:root {
    --sidebar-width: 286px;
    --primary: #635bff;
    --primary-2: #7c3aed;
    --primary-dark: #4438ca;
    --accent: #06b6d4;
    --success: #12b76a;
    --warning: #f79009;
    --danger: #f04438;
    --ink: #0f172a;
    --muted: #667085;
    --line: #e5e7eb;
    --line-2: #eef2f7;
    --soft: #f8fafc;
    --surface: rgba(255, 255, 255, .94);
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-md: 0 18px 48px rgba(15, 23, 42, .10);
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(99,91,255,.10), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(6,182,212,.12), transparent 26%),
        #f5f7fb;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }
img { max-width: 100%; }

/* Auth */
.auth-bg {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 16% 20%, rgba(99,91,255,.45), transparent 30%),
        radial-gradient(circle at 84% 6%, rgba(6,182,212,.28), transparent 28%),
        linear-gradient(135deg, #061126 0%, #101828 55%, #050816 100%);
    overflow-x: hidden;
}
.auth-shell {
    width: min(1120px, calc(100vw - 28px));
    min-height: min(720px, calc(100vh - 42px));
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(0,0,0,.36);
    backdrop-filter: blur(20px);
}
.auth-hero {
    position: relative;
    align-items: flex-end;
    padding: 56px;
    color: #fff;
    background:
        linear-gradient(140deg, rgba(99,91,255,.92), rgba(25,35,72,.78)),
        radial-gradient(circle at 70% 24%, rgba(255,255,255,.22), transparent 22%);
}
.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    filter: blur(.2px);
}
.auth-hero::before { width: 240px; height: 240px; right: -80px; top: 70px; }
.auth-hero::after { width: 130px; height: 130px; left: 70px; top: 92px; }
.auth-hero-inner { position: relative; z-index: 1; max-width: 560px; }
.auth-hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -.055em; font-weight: 850; margin: 10px 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.78); }
.auth-hero-text { color: rgba(255,255,255,.78); font-size: 16px; max-width: 480px; }
.auth-mini-stats { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.auth-mini-stats span { min-width: 124px; padding: 15px 17px; border-radius: 18px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); }
.auth-mini-stats strong { display: block; font-size: 21px; }
.auth-mini-stats small { color: rgba(255,255,255,.72); }
.auth-card {
    width: min(460px, calc(100vw - 32px));
    background: rgba(255,255,255,.98);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow-md);
}
.auth-card-pro {
    width: auto;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 58px);
}
.logo-tile {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 16px 34px rgba(99, 91, 255, .32);
    flex: none;
}
.logo-tile-lg { width: 70px; height: 70px; font-size: 28px; border-radius: 22px; }
.login-form .form-control { padding-left: 48px; }
.input-icon { position: relative; }
.input-icon > i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    z-index: 2;
}
.login-help-card {
    padding: 16px;
    border-radius: 18px;
    background: #f7f7ff;
    border: 1px solid #e6e5ff;
    color: #344054;
}
.login-help-card .bi { font-size: 28px; color: var(--primary); }

