/* ConSearch — Convention Document Search UI v4 — Top Bar Layout */
:root {
    --primary: #0ea5e9;
    --primary-light: #38bdf8;
    --primary-dark: #0284c7;
    --primary-glow: rgba(14,165,233,0.12);
    --accent: #14b8a6;
    --accent-light: #5eead4;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #f43f5e;
    --danger-bg: #fff1f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --bg: #f0fafb;
    --surface: #ffffff;
    --topbar-bg: linear-gradient(135deg, #0c1222 0%, #111d35 50%, #0a1628 100%);
    --topbar-height: 76px;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e0f2fe;
    --border-hover: #bae6fd;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xl: 18px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(14,165,233,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px rgba(14,165,233,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 24px rgba(14,165,233,0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: -30%; left: -20%;
    width: 180%; height: 180%;
    background:
        radial-gradient(ellipse at 25% 40%, rgba(14,165,233,0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 25%, rgba(20,184,166,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(56,189,248,0.03) 0%, transparent 50%);
    animation: bgFloat 25s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}
@keyframes bgFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-3%, -2%) scale(1.03); }
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeIn 0.6s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════ */
.topbar {
    width: 100%;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(56,189,248,0.08);
    animation: slideDown 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
/* Ambient glow */
.topbar::before {
    content: '';
    position: absolute;
    top: -100%; left: -20%;
    width: 140%; height: 400%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(14,165,233,0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(20,184,166,0.05) 0%, transparent 50%);
    animation: topbarGlow 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
@keyframes topbarGlow {
    0% { transform: translateX(0); opacity: 0.7; }
    100% { transform: translateX(3%); opacity: 1; }
}
/* Bottom accent line */
.topbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(14,165,233,0.3) 15%,
        rgba(20,184,166,0.4) 50%,
        rgba(14,165,233,0.3) 85%,
        transparent 100%);
    background-size: 200% 100%;
    animation: lineShimmer 6s ease-in-out infinite;
}
@keyframes lineShimmer {
    0%, 100% { background-position: 0% 0; }
    50% { background-position: 100% 0; }
}
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ── Brand (left) ── */
.topbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.logo {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.logo::before {
    content: '';
    display: inline-block;
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
    border-radius: 9px;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(14,165,233,0.3), 0 0 32px rgba(14,165,233,0.1);
    animation: iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat {
    0%, 100% {
        box-shadow: 0 0 16px rgba(14,165,233,0.3), 0 0 32px rgba(14,165,233,0.1);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 22px rgba(20,184,166,0.35), 0 0 40px rgba(20,184,166,0.12);
        transform: translateY(-1px);
    }
}
.logo-divider {
    width: 1px;
    height: 34px;
    background: linear-gradient(180deg, transparent, rgba(56,189,248,0.25), transparent);
    flex-shrink: 0;
}
.logo-sub {
    font-size: 15px;
    color: #4b6a8a;
    letter-spacing: 0.8px;
    font-weight: 500;
    white-space: nowrap;
}

/* ── Navigation (center) ── */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    color: #6b84a3;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
}
.nav-item::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 50%; right: 50%;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #14b8a6);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}
.nav-item:hover {
    color: #e0f2fe;
    background: rgba(14,165,233,0.06);
}
.nav-item.active {
    color: #ffffff;
    font-weight: 600;
    background: rgba(14,165,233,0.1);
}
.nav-item.active::after {
    left: 20%; right: 20%;
    opacity: 1;
    box-shadow: 0 0 8px rgba(14,165,233,0.35);
}
.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    filter: grayscale(0.3);
    transition: filter 0.25s ease;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { filter: grayscale(0); }

/* ── User (right) ── */
.topbar-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: rgba(14,165,233,0.05);
    border: 1px solid rgba(56,189,248,0.08);
    border-radius: 28px;
    transition: all 0.25s ease;
}
.user-info:hover {
    background: rgba(14,165,233,0.09);
    border-color: rgba(56,189,248,0.15);
}
/* Avatar circle */
.user-info::before {
    content: '';
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(14,165,233,0.2);
}
.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.user-alias {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    line-height: 1.2;
}
.user-role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: #38bdf8;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.main-content {
    margin-top: var(--topbar-height);
    flex: 1;
    padding: 40px 48px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page { display: none; }
.page.active { display: block; animation: pageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 32px; }
.page-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-desc { font-size: 15px; color: var(--text-secondary); margin-top: 6px; }

/* ─── Form ─── */
.search-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}
.search-form::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light), var(--accent-light));
    background-size: 300% 100%;
    animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.search-form:focus-within {
    border-color: rgba(14,165,233,0.3);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    letter-spacing: 0.2px;
}
.required { color: var(--danger); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fafeff;
    transition: all var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--surface);
}
.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus) { border-color: var(--border-hover); }
.form-hint { font-size: 15px; color: var(--text-muted); margin-top: 6px; display: block; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.optional-fields {
    margin-bottom: 20px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
    overflow: hidden;
    background: #fafeff;
}
.optional-fields:hover { border-color: var(--border-hover); }
.optional-fields summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    user-select: none;
    transition: all var(--transition);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.optional-fields summary::-webkit-details-marker { display: none; }
.optional-fields summary::before {
    content: '\25B6';
    font-size: 10px;
    color: var(--primary);
    transition: transform var(--transition);
    display: inline-block;
}
.optional-fields[open] summary::before { transform: rotate(90deg); }
.optional-fields summary:hover { background: rgba(14,165,233,0.04); }
.optional-fields[open] summary {
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    background: rgba(14,165,233,0.03);
}
.optional-fields > .form-row,
.optional-fields > .form-group {
    padding: 0 16px 16px;
    animation: expandIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes expandIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(14,165,233,0.3);
    letter-spacing: 0.3px;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(14,165,233,0.35);
    transform: translateY(-2px);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(16,185,129,0.25);
}
.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #e11d48 100%);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(244,63,94,0.2);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    background: var(--bg);
    border-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* ─── Results ─── */
.results-container { margin-top: 32px; animation: resultsIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes resultsIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 15px;
    color: var(--text-secondary);
    transition: all var(--transition);
    animation: tagIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.meta-tag:nth-child(1) { animation-delay: 0.05s; }
.meta-tag:nth-child(2) { animation-delay: 0.1s; }
.meta-tag:nth-child(3) { animation-delay: 0.15s; }
.meta-tag:nth-child(4) { animation-delay: 0.2s; }
@keyframes tagIn {
    from { opacity: 0; transform: scale(0.85) translateY(4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.meta-tag:hover { border-color: var(--primary-light); background: var(--primary-glow); }
.meta-tag strong { color: var(--text); font-weight: 600; }

.result-answer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow);
    line-height: 1.8;
    animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.result-answer h3 {
    font-size: 20px;
    margin: 24px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg);
    color: var(--text);
    font-weight: 700;
}
.result-answer h3:first-child { margin-top: 0; }
.result-answer ul, .result-answer ol { padding-left: 20px; margin: 10px 0; }
.result-answer li { margin: 6px 0; color: var(--text-secondary); }
.result-answer strong { color: var(--text); }
.result-answer pre {
    background: #f0fafb;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 13px;
    border: 1px solid var(--border);
}
.result-answer blockquote {
    border-left: 3px solid var(--primary-light);
    margin: 14px 0;
    color: var(--text-secondary);
    background: rgba(14,165,233,0.03);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ─── Status Badges ─── */
.answer-found {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: badgeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
.answer-found.yes {
    background: var(--success-bg);
    color: var(--success);
    box-shadow: 0 0 16px rgba(16,185,129,0.12);
}
.answer-found.no {
    background: var(--danger-bg);
    color: var(--danger);
    box-shadow: 0 0 16px rgba(244,63,94,0.1);
}

/* ─── SIM Section ─── */
.sim-section {
    margin-top: 24px;
    background: var(--warning-bg);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: var(--radius-xl);
    padding: 28px;
    animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.sim-header h3 { color: #b45309; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.sim-header p { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.sim-template {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.sim-template h4 { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.sim-template pre {
    background: #f8fffe;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    line-height: 1.6;
}
.sim-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ─── History ─── */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.history-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}
.history-item:hover {
    border-color: rgba(14,165,233,0.25);
    box-shadow: var(--shadow), 0 0 0 1px rgba(14,165,233,0.06);
    transform: translateX(4px);
}
.history-item:hover::before { opacity: 1; }
.history-item .hi-question { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.history-item .hi-meta {
    font-size: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.history-item .hi-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.hi-status.found { background: var(--success-bg); color: var(--success); }
.hi-status.not-found { background: var(--danger-bg); color: var(--danger); }

/* ─── Approvals ─── */
.approvals-list { display: flex; flex-direction: column; gap: 12px; }
.approval-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.approval-card:hover { box-shadow: var(--shadow); }
.approval-card .ac-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.approval-card .ac-title { font-weight: 700; font-size: 15px; }
.approval-card .ac-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.approval-card .ac-actions { display: flex; gap: 10px; }

/* ─── Spinner ─── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ─── Approval Badge ─── */
.approval-badge {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(245,158,11,0.25);
    animation: badgeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
        height: 56px;
    }
    .topbar-brand .logo-sub,
    .topbar-brand .logo-divider { display: none; }
    .logo { font-size: 18px; }
    .logo::before { width: 26px; height: 26px; border-radius: 7px; }
    .nav-item span:not(.nav-icon) { display: none; }
    .nav-item { padding: 8px 12px; }
    .user-details { display: none; }
    .user-info::before { width: 28px; height: 34px; }
    .user-info { padding: 4px; border-radius: 50%; }
    .main-content {
        margin-top: 56px;
        padding: 24px 20px;
    }
    .form-row { grid-template-columns: 1fr; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7dd3fc; }
::selection { background: rgba(14,165,233,0.15); color: var(--text); }

.setup-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px 32px;
    transition: border-color 0.2s;
}
.setup-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.setup-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #14b8a6);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 8px 0;
}
.step-content p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}
.step-content kbd {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: #cbd5e1;
}

.bookmarklet-drag-area {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bookmarklet-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    cursor: grab;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
}
.bookmarklet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.45);
}
.bookmarklet-btn:active {
    cursor: grabbing;
    transform: translateY(0);
}

.drag-hint {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.setup-info {
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 16px;
    padding: 24px 32px;
}
.setup-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 12px 0;
}
.setup-info ul {
    margin: 0;
    padding-left: 20px;
}
.setup-info li {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.8;
}

/* ─── Admin Role Switcher ─── */
#roleSwitcher {
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.1);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
#roleSwitcher:hover {
    border-color: rgba(14, 165, 233, 0.7);
}
#roleSwitcher:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}
#roleSwitcher option {
    background: #1e293b;
    color: #e2e8f0;
}

/* ─── Cache Tool — Visible text for light theme ─── */
.setup-content .step-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.setup-content .step-content p {
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    line-height: 1.7;
}
.setup-content .step-content strong {
    color: #0f172a;
    font-weight: 700;
}
.setup-info h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}
.setup-info li {
    font-size: 15px;
    font-weight: 500;
    color: #334155;
}
.setup-info strong {
    color: #0f172a;
}
#page-setup .page-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}
#page-setup .page-desc {
    font-size: 16px;
    font-weight: 500;
    color: #475569;
}
.setup-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #cbd5e1;
}
.setup-card:hover {
    border-color: #0ea5e9;
}
.setup-info {
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.25);
}

/* ─── kbd fix for light theme ─── */
.step-content kbd {
    background: #e2e8f0;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
