/* --- THIS IS THE FIX --- */
/* Pushes all account page content down below the fixed header */
body.account-page-body {
    padding-top: 120px;
}
/* --- END FIX --- */
/* This adds the missing space between the content and the footer */
main.nexus-container {
    margin-bottom: 50px;
}
/* =================================================================== */
/* --- ACCOUNT PAGE: "SPOKE" PAGE STYLES --- */
/* =================================================================== */

.account-spoke-page {
    width: 100%;
    max-width: 1200px; /* Spoke pages can be a bit wider */
    margin: 0 auto;
}

.account-spoke-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 25px;
}

.spoke-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px 10px 10px;
    border-radius: 6px;
}
.spoke-back-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.spoke-back-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.spoke-header-title h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}
.spoke-header-title p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* --- Spoke Card Grid & Base --- */
.spoke-card-grid {
    display: grid;
    gap: 25px;
}
/* 2-column layout */
.spoke-card-grid.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 3-column layout */
.spoke-card-grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.spoke-card {
    background: rgba(15, 17, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.spoke-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.spoke-card .card-header svg {
    width: 20px;
    height: 20px;
    color: #4a90e2;
    flex-shrink: 0;
}
.spoke-card .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}
.spoke-card .card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between rows */
}

/* --- Spoke Card Internal Components --- */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.spoke-card .card-body .setting-row:first-child {
    padding-top: 0;
}
.spoke-card .card-body .setting-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 15px;
}
.setting-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
}
.setting-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}
.setting-divider-title {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-weight: 500;
    margin-top: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Action Button (e.g., "Change", "Manage") */
.action-btn {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex-shrink: 0;
}
.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.action-btn.primary {
    background-color: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}
.action-btn.primary:hover {
    background-color: #5aa1f2;
    border-color: #5aa1f2;
}
.action-btn.danger {
    background-color: transparent;
    color: #f56c6c;
    border-color: #f56c6c;
}
.action-btn.danger:hover {
    background-color: rgba(245, 108, 108, 0.1);
    color: #f78989;
}
.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Toggle Switch (for PIN) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 28px;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}
input:checked + .slider {
    background-color: #4a90e2;
}
input:checked + .slider:before {
    transform: translateX(22px);
}
input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Responsive for Spoke Grid --- */
/* Tablet */
@media (max-width: 900px) {
    .spoke-card-grid.grid-cols-3 {
        /* Switch to 2 columns */
        grid-template-columns: repeat(2, 1fr);
    }
    .spoke-card-grid.grid-cols-2 {
        /* Switch to 1 column */
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .spoke-card-grid.grid-cols-3,
    .spoke-card-grid.grid-cols-2 {
        /* Switch to 1 column */
        grid-template-columns: 1fr;
    }
}

/* =================================================================== */
/* --- MODAL STYLES (Refreshed: Glassy Blue & Centered) --- */
/* =================================================================== */

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 15, 0.85); /* Darker dim for focus */
    backdrop-filter: blur(5px); /* Standard blur */
    z-index: 2147483647; /* Max Z-Index to ensure it stays on top of header/nav */
    display: flex;
    align-items: center; /* Vertical Center */
    justify-content: center; /* Horizontal Center */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.custom-modal-content {
    /* --- NOTIFICATION CENTER THEME --- */
    background: rgba(21, 24, 38, 0.95); /* Glassy Blue-Black */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.3); /* Blue Border */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    
    /* Sizing & Animation */
    width: 90%;
    max-width: 450px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Animate in */
.custom-modal-overlay.is-visible .custom-modal-content {
    transform: translateY(0) scale(1);
}

/* --- Header --- */
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2); /* Blue Separator */
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close-btn:hover {
    color: #fff;
}

/* --- Body --- */
.custom-modal-body {
    padding: 20px;
    color: #f1f1f1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-modal-body .dossier-form-section {
    margin-bottom: 0;
}

.dossier-form-intro {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: -5px 0 25px;
    text-align: center;
}

/* --- Footer --- */
.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(74, 144, 226, 0.2); /* Blue Separator */
    background: rgba(0, 0, 0, 0.2); /* Slightly darker footer */
    border-radius: 0 0 8px 8px;
}

/* --- Form Elements (Preserved & Themed) --- */
.visually-hidden-username {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-field-interactive {
    margin-bottom: 20px;
}
.form-field-interactive label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Unified Input Styles for Modal */
.custom-modal-content input[type="text"],
.custom-modal-content input[type="email"], 
.custom-modal-content input[type="password"],
.form-field-interactive input,
#email-change-form .dossier-input {
    width: 100%;
    padding: 10px 12px;
    /* Padding adjustment for icon inputs */
    padding-left: 12px; 
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Specific padding override for inputs with icons */
.input-wrapper input {
    padding-left: 40px !important;
}

.custom-modal-content input:focus,
.form-field-interactive input:focus,
#email-change-form .dossier-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

/* --- Password Toggles & Strength (Preserved) --- */
.password-toggle-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: rgba(255, 255, 255, 0.6);
}
.password-toggle-btn svg { width: 20px; height: 20px; }
.password-toggle-btn .icon-eye-closed { display: none; }