/* Shell */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    color: #fff;
    background:
        radial-gradient(circle at 0% 0%, rgba(99,91,255,.34), transparent 36%),
        linear-gradient(180deg, #0b1220 0%, #070b14 100%);
    padding: 22px 16px;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid rgba(255,255,255,.08);
    box-shadow: 18px 0 50px rgba(15,23,42,.15);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand h1 { font-size: 19px; margin: 0; line-height: 1.1; font-weight: 850; letter-spacing: -.02em; }
.sidebar-brand span { color: #94a3b8; font-size: 12px; }
.sidebar-nav { margin-top: 20px; display: grid; gap: 5px; padding-bottom: 88px; }
.nav-section-label {
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: 10px;
    font-weight: 900;
    margin: 18px 12px 6px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.78);
    padding: 12px 13px;
    border-radius: 14px;
    font-weight: 650;
    font-size: 14px;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.sidebar-link i { width: 22px; text-align: center; font-size: 17px; opacity: .95; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 14px 30px rgba(99,91,255,.32);
}
.sidebar-footer {
    position: fixed;
    left: 16px;
    bottom: 18px;
    width: calc(var(--sidebar-width) - 32px);
    padding-top: 12px;
    background: linear-gradient(180deg, rgba(7,11,20,0), #070b14 30%);
}
.sidebar-link-danger { color: #fecaca; background: rgba(240,68,56,.08); }
.sidebar-link-danger:hover { color: #fff; background: rgba(240,68,56,.18); }
.content-wrap {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    min-height: 86px;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229,231,235,.82);
    display: flex;
    align-items: center;
    padding: 16px 26px;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 900;
}
.title-wrap { min-width: 220px; }
.page-title { margin: 0; font-size: clamp(21px, 2vw, 26px); font-weight: 850; letter-spacing: -.025em; }
.page-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.top-search { max-width: 460px; flex: 1; margin-left: auto; position: relative; }
.top-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #98a2b3; z-index: 2; }
.top-search .form-control { border-radius: 999px; padding: 12px 18px 12px 44px; background: #fff; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn, .btn-soft {
    background: #fff;
    border: 1px solid var(--line);
    color: #344054;
    box-shadow: var(--shadow-sm);
}
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
.admin-profile {
    border: 0;
    background: #fff;
    border-radius: 999px;
    padding: 7px 10px 7px 7px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 850;
    flex: none;
}
.profile-copy { line-height: 1.1; text-align: left; }
.profile-copy strong { display: block; font-size: 13px; }
.profile-copy small { color: var(--muted); font-size: 11px; max-width: 150px; display: block; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 26px; flex: 1; animation: pageIn .22s ease both; }
@keyframes pageIn { from { opacity: .72; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.footer {
    color: #667085;
    font-size: 13px;
    padding: 0 26px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* Components */
.card-clean {
    background: var(--surface);
    border: 1px solid rgba(229,231,235,.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-clean:hover { border-color: rgba(99,91,255,.18); box-shadow: var(--shadow-md); }
.card-hover:hover { transform: translateY(-2px); }
.stat-card {
    padding: 22px;
    min-height: 138px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -24px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(99,91,255,.08);
}
.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 25px;
    flex: none;
    box-shadow: 0 15px 30px rgba(15,23,42,.13);
}
.bg-purple { background: linear-gradient(135deg,#7c3aed,#4f46e5); }
.bg-blue { background: linear-gradient(135deg,#0ea5e9,#2563eb); }
.bg-green { background: linear-gradient(135deg,#22c55e,#059669); }
.bg-orange { background: linear-gradient(135deg,#f59e0b,#f97316); }
.bg-red { background: linear-gradient(135deg,#fb7185,#ef4444); }
.bg-teal { background: linear-gradient(135deg,#14b8a6,#0891b2); }
.stat-label { color: #475467; font-size: 13px; font-weight: 750; margin-bottom: 4px; }
.stat-value { font-size: clamp(24px, 3vw, 32px); font-weight: 900; letter-spacing: -.045em; }
.stat-growth { color: #667085; font-size: 12px; margin-top: 3px; }
.section-title { font-size: 18px; font-weight: 850; letter-spacing: -.02em; margin: 0; }
.meta-muted { color: var(--muted); font-size: 13px; }
.table-responsive { border-radius: 16px; }
.table { margin: 0; vertical-align: middle; }
.table > :not(caption) > * > * { padding: 14px 14px; border-color: #eef2f7; }
.table thead th {
    color: #475467;
    font-weight: 850;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .045em;
    background: #f8fafc;
    white-space: nowrap;
}
.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: #fbfcff; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #f2f4f7; }
.thumb-sm { width: 38px; height: 38px; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); background: #f2f4f7; }
.form-control, .form-select {
    border-color: #d9e1ee;
    border-radius: 13px;
    min-height: 44px;
    box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(99,91,255,.65);
    box-shadow: 0 0 0 .25rem rgba(99,91,255,.12) !important;
}
textarea.form-control { min-height: 110px; }
.form-label { font-weight: 750; color: #344054; font-size: 13px; }
.btn {
    border-radius: 13px;
    font-weight: 750;
    padding: .62rem 1rem;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border: none;
    box-shadow: 0 12px 24px rgba(99,91,255,.20);
}
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #554cff, #6d28d9); box-shadow: 0 16px 30px rgba(99,91,255,.28); }
.btn-light {
    background: #fff;
    border: 1px solid var(--line);
    color: #344054;
}
.btn-outline-primary { border-color: rgba(99,91,255,.36); color: var(--primary-dark); background: #fff; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-sm { border-radius: 10px; padding: .44rem .65rem; }
.badge { font-weight: 800; letter-spacing: .01em; }
.empty-state { padding: 42px 20px; text-align: center; color: #667085; }
.actions-cell { white-space: nowrap; }
.admin-alert { border: 0; border-radius: 16px; box-shadow: var(--shadow-sm); }
pre.bg-light { background: #f8fafc !important; border: 1px solid var(--line); color: #344054; }
code { color: #5b21b6; }
.border { border-color: var(--line) !important; }
.rounded-4 { border-radius: 18px !important; }
.text-primary { color: var(--primary) !important; }
.text-bg-light { background: #f2f4f7 !important; color: #344054 !important; }
.text-bg-dark { background: #475467 !important; }
.text-bg-success { background: #dcfae6 !important; color: #067647 !important; }
.text-bg-warning { background: #fef0c7 !important; color: #b54708 !important; }
.text-bg-secondary { background: #eef2f7 !important; color: #475467 !important; }

/* Dashboard */
.dashboard-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 28px;
    margin-bottom: 24px;
    color: #fff;
    border-radius: 26px;
    background:
        radial-gradient(circle at 85% 18%, rgba(255,255,255,.24), transparent 22%),
        linear-gradient(135deg, #4f46e5, #7c3aed 55%, #06b6d4);
    box-shadow: 0 22px 60px rgba(79,70,229,.22);
    overflow: hidden;
    position: relative;
}
.dashboard-hero h1 { margin: 0 0 8px; font-weight: 900; letter-spacing: -.04em; }
.dashboard-hero p { margin: 0; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hero-actions .btn { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); color: #fff; box-shadow: none; }
.hero-actions .btn:hover { background: rgba(255,255,255,.24); }
.metric-pill {
    padding: 9px 12px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: rgba(255,255,255,.86);
    font-size: 13px;
    font-weight: 750;
}
.quick-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 17px;
    background: #f8fafc;
    border: 1px solid var(--line);
    color: #344054;
    font-weight: 800;
}
.quick-action i { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.insight-list { display: grid; gap: 14px; }
.insight-item { display: flex; align-items: center; gap: 12px; }
.insight-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--primary); flex: none; }
.progress-soft { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.progress-soft span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: inherit; }

/* Settings side tabs */
.card-clean .btn.w-100 { justify-content: flex-start; display: inline-flex; align-items: center; }

@media (max-width: 1180px) {
    .top-search { display: none; }
}
@media (max-width: 992px) {
    :root { --sidebar-width: 0px; }
    .sidebar { transform: translateX(-102%); transition: transform .24s ease; width: 292px; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-footer { width: 260px; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15,23,42,.48);
        opacity: 0;
        visibility: hidden;
        transition: .2s ease;
        z-index: 999;
    }
    body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
    .content-wrap { margin-left: 0; width: 100%; }
    .topbar { padding: 14px 16px; min-height: 76px; }
    .main { padding: 18px 16px 24px; }
    .dashboard-hero { grid-template-columns: 1fr; padding: 22px; }
    .hero-actions { justify-content: flex-start; }
}
@media (max-width: 768px) {
    .auth-shell { display: block; min-height: auto; border-radius: 28px; }
    .auth-card-pro { padding: 30px 24px; }
    .top-actions .btn-soft { display: none; }
    .profile-copy { display: none !important; }
    .admin-profile { padding: 6px; }
    .quick-action-grid { grid-template-columns: 1fr; }
    .footer { display: block; padding-inline: 16px; }
}
@media (max-width: 576px) {
    .title-wrap { min-width: 0; }
    .page-subtitle { display: none; }
    .top-actions { margin-left: auto; }
    .top-actions .btn-primary span { display: none !important; }
    .top-actions .btn-primary { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
    .top-actions .btn-primary i { margin: 0 !important; }
    .stat-card { min-height: 116px; }
    .auth-bg { place-items: start center; padding-top: 24px; }
}

/* v27 auth refinements */
.admin-google-btn{min-height:52px;border-radius:14px;font-weight:800;color:#1f2937;display:flex;align-items:center;justify-content:center;gap:4px}
.auth-divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:#98a2b3;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:#e4e7ec}

/* ===== v31/v32 prompt editor + media audit ===== */
.prompt-form-card .form-control,
.prompt-form-card .form-select { border-radius: 15px; }
.premium-toggle-box {
    min-width: 220px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid rgba(247,144,9,.20);
    background: linear-gradient(145deg, rgba(255,250,235,.92), #fff);
}
.premium-toggle-box small { display:block; margin:4px 0 0 24px; color:#7c6f56; font-size:11px; }
.prompt-live-preview {
    position: sticky;
    top: 104px;
    min-height: 360px;
    padding: 21px;
    border-radius: 24px;
    border: 1px solid rgba(99,91,255,.12);
    background: radial-gradient(circle at 100% 0%, rgba(99,91,255,.10), transparent 32%), linear-gradient(180deg,#fff,#fafbff);
    box-shadow: var(--shadow-sm);
}
.preview-kicker { display:block; margin-bottom:5px; color:var(--primary); font-size:10px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
.prompt-preview-stage {
    min-height: 285px;
    border-radius: 20px;
    overflow: hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed rgba(99,91,255,.24);
    background: linear-gradient(160deg,#eef2ff,#f8fafc);
}
.prompt-preview-stage img { width:100%; height:100%; min-height:285px; max-height:390px; object-fit:cover; display:block; }
.prompt-preview-empty { padding:28px 20px; display:grid; justify-items:center; gap:7px; text-align:center; color:var(--muted); }
.prompt-preview-empty i { font-size:42px; color:rgba(99,91,255,.62); }
.prompt-preview-empty strong { color:var(--ink); }
@media(max-width:1199.98px){.prompt-live-preview{position:static;min-height:0}}

.image-audit-shell .section-title { font-weight:850; letter-spacing:-.025em; }
.audit-stat { height:100%; min-height:92px; display:flex; align-items:center; gap:15px; padding:18px; border:1px solid var(--line); border-radius:20px; background:#fff; box-shadow:var(--shadow-sm); }
.audit-stat > i { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; font-size:21px; background:#f8fafc; }
.audit-stat strong { display:block; font-size:24px; line-height:1.05; font-weight:850; }
.audit-stat span { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.audit-thumb { width:62px; height:76px; border-radius:13px; object-fit:cover; background:#eef2f7; border:1px solid var(--line); }
.audit-path { display:block; max-width:280px; margin-top:5px; color:#667085; font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.audit-health { display:inline-flex; align-items:center; min-height:27px; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:800; }
.audit-good { color:#067647; background:#ecfdf3; border:1px solid #abefc6; }
.audit-review { color:#b54708; background:#fffaeb; border:1px solid #fedf89; }
.audit-missing { color:#b42318; background:#fef3f2; border:1px solid #fecdca; }
.audit-external { color:#175cd3; background:#eff8ff; border:1px solid #b2ddff; }
.audit-issues { display:grid; gap:2px; min-width:210px; color:#b54708; font-size:11px; }
.audit-issues span { display:flex; align-items:center; }
.image-audit-table td { vertical-align:middle; }
.prompt-image-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.prompt-image-metrics > div { min-width:0; padding:10px; border:1px solid var(--line-2); border-radius:14px; background:#fff; }
.prompt-image-metrics span { display:block; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.prompt-image-metrics strong { display:block; margin-top:4px; color:var(--ink); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media(max-width:420px){.prompt-image-metrics{grid-template-columns:1fr}.prompt-image-metrics strong{white-space:normal}}

/* v33 image quality enforcement */
.quality-policy-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.quality-policy-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(99,91,255,.13);
    background: #f8f8ff;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}
.quality-policy-strip i { color: var(--primary); }
.quality-save-rule {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 15px;
    border: 1px solid rgba(18,183,106,.18);
    background: #f2fdf7;
    color: #475467;
    font-size: 11px;
    line-height: 1.45;
}
.quality-save-rule > i { color: var(--success); font-size: 17px; line-height: 1; margin-top: 1px; }
.quality-save-rule strong { color: #067647; }

/* CSV existing-prompt updater */
.prompt-code-lock-note {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 285px;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid rgba(99,91,255,.18);
    background: linear-gradient(135deg, rgba(99,91,255,.08), rgba(6,182,212,.06));
    color: var(--ink);
}
.prompt-code-lock-note > i { color: var(--primary); font-size: 20px; }
.prompt-code-lock-note strong { display: block; font-size: 13px; }
.prompt-code-lock-note small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.update-stat-card {
    height: 100%;
    padding: 14px 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #f8fafc;
}
.update-stat-card strong { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; color: var(--ink); }
.update-stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.update-stat-good { background: rgba(18,183,106,.07); border-color: rgba(18,183,106,.18); }
.update-stat-good strong { color: #087a48; }
.update-stat-warn { background: rgba(247,144,9,.08); border-color: rgba(247,144,9,.2); }
.update-stat-warn strong { color: #b54708; }
.update-stat-danger { background: rgba(240,68,56,.07); border-color: rgba(240,68,56,.18); }
.update-stat-danger strong { color: #b42318; }
.update-field-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 13px 14px;
    border-radius: 17px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.update-field-option:hover { border-color: rgba(99,91,255,.28); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.update-field-option:has(.form-check-input:checked) { border-color: rgba(99,91,255,.38); background: rgba(99,91,255,.035); }
.update-field-option.locked { cursor: default; background: #f8fafc; }
.update-field-option.locked:hover { transform: none; box-shadow: none; }
.update-field-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: none;
    background: rgba(99,91,255,.09);
    color: var(--primary);
    font-size: 17px;
}
.update-field-option strong { display: block; color: var(--ink); font-size: 13px; }
.update-field-option small { display: block; color: var(--muted); margin-top: 2px; font-size: 11px; line-height: 1.25; }
.update-field-option .form-check-input { margin: 0; flex: none; }
@media (max-width: 767.98px) {
    .prompt-code-lock-note { min-width: 0; width: 100%; }
    .update-field-option { min-height: 68px; }
}
