/* ========================================
   Contact Form - Theme-aware Stylesheet
   รองรับโหมดมืด/สว่าง + Responsive
   ======================================== */
* { box-sizing: border-box; }

/* ===== Light theme (default) ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #eef2ff;
    --accent: #8b5cf6;

    --bg: #f1f5f9;
    --bg-soft: #f8fafc;
    --card: #ffffff;
    --card-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;

    --success: #10b981;
    --danger:  #ef4444;
    --warn:    #f59e0b;
    --info:    #3b82f6;

    --shadow:    0 8px 30px rgba(15, 23, 42, .06);
    --shadow-md: 0 12px 40px rgba(15, 23, 42, .08);

    --radius: 14px;
    --radius-lg: 20px;

    /* Sidebar (admin) */
    --sb-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --sb-text: #475569;
    --sb-active-bg: linear-gradient(135deg, #6366f1, #8b5cf6);
    --sb-active-text: #ffffff;
    --sb-section: #94a3b8;
    --sb-border: #e2e8f0;
}

/* ===== Dark theme ===== */
:root[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: rgba(99,102,241,.15);
    --accent: #a78bfa;

    --bg:      #0b1020;
    --bg-soft: #111827;
    --card:    #161e2f;
    --card-2:  #1e293b;
    --border:  #2a3548;
    --border-strong: #3a465c;

    --text:      #e2e8f0;
    --text-soft: #cbd5e1;
    --muted:     #94a3b8;

    --success: #34d399;
    --danger:  #f87171;
    --warn:    #fbbf24;
    --info:    #60a5fa;

    --shadow:    0 8px 30px rgba(0, 0, 0, .4);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, .5);

    --sb-bg: linear-gradient(180deg, #0d1424 0%, #111827 100%);
    --sb-text: #cbd5e1;
    --sb-active-bg: linear-gradient(135deg, #6366f1, #8b5cf6);
    --sb-active-text: #ffffff;
    --sb-section: #64748b;
    --sb-border: #1f2937;
}

html, body { margin:0; padding:0; }
body {
    font-family: 'Sarabun', 'Segoe UI', 'Prompt', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    line-height: 1.55;
    transition: background .25s, color .25s;
}
a { color: var(--primary); }

/* ===== Layout - public form ===== */
.page-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 28px 18px 60px;
}
.welcome { color: var(--muted); font-size: 15px; }
.page-title {
    font-size: 28px; font-weight: 700;
    color: var(--text); margin: 4px 0 22px;
    letter-spacing: -.3px;
}
.step-label { color: var(--muted); font-size: 14px; }

/* ===== Floating theme toggle ===== */
.theme-fab {
    position: fixed; top: 18px; right: 18px;
    width: 44px; height: 44px;
    border: none; cursor: pointer;
    background: var(--card);
    color: var(--text);
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 50;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .15s, background .25s, color .25s;
}
.theme-fab:hover { transform: rotate(15deg) scale(1.05); }

/* ===== Card ===== */
.card {
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 28px 30px;
    border: 1px solid var(--border);
    transition: background .25s, border-color .25s;
}
.section-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 17px;
    margin: 6px 0 14px;
}
.section + .section { margin-top: 28px; }
.divider {
    border: none; border-top: 1px solid var(--border); margin: 22px 0 18px;
}

