:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.35);
    --sidebar-start: #081028;
    --sidebar-end: #0F172A;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: rgba(37, 99, 235, 0.22);
    --bg: #F5F7FB;
    --bg-gradient: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    --card: #FFFFFF;
    --border: rgba(226, 232, 240, 0.7);
    --text: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;
    --purple: #8B5CF6;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-glow-blue: 0 12px 30px rgba(37, 99, 235, 0.18);
    --shadow-glow-green: 0 12px 30px rgba(16, 185, 129, 0.18);
    --shadow-glow-orange: 0 12px 30px rgba(245, 158, 11, 0.18);
    --shadow-glow-purple: 0 12px 30px rgba(139, 92, 246, 0.18);
    --radius: 14px;
    --radius-sm: 10px;
    --transition: all 0.25s ease;
    --sidebar-width: 260px;
    --topbar-height: 76px;
    --mobile-nav-height: 76px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body.app-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
    color: #fff;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    transition: var(--transition);
    box-shadow: 8px 0 32px rgba(8, 16, 40, 0.35);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(147, 197, 253, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.brand-icon svg {
    width: 20px;
    height: 20px;
    color: #93C5FD;
}

.brand-text strong {
    display: block;
    font-size: 15px;
}

.brand-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin-bottom: 24px;
    transition: var(--transition);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.sidebar-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.45);
}

.sidebar-cta svg {
    width: 18px;
    height: 18px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.9;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(3px);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    border-color: rgba(96, 165, 250, 0.25);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15), 0 8px 24px rgba(37, 99, 235, 0.25);
}

.nav-item.active svg {
    color: #93C5FD;
}

.sidebar-security {
    margin-top: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-security strong {
    display: block;
    font-size: 13px;
}

.sidebar-security p {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.security-ring {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.security-ring svg {
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}

.security-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 3;
}

.security-ring .ring-fill {
    fill: none;
    stroke: #34D399;
    stroke-width: 3;
    stroke-linecap: round;
}

.security-ring span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* Security recommendations page */
.page-security .security-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
}

.page-security .security-page-summary {
    padding: 20px 22px;
}

.page-security .security-page-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.page-security .security-ring--page {
    width: 72px;
    height: 72px;
}

.page-security .security-ring--page svg {
    width: 72px;
    height: 72px;
}

.page-security .security-ring--page .ring-bg {
    stroke: #e5e7eb;
}

.page-security .security-ring--page .ring-fill {
    stroke: var(--primary);
}

.page-security .security-ring--page span {
    font-size: 14px;
    color: var(--text);
}

.page-security .security-page-score h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
}

.page-security .security-page-score p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.page-security .security-page-intro {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.page-security .security-tips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-security .security-tip {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.page-security .security-tip--high {
    border-color: rgba(245, 158, 11, 0.35);
    background: #FFFBEB;
}

.page-security .security-tip--medium {
    border-color: rgba(37, 99, 235, 0.15);
}

.page-security .security-tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.page-security .security-tip--high .security-tip-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.page-security .security-tip-icon svg {
    width: 20px;
    height: 20px;
}

.page-security .security-tip-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.page-security .security-tip-body p {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.page-security .security-tip-body .btn {
    margin-top: 4px;
}

.page-security .btn-sm {
    padding: 7px 12px;
    font-size: 12px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 150;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
    width: min(480px, 50vw);
}

.search-form svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-form input {
    width: 100%;
    padding: 11px 72px 11px 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), var(--shadow-glow-blue);
}

.search-form kbd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
}

.page-heading h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.page-heading p {
    margin: 2px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.icon-btn:hover {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.25);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.mobile-menu-btn {
    display: none;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card);
}

.topbar-right {
    position: relative;
    z-index: 120;
}

.topbar-dropdown-wrap {
    position: relative;
}

.topbar-dropdown-wrap.is-open .user-menu {
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.topbar-dropdown-wrap.is-open .notification-btn {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.35);
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 24px));
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    z-index: 200;
    overflow: hidden;
}

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.topbar-dropdown-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
}

.topbar-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    transition: background var(--transition);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.topbar-dropdown-item:last-child {
    border-bottom: none;
}

.topbar-dropdown-item:hover {
    background: rgba(37, 99, 235, 0.06);
}

.topbar-dropdown-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-dropdown-item--warning .topbar-dropdown-item-icon {
    background: rgba(245, 158, 11, 0.14);
    color: var(--warning);
}

.topbar-dropdown-item--info .topbar-dropdown-item-icon {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}

.topbar-dropdown-item-icon svg {
    width: 18px;
    height: 18px;
}

.topbar-dropdown-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar-dropdown-item-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.topbar-dropdown-item-text small {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.topbar-dropdown-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
}

.topbar-dropdown-empty svg {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.topbar-dropdown-empty p {
    margin: 0;
    font-size: 13px;
}

.topbar-dropdown--menu {
    width: 260px;
}

.topbar-dropdown-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.topbar-dropdown-user strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.topbar-dropdown-user span {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.user-avatar--lg {
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.topbar-dropdown-divider {
    height: 1px;
    background: var(--border);
}

.topbar-dropdown-body--menu,
.topbar-dropdown-footer {
    padding: 6px;
}

.topbar-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: background var(--transition), color var(--transition);
}

.topbar-menu-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.topbar-menu-link svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.topbar-menu-link:hover svg {
    color: var(--primary);
}

.topbar-menu-link--danger {
    color: var(--danger);
}

.topbar-menu-link--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

.topbar-menu-link--danger svg {
    color: var(--danger);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.user-menu:hover {
    border-color: rgba(37, 99, 235, 0.25);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
}

.user-menu svg:last-child {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.logout-icon-btn {
    color: var(--danger);
}

.app-content {
    padding: 24px;
    flex: 1;
    padding-bottom: calc(24px + var(--mobile-nav-height));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: var(--stat-accent, var(--primary));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--stat-glow, var(--shadow-hover));
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stat-icon-bg, rgba(37, 99, 235, 0.12));
    color: var(--stat-accent, var(--primary));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label-short {
    display: none;
}

.stat-label-full {
    display: inline;
}

@media (min-width: 769px) {
    .page-dashboard .stats-grid {
        gap: 12px;
        margin-bottom: 16px;
    }

    .page-dashboard .stat-card {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 1px;
        padding: 12px 14px;
        align-items: center;
    }

    .page-dashboard .stat-card-top {
        grid-row: 1 / 3;
        grid-column: 1;
        margin-bottom: 0;
    }

    .page-dashboard .stat-card .stat-label {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
        font-size: 12px;
        line-height: 1.25;
    }

    .page-dashboard .stat-card .stat-value {
        grid-column: 2;
        grid-row: 2;
        font-size: 22px;
        line-height: 1.1;
    }

    .page-dashboard .stat-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        box-shadow: 0 4px 14px var(--stat-icon-shadow, rgba(37, 99, 235, 0.3));
    }

    .page-dashboard .stat-icon svg {
        width: 18px;
        height: 18px;
    }

    .page-dashboard .stat-card::after {
        width: 72px;
        height: 72px;
        top: -45%;
        right: -12%;
    }

    .page-dashboard .section-card:has(.quick-actions) {
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    .page-dashboard .section-card:has(.quick-actions) .section-header {
        margin-bottom: 10px;
    }

    .page-dashboard .section-card:has(.quick-actions) .section-header h2 {
        font-size: 15px;
    }

    .page-dashboard .quick-actions {
        gap: 12px;
    }

    .page-dashboard .quick-action {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 12px;
        row-gap: 2px;
        padding: 12px 14px;
        text-align: left;
        align-items: center;
    }

    .page-dashboard .quick-action-icon {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 36px;
        height: 36px;
        margin: 0;
        border-radius: 10px;
        box-shadow: 0 4px 14px var(--qa-icon-shadow, rgba(37, 99, 235, 0.3));
    }

    .page-dashboard .quick-action-icon svg {
        width: 18px;
        height: 18px;
    }

    .page-dashboard .quick-action:hover .quick-action-icon {
        transform: scale(1.05);
        box-shadow: 0 6px 18px var(--qa-icon-shadow, rgba(37, 99, 235, 0.35));
    }

    .page-dashboard .quick-action strong {
        grid-column: 2;
        grid-row: 1;
        font-size: 13px;
        margin-bottom: 0;
        line-height: 1.25;
    }

    .page-dashboard .quick-action span {
        grid-column: 2;
        grid-row: 2;
        font-size: 11px;
        line-height: 1.3;
    }
}

.stat-card--blue {
    --stat-accent: #2563EB;
    --stat-icon-bg: rgba(37, 99, 235, 0.14);
    --stat-glow: var(--shadow-glow-blue);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(239,246,255,0.95));
}

.stat-card--green {
    --stat-accent: #10B981;
    --stat-icon-bg: rgba(16, 185, 129, 0.14);
    --stat-glow: var(--shadow-glow-green);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(236,253,245,0.95));
}

.stat-card--orange {
    --stat-accent: #F97316;
    --stat-icon-bg: rgba(249, 115, 22, 0.14);
    --stat-glow: var(--shadow-glow-orange);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,247,237,0.95));
}

