/* =========================================================
   identity.css — Score Auto Parts Identity / Account Pages
   ========================================================= */

/* ----------------------------------------------------------
   Variables
   ---------------------------------------------------------- */
:root {
    --id-green:       #1a6b3c;
    --id-green-dark:  #0f4526;
    --id-green-light: #e6f4ec;
    --id-green-mid:   #4d9967;
    --id-amber:       #b45309;
    --id-amber-bg:    #fdf3dc;
    --id-danger:      #991b1b;
    --id-danger-bg:   #fef2f2;

    --id-bg:          #f4f4f2;
    --id-surface:     #ffffff;
    --id-border:      rgba(0,0,0,0.09);
    --id-border-mid:  rgba(0,0,0,0.14);

    --id-text:        #1a1a1a;
    --id-text-2:      #4a4a4a;
    --id-text-3:      #888;

    --id-r-sm:        6px;
    --id-r-md:        10px;
    --id-r-lg:        14px;

    --id-shadow:      0 2px 14px rgba(0,0,0,0.07);
}

/* ----------------------------------------------------------
   Auth page — full-page centered layout
   ---------------------------------------------------------- */
.id-page {
    min-height: 100vh;
    background: var(--id-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.id-logo {
    width: 110px;
    height: auto;
    margin-bottom: 1.75rem;
}

.id-heading {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--id-text);
    text-align: center;
    margin: 0 0 1.5rem;
}

/* ----------------------------------------------------------
   Card (auth form wrapper)
   ---------------------------------------------------------- */
.id-card {
    background: var(--id-surface);
    border: 0.5px solid var(--id-border-mid);
    border-radius: var(--id-r-lg);
    padding: 28px 32px 24px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--id-shadow);
}

/* ----------------------------------------------------------
   Alerts / banners
   ---------------------------------------------------------- */
.id-alert {
    border-radius: var(--id-r-md);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
}

.id-alert strong {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}

.id-alert-success {
    background: var(--id-green-light);
    border: 0.5px solid rgba(26,107,60,0.22);
    color: var(--id-green-dark);
}

.id-alert-warning {
    background: var(--id-amber-bg);
    border: 0.5px solid rgba(180,83,9,0.22);
    color: var(--id-amber);
}

.id-alert-danger {
    background: var(--id-danger-bg);
    border: 0.5px solid rgba(153,27,27,0.2);
    color: var(--id-danger);
}

/* ----------------------------------------------------------
   Info block (password requirements etc.)
   ---------------------------------------------------------- */
.id-info {
    background: var(--id-green-light);
    border: 0.5px solid rgba(26,107,60,0.18);
    border-radius: var(--id-r-md);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--id-green-dark);
    line-height: 1.55;
}

.id-info ul {
    margin: 6px 0 0;
    padding-left: 18px;
    line-height: 1.9;
}

/* ----------------------------------------------------------
   Form elements
   ---------------------------------------------------------- */
.id-form-group {
    margin-bottom: 13px;
}

.id-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--id-text-3);
    margin-bottom: 5px;
}

.id-input {
    display: block;
    width: 100%;
    padding: 10px 13px;
    border: 0.5px solid var(--id-border-mid);
    border-radius: var(--id-r-sm);
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    color: var(--id-text);
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

.id-input:focus {
    outline: none;
    border-color: var(--id-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,107,60,0.08);
}

.id-input[readonly],
.id-input:disabled {
    opacity: 0.6;
    background: #f0f0ee;
    cursor: default;
}

.id-input::placeholder {
    color: #bbb;
}

/* Checkbox row (remember me etc.) */
.id-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 16px;
    font-size: 12px;
    color: var(--id-text-2);
}

.id-check-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 11px;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.id-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    background: var(--id-green);
    color: #fff;
    border: none;
    border-radius: var(--id-r-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    margin-top: 20px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.id-btn:hover {
    background: var(--id-green-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,107,60,0.18);
}

.id-btn:active {
    transform: translateY(0);
}

.id-btn-secondary {
    display: inline-block;
    padding: 9px 18px;
    background: transparent;
    color: var(--id-green);
    border: 0.5px solid rgba(26,107,60,0.35);
    border-radius: var(--id-r-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.id-btn-secondary:hover {
    background: var(--id-green-light);
    border-color: var(--id-green);
    color: var(--id-green-dark);
}

/* ----------------------------------------------------------
   Footer links (below forms)
   ---------------------------------------------------------- */
.id-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 12px;
    color: var(--id-text-3);
    letter-spacing: 0.04em;
}

.id-footer p {
    margin: 0 0 6px;
    text-transform: uppercase;
    font-weight: 500;
}

.id-link {
    color: var(--id-green);
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    font-size: 12px;
    text-transform: uppercase;
    transition: color 0.15s;
}

.id-link:hover {
    color: var(--id-green-dark);
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Recovery codes display
   ---------------------------------------------------------- */
.id-codes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 16px 0;
}

.id-code {
    font-family: monospace;
    font-size: 14px;
    background: var(--id-bg);
    border: 0.5px solid var(--id-border);
    border-radius: var(--id-r-sm);
    padding: 8px 12px;
    color: var(--id-text);
    letter-spacing: 0.08em;
}

/* ----------------------------------------------------------
   QR code block
   ---------------------------------------------------------- */
.id-qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--id-bg);
    border-radius: var(--id-r-md);
    margin: 16px 0;
}