/* ===== Form ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}
.field { display:flex; flex-direction:column; gap:6px; margin-bottom: 14px; }
.field label {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}
.field label .req { color: var(--danger); margin-left: 2px; }

.input-wrap {
    position: relative;
    display: flex; align-items: center;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color .15s, background .25s, box-shadow .15s;
}
.input-wrap:focus-within {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.input-wrap .icon {
    color: var(--primary);
    margin-right: 10px;
    display: inline-flex;
}
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
    border: none; outline: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    width: 100%;
    padding: 13px 0;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: var(--muted); opacity: .8; }
.input-wrap textarea { resize: vertical; min-height: 80px; padding-top:13px; }
.input-wrap select {
    appearance: none;
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 22px;
    cursor: pointer;
}
:root .input-wrap select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
:root[data-theme="dark"] .input-wrap select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}
.input-wrap select option { background: var(--card); color: var(--text); }

/* ===== Buttons ===== */
.btn-row { display:flex; gap:12px; margin-top: 18px; flex-wrap:wrap; }
.btn {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    transition: transform .08s, box-shadow .15s, background .15s, color .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    flex: 1;
    box-shadow: 0 6px 18px rgba(99,102,241,.32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(99,102,241,.42); }
.btn-secondary {
    background: var(--card-2);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-danger  { background: rgba(239,68,68,.15); color: var(--danger); }
.btn-danger:hover  { background: rgba(239,68,68,.25); }
.btn-success { background: rgba(16,185,129,.15); color: var(--success); }
.btn-warn    { background: rgba(245,158,11,.15); color: var(--warn); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ===== Multi-select dropdown (บริการ) ===== */
.ms-dropdown { position: relative; }
.ms-trigger {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 40px 10px 14px;
    min-height: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    text-align: left;
    position: relative;
    transition: border-color .15s, box-shadow .15s, background .25s;
    flex-wrap: wrap;
}
.ms-trigger:hover { border-color: var(--border-strong); }
.ms-trigger.open {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 4px var(--primary-light);
}
.ms-trigger .ms-icon {
    color: var(--primary);
    flex-shrink: 0;
    display: inline-flex;
}
.ms-trigger .ms-placeholder { color: var(--muted); }
.ms-trigger::after {
    content: '';
    position: absolute;
    right: 14px; top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-75%) rotate(45deg);
    transition: transform .2s;
}
.ms-trigger.open::after {
    transform: translateY(-25%) rotate(-135deg);
    border-color: var(--primary);
}

/* chips ภายในปุ่ม trigger */
.ms-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}
.ms-chip .x {
    width: 18px; height: 18px;
    background: rgba(255,255,255,.25);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; line-height: 1;
    cursor: pointer;
    transition: background .15s;
}
.ms-chip .x:hover { background: rgba(255,255,255,.45); }

/* dropdown panel */
.ms-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-height: 360px;
    overflow-y: auto;
    z-index: 20;
    display: none;
    padding: 6px;
}
.ms-panel.open { display: block; animation: ms-fade .15s ease-out; }
@keyframes ms-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ms-search {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--card-2);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 6px;
    outline: none;
}
.ms-search:focus { border-color: var(--primary); }

.ms-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}
.ms-option:hover { background: var(--card-2); }
.ms-option.selected { background: var(--primary-light); }
.ms-option .ms-cb {
    width: 22px; height: 22px;
    border: 2px solid var(--border-strong);
    border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all .15s;
    background: var(--card);
}
.ms-option.selected .ms-cb {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: #fff;
}
.ms-option .ms-emoji { font-size: 20px; flex-shrink: 0; }
.ms-option .ms-text { flex: 1; min-width: 0; }
.ms-option .ms-name { font-weight: 600; color: var(--text); font-size: 14px; }
.ms-option .ms-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

.ms-empty { text-align: center; color: var(--muted); padding: 20px; font-size: 13px; }

/* select optgroup ให้อ่านง่ายในทั้ง 2 ธีม */
.input-wrap select optgroup { font-weight: 700; color: var(--primary); background: var(--card); }
.input-wrap select optgroup option { font-weight: 400; color: var(--text); padding-left: 8px; }



/* select optgroup ให้อ่านง่ายในทั้ง 2 ธีม */
.input-wrap select optgroup { font-weight: 700; color: var(--primary); background: var(--card); }
.input-wrap select optgroup option { font-weight: 400; color: var(--text); padding-left: 8px; }

/* ===== Stepper ===== */
.stepper { display:flex; gap:8px; margin-bottom: 22px; }
.stepper .dot {
    flex: 1; height: 6px;
    background: var(--border);
    border-radius: 6px;
    transition: background .25s;
}
.stepper .dot.active { background: linear-gradient(90deg, var(--primary), var(--accent)); }

