:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4ee;
  --panel: #ffffff;
  --canvas: #f3f6fa;
  --nav: #0b2418;
  --blue: #16803f;
  --blue-soft: #e8f8ee;
  --cyan: #35b969;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --amber: #d97706;
  --amber-soft: #fff7df;
  --red: #dc2626;
  --red-soft: #fff0f0;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 14px; }
.spinner { width: 34px; height: 34px; border: 3px solid #dbeafe; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(380px, .95fr);
  background: var(--nav);
}
.auth-brand { padding: clamp(40px, 8vw, 110px); color: white; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 20% 15%, #17653c 0, transparent 43%), linear-gradient(145deg, #071a11, #103623); }
.brand-mark { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 15px; background: #4ade80; color: #052e16; font-weight: 900; font-size: 21px; box-shadow: 0 12px 32px #16a34a44; }
.auth-brand h1 { max-width: 620px; font-size: clamp(38px, 5vw, 68px); letter-spacing: -.045em; line-height: 1.06; margin: 26px 0 18px; }
.auth-brand p { max-width: 580px; color: #b9c8df; font-size: 18px; }
.brand-flow { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.brand-flow span { border: 1px solid #ffffff24; border-radius: 999px; padding: 9px 14px; color: #dce7f7; font-size: 14px; background: #ffffff0d; }
.auth-side { background: #f8fafc; display: grid; place-items: center; padding: 28px; }
.auth-card { width: min(440px, 100%); background: white; border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: 0 24px 60px #0f172a18; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #edf2f7; border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.auth-tab { border: 0; background: transparent; border-radius: 9px; padding: 10px; color: var(--muted); font-weight: 700; }
.auth-tab.active { color: var(--ink); background: white; box-shadow: 0 2px 10px #0f172a12; }
.auth-card h2 { font-size: 27px; margin: 0 0 5px; letter-spacing: -.02em; }
.auth-card > p { color: var(--muted); margin: 0 0 24px; }
.field { display: grid; gap: 7px; margin: 15px 0; }
.field label { color: #334155; font-weight: 700; font-size: 14px; }
.field input, .field textarea, .field select, .input {
  width: 100%; border: 1px solid #cbd5e1; background: white; color: var(--ink); border-radius: 11px; padding: 11px 13px; outline: none; transition: .18s border, .18s box-shadow;
}
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px #dbeafe; }
.password-note { font-size: 13px; color: #92400e; background: var(--amber-soft); border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; }
.btn { border: 0; border-radius: 10px; padding: 10px 15px; font-weight: 750; color: #334155; background: #e9eef5; transition: .18s transform, .18s opacity, .18s background; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { color: white; background: var(--blue); }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { color: white; background: var(--green); }
.btn-danger { color: white; background: var(--red); }
.btn-ghost { border: 1px solid var(--line); background: white; }
.btn-small { padding: 7px 10px; font-size: 14px; }
.btn-wide { width: 100%; margin-top: 10px; padding: 12px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { background: var(--nav); color: white; min-height: 100vh; padding: 24px 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side-brand { display: flex; gap: 12px; align-items: center; padding: 4px 6px 25px; border-bottom: 1px solid #ffffff18; }
.side-brand .brand-mark { width: 39px; height: 39px; border-radius: 12px; font-size: 16px; }
.side-brand strong { display: block; }
.side-brand small { color: #94a3b8; display: block; margin-top: 1px; }
.side-nav { display: grid; gap: 6px; margin-top: 20px; }
.mobile-menu-backdrop { display: none; }
.mobile-menu-button { display: none; }
.side-link { border: 0; background: transparent; color: #bac7da; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; text-align: left; }
.side-link.active, .side-link:hover { color: white; background: #ffffff12; }
.side-icon { width: 24px; text-align: center; }
.side-user { margin-top: auto; border-top: 1px solid #ffffff18; padding-top: 18px; }
.side-user-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.role-label { color: #94a3b8; font-size: 13px; margin-bottom: 12px; }
.side-user .btn { width: 100%; background: #ffffff12; color: white; }
.main { min-width: 0; padding: 30px clamp(18px, 4vw, 52px) 60px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 27px; }
.topbar h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.16; margin: 0 0 7px; letter-spacing: -.03em; }
.topbar p { margin: 0; color: var(--muted); }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 24px #0f172a0a; }
.task-card { padding: 24px; overflow: hidden; position: relative; }
.task-card::after { content: ""; position: absolute; right: -40px; top: -45px; width: 130px; height: 130px; border-radius: 50%; background: #dcfce799; }
.task-card:nth-child(2)::after { background: #d1fae599; }
.eyebrow { color: var(--blue); font-size: 13px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.task-card h2 { margin: 8px 0 3px; font-size: 25px; }
.task-card .subtitle { color: #334155; font-weight: 700; }
.task-card p { color: var(--muted); max-width: 600px; }
.platforms { display: flex; gap: 7px; flex-wrap: wrap; margin: 14px 0 20px; }
.chip { background: #eef2f7; color: #475569; border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 700; }
.tiers { display: flex; gap: 10px; flex-wrap: wrap; }
.tier-option { min-width: 125px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: white; text-align: left; }
.tier-option strong, .tier-option small { display: block; }
.tier-option small { color: var(--muted); margin-top: 2px; }
.enrolled-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 13px; margin-top: 16px; }

.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stat { padding: 19px; }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-value { font-size: 31px; font-weight: 850; letter-spacing: -.04em; margin-top: 3px; }
.stat-meta { font-size: 13px; color: var(--muted); }
.stat.blue { border-top: 3px solid var(--blue); }
.stat.green { border-top: 3px solid var(--green); }
.stat.amber { border-top: 3px solid var(--amber); }
.stat.red { border-top: 3px solid var(--red); }

.detail-head { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.day-progress-panel { padding: 20px 22px; margin-bottom: 18px; }
.day-progress-panel .section-title { margin-bottom: 14px; }
.day-progress-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.day-progress-item { padding: 12px; border: 1px solid #d6e8db; border-radius: 12px; background: #f8fdf9; }
.day-progress-item.initial-progress-item { border-color: #a9d5b6; background: #effaf2; }
.day-progress-title { display: flex; align-items: center; justify-content: space-between; color: #14532d; margin-bottom: 10px; }
.day-progress-title span { color: #64748b; font-size: 12px; }
.day-progress-count { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin: 7px 0 4px; }
.day-progress-count span { color: var(--muted); }
.day-progress-track { height: 5px; border-radius: 999px; background: #e3eee6; overflow: hidden; }
.day-progress-track span { display: block; height: 100%; border-radius: inherit; background: #68a6b1; }
.day-progress-track.approved span { background: #22a65b; }
.day-progress-track.rejected span { background: #dc5b5b; }
.day-progress-track.reviewing span { background: #e9a83b; }
.detail-head h2 { margin: 0; }
.detail-meta { color: var(--muted); font-size: 14px; margin-top: 3px; }
.progress-wrap { margin-top: 14px; }
.progress-track { height: 9px; background: #e7edf4; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: inherit; }
.section-card { margin-top: 18px; padding: 22px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-title h3 { margin: 0; font-size: 19px; }
.section-title p { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.account-card { border: 1px solid var(--line); border-radius: 14px; padding: 17px; margin-top: 12px; }
.account-head { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
.account-number { width: 40px; height: 40px; border-radius: 11px; background: #dcfce7; color: var(--blue); display: grid; place-content: center; font-weight: 850; }
.account-id-wrap label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.requirements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
.req { border: 1px solid var(--line); border-radius: 11px; padding: 11px; min-height: 106px; display: flex; flex-direction: column; gap: 7px; }
.req-name { font-size: 14px; font-weight: 800; }
.req-meta { color: var(--muted); font-size: 12px; line-height: 1.35; }
.req-actions { margin-top: auto; display: flex; gap: 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 800; width: fit-content; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending, .status-assigned, .status-awaiting_view { color: #0369a1; background: #e0f2fe; }
.status-approved, .status-completed, .status-used { color: #15803d; background: var(--green-soft); }
.status-rejected, .status-expired, .status-revoked { color: #b91c1c; background: var(--red-soft); }
.status-locked, .status-withdrawn { color: #64748b; background: #f1f5f9; }
.status-submitted { color: #0369a1; background: #e0f2fe; }
.status-open, .status-pending_phone, .status-pending_coupon, .status-issued { color: #a16207; background: var(--amber-soft); }
.reason { color: #b91c1c; font-size: 12px; background: #fff4f4; padding: 7px; border-radius: 7px; }
.reviewer { color: #475569; font-size: 12px; }

.entitlement { border: 1px solid #bbf7d0; background: linear-gradient(135deg, #f0fdf4, #ecfdf5); }
.entitlement .phone-row { display: grid; grid-template-columns: minmax(190px, 320px) auto; gap: 10px; align-items: end; }
.tier-switch-box { display: grid; gap: 8px; min-width: 230px; padding: 14px; border: 2px solid #16a34a; border-radius: 12px; background: #f0fdf4; }
.tier-switch-box label { font-weight: 800; color: #166534; }
.tier-switch-box small { color: #475569; line-height: 1.4; }
.tier-switch-button { width: 100%; min-height: 44px; font-weight: 800; }
.tier-switch-button:disabled { opacity: .7; cursor: wait; }

.review-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 18px 20px; margin-bottom: 18px; }
.review-toolbar strong { font-size: 20px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.review-card { overflow: hidden; }
.review-media { background: #07111f; min-height: 250px; display: grid; place-content: center; }
.review-media video, .review-media img { width: 100%; height: 100%; object-fit: contain; }
.review-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; background: #07111f; }
.review-frames figure { margin: 0; min-width: 0; border-right: 1px solid #ffffff22; }
.review-frames figure:last-child { border-right: 0; }
.review-frames img { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; display: block; }
.review-frames figcaption { color: white; background: #111c2d; padding: 8px; font-size: 12px; text-align: center; }
.review-frames figcaption small { display: block; color: #94a3b8; }
.review-frame-zoom { cursor: zoom-in; }
.review-frame-zoom:focus-visible { outline: 3px solid #22c55e; outline-offset: -3px; }
.review-zoom-card { width: min(1400px, 100%); }
.review-zoom-image { display: block; max-width: 100%; max-height: calc(100vh - 210px); width: auto; height: auto; margin: 0 auto; object-fit: contain; background: #07111f; }
.review-zoom-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.review-zoom-controls span { color: var(--muted); font-size: 14px; }
.review-body { padding: 17px; }
.review-title { display: flex; justify-content: space-between; gap: 10px; }
.review-title strong { font-size: 17px; }
.review-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0; }
.fact { background: #f5f7fa; border-radius: 9px; padding: 8px 10px; }
.fact small, .fact strong { display: block; }
.fact small { color: var(--muted); }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.reject-box { display: none; gap: 8px; margin-top: 10px; }
.reject-box.open { display: grid; }

.split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.panel { padding: 21px; }
.panel h3 { margin: 0 0 15px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid #e8edf3; font-size: 14px; vertical-align: middle; }
th { background: #f7f9fb; color: #475569; position: sticky; top: 0; z-index: 1; }
tr:last-child td { border-bottom: 0; }
.config-task { border: 1px solid var(--line); border-radius: 13px; padding: 16px; margin-top: 12px; }
.config-task h4 { margin: 0 0 12px; }
.config-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: end; }
.window-grid { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 8px; margin-top: 12px; }
.window-item { background: #f6f8fb; border-radius: 9px; padding: 8px; }
.window-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.window-item input { width: 100%; border: 1px solid #cbd5e1; border-radius: 7px; padding: 7px; }
.empty { text-align: center; color: var(--muted); padding: 44px 20px; }

.toast { position: fixed; top: 20px; left: 50%; transform: translate(-50%, -15px); background: #0f172a; color: white; padding: 11px 16px; border-radius: 10px; z-index: 100; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 12px 34px #0f172a44; max-width: min(560px, calc(100vw - 30px)); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #991b1b; }
.upload-progress { position: fixed; inset: 0; background: #07111fb8; z-index: 90; display: grid; place-content: center; }
.upload-box { width: min(420px, calc(100vw - 32px)); background: white; border-radius: 18px; padding: 25px; text-align: center; }
.upload-box .progress-track { margin: 18px 0 8px; }
.modal { position: fixed; inset: 0; z-index: 95; background: #07111fd9; padding: 24px; overflow: auto; display: grid; place-items: center; }
.modal-card { width: min(1120px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: white; border-radius: 20px; box-shadow: 0 28px 80px #0008; padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { margin: 0 0 4px; }
.modal-head p { margin: 0; color: var(--muted); }
.preflight-ok { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: #166534; background: var(--green-soft); border: 1px solid #bbf7d0; border-radius: 12px; padding: 11px 13px; margin-bottom: 16px; }
.preflight-ok span { color: #475569; }
.preflight-ok em { width: 100%; color: #92400e; font-style: normal; font-size: 13px; }
.picker-layout { display: grid; gap: 16px; }
.video-panel { background: #07111f; border-radius: 14px; padding: 12px; color: white; }
.video-panel video { width: 100%; max-height: 45vh; display: block; border-radius: 8px; background: black; }
.video-panel .muted { color: #a8b6ca; margin: 8px 0 0; font-size: 13px; }
.timeline-row { display: grid; grid-template-columns: 1fr 76px; gap: 12px; align-items: center; margin-top: 10px; }
.timeline-row input { width: 100%; }
.keyframe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.keyframe-card { margin: 0; min-width: 0; border: 2px dashed #cbd5e1; border-radius: 13px; overflow: hidden; background: #f8fafc; }
.keyframe-card.selected { border-style: solid; border-color: #60a5fa; }
.keyframe-card img, .frame-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; display: grid; place-content: center; background: #111827; color: #94a3b8; }
.keyframe-card figcaption { display: grid; gap: 5px; padding: 11px; }
.keyframe-card figcaption span { color: var(--muted); font-size: 12px; }
.picker-footer { position: sticky; bottom: -24px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 18px -24px -24px; padding: 15px 24px; background: white; border-top: 1px solid var(--line); }
.gallery-card { width: min(980px, 100%); }
.muted { color: var(--muted); }
.mobile-top { display: none; }

.developer-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #17653c, transparent 38%), linear-gradient(145deg, #071a11, #103623); }
.developer-auth .auth-card .brand-mark { margin-bottom: 20px; }
.back-link { display: block; text-align: center; color: var(--muted); margin-top: 18px; font-size: 14px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #edf5ef; border-radius: 12px; margin: 18px 0; }
.role-switch button { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); font-weight: 800; }
.role-switch button.active { background: white; color: var(--blue); box-shadow: 0 3px 10px #14532d18; }
.tiers.vertical { display: grid; }
.tier-detail { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, .9fr); gap: 16px; align-items: center; }
.tier-detail span, .tier-detail em { min-width: 0; }
.tier-detail em { font-style: normal; color: #166534; background: #f0fdf4; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.reward-line { color: #166534; font-weight: 700; }
.notice { margin-top: 18px; padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; border-color: #bbf7d0; background: #f0fdf4; }
.notice span { color: #3f5f4a; font-size: 14px; }
.section-card > .notice { display: block; margin: 12px 0; border: 1px solid #bbf7d0; border-radius: 10px; }
.section-card > .notice p { margin: 8px 0; white-space: pre-wrap; }
.technical-group-number { padding: 12px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; }
.technical-group-number strong { color: #166534; font-size: 22px; }
.announcement-edit-form { border-top: 1px solid var(--line); padding: 16px 0; display: grid; gap: 8px; }
.account-title { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.account-inputs { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 10px; }
.account-inputs .field { margin: 0; }
.reward-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.reward-form .field { margin: 0; }
.reward-form .wide { grid-column: 1 / -1; }
.ticket-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.6fr) auto; gap: 10px; align-items: start; }
.ticket-list { display: grid; gap: 10px; margin-top: 16px; }
.ticket-list article { border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.ticket-item { border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.ticket-item summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; cursor: pointer; list-style: none; }
.ticket-item summary::-webkit-details-marker { display: none; }
.ticket-item summary::before { content: '›'; color: #15803d; font-size: 22px; transition: transform .2s ease; }
.ticket-item[open] summary::before { transform: rotate(90deg); }
.ticket-item summary strong { flex: 1; }
.ticket-item-body { padding: 0 16px 15px; border-top: 1px solid var(--line); }
.ticket-item-body p { white-space: pre-wrap; }
.ticket-footer { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
.ticket-actions { display: flex; gap: 8px; margin-top: 10px; }
.ticket-list article > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.ticket-list p { color: #475569; margin: 8px 0; white-space: pre-wrap; }
.ticket-reply { background: #f0fdf4; color: #166534; border-radius: 8px; padding: 9px; white-space: pre-wrap; }
.ticket-reply-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.ticket-status-switch { display: inline-flex; padding: 4px; border: 1px solid #cce5d2; border-radius: 999px; background: #eef7f0; }
.ticket-status-switch button { border: 0; background: transparent; color: #37624a; border-radius: 999px; padding: 8px 13px; white-space: nowrap; }
.ticket-status-switch button.active { background: #15803d; color: white; box-shadow: 0 2px 6px #16653433; }
.pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.recipient-filter-grid { display: grid; grid-template-columns: repeat(3,minmax(160px,1fr)); gap: 10px; align-items: end; }
.recipient-filter-grid .field { margin: 0; }
.recipient-preview { border: 1px solid #bbf7d0; background: #f7fcf8; border-radius: 12px; padding: 15px; margin-top: 15px; }
.recipient-list { display: grid; grid-template-columns: repeat(4,minmax(120px,1fr)); gap: 6px; max-height: 240px; overflow: auto; }
.recipient-list label { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 7px; font-size: 13px; }
.template-manager { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.template-manager summary { cursor: pointer; font-weight: 800; color: #166534; }
.reward-modal-card { width: min(520px,100%); }
.reward-congratulations { padding: 14px; background: #f0fdf4; border-radius: 10px; color: #166534; line-height: 1.65; }
.invite-code { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; padding: 14px 16px; border: 1px solid #86efac; border-radius: 12px; background: #f0fdf4; }
.invite-code strong { font-size: 20px; letter-spacing: .08em; color: #166534; }
.invite-code span { color: var(--muted); font-size: 13px; }
.code-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.code-list > span { padding: 7px 9px; border-radius: 9px; background: #f6f8f7; color: #475569; }
.invite-list { display: grid; gap: 10px; margin-top: 12px; }
.invite-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 15px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f7fcf8; }
.invite-item-main { display: grid; gap: 5px; min-width: 0; }
.invite-item-main strong { color: #166534; font-size: 18px; overflow-wrap: anywhere; user-select: text; }
.invite-item-main small { color: var(--muted); }
.invite-item-main .invite-warning { color: #92400e; }
.invite-item-actions { display: flex; gap: 7px; flex-wrap: wrap; flex-shrink: 0; }
.invite-history { margin-top: 20px; }
.invite-history summary { cursor: pointer; color: #475569; }
@media (max-width: 600px) { .invite-item { align-items: flex-start; flex-direction: column; } }
.duplicate-groups { display: grid; gap: 12px; }
.duplicate-groups article { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.duplicate-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.duplicate-groups article > span { display: block; padding: 6px 8px; margin-top: 5px; background: #f6f8f7; border-radius: 7px; color: #475569; }
.template-form { padding: 13px; margin-top: 11px; border: 1px solid var(--line); border-radius: 11px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-bottom: 18px; }
.user-admin-card { border: 1px solid var(--line); border-radius: 13px; padding: 15px; margin-top: 12px; }
.user-admin-card details { margin-top: 10px; padding: 10px; background: #f7faf8; border-radius: 9px; }
.user-admin-card summary { cursor: pointer; font-weight: 800; }
.admin-requirements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.single-task { grid-template-columns: minmax(0, 1fr); }
.auth-tabs-three { grid-template-columns: repeat(3, 1fr); }
.quota-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.quota-card { padding: 18px; }
.quota-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quota-head strong, .quota-head span { display: block; }
.quota-head strong { font-size: 19px; }
.quota-head span { color: var(--muted); }
.quota-meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.review-frames.many { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 620px; overflow: auto; }
.review-frames.many img { aspect-ratio: 16 / 10; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; align-items: start; }
.config-row .field { min-width: 150px; flex: 1; margin: 0; }
.staff-day-filter { flex: 1 1 320px; min-width: 260px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.staff-day-filter legend { padding: 0 4px; font-size: 13px; font-weight: 700; }
.staff-day-filter label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.staff-day-options { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; }
.daily-window-config { margin: 15px 0; border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.daily-window-config summary { cursor: pointer; font-weight: 800; color: #166534; }
.daily-window-list { display: grid; gap: 7px; margin: 12px 0; }
.daily-window-row { display: grid; grid-template-columns: 86px 1fr 1fr; gap: 9px; align-items: end; background: #f7faf8; border-radius: 9px; padding: 8px; }
.daily-window-row label { font-size: 12px; color: var(--muted); }
.daily-window-row input { display: block; width: 100%; border: 1px solid #cbd5e1; border-radius: 7px; padding: 7px; }
.tier-summary { display: grid; gap: 7px; }
.tier-summary > div { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 9px; background: #f6f8f7; border-radius: 8px; padding: 9px; font-size: 13px; }
.tier-summary span { color: #475569; }
.tier-summary small { color: #166534; }
.keyframe-grid.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1050px) {
  .requirements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-grid, .split { grid-template-columns: 1fr; }
  .account-inputs { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { min-height: 280px; padding: 32px 24px; }
  .auth-brand h1 { font-size: 36px; }
  .auth-brand p { font-size: 16px; }
  .brand-flow { margin-top: 18px; }
  .auth-side { padding: 18px; }
  .auth-card { padding: 24px; }
  .shell { display: block; }
  .sidebar { display: flex; position: fixed; z-index: 32; top: 0; left: 0; height: 100vh; width: min(290px, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px #06180e55; }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-menu-backdrop { display: block; position: fixed; inset: 0; z-index: 31; border: 0; background: #06180eaa; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.menu-open .mobile-menu-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; background: var(--nav); color: white; padding: 12px 16px; }
  .mobile-menu-button { display: inline-flex; border: 0; background: #ffffff18; color: white; font-size: 23px; width: 35px; height: 35px; border-radius: 9px; align-items: center; justify-content: center; }
  .mobile-top .brand-mark { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }
  .main { padding: 22px 14px 50px; }
  .task-grid, .stats, .review-grid { grid-template-columns: 1fr; }
  .topbar { display: block; }
  .top-actions { margin-top: 14px; }
  .detail-head { display: block; }
  .detail-head .btn { margin-top: 12px; }
  .account-head { grid-template-columns: auto 1fr; }
  .account-head > .btn { grid-column: 1 / -1; }
  .requirements { grid-template-columns: 1fr 1fr; }
  .entitlement .phone-row { grid-template-columns: 1fr; }
  .window-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyframe-grid { grid-template-columns: 1fr; }
  .picker-footer { align-items: stretch; flex-direction: column; }
  .review-frames { grid-template-columns: 1fr; }
  .review-frames img { aspect-ratio: 16 / 10; }
  .quota-grid, .account-inputs, .reward-form { grid-template-columns: 1fr; }
  .reward-form .wide { grid-column: auto; }
  .ticket-form { grid-template-columns: 1fr; }
  .tier-detail { grid-template-columns: 1fr; }
  .daily-window-row { grid-template-columns: 1fr; }
  .tier-summary > div { grid-template-columns: 1fr; }
  .admin-requirements { grid-template-columns: 1fr; }
  .recipient-filter-grid { grid-template-columns: 1fr; }
  .recipient-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ticket-status-switch { width: 100%; overflow-x: auto; }
  .auth-tabs-three { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .requirements { grid-template-columns: 1fr; }
  .review-facts { grid-template-columns: 1fr; }
  .task-card, .section-card, .panel { padding: 17px; }
  .day-progress-panel { padding: 14px; }
  .day-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .day-progress-item { padding: 10px; }
}