.id-shared-key {
    font-family: monospace;
    font-size: 13px;
    background: var(--id-surface);
    border: 0.5px solid var(--id-border-mid);
    border-radius: var(--id-r-sm);
    padding: 8px 12px;
    letter-spacing: 0.12em;
    color: var(--id-text);
    word-break: break-all;
    text-align: center;
}

/* ----------------------------------------------------------
   Manage layout — sidebar + content
   ---------------------------------------------------------- */
.id-shell {
    display: flex;
    min-height: 100vh;
    background: var(--id-bg);
}

.id-sidebar {
    width: 224px;
    background: var(--id-surface);
    border-right: 0.5px solid var(--id-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.id-sidebar-logo {
    padding: 20px 18px 16px;
    border-bottom: 0.5px solid var(--id-border);
}

.id-sidebar-logo-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--id-text);
    letter-spacing: 0.02em;
}

.id-sidebar-logo-sub {
    font-size: 11px;
    color: var(--id-text-3);
    margin-top: 2px;
}

.id-sidebar-nav {
    padding: 12px 10px;
    flex: 1;
}

.id-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--id-text-3);
    padding: 6px 10px 4px;
    display: block;
}

.id-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--id-r-sm);
    font-size: 13px;
    color: var(--id-text-2);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.id-nav-item:hover {
    background: var(--id-bg);
    color: var(--id-text);
}

.id-nav-item.active {
    background: var(--id-green-light);
    color: var(--id-green);
    font-weight: 500;
}

.id-nav-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
}

.id-nav-item.active .id-nav-icon {
    opacity: 1;
}

.id-sidebar-footer {
    padding: 12px 10px;
    border-top: 0.5px solid var(--id-border);
}

/* ----------------------------------------------------------
   Manage — main content area
   ---------------------------------------------------------- */
.id-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.id-topbar {
    background: var(--id-surface);
    border-bottom: 0.5px solid var(--id-border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.id-topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--id-text);
    flex: 1;
}

.id-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--id-text-3);
}

.id-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--id-green-light);
    color: var(--id-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.id-content {
    padding: 24px;
    flex: 1;
}

.id-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--id-text);
    padding: 0;
}

/* ----------------------------------------------------------
   Manage — page header
   ---------------------------------------------------------- */
.id-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.id-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--id-text);
    letter-spacing: -0.01em;
}

.id-page-subtitle {
    font-size: 13px;
    color: var(--id-text-3);
    margin-top: 3px;
}

/* ----------------------------------------------------------
   Manage — card
   ---------------------------------------------------------- */
.id-m-card {
    background: var(--id-surface);
    border: 0.5px solid var(--id-border);
    border-radius: var(--id-r-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.id-m-card-header {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 0.5px solid var(--id-border);
    gap: 10px;
}

.id-m-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--id-text);
    flex: 1;
}

.id-m-card-count {
    font-size: 12px;
    color: var(--id-text-3);
    background: var(--id-bg);
    border-radius: 99px;
    padding: 2px 8px;
}

.id-m-card-body {
    padding: 18px;
}

/* ----------------------------------------------------------
   Manage — form elements
   ---------------------------------------------------------- */
.id-m-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.id-m-form-grid.cols-1 {
    grid-template-columns: 1fr;
}

.id-m-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.id-m-form-group.span-2 {
    grid-column: span 2;
}

.id-m-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--id-text-3);
}

.id-m-label .req {
    color: #e53e3e;
    margin-left: 2px;
}

