:root {
    --uva-blue: #1B2A4A;
    --uva-blue-dark: #0F1729;
    --uva-orange: #3A6EA5;
    --uva-cyan: #009FDF;
    --uva-gray: #EDF2F9;
    --white: #ffffff;
    --text: #1A1D26;
    --text-gray: #5F6776;
    --border: #C9D5E3;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--uva-gray); color: var(--text); line-height: 1.5;
}
a { color: var(--uva-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.top-nav {
    background: var(--uva-blue); padding: 0 2rem;
    display: flex; align-items: center; height: 56px; gap: 2rem;
}
.nav-brand a { color: var(--uva-orange); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-user { margin-left: auto; color: rgba(255,255,255,0.7); font-size: 0.85rem; display: flex; gap: 1rem; align-items: center; }
.nav-user a { color: var(--uva-orange); text-decoration: none; }
.nav-user-name { color: rgba(255,255,255,0.9); font-weight: 500; }

/* Content */
.content { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { color: var(--uva-blue); font-size: 1.5rem; }

/* Portal greeting — hero style */
.portal-header {
    background: #FFFFFF;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(15,23,41,0.06);
}
.portal-greeting h1 {
    color: #1B2A4A; font-size: 1.35rem; font-weight: 700;
    letter-spacing: -0.01em;
}
.portal-subtitle {
    color: #5F6776; font-size: 0.875rem; margin-top: 0.25rem;
}

/* Service cards — Legislative Tracker style */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.service-card-link { text-decoration: none; color: inherit; }
.service-card-link:hover { text-decoration: none; }

.portal-service-card {
    background: #E1EAF5;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15,23,41,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}
.portal-service-card:hover {
    box-shadow: 0 2px 8px rgba(15,23,41,0.08);
    transform: translateY(-2px);
}

.portal-card-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 0.75rem;
    background: rgba(58,110,165,0.1); color: #3A6EA5;
}

.portal-card-body { flex: 1; }
.portal-card-body h3 {
    color: #1B2A4A; font-size: 1rem; font-weight: 650;
    margin-bottom: 0.3rem;
}
.portal-card-body p {
    color: #5F6776; font-size: 0.8125rem; line-height: 1.5;
}

.portal-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: auto; padding-top: 0.75rem;
    border-top: 1px solid #C3D5E8;
}
.portal-role-badge {
    display: inline-block; padding: 0.15rem 0.6rem; border-radius: 10px;
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #D8E3F0; color: #3A6EA5;
}
.portal-card-action.btn {
    background: #3A6EA5; color: #fff; font-size: 0.75rem;
    padding: 0.25rem 0.75rem; border-radius: 6px; font-weight: 500;
}
.portal-card-action.btn:hover { background: #2D5A8A; }

.portal-empty {
    grid-column: 1 / -1; text-align: center; padding: 3rem;
    color: #5F6776; background: #E1EAF5; border: 1px solid #C3D5E8;
    border-radius: 12px;
}
.portal-admin-hint {
    text-align: center; margin-top: 1.5rem; padding: 1rem;
    font-size: 0.8125rem; color: #5F6776;
}
.portal-admin-hint a { color: #3A6EA5; font-weight: 500; }
.portal-admin-hint a:hover { text-decoration: underline; }

/* Profile grid */
.profile-grid { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; }
.profile-card h2, .profile-sidebar h2 { color: var(--uva-blue); font-size: 1.1rem; margin-bottom: 1rem; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--white); border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-meta { font-size: 0.8rem; color: var(--text-gray); }
.stats-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: 10px; padding: 1rem; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--uva-blue); }
.stat-accent { color: var(--uva-orange); }
.stat-label { font-size: 0.8rem; color: var(--text-gray); margin-top: 0.25rem; }

/* Admin service grid */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.service-card {
    background: #E1EAF5; border-radius: 12px; padding: 1.25rem;
    border: 1px solid #C3D5E8; border-left: 4px solid #3A6EA5;
    display: flex; flex-direction: column; min-height: 140px;
    box-shadow: 0 1px 2px rgba(15,23,41,0.04);
}
.service-active { border-left-color: #28a745; }
.service-inactive { border-left-color: #dc3545; opacity: 0.7; }
.svc-card-content { flex: 1; }
.svc-card-actions {
    display: flex; align-items: center; gap: 0.5rem;
    margin-top: 0.75rem; padding-top: 0.75rem;
    border-top: 1px solid #C3D5E8;
}

/* Stacked service pills in users table */
.service-pills-stack {
    display: flex; flex-direction: column; gap: 0.3rem;
    align-items: flex-start;
}

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--uva-blue); color: white; padding: 0.6rem 0.75rem; text-align: left; font-weight: 500; }
td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(0,159,223,0.03); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; text-decoration: none; transition: all 0.15s; }
.btn-primary { background: var(--uva-orange); color: white; }
.btn-primary:hover { background: #cc6600; text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--uva-cyan); }
.btn-danger { background: #dc3545; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.3rem; color: var(--text-gray); }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"],
.form-group textarea, .form-group select {
    width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--uva-cyan); box-shadow: 0 0 0 2px rgba(0,159,223,0.15); }

/* Badges */
.status-badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.category-tag { display: inline-block; background: #e3f2fd; color: #1565c0; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.tag-admin { background: #fff3cd; color: #856404; }

/* Flash */
.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-info { background: #e3f2fd; color: #1565c0; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: var(--white); border-radius: 12px; padding: 1.5rem; width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

/* Passkey & info rows */
.passkey-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.passkey-row:last-child { border-bottom: none; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }

/* Login page */
.login-body { background: linear-gradient(135deg, #1B2A4A 0%, #0F1729 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 420px; padding: 1rem; }
.login-card { background: var(--white); border-radius: 12px; padding: 2rem; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 1.5rem; }
.login-header h1 { color: var(--uva-blue); font-size: 1.4rem; }
.login-subtitle { color: var(--text-gray); font-size: 0.9rem; margin-top: 0.25rem; }
.login-service { color: var(--uva-orange); font-size: 0.85rem; margin-top: 0.5rem; }
.login-divider { display: flex; align-items: center; margin: 1.25rem 0; gap: 1rem; color: var(--text-gray); font-size: 0.85rem; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-passkey { background: var(--uva-blue); color: white; padding: 0.65rem 1rem; font-weight: 500; }
.btn-passkey:hover { background: var(--uva-blue-dark); }
.login-footer { text-align: center; color: rgba(255,255,255,0.5); font-size: 0.8rem; margin-top: 1.5rem; }

/* Footer */
.site-footer { text-align: center; padding: 1.5rem; color: var(--text-gray); font-size: 0.8rem; }


/* ============================================
   DROPDOWN MENU
   ============================================ */
.user-dropdown { position: relative; }
.dropdown-trigger {
    display: flex; align-items: center; gap: 0.5rem;
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.9); padding: 0.25rem 0.5rem;
    border-radius: 8px; transition: background 0.2s;
}
.dropdown-trigger:hover, .dropdown-trigger.active {
    background: rgba(255,255,255,0.1);
}
.nav-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    overflow: hidden; background: var(--uva-orange);
    display: flex; align-items: center; justify-content: center;
}

.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
    color: white; font-weight: 600; font-size: 0.85rem;
}
.dropdown-arrow {
    transition: transform 0.2s; opacity: 0.7;
}
.dropdown-trigger.active .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: white; border-radius: 12px; min-width: 260px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); border: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.2s ease; z-index: 1000;
}
.dropdown-menu.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-header {
    padding: 1rem; display: flex; align-items: center; gap: 0.75rem;
}
.dropdown-avatar {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    background: var(--uva-orange); display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.avatar-img-lg { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials-lg { color: white; font-weight: 600; font-size: 1.1rem; }

.dropdown-user-info {
    display: flex; flex-direction: column;
}
.dropdown-user-info strong {
    color: var(--uva-blue); font-size: 0.9rem;
}
.dropdown-user-info span {
    color: var(--text-gray); font-size: 0.75rem;
}
.dropdown-divider {
    height: 1px; background: var(--border); margin: 0.25rem 0;
}
.dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 1rem; color: var(--text); font-size: 0.85rem;
    text-decoration: none; transition: background 0.15s;
}
.dropdown-item:hover {
    background: var(--uva-gray); text-decoration: none;
}
.dropdown-item-danger { color: #c0392b; }
.dropdown-item-danger:hover { background: #fdf0ef; }
.dropdown-icon { font-size: 1rem; width: 20px; text-align: center; }

/* ============================================
   RICH PROFILE PAGE
   ============================================ */
.profile-layout {
    display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem;
}
@media (max-width: 768px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-avatar-card { text-align: center; padding: 2rem 1.5rem; }
.avatar-upload-area {
    position: relative; width: 120px; height: 120px;
    margin: 0 auto 1rem; border-radius: 50%; overflow: hidden;
    cursor: pointer;
}
.profile-photo-lg {
    width: 100%; height: 100%; object-fit: cover;
}
.profile-photo-placeholder {
    width: 100%; height: 100%; background: var(--uva-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: white; font-weight: 600;
}
.avatar-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6); color: white; padding: 0.4rem;
    font-size: 0.75rem; text-align: center;
    opacity: 0; transition: opacity 0.2s;
}
.avatar-upload-area:hover .avatar-overlay { opacity: 1; }
.profile-name {
    color: var(--uva-blue); font-size: 1.2rem; margin-bottom: 0.25rem;
}
.profile-title-text { color: var(--text-gray); font-size: 0.9rem; }
.profile-org-text { color: var(--text-gray); font-size: 0.85rem; margin-top: 0.15rem; }
.card-section-title {
    color: var(--uva-blue); font-size: 1.05rem; margin-bottom: 1rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--uva-gray);
}

.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
textarea {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
    border-radius: 6px; font-family: inherit; font-size: 0.9rem;
    resize: vertical;
}
textarea:focus {
    outline: none; border-color: var(--uva-cyan);
    box-shadow: 0 0 0 3px rgba(0,159,223,0.1);
}

/* Passkey rows */
.passkey-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 0; border-bottom: 1px solid var(--uva-gray);
}
.passkey-row:last-of-type { border-bottom: none; }

/* TOTP */
.totp-status { padding: 1rem; border-radius: 8px; }
.totp-enabled { background: #eafaf1; border: 1px solid #27ae60; }
.totp-badge {
    display: inline-block; background: #27ae60; color: white;
    padding: 0.2rem 0.75rem; border-radius: 12px; font-size: 0.8rem;
    font-weight: 600; margin-bottom: 0.5rem;
}
.totp-setup { margin-top: 1rem; text-align: center; }
.totp-qr { max-width: 200px; margin: 1rem auto; display: block; }

.totp-verify-row {
    display: flex; gap: 0.5rem; align-items: center;
    justify-content: center; margin-top: 0.5rem;
}
.totp-input {
    width: 120px; text-align: center; font-size: 1.2rem;
    letter-spacing: 0.3rem; padding: 0.5rem;
    border: 2px solid var(--border); border-radius: 8px;
}
.totp-input:focus {
    border-color: var(--uva-cyan);
    outline: none;
}

/* Password strength */
.password-strength {
    font-size: 0.8rem; font-weight: 600; margin-top: 0.25rem;
    min-height: 1.2em;
}

/* Info rows */
.info-row {
    display: flex; justify-content: space-between;
    padding: 0.5rem 0; border-bottom: 1px solid var(--uva-gray);
    font-size: 0.9rem;
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--text-gray); }

/* === Legislative Tracker-style header === */
header {
    background-color: #0F1729;
    color: #fff;
    padding: 0 32px;
    height: 52px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-content {
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: #fff;
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.main-nav a.active { color: #fff; background: rgba(255,255,255,0.12); }

/* User menu in header */
.user-menu { position: relative; }
.user-menu-trigger {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    border: none; background: none; color: #fff;
}
.user-menu-trigger:hover { background: rgba(255,255,255,0.08); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.15);
}
.user-avatar-initials {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--uva-orange); display: flex; align-items: center;
    justify-content: center; font-size: 0.75rem; font-weight: 600;
    color: #fff; border: 2px solid rgba(255,255,255,0.15);
}
.user-dropdown {
    display: none; position: absolute; right: 0; top: calc(100% + 6px);
    background: #fff; border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 10px 15px -3px rgba(15,23,41,0.08), 0 4px 6px rgba(15,23,41,0.04);
    min-width: 240px; z-index: 200; overflow: hidden;
}
.user-dropdown.open { display: block; }
.user-dropdown-header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 12px;
}
.user-dropdown-header .name { font-weight: 600; font-size: 0.8125rem; color: #1A1D26; }
.user-dropdown-header .role { font-size: 0.75rem; color: #5F6776; }
.user-dropdown-section { padding: 4px 0; }
.user-dropdown-section + .user-dropdown-section { border-top: 1px solid var(--border); }
.user-dropdown-label {
    padding: 8px 16px 4px; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; color: #8B919E;
}
.user-dropdown a {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; font-size: 0.8125rem; color: #5F6776;
    text-decoration: none; transition: all 0.15s;
}
.user-dropdown a:hover { background: #E4ECF5; color: #1A1D26; text-decoration: none; }
.dropdown-icon { width: 16px; text-align: center; font-size: 0.8125rem; opacity: 0.6; }

/* Container override for auth hub */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Trigger user name + title */
.trigger-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    margin-right: 4px;
}
.trigger-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}
.trigger-title {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.55);
    font-weight: 400;
}

/* === Admin User Detail Page === */
.detail-hero {
    background: #FFFFFF;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(15,23,41,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.detail-hero h1 {
    color: #1B2A4A; font-size: 1.25rem; font-weight: 700;
    letter-spacing: -0.01em;
}
.detail-hero .hero-sub {
    color: #5F6776; font-size: 0.8125rem; margin-top: 0.15rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

.detail-card {
    background: #FFFFFF;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(15,23,41,0.04);
}
.detail-card h3 {
    color: #1B2A4A; font-size: 0.9375rem; font-weight: 650;
    margin-bottom: 1rem; padding-bottom: 0.5rem;
    border-bottom: 2px solid #C3D5E8;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 500px) {
    .form-row { grid-template-columns: 1fr; }
}

.toggle-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid #E5E7EB;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row label {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.875rem; font-weight: 500; color: #1B2A4A;
    cursor: pointer; flex: 1;
}
.toggle-row .toggle-desc {
    font-size: 0.75rem; color: #5F6776; font-weight: 400;
}

.svc-access-row {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid #E5E7EB;
}
.svc-access-row:last-child { border-bottom: none; }
.svc-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; background: rgba(58,110,165,0.1); flex-shrink: 0;
}
.svc-info { flex: 1; }
.svc-name { font-size: 0.875rem; font-weight: 600; color: #1B2A4A; }
.svc-role-select {
    padding: 0.3rem 0.5rem; border: 1px solid #C9D5E3;
    border-radius: 6px; font-size: 0.8125rem; background: #F5F8FC;
}

.passkey-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid #E5E7EB;
}
.passkey-item:last-child { border-bottom: none; }
.passkey-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; background: #EDE9FE; color: #7C3AED; flex-shrink: 0;
}
.passkey-info { flex: 1; }
.passkey-name { font-size: 0.875rem; font-weight: 500; color: #1B2A4A; }
.passkey-meta { font-size: 0.75rem; color: #5F6776; }

.form-actions {
    display: flex; gap: 0.75rem; justify-content: flex-end;
    margin-top: 1.5rem; padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}


/* ============================================
   ADMIN DASHBOARD REDESIGN
   ============================================ */
.admin-hero {
    background: #FFFFFF;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(15,23,41,0.06);
}
.admin-hero h1 {
    color: #1B2A4A; font-size: 1.35rem; font-weight: 700;
    letter-spacing: -0.01em;
}
.admin-hero-sub {
    color: #5F6776; font-size: 0.875rem; margin-top: 0.25rem;
}

/* User cards grid */
.user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.user-card {
    background: #FFFFFF;
    border: 1px solid #C3D5E8;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(15,23,41,0.04);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.user-card:hover {
    box-shadow: 0 4px 12px rgba(15,23,41,0.08);
    transform: translateY(-1px);
}
.user-card-header {
    display: flex; align-items: center; gap: 0.75rem;
}
.user-avatar-circle {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem; flex-shrink: 0;
    color: #fff;
}

.user-card-info { flex: 1; min-width: 0; }
.user-card-name {
    font-size: 0.95rem; font-weight: 650; color: #1B2A4A;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-name a {
    color: #1B2A4A; text-decoration: none;
}
.user-card-name a:hover { color: #3A6EA5; text-decoration: none; }
.user-card-username {
    font-size: 0.75rem; color: #5F6776;
}
.user-card-email {
    font-size: 0.75rem; color: #5F6776;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-card-body {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    align-items: center;
}
.user-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 0.65rem; border-top: 1px solid #E5EBF3;
    margin-top: auto;
}
.user-card-meta {
    font-size: 0.7rem; color: #8B919E;
}

/* Badges & pills for user cards */
.badge-role {
    display: inline-block; padding: 0.15rem 0.55rem;
    border-radius: 10px; font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-role-admin { background: #FEF3C7; color: #92400E; }
.badge-role-user { background: #DBEAFE; color: #1E40AF; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-disabled { background: #FEE2E2; color: #991B1B; }
.svc-pill {
    display: inline-block; padding: 0.12rem 0.45rem;
    border-radius: 4px; font-size: 0.6875rem; font-weight: 500;
    background: #E0ECFA; color: #1E3A5F;
}
.svc-pill-admin { background: #FEF3C7; color: #92400E; }
.passkey-count {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.6875rem; color: #7C3AED;
    background: #EDE9FE; padding: 0.12rem 0.45rem;
    border-radius: 4px; font-weight: 500;
}
.user-card-actions {
    display: flex; gap: 0.4rem;
}