#password-strength-container {
    margin: -10px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.strength-bar-wrapper {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}
.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}
.strength-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    width: 60px;
    text-align: right;
}
.strength-bar.weak { background-color: #f56c6c; }
.strength-bar.medium { background-color: #e6a23c; }
.strength-bar.strong { background-color: #67c23a; }

.password-checklist {
    list-style: none;
    padding: 0;
    margin: -5px 0 20px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}
.password-checklist li {
    padding-left: 20px;
    position: relative;
    transition: color 0.3s ease;
}
.password-checklist li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-weight: bold;
    transition: color 0.3s ease;
}
.password-checklist li.valid { color: #67c23a; }
.password-checklist li.valid::before { content: '●'; color: #67c23a; }

.confirm-status-icon {
    position: absolute;
    right: 15px;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.confirm-status-icon.valid::before { content: '✓'; color: #67c23a; font-size: 1.5rem; }
.confirm-status-icon.invalid::before { content: '✗'; color: #f56c6c; font-size: 1.5rem; }
.confirm-status-icon.visible { opacity: 1; transform: scale(1); }

/* --- Buttons inside Modal --- */
#password-change-form button[type="submit"],
#email-change-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #4a90e2;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
}
#password-change-form button[type="submit"]:disabled {
    background-color: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.3);
    opacity: 0.6;
    cursor: not-allowed;
}
#email-change-form button[type="submit"]:hover {
    background-color: #5aa1f2;
}

/* --- Static Fields & Alerts --- */
.form-field-static {
    padding: 10px 0;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2); /* Updated border color */
}
.form-field-static .field-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}
.form-field-static .field-value {
    font-size: 1rem;
    color: #fff;
    display: block;
    margin-top: 4px;
    font-weight: bold;
}

.system-alert {
    padding: 12px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.7);
    color: #fcc;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}
.system-alert.hidden {
    display: none;
}

/* --- [NEW] System Alert Banner (for PIN Promo) --- */
.system-alert-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid;
}
.system-alert-banner.info {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.5);
    color: #a9cff8;
}
.system-alert-banner svg {
    width: 24px;
    height: 24px;
    color: #4a90e2;
    flex-shrink: 0;
}
.system-alert-banner .alert-content {
    flex-grow: 1;
}
.system-alert-banner .alert-content strong {
    display: block;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}
.system-alert-banner .alert-content span {
    font-size: 0.9rem;
}
.system-alert-banner .action-btn {
    flex-shrink: 0;
}
.system-alert-banner.hidden {
    display: none;
}


/* =================================================================== */
/* --- [NEW] PIN Verification Overlay & Modal (Advanced & Interactive) --- */
/* =================================================================== */

.pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 6, 10, 0.85); /* Darker, sleeker dim */
    backdrop-filter: blur(12px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.pin-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.pin-modal-container {
    background: rgba(21, 24, 38, 0.6); /* Glassy background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 40px 30px;
    text-align: center;
    transform: scale(0.95) translateY(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(20px);
}
.pin-overlay.is-active .pin-modal-container {
    transform: scale(1) translateY(0);
}

.pin-modal-container h3 {
    margin: 10px 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}
.pin-modal-container p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 30px 0;
}

/* Back Button */
.pin-modal-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.pin-modal-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateX(-2px);
}

/* --- PIN Inputs --- */
.pin-input-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.pin-input {
    width: 60px;
    height: 70px;
    font-size: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    transition: all 0.2s ease;
    caret-color: #4a90e2;
    /* Hide browser default styling */
    -moz-appearance: textfield;
}
.pin-input::-webkit-outer-spin-button,
.pin-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Focus State */
.pin-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
    transform: translateY(-2px);
}

/* Filled State (Optional styling for when numbers are entered) */
.pin-input:not(:placeholder-shown) {
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- States (Success / Error / Loading) --- */

/* Loading: Inputs pulse */
.pin-input-group.loading .pin-input {
    border-color: #4a90e2;
    color: transparent; /* Hide numbers during load if desired, or keep visible */
    animation: pulse-blue 1.5s infinite;
    pointer-events: none;
}

/* Success: Green Glow */
.pin-input-group.success .pin-input {
    border-color: #67c23a;
    background: rgba(103, 194, 58, 0.1);
    box-shadow: 0 0 20px rgba(103, 194, 58, 0.4);
    transform: scale(1.05);
}

/* Error: Red Shake */
.pin-input-group.error {
    animation: shake 0.4s ease-in-out;
}
.pin-input-group.error .pin-input {
    border-color: #f56c6c;
    background: rgba(245, 108, 108, 0.1);
    box-shadow: 0 0 15px rgba(245, 108, 108, 0.3);
}

/* --- Password Input (Fallback) --- */
.pin-password-wrapper {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}
.pin-password-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-align: left; /* Changed from center to left for better alignment */
    box-sizing: border-box; /* Ensures padding doesn't break width */
}
.pin-password-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.pin-password-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
}