.id-m-input {
    padding: 9px 12px;
    border: 0.5px solid var(--id-border-mid);
    border-radius: var(--id-r-sm);
    font-size: 13px;
    font-family: inherit;
    background: #fafafa;
    color: var(--id-text);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.id-m-input:focus {
    outline: none;
    border-color: var(--id-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,107,60,0.07);
}

.id-m-input[disabled] {
    opacity: 0.55;
    background: #f0f0ee;
}

.id-m-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.id-m-btn {
    padding: 8px 18px;
    background: var(--id-green);
    color: #fff;
    border: none;
    border-radius: var(--id-r-sm);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.id-m-btn:hover {
    background: var(--id-green-dark);
    color: #fff;
}

.id-m-btn-ghost {
    padding: 8px 18px;
    background: transparent;
    color: var(--id-text-2);
    border: 0.5px solid var(--id-border-mid);
    border-radius: var(--id-r-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
}

.id-m-btn-ghost:hover {
    background: var(--id-bg);
    border-color: rgba(0,0,0,0.2);
    color: var(--id-text);
}

.id-m-btn-danger {
    padding: 8px 18px;
    background: transparent;
    color: var(--id-danger);
    border: 0.5px solid rgba(153,27,27,0.3);
    border-radius: var(--id-r-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s;
}

.id-m-btn-danger:hover {
    background: var(--id-danger-bg);
    color: var(--id-danger);
}

/* ----------------------------------------------------------
   Manage — table
   ---------------------------------------------------------- */
.id-m-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.id-m-table th {
    padding: 9px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--id-text-3);
    border-bottom: 0.5px solid var(--id-border);
    background: var(--id-bg);
}

.id-m-table td {
    padding: 11px 16px;
    border-bottom: 0.5px solid var(--id-border);
    color: var(--id-text-2);
}

.id-m-table tr:last-child td {
    border-bottom: none;
}

.id-m-table tr:hover td {
    background: rgba(0,0,0,0.015);
}

/* ----------------------------------------------------------
   Manage — alert / status message
   ---------------------------------------------------------- */
.id-m-alert {
    border-radius: var(--id-r-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.id-m-alert-success {
    background: var(--id-green-light);
    border: 0.5px solid rgba(26,107,60,0.22);
    color: var(--id-green-dark);
}

.id-m-alert-danger {
    background: var(--id-danger-bg);
    border: 0.5px solid rgba(153,27,27,0.2);
    color: var(--id-danger);
}

/* ----------------------------------------------------------
   Manage — metrics row
   ---------------------------------------------------------- */
.id-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.id-metric-card {
    background: var(--id-surface);
    border: 0.5px solid var(--id-border);
    border-radius: var(--id-r-md);
    padding: 14px 16px;
}

.id-metric-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--id-text-3);
    margin-bottom: 6px;
}

.id-metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--id-text);
}

/* ----------------------------------------------------------
   Manage — section subheader
   ---------------------------------------------------------- */
.id-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--id-text-3);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 0.5px solid var(--id-border);
}

/* ----------------------------------------------------------
   Manage — pill
   ---------------------------------------------------------- */
.id-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.id-pill-success {
    background: var(--id-green-light);
    color: var(--id-green);
}

.id-pill-warning {
    background: var(--id-amber-bg);
    color: var(--id-amber);
}

.id-pill-danger {
    background: var(--id-danger-bg);
    color: var(--id-danger);
}

.id-pill-neutral {
    background: var(--id-bg);
    color: var(--id-text-3);
    border: 0.5px solid var(--id-border);
}

/* ----------------------------------------------------------
   Empty state
   ---------------------------------------------------------- */
.id-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--id-text-3);
}

.id-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--id-text-2);
    margin-bottom: 6px;
}

.id-empty-text {
    font-size: 13px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   Pagination (reuse in manage pages)
   ---------------------------------------------------------- */
.id-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-top: 0.5px solid var(--id-border);
    justify-content: center;
}

.id-pagination a,
.id-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: var(--id-r-sm);
    font-size: 12px;
    text-decoration: none;
    color: var(--id-text-2);
    border: 0.5px solid var(--id-border);
    background: var(--id-surface);
    transition: background 0.12s;
}

.id-pagination a:hover {
    background: var(--id-bg);
}

.id-pagination .current {
    background: var(--id-green);
    color: #fff;
    border-color: var(--id-green);
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .id-sidebar {
        position: fixed;
        left: -224px;
        z-index: 100;
        transition: left 0.2s;
        height: 100vh;
    }

    .id-sidebar.open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

    .id-sidebar-toggle {
        display: block;
    }

    .id-card {
        padding: 20px 18px;
    }

    .id-m-form-grid {
        grid-template-columns: 1fr;
    }

    .id-m-form-group.span-2 {
        grid-column: span 1;
    }

    .id-content {
        padding: 16px;
    }
}

/* ----------------------------------------------------------
   Live password checklist (shared: identity + customer portal)
   Rules mirror Program.cs PasswordOptions.
   ---------------------------------------------------------- */
.pw-checklist {
    border-radius: var(--id-r-md, 8px);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
    background: #f6f7f8;
    border: 0.5px solid rgba(0,0,0,0.08);
    color: #3a3a3a;
}

.pw-checklist-title {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2937;
}

.pw-checklist-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pw-checklist-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    color: #6b7280;
    transition: color 0.15s;
}

.pw-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #c4c7cc;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}

.pw-checklist-list li.pw-ok {
    color: #1a6b3c;
}

.pw-checklist-list li.pw-ok .pw-icon {
    border-color: #1a6b3c;
    background: #1a6b3c;
}

.pw-checklist-list li.pw-ok .pw-icon::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pw-checklist-list li.pw-miss {
    color: #991b1b;
}

.pw-checklist-list li.pw-miss .pw-icon {
    border-color: #991b1b;
    background: #fff;
}

.pw-checklist-list li.pw-miss .pw-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 6.5px;
    width: 8px;
    height: 2px;
    background: #991b1b;
    border-radius: 1px;
}

/* Theme tweak for the green identity info block look */
.pw-checklist.pw-theme-id {
    background: var(--id-green-light, #eaf4ee);
    border-color: rgba(26,107,60,0.18);
    color: var(--id-green-dark, #1a6b3c);
}

.pw-checklist.pw-theme-id .pw-checklist-title {
    color: var(--id-green-dark, #1a6b3c);
}