/* ===== Alerts ===== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}
.alert-error { background: rgba(239,68,68,.12); color: var(--danger); border:1px solid rgba(239,68,68,.3); }
.alert-ok    { background: rgba(16,185,129,.12); color: var(--success); border:1px solid rgba(16,185,129,.3); }
.alert-info  { background: rgba(59,130,246,.12); color: var(--info);   border:1px solid rgba(59,130,246,.3); }

/* ===== Review page (step 4) ===== */
.review-section {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background: var(--card-2);
}
.review-section .head {
    display:flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.review-section .head h3 { margin:0; font-size: 16px; color: var(--primary); }
.review-section .head .edit-link {
    font-size: 13px; color: var(--primary); text-decoration: none;
    background: var(--primary-light);
    padding: 6px 12px; border-radius: 8px;
    display: inline-flex; gap: 4px; align-items: center;
}
.review-section .head .edit-link:hover { background: var(--border); }
.review-grid { display:grid; grid-template-columns: 180px 1fr; gap: 6px 16px; font-size:14px; }
.review-grid .k { color: var(--muted); }
.review-grid .v { color: var(--text); word-break: break-word; }

/* ===== Thank you ===== */
.thanks-wrap { text-align:center; padding: 40px 20px; }
.thanks-icon {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color:#fff; font-size: 50px;
    display:inline-flex; align-items:center; justify-content:center;
    box-shadow: 0 14px 30px rgba(16,185,129,.35);
    margin-bottom: 16px;
    animation: pop .5s ease-out;
}
@keyframes pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.thanks-wrap h2 { margin: 6px 0 8px; font-size: 26px; }
.thanks-wrap p { color: var(--muted); margin: 6px 0; }
.ref-box {
    display: inline-block;
    background: var(--card-2);
    border: 1px dashed var(--border-strong);
    padding: 10px 24px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin: 10px 0 18px;
    letter-spacing: 2px;
}

/* ===== Admin ===== */
.admin-shell { display:flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar {
    width: 250px;
    background: var(--sb-bg);
    color: var(--sb-text);
    padding: 22px 14px;
    flex-shrink: 0;
    border-right: 1px solid var(--sb-border);
}
.admin-brand {
    display:flex; gap: 10px; align-items: center;
    margin: 0 8px 22px; padding-bottom: 18px;
    border-bottom: 1px solid var(--sb-border);
}
.admin-brand .logo {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size: 20px;
    box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.admin-brand .name { font-size: 14px; font-weight: 700; color: var(--text); }
.admin-brand .role { font-size: 12px; color: var(--muted); }

.sb-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sb-section);
    padding: 14px 14px 6px;
}
.admin-sidebar a {
    display:flex; align-items:center; gap: 10px;
    color: var(--sb-text); text-decoration:none;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 2px;
    font-size: 14px;
    transition: background .15s, color .15s;
}
.admin-sidebar a:hover { background: var(--bg-soft); color: var(--text); }
.admin-sidebar a.active {
    background: var(--sb-active-bg);
    color: var(--sb-active-text);
    box-shadow: 0 4px 12px rgba(99,102,241,.35);
}
.admin-sidebar a.active svg { color: #fff; }
.sb-logout {
    margin-top: 8px;
    color: var(--danger) !important;
}
.sb-logout:hover { background: rgba(239,68,68,.1) !important; }

.admin-main { flex: 1; padding: 24px 28px; min-width: 0; }
.admin-top {
    display:flex; justify-content: space-between; align-items: center;
    margin-bottom: 22px; gap: 14px;
}
.admin-top h2 { margin:0; font-size: 24px; }
.admin-top .crumb { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.admin-user-pill {
    display:flex; align-items:center; gap: 10px;
    background: var(--card);
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.admin-user-pill .av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display:inline-flex; align-items:center; justify-content:center;
    font-weight: 700; font-size: 13px;
}
.admin-user-pill .n { font-size: 13px; color: var(--text); }

/* Stats */
.stats-grid {
    display:grid; grid-template-columns: repeat(4, 1fr); gap:14px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--card);
    border-radius: 16px; padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display:flex; gap: 14px; align-items: center;
}
.stat-card .icon-circle {
    width: 48px; height: 48px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 26px; font-weight: 700; color: var(--text); margin-top: 2px; }
.stat-card.blue   .icon-circle { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.stat-card.green  .icon-circle { background: linear-gradient(135deg,#10b981,#059669); }
.stat-card.orange .icon-circle { background: linear-gradient(135deg,#f59e0b,#d97706); }
.stat-card.red    .icon-circle { background: linear-gradient(135deg,#ef4444,#dc2626); }

/* Tables */
.table-wrap { background: var(--card); border-radius: 16px; box-shadow: var(--shadow);
              overflow:hidden; border:1px solid var(--border); }
.table-tools { padding: 14px 16px; border-bottom: 1px solid var(--border);
               display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.table-tools input, .table-tools select {
    padding: 10px 12px; border:1px solid var(--border); border-radius:10px;
    font-size: 14px; font-family: inherit;
    background: var(--card-2);
    color: var(--text);
}
.table-tools input:focus, .table-tools select:focus {
    outline:none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.filter-pill {
    padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card-2); color: var(--text-soft);
    font-size: 13px; font-family: inherit; cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display:inline-block;
}
.filter-pill:hover { background: var(--border); }
.filter-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99,102,241,.35);
}

table.data { width:100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 12px 14px; text-align:left; border-bottom:1px solid var(--border); }
table.data th { background: var(--card-2); color: var(--muted); font-weight:600; font-size:13px; }
table.data tr:hover td { background: var(--card-2); }
.badge {
    display:inline-block; padding: 4px 12px; border-radius: 999px;
    font-size: 12px; font-weight:600;
}
.badge.new       { background: rgba(59,130,246,.18);  color:#3b82f6; }
.badge.reviewed  { background: rgba(245,158,11,.18);  color:#f59e0b; }
.badge.contacted { background: rgba(16,185,129,.18);  color:#10b981; }
.badge.archived  { background: rgba(100,116,139,.18); color:#64748b; }
.badge.super     { background: rgba(168,85,247,.18);  color:#a855f7; }
.badge.admin     { background: rgba(59,130,246,.18);  color:#3b82f6; }

.action-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    display:inline-flex; align-items:center; justify-content:center;
    border:none; cursor:pointer; text-decoration:none;
    margin-right: 4px;
    transition: transform .08s, opacity .15s;
}
.action-btn:hover { transform: translateY(-1px); }
.act-view { background: linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; }
.act-edit { background: linear-gradient(135deg,#f59e0b,#d97706); color:#fff; }
.act-del  { background: linear-gradient(135deg,#ef4444,#dc2626); color:#fff; }

/* Login */
.login-bg {
    min-height: 100vh; display:flex; align-items:center; justify-content:center;
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #8b5cf6 100%);
    padding: 20px;
    position: relative; overflow: hidden;
}
.login-bg::before {
    content: '';
    position: absolute; inset: -50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.08) 0%, transparent 60%);
}
.login-card {
    background: var(--card); border-radius: 24px; padding: 36px 32px;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
    width: 100%; max-width: 410px;
    position: relative;
    border: 1px solid var(--border);
}
.login-card .logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex; align-items:center; justify-content:center;
    color:#fff; font-size: 32px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(99,102,241,.45);
}
.login-card h1 { text-align:center; margin: 0 0 6px; color: var(--text); font-size: 22px; }
.login-card .sub { text-align:center; color: var(--muted); margin-bottom: 22px; font-size:14px; }

/* Detail view */
.detail-grid {
    display:grid; grid-template-columns: 200px 1fr; gap: 10px 18px;
    padding: 4px 0;
}
.detail-grid .k { color: var(--muted); font-size: 14px; }
.detail-grid .v { color: var(--text); font-size: 15px; word-break: break-word; }

/* Notes timeline */
.note-list { margin-top: 14px; }
.note-item {
    display: flex; gap: 12px;
    padding: 12px 14px;
    background: var(--card-2);
    border-radius: 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary);
}
.note-item .av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; display: flex; align-items:center; justify-content:center;
    font-weight:700; font-size: 13px; flex-shrink: 0;
}
.note-item .body { flex: 1; }
.note-item .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.note-item .text { font-size: 14px; color: var(--text); white-space: pre-wrap; }

/* Modal */
.modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    display: none; align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-bg.open { display: flex; }
.modal {
    background: var(--card);
    border-radius: 18px;
    max-width: 500px; width: 100%;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.modal h3 { margin: 0 0 14px; color: var(--text); }
.modal .close {
    float: right; cursor: pointer; color: var(--muted);
    background: none; border: none; font-size: 22px;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
    .grid-2 { grid-template-columns: 1fr; }
    .page-title { font-size: 22px; }
    .card { padding: 22px 18px; border-radius: 18px; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar {
        width: 100%; padding: 12px;
        display:flex; gap:4px; overflow-x:auto;
        border-right: none; border-bottom: 1px solid var(--sb-border);
    }
    .admin-brand, .sb-section { display:none; }
    .admin-sidebar a { flex:0 0 auto; margin: 0; padding: 8px 12px; white-space: nowrap; }
    .admin-main { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid, .review-grid { grid-template-columns: 1fr; gap: 2px 0; }
    .detail-grid .k, .review-grid .k { margin-top: 10px; }
    table.data { font-size: 13px; }
    table.data th, table.data td { padding: 10px 8px; }
    .hide-sm { display: none; }
    .admin-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 20px; }
    .btn { padding: 12px 16px; font-size: 14px; }
}