/* --- Actions --- */
.pin-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 40px; /* Reserve space */
}

/* "Unlock" button is visually hidden for PIN mode but kept for Password mode logic if needed */
.pin-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #4a90e2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pin-submit-btn:hover {
    background: #5aa1f2;
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}
.pin-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}
.pin-submit-btn.hidden {
    display: none; /* CSS class to hide button in JS */
}

.pin-forgot-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s;
}
.pin-forgot-btn:hover {
    color: #fff;
    text-decoration: underline;
}

/* Status Text (Loading/Error messages below inputs) */
.pin-status-text {
    height: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s;
}
.pin-status-text.visible { opacity: 1; }
.pin-status-text.error { color: #f56c6c; }
.pin-status-text.success { color: #67c23a; }
.pin-status-text.loading { color: #4a90e2; }

/* --- Animations --- */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(74, 144, 226, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* =================================================================== */
/* --- NEW: HORIZONTAL PASSKEY SLOT SYSTEM (Optimized for 3-Col) --- */
/* =================================================================== */

/* 1. The Grid Container */
.passkey-slot-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Exactly 5 columns */
    gap: 8px; /* Reduced gap (was 15px) to fit narrow cards */
    margin-top: 15px;
    margin-bottom: 10px;
}

/* 2. The Slot Card (Base) */
.passkey-slot {
    aspect-ratio: 1 / 1; /* Perfect Square */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px; /* Slightly tighter curves */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: all 0.2s ease;
    padding: 5px; /* Reduced padding (was 10px) */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 3. Active Slot (Has Data) */
.passkey-slot.is-active {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.3);
    cursor: pointer;
}

.passkey-slot.is-active:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #4a90e2;
}

/* 4. Empty Slot */
.passkey-slot.is-empty {
    border-style: dashed;
    opacity: 0.5;
}

/* 5. Slot Content */
.passkey-slot-icon {
    font-size: 20px; /* Reduced icon size (was 24px) */
    color: #4a90e2;
    margin-bottom: 4px;
}

.passkey-slot.is-empty .passkey-slot-icon {
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px; /* Smaller plus icon */
}

.passkey-slot-name {
    font-size: 0.7rem; /* Smaller text (was 0.8rem) */
    font-weight: 500;
    color: #fff;
    line-height: 1.1;
    width: 100%;
    
    /* Truncate long names */
    white-space: nowrap; /* Force single line */
    overflow: hidden;
    text-overflow: ellipsis;
}

.passkey-slot.is-empty .passkey-slot-name {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.65rem;
}

/* Responsive: Mobile Stack */
@media (max-width: 600px) {
    .passkey-slot-grid {
        grid-template-columns: repeat(5, 1fr); /* Keep 5 even on mobile, just smaller */
        gap: 5px;
    }
    .passkey-slot-name {
        font-size: 0.6rem; /* Tiny text for mobile */
    }
}

/* --- Modal Specifics for Passkey Details --- */
.pk-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}
.pk-detail-label {
    color: rgba(255,255,255,0.6);
}
.pk-detail-value {
    color: #fff;
    font-weight: 500;
}

/* --- Passkey Icon Selector --- */
.pk-icon-selector-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    display: block;
}

.pk-icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 8 Icons */
    gap: 8px;
    margin-bottom: 20px;
}

.pk-icon-option {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
}

.pk-icon-option:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pk-icon-option.selected {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
    color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.2);
}

.pk-icon-option span {
    font-size: 20px;
}

/* Responsive tweaks for narrow screens */
@media (max-width: 450px) {
    .pk-icon-grid {
        grid-template-columns: repeat(4, 1fr); /* Wrap to 2 rows */
    }
}

/* --- Masked Input State --- */
.pin-input.is-masked {
    font-family: 'Courier New', monospace; /* Ensures asterisk is standard */
    font-size: 2.5rem; /* Make asterisk slightly larger */
    padding-top: 10px; /* Optical alignment for asterisk */
    color: #4a90e2; /* Blue tint when masked */
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
}



/* --- Body Scroll Lock for PIN Modal --- */
body.pin-scroll-lock {
    overflow: hidden !important;
    height: 100vh;       /* Locks height to viewport */
    touch-action: none;  /* Disables touch scrolling on mobile */
    padding-right: 0px;  /* Optional: Adjust if scrollbar removal causes layout shift */
}