.stat-card--purple {
    --stat-accent: #8B5CF6;
    --stat-icon-bg: rgba(139, 92, 246, 0.14);
    --stat-glow: var(--shadow-glow-purple);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,243,255,0.95));
}

.section-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.section-header a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-action {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    transition: var(--transition);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--qa-glow, var(--shadow-hover));
    border-color: var(--qa-border, rgba(37, 99, 235, 0.22));
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--qa-icon-bg, rgba(37, 99, 235, 0.12));
    color: var(--qa-accent, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quick-action:hover .quick-action-icon {
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.quick-action-icon svg {
    width: 24px;
    height: 24px;
}

.quick-action strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.quick-action span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.quick-action--blue { --qa-accent:#2563EB; --qa-icon-bg:rgba(37,99,235,0.12); --qa-glow:var(--shadow-glow-blue); --qa-border:rgba(37,99,235,0.25); }
.quick-action--purple { --qa-accent:#8B5CF6; --qa-icon-bg:rgba(139,92,246,0.12); --qa-glow:var(--shadow-glow-purple); --qa-border:rgba(139,92,246,0.25); }
.quick-action--green { --qa-accent:#10B981; --qa-icon-bg:rgba(16,185,129,0.12); --qa-glow:var(--shadow-glow-green); --qa-border:rgba(16,185,129,0.25); }
.quick-action--orange { --qa-accent:#F97316; --qa-icon-bg:rgba(249,115,22,0.12); --qa-glow:var(--shadow-glow-orange); --qa-border:rgba(249,115,22,0.25); }

.category-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.category-chip {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    transition: var(--transition);
}

.category-chip:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--chip-accent, rgba(37, 99, 235, 0.25));
}

.category-chip-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--chip-accent, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.category-chip strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.category-chip span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-weight: 500;
}

.data-table tbody tr {
    transition: var(--transition);
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.02));
    box-shadow: inset 3px 0 0 var(--primary);
}

.data-table .date-cell {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

.site-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-favicon,
.site-fallback {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.site-favicon {
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
}

.site-fallback {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.site-cell strong {
    display: block;
    font-size: 14px;
}

.site-cell small {
    color: var(--text-secondary);
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green { background: #DCFCE7; color: #166534; }
.badge-orange { background: #FFEDD5; color: #9A3412; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-pink { background: #FCE7F3; color: #9D174D; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-gray { background: #F3F4F6; color: #374151; }

.row-actions {
    position: relative;
}

.row-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.row-menu-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    min-width: 180px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.empty-state p {
    margin: 0 0 20px;
    color: var(--text-secondary);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 500;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    width: min(920px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(12px);
}

.modal-profile {
    text-align: center;
    padding: 12px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.95), rgba(255, 255, 255, 0.8));
    border: 1px solid var(--border);
}

.website-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transition: var(--transition);
}

.website-link-btn:hover {
    background: rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-blue);
}

.modal-meta {
    border-left: 1px solid var(--border);
    padding-left: 24px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.7), rgba(255, 255, 255, 0.4));
    border-radius: var(--radius-sm);
    padding-top: 8px;
    padding-bottom: 8px;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(248, 251, 255, 0.85);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-body {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 24px;
    padding: 24px;
}

.modal-profile .site-fallback,
.modal-profile .site-favicon {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 16px;
    font-size: 24px;
}

.modal-profile h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.modal-profile p {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.detail-field {
    margin-bottom: 16px;
}

.detail-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.field-row span {
    flex: 1;
    word-break: break-all;
}

.field-row button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--card);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.field-row button:hover {
    color: var(--primary);
}

.strength-meter {
    margin-top: 8px;
}

.strength-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.strength-segment {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
}

.strength-segment.active.weak { background: var(--danger); }
.strength-segment.active.medium { background: var(--warning); }
.strength-segment.active.strong,
.strength-segment.active.very-strong,
.strength-segment.active.excellent { background: var(--success); }

.strength-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-meta {
    border-left: 1px solid var(--border);
    padding-left: 24px;
}

.meta-item {
    margin-bottom: 16px;
}

.meta-item label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-item span {
    font-size: 13px;
    font-weight: 500;
}

.form-card {
    max-width: 720px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 14px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--card);
    padding: 0 4px;
}

.form-group textarea + label {
    top: 18px;
    transform: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group.has-value label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.form-group.has-value textarea + label {
    top: 0;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 96px;
}

.password-input-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}

.password-input-actions button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-input-actions button:hover {
    background: var(--bg);
    color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.mobile-nav {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: var(--mobile-nav-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    z-index: 300;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    box-shadow: var(--shadow);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    padding: 8px;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -28px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.42);
    border: 3px solid rgba(255, 255, 255, 0.95);
    transition: var(--transition);
}

.mobile-nav-fab:hover {
    transform: translateY(-2px) scale(1.04);
}

.mobile-nav-fab svg {
    width: 24px;
    height: 24px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow);
    animation: fadeIn 0.25s ease;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

/* ===== Premium auth / login ===== */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(ellipse 90% 60% at 50% -15%, rgba(59, 130, 246, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 50%, rgba(99, 102, 241, 0.12), transparent 50%),
        radial-gradient(ellipse 60% 45% at 0% 80%, rgba(37, 99, 235, 0.1), transparent 45%),
        linear-gradient(165deg, #0f172a 0%, #1e3a8a 28%, #1d4ed8 52%, #2563eb 100%);
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
}

.auth-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: authOrbFloat 14s ease-in-out infinite;
}

.auth-bg-orb--1 {
    width: 320px;
    height: 320px;
    top: -8%;
    left: -6%;
    background: rgba(96, 165, 250, 0.45);
}

.auth-bg-orb--2 {
    width: 280px;
    height: 280px;
    bottom: 10%;
    right: -8%;
    background: rgba(129, 140, 248, 0.4);
    animation-delay: -5s;
}

.auth-bg-orb--3 {
    width: 200px;
    height: 200px;
    top: 45%;
    left: 55%;
    background: rgba(59, 130, 246, 0.35);
    animation-delay: -9s;
}

@keyframes authOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -18px) scale(1.06); }
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: authCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card {
    width: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 32px 64px rgba(15, 23, 42, 0.28),
        0 12px 24px rgba(37, 99, 235, 0.15);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.auth-card-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.auth-header {
    position: relative;
    z-index: 1;
    padding: 36px 32px 0;
    text-align: center;
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.2),
        0 14px 32px rgba(37, 99, 235, 0.45);
}

.auth-logo svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.auth-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.auth-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: #0f172a;
    line-height: 1.15;
}

.auth-subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.45;
}

.auth-form {
    position: relative;
    z-index: 1;
    padding: 28px 32px 24px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 22px;
}

.auth-form .form-group label {
    position: static;
    transform: none;
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    background: transparent;
    padding: 0;
}

.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-input input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.auth-input input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.auth-input input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-input--password input {
    padding-right: 52px;
}

.auth-input--password .password-input-actions {
    right: 10px;
}

.auth-input--password .password-input-actions button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
}

.auth-input--password .password-input-actions button:hover {
    background: rgba(37, 99, 235, 0.12);
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 45%, #1d4ed8 100%);
    box-shadow:
        0 4px 14px rgba(37, 99, 235, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-submit svg {
    width: 18px;
    height: 18px;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 45%, #2563eb 100%);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled,
.auth-submit.is-loading {
    opacity: 0.85;
    cursor: wait;
    transform: none;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 16px 20px 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.auth-features li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.25;
}

.auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-feature-icon svg {
    width: 16px;
    height: 16px;
}

.auth-footnote {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    line-height: 1.4;
}

.auth-footnote svg {
    width: 16px;
    height: 16px;
    color: rgba(147, 197, 253, 0.95);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .auth-page {
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        align-items: center;
        justify-content: center;
        min-height: 100svh;
        min-height: 100dvh;
    }

    .auth-shell {
        width: 100%;
        max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .auth-card {
        border-radius: 20px;
    }

    .auth-header {
        padding: 28px 24px 0;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-form {
        padding: 24px 24px 20px;
    }

    .auth-features {
        padding: 14px 16px 18px;
        gap: 6px;
    }

    .auth-features li {
        font-size: 9px;
    }

    .auth-feature-icon {
        width: 32px;
        height: 32px;
    }
}

.generator-output {
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: ui-monospace, monospace;
    font-size: 18px;
    text-align: center;
    word-break: break-all;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Password generator page ===== */
.page-generator .generator-page {
    align-items: start;
}

.page-generator .generator-card {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.page-generator .generator-hero {
    padding: 22px 22px 18px;
    background: linear-gradient(145deg, rgba(250, 245, 255, 0.95), rgba(237, 233, 254, 0.55));
    border-bottom: 1px solid var(--border);
}

.page-generator .generator-hero-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.page-generator .generator-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #A855F7, #7C3AED);
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
}

.page-generator .generator-hero-icon svg {
    width: 22px;
    height: 22px;
}

.page-generator .generator-hero-title {
    margin: 0 0 2px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-generator .generator-hero-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.page-generator .generator-output-wrap {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.page-generator .generator-output {
    flex: 1;
    min-height: 64px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.92);
    font-size: clamp(15px, 2vw, 20px);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    justify-content: flex-start;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.page-generator .generator-output:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08);
}

.page-generator .generator-output.password-placeholder {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: normal;
    cursor: default;
}

.page-generator .generator-inline-btn {
    width: 48px;
    min-width: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.95);
    color: var(--purple);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.page-generator .generator-inline-btn:hover:not(:disabled) {
    border-color: rgba(139, 92, 246, 0.4);
    background: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow-purple);
}

.page-generator .generator-inline-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-generator .generator-inline-btn svg {
    width: 20px;
    height: 20px;
}

.page-generator .generator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.page-generator .btn-generator {
    background: linear-gradient(135deg, #A855F7, #7C3AED);
    color: #fff;
    border: none;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.32);
}

.page-generator .btn-generator:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.38);
}

.page-generator .generator-strength {
    margin-top: 14px;
}

.page-generator .generator-strength-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.page-generator .strength-track--generator .strength-track-fill {
    background: linear-gradient(90deg, #A855F7, #7C3AED);
    transition: width var(--transition), background var(--transition);
}

.page-generator .strength-track--generator[data-tone="weak"] .strength-track-fill {
    background: linear-gradient(90deg, #F87171, #EF4444);
}

.page-generator .strength-track--generator[data-tone="medium"] .strength-track-fill {
    background: linear-gradient(90deg, #FBBF24, #F59E0B);
}

.page-generator .strength-track--generator[data-tone="strong"] .strength-track-fill,
.page-generator .strength-track--generator[data-tone="excellent"] .strength-track-fill {
    background: linear-gradient(90deg, #34D399, #10B981);
}

.page-generator .generator-section {
    padding: 20px 22px;
    border-top: 1px solid var(--border);
}

.page-generator .generator-section-title {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
}

.page-generator .generator-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.page-generator .generator-presets .preset-card {
    margin: 0;
    text-align: left;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    font: inherit;
    color: inherit;
    width: 100%;
}

.page-generator .generator-presets .preset-card:hover {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: var(--shadow-glow-purple);
}

.page-generator .generator-presets .preset-card strong {
    font-size: 13px;
}

.page-generator .generator-presets .preset-card span {
    font-size: 11px;
    line-height: 1.35;
}

.page-generator .generator-option-block + .generator-option-block {
    margin-top: 18px;
}

.page-generator .generator-option-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.page-generator .generator-option-label label {
    margin: 0;
}

.page-generator .generator-char-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.page-generator .generator-char-grid .checkbox-item {
    padding: 12px 14px;
    gap: 12px;
    align-items: center;
}

.page-generator .checkbox-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    flex-shrink: 0;
}

.page-generator .checkbox-item.checked .checkbox-item-icon {
    background: linear-gradient(135deg, #A855F7, #7C3AED);
    color: #fff;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.28);
}

.page-generator .checkbox-item-icon svg {
    width: 18px;
    height: 18px;
}

.page-generator .checkbox-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.page-generator .checkbox-item-text strong {
    font-size: 13px;
    font-weight: 700;
}

.page-generator .checkbox-item-text small {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}

.page-generator .generator-char-grid .checkbox-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.page-generator .generator-symbols-panel {
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.8);
    transition: opacity var(--transition), max-height var(--transition);
}

.page-generator .generator-symbols-panel.is-collapsed {
    display: none;
}

.page-generator .generator-symbols-panel > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-generator .generator-hint {
    margin: 0 0 10px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.page-generator .generator-symbols-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: ui-monospace, monospace;
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.page-generator .generator-symbols-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.page-generator .generator-symbols-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.page-generator .generator-symbol-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.page-generator .symbol-chip {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    cursor: pointer;
    transition: var(--transition);
}

.page-generator .symbol-chip:hover {
    border-color: rgba(139, 92, 246, 0.45);
    color: var(--purple);
    background: rgba(139, 92, 246, 0.06);
}

.page-generator .symbol-chip--muted {
    font-family: inherit;
    color: var(--text-muted);
}

.page-generator .generator-auto-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.page-generator .generator-auto-toggle input {
    accent-color: var(--purple);
    width: 16px;
    height: 16px;
}

.page-generator .generator-sidebar {
    position: sticky;
    top: calc(var(--topbar-height) + 16px);
    max-height: calc(100vh - var(--topbar-height) - 32px);
    display: flex;
    flex-direction: column;
}

.page-generator .generator-sidebar .history-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.page-generator .generator-history-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
}

.page-generator .generator-history-empty svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    opacity: 0.55;
}

.page-generator .generator-history-empty p {
    margin: 0;
    font-size: 13px;
}

.page-generator .history-item {
    align-items: flex-start;
}

.page-generator .history-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.page-generator .history-item-password {
    font-family: ui-monospace, monospace;
    font-size: 13px;
    word-break: break-all;
    color: var(--text);
}

.page-generator .history-item-time {
    font-size: 11px;
    color: var(--text-muted);
    font-family: inherit;
}

.page-generator .btn-sm {
    padding: 7px 10px;
    font-size: 12px;
}

.page-generator .btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Settings hub */
.settings-page {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.settings-tile:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow-sm);
}

.settings-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-tile-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.settings-tile-icon--purple {
    background: linear-gradient(135deg, #A855F7, #7C3AED);
}

.settings-tile-icon--blue {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
}

.settings-tile-icon--green {
    background: linear-gradient(135deg, #22C55E, #16A34A);
}

.settings-tile-icon--orange {
    background: linear-gradient(135deg, #FB923C, #EA580C);
}

.settings-tile-icon--danger {
    background: linear-gradient(135deg, #F87171, #EF4444);
}

.settings-tile-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-tile-text strong {
    font-size: 15px;
    font-weight: 700;
}

.settings-tile-text small {
    font-size: 12px;
    color: var(--text-secondary);
}

.settings-tile-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.settings-tile--danger .settings-tile-text strong {
    color: var(--danger);
}

.settings-account {
    padding: 8px;
}

@media (max-width: 1024px) {
    .page-generator .content-grid-2,
    .page-generator .generator-page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .page-generator .generator-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-generator .generator-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .page-generator .app-content {
        gap: var(--m-space-md, 16px);
        padding: var(--m-space-md, 16px);
        padding-bottom: calc(var(--m-space-lg, 20px) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
    }

    .page-generator .generator-page {
        gap: var(--m-space-md, 16px);
    }

    .page-generator .generator-card {
        border-radius: 16px;
        box-shadow: var(--shadow-m-primary, 0 10px 32px rgba(15, 23, 42, 0.1));
        border: 1px solid rgba(226, 232, 240, 0.88);
    }

    .page-generator .generator-hero {
        padding: var(--m-space-md, 16px);
    }

    .page-generator .generator-hero-head {
        gap: var(--m-space-sm, 12px);
        margin-bottom: var(--m-space-sm, 12px);
    }

    .page-generator .generator-hero-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .page-generator .generator-hero-icon svg {
        width: 18px;
        height: 18px;
    }

    .page-generator .generator-hero-title {
        font-size: 15px;
    }

    .page-generator .generator-hero-desc {
        font-size: 12px;
    }

    .page-generator .generator-output {
        min-height: 48px;
        padding: 10px 12px;
        font-size: 14px;
        letter-spacing: 0.02em;
    }

    .page-generator .generator-output.password-placeholder {
        font-size: 12px;
    }

    .page-generator .generator-output-wrap {
        flex-direction: row;
        gap: 8px;
    }

    .page-generator .generator-inline-btn {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .page-generator .generator-actions {
        margin-top: var(--m-space-md, 16px);
        gap: var(--m-space-sm, 12px);
    }

    .page-generator .generator-actions .btn {
        padding: 11px 14px;
        font-size: 13px;
        flex: 1 1 calc(50% - 6px);
        min-height: 44px;
    }

    .page-generator .generator-actions .btn-generator {
        flex: 1 1 100%;
        margin-top: var(--m-space-xs, 4px);
    }

    .page-generator .generator-strength {
        margin-top: var(--m-space-md, 16px);
        padding-top: var(--m-space-xs, 4px);
    }

    .page-generator .generator-strength-meta {
        font-size: 11px;
    }

    .page-generator .generator-section {
        padding: var(--m-space-md, 16px);
        margin-top: var(--m-space-sm, 12px);
    }

    .page-generator .generator-section-title {
        font-size: 14px;
        font-weight: 800;
        letter-spacing: -0.02em;
        margin-bottom: var(--m-space-sm, 12px);
        color: #0f172a;
    }

    .page-generator .generator-presets {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--m-space-sm, 12px);
    }

    .page-generator .generator-presets .preset-card {
        padding: var(--m-space-sm, 12px) var(--m-space-md, 14px);
        border-radius: 14px;
        box-shadow: var(--shadow-m-secondary, 0 2px 12px rgba(15, 23, 42, 0.05));
    }

    .page-generator .generator-presets .preset-card strong {
        font-size: 12px;
    }

    .page-generator .generator-presets .preset-card span {
        font-size: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .page-generator .generator-char-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--m-space-sm, 12px);
    }

    .page-generator .generator-char-grid .checkbox-item {
        padding: var(--m-space-sm, 12px);
        gap: var(--m-space-sm, 12px);
        border-radius: 14px;
    }

    .page-generator .checkbox-item-icon {
        width: 30px;
        height: 30px;
    }

    .page-generator .checkbox-item-icon svg {
        width: 15px;
        height: 15px;
    }

    .page-generator .checkbox-item-text strong {
        font-size: 11px;
    }

    .page-generator .checkbox-item-text small {
        font-size: 10px;
    }

    .page-generator .generator-symbols-panel {
        padding: var(--m-space-md, 16px);
        margin-top: var(--m-space-sm, 12px);
    }

    .page-generator .generator-symbols-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .page-generator .symbol-chip {
        padding: 5px 8px;
        font-size: 11px;
    }

    .page-generator .generator-auto-toggle {
        padding: var(--m-space-md, 16px);
        font-size: 13px;
        margin-top: var(--m-space-md, 16px);
        border-radius: 14px;
    }

    .page-generator .generator-option-block + .generator-option-block {
        margin-top: var(--m-space-md, 16px);
    }

    .page-generator .generator-sidebar {
        padding: var(--m-space-md, 16px);
        margin-bottom: 0;
        border-radius: 16px;
        box-shadow: var(--shadow-m-secondary, 0 2px 12px rgba(15, 23, 42, 0.05));
    }

    .page-generator .generator-sidebar .section-header {
        margin-bottom: 8px;
    }

    .page-generator .generator-sidebar .section-header h2 {
        font-size: 14px;
    }

    .page-generator .history-item {
        padding: 8px 10px;
    }

    .page-generator .history-item-password {
        font-size: 12px;
    }

    /* Settings page (mobile) */
    .page-settings .app-content {
        gap: var(--m-space-md, 16px);
        padding: var(--m-space-md, 16px);
        padding-bottom: calc(var(--m-space-lg, 20px) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 28px);
    }

    .settings-grid {
        gap: var(--m-space-sm, 12px);
    }

    .settings-tile {
        padding: var(--m-space-md, 16px);
        border-radius: 16px;
        box-shadow: var(--shadow-m-secondary, 0 2px 12px rgba(15, 23, 42, 0.05));
    }

    .settings-tile-icon {
        width: 38px;
        height: 38px;
    }

    .settings-tile-text strong {
        font-size: 14px;
    }

    .settings-tile-text small {
        font-size: 11px;
    }

    /* Mobile nav: FAB tıklama alanı daralt */
    .mobile-nav {
        gap: 2px;
    }

    .mobile-nav-fab {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        margin-top: -18px;
        margin-left: 4px;
        margin-right: 4px;
    }

    .mobile-nav-item:last-child,
    .mobile-nav-item:nth-child(4) {
        position: relative;
        z-index: 3;
    }
}

@media (max-width: 1024px) {
    .stats-grid,
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-meta {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 420;
    }

    .sidebar-overlay {
        z-index: 410;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .search-form {
        width: 100%;
        flex: 1;
    }

    .search-form kbd,
    .user-name,
    .logout-icon-btn {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .stats-grid,
    .form-row-2 {
        grid-template-columns: 1fr 1fr;
    }

    .topbar {
        padding: 0 16px;
    }

    .app-content {
        padding: var(--m-space-md, 16px);
        padding-bottom: calc(var(--m-space-lg, 20px) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
    }

    .data-table-wrap:not(.data-table-wrap--mobile-cards) .data-table th:nth-child(3),
    .data-table-wrap:not(.data-table-wrap--mobile-cards) .data-table td:nth-child(3),
    .data-table-wrap:not(.data-table-wrap--mobile-cards) .data-table th:nth-child(4),
    .data-table-wrap:not(.data-table-wrap--mobile-cards) .data-table td:nth-child(4) {
        display: none;
    }
}

.content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.admin-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.admin-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.color-dot svg {
    width: 18px;
    height: 18px;
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.icon-option {
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.icon-option.selected,
.icon-option:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.icon-option svg {
    width: 18px;
    height: 18px;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.preset-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.preset-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.preset-card strong {
    display: block;
    margin-bottom: 4px;
}

.preset-card span {
    color: var(--text-secondary);
    font-size: 12px;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.checkbox-item.checked {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

.checkbox-item input {
    accent-color: var(--primary);
}

.range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-row input[type="range"] {
    flex: 1;
}

.range-value {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
    color: var(--primary);
}

.strength-track {
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 8px;
}

.strength-track-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width var(--transition);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, monospace;
    font-size: 13px;
}

.backup-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.backup-export-form {
    margin: 0;
    min-width: 0;
}

.backup-export-btn {
    width: 100%;
    text-align: center;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.upload-zone {
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    background: var(--bg);
    transition: border-color var(--transition), background var(--transition);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.upload-zone svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .content-grid-2,
    .control-grid,
    .backup-actions,
    .preset-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== VISUAL POLISH v4 ===== */

:root {
    --lift-hover: translateY(-4px);
    --shadow-card-hover: 0 20px 40px rgba(37, 99, 235, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-blur: blur(14px);
}

body.app-body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59, 130, 246, 0.08), transparent 55%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

/* Sidebar premium */
.brand-icon {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: 1px solid rgba(147, 197, 253, 0.35);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 10px 28px rgba(37, 99, 235, 0.4);
}

.brand-icon svg {
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.32), rgba(37, 99, 235, 0.14));
    border-color: rgba(147, 197, 253, 0.28);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2), 0 8px 28px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-item.active svg {
    color: #fff;
    filter: drop-shadow(0 0 6px rgba(147, 197, 253, 0.6));
}

/* Search bar */
.search-form svg {
    transition: var(--transition);
    opacity: 0.55;
}

.search-form:focus-within svg {
    opacity: 1;
    color: var(--primary);
    transform: scale(1.05);
}

.search-form input {
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
}

.search-form input:focus {
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04), 0 0 0 4px rgba(37, 99, 235, 0.14), 0 8px 24px rgba(37, 99, 235, 0.12);
}

/* Glass cards */
.section-card,
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.section-header h2 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.section-header a {
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    transition: var(--transition);
}

.section-header a:hover {
    background: rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

/* Stat cards - vibrant */
.stat-card {
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--stat-orb, rgba(37, 99, 235, 0.08));
    pointer-events: none;
}

.stat-card:hover {
    transform: var(--lift-hover);
    box-shadow: var(--shadow-card-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--stat-grad-start, #3B82F6), var(--stat-grad-end, #2563EB));
    color: #fff;
    box-shadow: 0 8px 22px var(--stat-icon-shadow, rgba(37, 99, 235, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.stat-card--blue {
    --stat-grad-start: #3B82F6;
    --stat-grad-end: #2563EB;
    --stat-icon-shadow: rgba(37, 99, 235, 0.4);
    --stat-orb: rgba(59, 130, 246, 0.12);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.92), rgba(219, 234, 254, 0.55));
}

.stat-card--green {
    --stat-grad-start: #22C55E;
    --stat-grad-end: #16A34A;
    --stat-icon-shadow: rgba(34, 197, 94, 0.38);
    --stat-orb: rgba(34, 197, 94, 0.12);
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.92), rgba(220, 252, 231, 0.55));
}

.stat-card--orange {
    --stat-grad-start: #FB923C;
    --stat-grad-end: #EA580C;
    --stat-icon-shadow: rgba(249, 115, 22, 0.38);
    --stat-orb: rgba(251, 146, 60, 0.12);
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.92), rgba(254, 243, 199, 0.45));
}

.stat-card--purple {
    --stat-grad-start: #A855F7;
    --stat-grad-end: #7C3AED;
    --stat-icon-shadow: rgba(168, 85, 247, 0.38);
    --stat-orb: rgba(168, 85, 247, 0.12);
    background: linear-gradient(145deg, rgba(250, 245, 255, 0.92), rgba(237, 233, 254, 0.55));
}

/* Quick actions */
.quick-action {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.quick-action:hover {
    transform: var(--lift-hover);
    box-shadow: var(--shadow-card-hover);
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--qa-grad-start, #3B82F6), var(--qa-grad-end, #2563EB));
    color: #fff;
    box-shadow: 0 10px 24px var(--qa-icon-shadow, rgba(37, 99, 235, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.quick-action-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.quick-action:hover .quick-action-icon {
    transform: scale(1.1);
    box-shadow: 0 14px 32px var(--qa-icon-shadow, rgba(37, 99, 235, 0.38));
}

.quick-action--blue {
    --qa-grad-start: #3B82F6;
    --qa-grad-end: #2563EB;
    --qa-icon-shadow: rgba(37, 99, 235, 0.35);
    --qa-glow: 0 20px 40px rgba(37, 99, 235, 0.14);
    --qa-border: rgba(59, 130, 246, 0.25);
}

.quick-action--purple {
    --qa-grad-start: #A855F7;
    --qa-grad-end: #7C3AED;
    --qa-icon-shadow: rgba(168, 85, 247, 0.35);
    --qa-glow: 0 20px 40px rgba(168, 85, 247, 0.14);
    --qa-border: rgba(168, 85, 247, 0.25);
}

.quick-action--green {
    --qa-grad-start: #22C55E;
    --qa-grad-end: #16A34A;
    --qa-icon-shadow: rgba(34, 197, 94, 0.35);
    --qa-glow: 0 20px 40px rgba(34, 197, 94, 0.14);
    --qa-border: rgba(34, 197, 94, 0.25);
}

.quick-action--orange {
    --qa-grad-start: #FB923C;
    --qa-grad-end: #EA580C;
    --qa-icon-shadow: rgba(249, 115, 22, 0.35);
    --qa-glow: 0 20px 40px rgba(249, 115, 22, 0.14);
    --qa-border: rgba(249, 115, 22, 0.25);
}

/* Category chips - pastel themes */
.category-chip {
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.category-chip:hover {
    transform: var(--lift-hover) scale(1.03);
    box-shadow: var(--cat-hover-shadow, var(--shadow-card-hover));
}

.category-chip-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cat-icon-start, #3B82F6), var(--cat-icon-end, #2563EB));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 20px var(--cat-icon-shadow, rgba(37, 99, 235, 0.28));
}

.category-chip-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.cat-theme-blue {
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.95), rgba(219, 234, 254, 0.65));
    --cat-icon-start: #3B82F6;
    --cat-icon-end: #2563EB;
    --cat-icon-shadow: rgba(37, 99, 235, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(37, 99, 235, 0.14);
}

.cat-theme-green {
    background: linear-gradient(145deg, rgba(240, 253, 244, 0.95), rgba(220, 252, 231, 0.65));
    --cat-icon-start: #22C55E;
    --cat-icon-end: #16A34A;
    --cat-icon-shadow: rgba(34, 197, 94, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(34, 197, 94, 0.14);
}

.cat-theme-orange {
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.95), rgba(254, 243, 199, 0.6));
    --cat-icon-start: #FB923C;
    --cat-icon-end: #EA580C;
    --cat-icon-shadow: rgba(249, 115, 22, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(249, 115, 22, 0.14);
}

.cat-theme-pink {
    background: linear-gradient(145deg, rgba(253, 242, 248, 0.95), rgba(252, 231, 243, 0.65));
    --cat-icon-start: #EC4899;
    --cat-icon-end: #DB2777;
    --cat-icon-shadow: rgba(236, 72, 153, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(236, 72, 153, 0.14);
}

.cat-theme-yellow {
    background: linear-gradient(145deg, rgba(254, 252, 232, 0.95), rgba(254, 249, 195, 0.65));
    --cat-icon-start: #EAB308;
    --cat-icon-end: #CA8A04;
    --cat-icon-shadow: rgba(234, 179, 8, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(234, 179, 8, 0.14);
}

.cat-theme-purple {
    background: linear-gradient(145deg, rgba(250, 245, 255, 0.95), rgba(237, 233, 254, 0.65));
    --cat-icon-start: #A855F7;
    --cat-icon-end: #7C3AED;
    --cat-icon-shadow: rgba(168, 85, 247, 0.3);
    --cat-hover-shadow: 0 20px 40px rgba(168, 85, 247, 0.14);
}

/* Table rows */
.data-table tbody tr {
    border-radius: 8px;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.07), rgba(37, 99, 235, 0.02));
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08), inset 3px 0 0 #2563EB;
    transform: translateY(-1px);
}

.site-fallback {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.badge {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.badge-yellow { background: #FEF9C3; color: #854D0E; }

/* Empty state icons */
.empty-state-icon {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.empty-state-icon svg {
    color: #fff;
}

/* Modal premium */
.modal {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.18);
}

.modal-header h2 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Auth — premium styles in dedicated block above */


/* ===== MOBILE UX v1 - native app feel ===== */

body.modal-open {
    overflow: hidden;
    touch-action: none;
}

@keyframes slideUpMobile {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 56px;
        --mobile-nav-height: 64px;
        --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
        --m-space-xs: 8px;
        --m-space-sm: 12px;
        --m-space-md: 16px;
        --m-space-lg: 20px;
        --shadow-m-primary: 0 10px 32px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(37, 99, 235, 0.06);
        --shadow-m-secondary: 0 2px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
    }

    body.app-body {
        background: linear-gradient(180deg, #eef4ff 0%, #f8fbff 25%, #f8fafc 100%) !important;
        background-attachment: fixed;
    }

    .app-main {
        background: transparent;
    }

    /* Unified content surface */
    .app-content {
        display: flex;
        flex-direction: column;
        gap: var(--m-space-md);
        max-width: 100%;
        padding: var(--m-space-md);
        padding-top: var(--m-space-sm);
        padding-bottom: calc(var(--m-space-lg) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 24px);
    }

    .app-content > .stats-scroll,
    .app-content > .stats-grid {
        margin-bottom: 0;
    }

    /* Premium header + soft transition */
    .topbar {
        height: var(--topbar-height);
        min-height: var(--topbar-height);
        padding: 0 var(--m-space-md);
        gap: var(--m-space-sm);
        background: linear-gradient(168deg, #1e3a8a 0%, #2563eb 48%, #3b82f6 100%);
        border-bottom: none;
        box-shadow:
            0 4px 24px rgba(30, 58, 138, 0.28),
            0 0 48px rgba(59, 130, 246, 0.12);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow: visible;
        position: sticky;
        z-index: 100;
    }

    .topbar::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -20px;
        height: 20px;
        background: linear-gradient(180deg, rgba(37, 99, 235, 0.18) 0%, rgba(238, 244, 255, 0.55) 50%, transparent 100%);
        filter: blur(8px);
        pointer-events: none;
        z-index: -1;
    }

    .topbar-left {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }

    .topbar-right {
        gap: var(--m-space-xs);
        flex-shrink: 0;
    }

    .topbar .icon-btn,
    .topbar .mobile-menu-btn,
    .topbar .notification-btn {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.24);
        color: #fff;
    }

    .topbar .icon-btn:hover,
    .topbar .notification-btn:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.35);
        color: #fff;
    }

    .topbar .notification-btn .notification-dot {
        box-shadow: 0 0 0 2px #2563eb;
    }

    .topbar .user-menu {
        padding: 4px 8px 4px 4px;
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.22);
    }

    .topbar .user-menu svg:last-child {
        color: rgba(255, 255, 255, 0.75);
    }

    .topbar .user-avatar {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
    }

    .topbar .search-form svg {
        color: var(--primary);
        opacity: 0.7;
    }

    .topbar .search-form input {
        background: rgba(255, 255, 255, 0.96);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    }

    .topbar .search-form input::placeholder {
        color: #94a3b8;
    }

    .topbar .page-heading h1 {
        color: #fff;
    }

    .topbar .page-heading p {
        color: rgba(255, 255, 255, 0.78);
    }

    .user-menu {
        padding: 4px 6px 4px 4px;
    }

    .user-name {
        display: none;
    }

    .topbar-dropdown {
        right: -8px;
        width: min(300px, calc(100vw - 20px));
    }

    .topbar-dropdown--menu {
        width: min(260px, calc(100vw - 20px));
    }

    .page-heading h1 {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -0.03em;
    }

    .page-heading p {
        font-size: 12px;
        font-weight: 500;
    }

    /* Search bar ? full width, compact */
    .search-form {
        width: 100%;
        flex: 1;
        min-width: 0;
    }

    .search-form input {
        height: 44px;
        padding: 0 14px 0 38px;
        font-size: 14px;
        border-radius: 12px;
    }

    .search-form svg {
        left: 12px;
        width: 16px;
        height: 16px;
    }

    .icon-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 12px;
    }

    /* Stats - horizontal mini widgets */
    .stats-scroll {
        margin: 0 calc(-1 * var(--m-space-md)) 0;
        padding: 0 var(--m-space-md);
    }

    .stats-grid--horizontal {
        display: flex;
        flex-wrap: nowrap;
        gap: var(--m-space-sm);
        overflow-x: auto;
        overflow-y: hidden;
        margin-bottom: 0;
        padding-bottom: 2px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        grid-template-columns: unset;
    }

    .stats-grid--horizontal::-webkit-scrollbar {
        display: none;
    }

    .stats-grid--horizontal .stat-card {
        flex: 0 0 auto;
        min-width: 82px;
        width: 82px;
        padding: 8px 6px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        scroll-snap-align: start;
    }

    .stats-grid:not(.stats-grid--horizontal) {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--m-space-sm);
        margin-bottom: 0;
    }

    .stat-card {
        padding: var(--m-space-sm);
        border-radius: 14px;
        box-shadow: var(--shadow-m-secondary);
        border: 1px solid rgba(226, 232, 240, 0.9);
    }

    .stat-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }

    .stat-card-top {
        margin-bottom: 2px;
    }

    .stat-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .stat-icon svg {
        width: 14px;
        height: 14px;
    }

    .stat-card .stat-label {
        font-size: 9px;
        margin-bottom: 0;
        margin-top: 2px;
        line-height: 1.2;
        color: var(--text-secondary);
    }

    .stat-label-short {
        display: inline;
    }

    .stat-label-full {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -0.02em;
    }

    /* Section cards - breathing room + shadow hierarchy */
    .section-card {
        padding: var(--m-space-md);
        margin-bottom: 0;
        border-radius: 16px;
        background: #fff;
        border: 1px solid rgba(226, 232, 240, 0.88);
        box-shadow: var(--shadow-m-secondary);
    }

    .section-card:has(.data-table),
    .section-card:has(.generator-page),
    .section-card--primary {
        box-shadow: var(--shadow-m-primary);
    }

    .page-dashboard .section-card {
        padding: var(--m-space-md);
        margin-bottom: 0;
    }

    .section-header {
        margin-bottom: var(--m-space-sm);
        gap: var(--m-space-xs);
    }

    .page-dashboard .section-header {
        margin-bottom: var(--m-space-sm);
    }

    .section-header h2 {
        font-size: 15px;
        font-weight: 800;
        letter-spacing: -0.025em;
        color: #0f172a;
    }

    .section-header p,
    .section-header .section-subtitle {
        font-size: 12px;
        font-weight: 500;
        color: #64748b;
    }

    .section-header a {
        font-size: 12px;
        font-weight: 600;
        padding: 6px 12px;
        color: var(--primary);
        background: rgba(37, 99, 235, 0.08);
        border-radius: 999px;
    }

    /* Quick actions - 4 buttons in one row */
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--m-space-sm);
    }

    .quick-action {
        padding: var(--m-space-sm) var(--m-space-xs);
        border-radius: 14px;
        box-shadow: var(--shadow-m-secondary);
        text-align: center;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .page-dashboard .quick-action {
        padding: 8px 2px;
    }

    .page-dashboard .quick-action span {
        display: none;
    }

    .quick-action:hover {
        transform: none;
    }

    .quick-action:active {
        transform: scale(0.97);
    }

    .quick-action-icon {
        width: 32px;
        height: 32px;
        margin: 0 auto 4px;
        border-radius: 9px;
    }

    .page-dashboard .quick-action-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 4px;
    }

    .quick-action-icon svg {
        width: 15px;
        height: 15px;
    }

    .quick-action strong {
        font-size: 9px;
        margin-bottom: 0;
        line-height: 1.1;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .page-dashboard .quick-action strong {
        font-size: 9px;
    }

    .quick-action span {
        font-size: 10px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hide dashboard categories on mobile */
    .page-dashboard .dashboard-categories-section {
        display: none;
    }

    .page-dashboard .stats-scroll {
        display: none;
    }

    /* Categories — 2-col square-ish chips */
    .category-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--m-space-sm);
    }

    .category-chip {
        padding: var(--m-space-md) var(--m-space-sm);
        border-radius: 14px;
        box-shadow: var(--shadow-m-secondary);
        aspect-ratio: 1.05;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .category-chip:hover {
        transform: none;
    }

    .category-chip:active {
        transform: scale(0.97);
    }

    .category-chip-icon {
        width: 32px;
        height: 32px;
        margin: 0 0 6px;
        border-radius: 10px;
    }

    .category-chip-icon svg {
        width: 16px;
        height: 16px;
    }

    .category-chip strong {
        font-size: 12px;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        width: 100%;
    }

    .category-chip span {
        font-size: 10px;
        margin-top: 2px;
    }

    /* Password list — mobile card rows */
    .data-table-wrap--mobile-cards {
        margin: 0;
    }

    .data-table-wrap--mobile-cards .data-table thead {
        display: none;
    }

    .data-table-wrap--mobile-cards .data-table,
    .data-table-wrap--mobile-cards .data-table tbody {
        display: block;
    }

    .data-table-wrap--mobile-cards .data-table tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 12px;
        padding: var(--m-space-md);
        margin-bottom: 0;
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow-m-secondary);
        border-bottom: none;
        align-items: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease;
    }

    .data-table-wrap--mobile-cards .data-table tbody tr:hover,
    .data-table-wrap--mobile-cards .data-table tbody tr:active {
        background: rgba(37, 99, 235, 0.05);
        transform: none;
        box-shadow: none;
    }

    .data-table-wrap--mobile-cards .data-table td {
        display: block;
        padding: 0;
        border: none;
        vertical-align: middle;
    }

    .data-table-wrap--mobile-cards .data-table td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .data-table-wrap--mobile-cards .data-table td:nth-child(2) {
        display: none;
    }

    .data-table-wrap--mobile-cards .data-table td:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .data-table-wrap--mobile-cards .data-table td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        font-size: 11px;
        color: var(--text-secondary);
        white-space: nowrap;
    }

    .data-table-wrap--mobile-cards .data-table td:nth-child(5),
    .data-table-wrap--mobile-cards .data-table td.row-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }

    .data-table-wrap--mobile-cards .site-cell {
        gap: 10px;
    }

    .data-table-wrap--mobile-cards .site-cell strong {
        font-size: 14px;
        font-weight: 600;
    }

    .data-table-wrap--mobile-cards .site-cell small {
        font-size: 12px;
        color: var(--text-secondary);
    }

    .data-table-wrap--mobile-cards .site-favicon,
    .data-table-wrap--mobile-cards .site-fallback {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 13px;
        border-radius: 10px;
    }

    .data-table-wrap--mobile-cards .badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .data-table-wrap--mobile-cards .row-menu-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 12px;
    }

    .data-table-wrap--mobile-cards .row-menu-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Filters */
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 10px;
    }

    .filters-bar form {
        width: 100%;
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px !important;
    }

    .filter-select {
        flex: 1;
        min-width: 0;
        width: 100%;
        height: 44px;
        padding: 0 12px;
        font-size: 14px;
    }

    .filters-bar-actions {
        margin-left: 0 !important;
        width: 100%;
        justify-content: space-between;
    }

    .filters-bar-actions .btn-primary {
        display: none;
    }

    /* Bottom nav — premium floating bar */
    .mobile-nav {
        display: flex;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        height: var(--mobile-nav-height);
        padding: 0 8px 8px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(28px) saturate(190%);
        -webkit-backdrop-filter: blur(28px) saturate(190%);
        border: 1px solid rgba(255, 255, 255, 0.72);
        box-shadow:
            0 -6px 24px rgba(15, 23, 42, 0.06),
            0 12px 40px rgba(15, 23, 42, 0.14),
            0 2px 8px rgba(15, 23, 42, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .mobile-nav-item {
        flex: 1;
        min-height: 44px;
        justify-content: center;
        position: relative;
        padding: 6px 4px;
        font-size: 10px;
        gap: 3px;
        border-radius: 14px;
        transition: color 0.18s ease, background 0.18s ease;
    }

    .mobile-nav-item svg {
        width: 21px;
        height: 21px;
        transition: transform 0.18s ease, filter 0.18s ease;
    }

    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item.active svg {
        filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.45));
        transform: scale(1.05);
    }

    .mobile-nav-item.active::before {
        content: '';
        position: absolute;
        inset: 2px 4px;
        border-radius: 12px;
        background: rgba(37, 99, 235, 0.08);
        z-index: -1;
    }

    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 18px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, #3B82F6, #2563EB);
        box-shadow: 0 0 10px rgba(37, 99, 235, 0.55);
    }

    /* FAB ? center gradient button */
    .mobile-nav-fab {
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        margin-top: -22px;
        flex-shrink: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 40%, #2563EB 70%, #1D4ED8 100%);
        border: 3px solid rgba(255, 255, 255, 0.95);
        box-shadow:
            0 10px 28px rgba(37, 99, 235, 0.45),
            0 0 0 4px rgba(37, 99, 235, 0.1);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
    }

    .mobile-nav-fab svg {
        width: 22px;
        height: 22px;
    }

    .mobile-nav-fab:active {
        transform: scale(0.92);
        box-shadow:
            0 6px 18px rgba(37, 99, 235, 0.4),
            0 0 0 3px rgba(37, 99, 235, 0.08);
    }

    /* Modal - compact centered card on mobile */
    .modal-overlay {
        padding: 12px;
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(12px + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 4px);
        align-items: center;
        justify-content: center;
    }

    .modal-overlay.open .modal {
        animation: modalPopMobile 0.24s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes modalPopMobile {
        from {
            opacity: 0;
            transform: translateY(10px) scale(0.97);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .modal {
        width: calc(100% - 4px);
        max-width: 420px;
        max-height: min(76dvh, 620px);
        height: auto;
        border-radius: 18px;
        padding-bottom: 0;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        padding: 12px 14px;
        flex-shrink: 0;
    }

    .modal-header h2 {
        font-size: 15px;
        font-weight: 700;
    }

    .modal-actions {
        gap: 4px;
    }

    .modal-actions .icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .modal-actions .icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 14px 14px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
    }

    .modal-profile {
        display: grid;
        grid-template-columns: 44px 1fr;
        column-gap: 10px;
        row-gap: 2px;
        padding: 10px 12px;
        text-align: left;
        align-items: center;
    }

    .modal-profile .site-fallback,
    .modal-profile .site-favicon {
        grid-row: 1 / span 2;
        grid-column: 1;
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 16px;
        margin: 0;
        border-radius: 12px;
    }

    .modal-profile h3 {
        grid-column: 2;
        grid-row: 1;
        font-size: 15px;
        margin: 0;
        line-height: 1.25;
    }

    .modal-profile p {
        grid-column: 2;
        grid-row: 2;
        font-size: 11px;
        margin: 0;
        line-height: 1.3;
    }

    .modal-profile .badge,
    .modal-profile #modalCategoryBadge {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 6px;
        font-size: 10px;
    }

    .modal-profile .website-link-btn,
    .modal-profile #modalWebsiteLink {
        grid-column: 1 / -1;
        margin-top: 6px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .modal-meta {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        border: none;
        padding: 0;
        background: transparent;
    }

    .meta-item {
        margin-bottom: 0;
        padding: 8px 4px;
        background: rgba(248, 251, 255, 0.9);
        border: 1px solid var(--border);
        border-radius: 10px;
        text-align: center;
    }

    .meta-item label {
        font-size: 9px;
        margin-bottom: 2px;
    }

    .meta-item span {
        font-size: 10px;
        line-height: 1.2;
    }

    .detail-field {
        margin-bottom: 8px;
    }

    .detail-field:last-child {
        margin-bottom: 0;
    }

    .detail-field label {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .field-row {
        min-height: 40px;
        padding: 6px 8px;
        border-radius: 10px;
        background: rgba(248, 251, 255, 0.95);
    }

    .field-row span {
        font-size: 13px;
        line-height: 1.35;
    }

    .field-row button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        flex-shrink: 0;
        border-radius: 9px;
    }

    .field-row button svg {
        width: 15px;
        height: 15px;
    }

    .strength-meter {
        margin-top: 6px;
    }

    .strength-label {
        font-size: 10px;
    }

    /* Forms & other pages */
    .form-card {
        padding: 14px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .content-grid-2 {
        gap: 12px;
    }

    .admin-item {
        padding: 12px;
        gap: 10px;
    }

    .admin-item-main .color-dot {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .icon-picker {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .icon-option {
        height: 44px;
        min-height: 44px;
    }

    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .preset-card {
        padding: 12px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .backup-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .empty-state {
        padding: 28px 16px;
    }

    .empty-state h3 {
        font-size: 16px;
    }

    .empty-state-icon {
        width: 52px;
        height: 52px;
    }

    .alert {
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .btn {
        min-height: 44px;
        padding: 10px 14px;
    }

    /* Disable heavy desktop hover lifts on touch */
    .quick-action:hover,
    .stat-card:hover,
    .category-chip:hover,
    .admin-item:hover,
    .data-table tbody tr:hover {
        transform: none;
    }

    .toast-container {
        top: calc(var(--topbar-height) + 8px);
        right: 12px;
        left: 12px;
    }

    /* Dashboard: tek scroll alanı, gereksiz body bounce yok */
    body.page-dashboard.app-body {
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100dvh;
        overflow-y: hidden;
    }

    body.page-dashboard .app-shell {
        flex: 1;
        min-height: 0;
        width: 100%;
    }

    body.page-dashboard .app-main {
        flex: 1;
        min-height: 0;
        max-height: 100dvh;
        overflow: hidden;
    }

    .page-dashboard .app-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        padding: var(--m-space-sm, 12px);
        padding-top: var(--m-space-xs, 8px);
        padding-bottom: calc(12px + var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom, 0px));
        gap: var(--m-space-sm, 12px);
    }

    .page-dashboard .stats-scroll {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
    }

    .page-dashboard .topbar::after {
        bottom: -6px;
        height: 8px;
        filter: blur(4px);
    }

    .page-dashboard .section-header h2 {
        font-size: 13px;
    }

    /* Shared compact password list (dashboard + passwords page) */
    .page-passwords .app-content {
        padding: 8px 10px;
        padding-bottom: calc(8px + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
    }

    .page-passwords .filters-bar {
        gap: 6px;
        margin-bottom: 6px;
    }

    .page-passwords .filter-select {
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 10px;
    }

    .page-passwords .filters-bar form {
        gap: 6px !important;
    }

    .page-passwords .filters-bar-actions span {
        font-size: 11px !important;
    }

    .page-passwords .filters-bar .btn-secondary {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .page-passwords .password-list-section {
        margin-bottom: 0;
        border-radius: 12px;
    }

    .page-dashboard .password-list-section,
    .page-passwords .password-list-section {
        padding: 12px 12px 14px;
        overflow: visible;
        margin-bottom: 0;
    }

    .page-dashboard .password-list-section .section-header,
    .page-passwords .password-list-section .section-header {
        margin-bottom: 10px;
    }

    .password-list-section .data-table-wrap--mobile-cards {
        margin: 0;
    }

    .password-list-compact {
        margin: 0;
        padding-bottom: 2px;
    }

    .password-list-compact .data-table tbody {
        gap: 10px;
    }

    .password-list-compact .data-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .password-list-compact .data-table tbody tr {
        gap: 2px 6px;
        padding: 7px 10px;
        min-height: 0;
    }

    .password-list-compact .site-cell {
        gap: 8px;
        align-items: center;
    }

    .password-list-compact .site-cell strong {
        font-size: 12px;
        font-weight: 600;
        line-height: 1.25;
    }

    .password-list-compact .site-cell small {
        font-size: 10px;
        line-height: 1.25;
        margin-top: 1px;
    }

    .password-list-compact .site-favicon,
    .password-list-compact .site-fallback {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 11px;
        border-radius: 8px;
    }

    .password-list-compact .badge {
        font-size: 9px;
        padding: 2px 6px;
        line-height: 1.3;
    }

    .password-list-compact .date-cell {
        font-size: 10px;
    }

    .password-list-compact .row-menu-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        border-radius: 10px;
    }

    .password-list-compact .row-menu-btn svg {
        width: 16px;
        height: 16px;
    }

    .page-passwords .empty-state {
        padding: 24px 12px;
    }

    .page-passwords .empty-state h3 {
        font-size: 15px;
    }

    .page-passwords .empty-state p {
        font-size: 12px;
        margin-bottom: 14px;
    }
}

@media (max-width: 768px) and (min-width: 481px) {
    .category-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.password-row.is-highlighted,
.data-table tbody tr.password-row.is-highlighted {
    background: rgba(37, 99, 235, 0.1) !important;
    box-shadow: inset 3px 0 0 #2563EB;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#addPasswordModalOverlay {
    z-index: 520;
}

.modal--form {
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 720px);
    overflow: hidden;
}

.modal--form .modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-body.modal-form-body {
    display: block;
    grid-template-columns: none;
    flex: 1;
    min-height: 0;
    padding: 16px 24px 8px;
    overflow-y: auto;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
}

.modal-form-footer {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

.modal-form-footer .btn {
    flex: 1;
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}

.modal-form-footer .btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.modal-form-footer .btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.modal-form-footer .btn-primary {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

.modal-form-body .form-grid {
    gap: 14px;
    padding-bottom: 4px;
}

.modal-form-body .form-group {
    overflow: visible;
}

.modal-form-body .form-group input,
.modal-form-body .form-group textarea {
    padding-top: 22px;
    padding-bottom: 10px;
}

.modal-form-body .form-group label {
    top: 50%;
    transform: translateY(-50%);
    line-height: 1.2;
    max-width: calc(100% - 28px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-form-body .form-group input:focus + label,
.modal-form-body .form-group input:not(:placeholder-shown) + label,
.modal-form-body .form-group.has-value label,
.modal-form-body .form-group textarea:focus + label,
.modal-form-body .form-group textarea:not(:placeholder-shown) + label {
    top: 10px;
    transform: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

.modal-form-body .form-group--select select,
.modal-form-body .form-group select {
    padding-top: 22px;
    padding-bottom: 10px;
}

.modal-form-body .form-group--select label,
.modal-form-body .form-group select + label {
    top: 10px;
    transform: none;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.modal-form-body .form-group--select.has-value label,
.modal-form-body .form-group.has-value select + label {
    color: var(--primary);
}

.modal-form-body .password-input-wrap input {
    padding-right: 108px;
}

button.sidebar-cta,
button.mobile-nav-fab,
button.quick-action,
button.user-menu {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

button.sidebar-cta {
    width: 100%;
    border: none;
}

button.quick-action {
    display: block;
    width: 100%;
    color: inherit;
}

@media (max-width: 768px) {
    .modal--form {
        max-width: 420px;
        max-height: min(88dvh, 640px);
    }

    .modal-body.modal-form-body {
        padding: 12px 14px 8px;
    }

    .modal-form-footer {
        padding: 12px 14px;
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
        gap: 10px;
    }

    .modal-form-footer .btn {
        min-height: 46px;
    }

    .modal-form-body .form-row-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .modal-form-body .password-input-wrap input {
        padding-right: 100px;
    }

    /* List rows inside elevated sections — stack with rhythm */
    .data-table-wrap--mobile-cards .data-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .data-table-wrap--mobile-cards .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: var(--m-space-sm, 12px);
    }

    .password-list-section .section-header,
    .section-card:has(.data-table) .section-header {
        margin-bottom: var(--m-space-md, 16px);
    }

    .filters-bar {
        gap: var(--m-space-sm);
        margin-bottom: var(--m-space-sm);
    }
}
