:root {
  color-scheme: dark;
  --bg: #050609;
  --panel: #0b0c10;
  --panel-2: #101116;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --text: #f7f7f8;
  --muted: #9699a5;
  --accent: #ff2430;
  --accent-2: #d70e1a;
  --warning: #ffb224;
  --success: #38cf84;
  --radius: 16px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% -10%, rgba(255,36,48,.11), transparent 34%), var(--bg); color: var(--text); font-family: var(--font); }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; pointer-events: none; filter: blur(2px); opacity: .7; }
.ambient-one { width: 420px; height: 420px; right: -210px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(255,36,48,.14), transparent 70%); }
.ambient-two { width: 350px; height: 350px; left: -220px; bottom: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(255,36,48,.08), transparent 70%); }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(100%, 520px); padding: 42px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, rgba(17,18,23,.97), rgba(7,8,11,.98)); box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.brand-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 44px; }
.brand-lockup img { width: 52px; height: 52px; border-radius: 14px; box-shadow: 0 8px 24px rgba(255,36,48,.20); }
.brand-lockup div { display: grid; gap: 2px; }
.brand-lockup span { font-size: 23px; font-weight: 900; letter-spacing: .08em; }
.brand-lockup small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.brand-lockup.compact { margin: 0 0 40px; }
.brand-lockup.compact img { width: 42px; height: 42px; border-radius: 11px; }
.brand-lockup.compact span { font-size: 19px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 850; }
h1 { margin: 0; max-width: 440px; font-size: clamp(2.2rem, 6vw, 3.45rem); line-height: .98; letter-spacing: -.045em; }
.lead { margin: 20px 0 30px; color: var(--muted); font-size: 15px; line-height: 1.65; }
form { display: grid; gap: 16px; }
label { display: grid; gap: 8px; color: #d4d5da; font-size: 12px; font-weight: 750; letter-spacing: .04em; }
input, select, textarea { width: 100%; color: var(--text); border: 1px solid var(--line-strong); background: #08090d; border-radius: 10px; outline: none; transition: border-color .16s, box-shadow .16s; }
input, select { min-height: 48px; padding: 0 14px; }
textarea { min-height: 110px; resize: vertical; padding: 12px 14px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: rgba(255,36,48,.72); box-shadow: 0 0 0 3px rgba(255,36,48,.11); }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 800; transition: transform .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; box-shadow: 0 12px 28px rgba(255,36,48,.18); }
.button.secondary { background: #111219; border-color: var(--line-strong); }
.button.danger { background: rgba(255,36,48,.12); border-color: rgba(255,36,48,.36); color: #ff626b; }
.danger-zone { padding-top: 4px; }
.button.warning { background: rgba(255,178,36,.10); border-color: rgba(255,178,36,.30); color: #ffc55e; }
.button.full { width: 100%; margin-top: 5px; }
.form-error { min-height: 18px; margin: 0; color: #ff6b73; font-size: 13px; }
.security-note { margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: #777b87; font-size: 12px; line-height: 1.5; }

.app-view { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px; border-right: 1px solid var(--line); background: rgba(7,8,11,.94); backdrop-filter: blur(20px); display: flex; flex-direction: column; z-index: 4; }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { min-height: 46px; display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 11px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font-size: 14px; font-weight: 720; }
.nav-item:hover { background: rgba(255,255,255,.035); color: #dddfe5; }
.nav-item.active { color: white; border-color: var(--line); background: linear-gradient(90deg, rgba(255,36,48,.12), rgba(255,255,255,.025)); }
.nav-item b { min-width: 24px; padding: 4px 7px; border-radius: 99px; background: rgba(255,255,255,.06); text-align: center; font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.025); }
.status-dot.danger { background: var(--accent); }.status-dot.warning { background: var(--warning); }.status-dot.success { background: var(--success); }.status-dot.muted { background: #686b75; }.status-dot.neutral { background: #aaaeba; }
.sidebar-footer { margin-top: auto; display: grid; gap: 14px; }
.moderator-card { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.moderator-card .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-weight: 900; }
.moderator-card div { display: grid; gap: 3px; min-width: 0; }
.moderator-card strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.moderator-card small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.text-button { border: 0; background: transparent; color: #777b87; cursor: pointer; text-align: left; font-size: 12px; }
.text-button:hover { color: white; }

.workspace { width: min(100%, 1500px); padding: 34px clamp(20px, 4vw, 58px) 70px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 30px; }
.topbar h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-actions select { width: 180px; min-height: 44px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metrics article { min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(17,18,23,.86), rgba(9,10,14,.86)); }
.metrics span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .09em; }
.metrics strong { display: block; margin: 13px 0 7px; font-size: 38px; line-height: 1; }
.metrics small { color: #737783; font-size: 11px; }
.queue-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(10,11,15,.84); }
.queue-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.queue-head span { font-weight: 830; }.queue-head small { color: var(--muted); }
.report-list { display: grid; }
.report-row { width: 100%; display: grid; grid-template-columns: minmax(190px,1.25fr) minmax(180px,1fr) minmax(120px,.65fr) 120px 24px; align-items: center; gap: 18px; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.report-row:last-child { border-bottom: 0; }
.report-row:hover { background: rgba(255,255,255,.025); }
.report-primary { min-width: 0; display: grid; gap: 5px; }
.report-primary strong, .report-reason { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-primary span, .report-meta { color: var(--muted); font-size: 12px; }
.report-reason { color: #d5d6dc; font-size: 13px; }
.type-badge, .state-badge { justify-self: start; display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line-strong); color: #c1c3cb; font-size: 10px; font-weight: 830; text-transform: uppercase; letter-spacing: .07em; }
.state-badge.new { color: #ff6a72; border-color: rgba(255,36,48,.3); background: rgba(255,36,48,.08); }
.state-badge.reviewing { color: #ffc35a; border-color: rgba(255,178,36,.3); background: rgba(255,178,36,.08); }
.state-badge.resolved { color: #61dc9a; border-color: rgba(56,207,132,.3); background: rgba(56,207,132,.07); }
.row-arrow { color: #575b66; font-size: 22px; }
.state-card { min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.state-card strong { color: white; }.state-card span { font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.12); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.detail-overlay { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; }
.overlay-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0,0,0,.64); backdrop-filter: blur(5px); }
.detail-panel { position: relative; width: min(100%, 700px); height: 100%; overflow-y: auto; border-left: 1px solid var(--line-strong); background: #090a0e; box-shadow: -30px 0 80px rgba(0,0,0,.45); }
.detail-header { position: sticky; top: 0; z-index: 2; min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; border-bottom: 1px solid var(--line); background: rgba(9,10,14,.94); backdrop-filter: blur(18px); }
.detail-header h2 { margin: 0; font-size: 27px; }.detail-header .eyebrow { margin-bottom: 5px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #111219; cursor: pointer; font-size: 25px; line-height: 1; }
.detail-content { padding: 24px 26px 50px; display: grid; gap: 18px; }
.detail-hero { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 18px; align-items: stretch; }
.target-image { width: 132px; height: 132px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #111219; }
.image-placeholder { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: #111219; color: #555965; font-size: 34px; }
.detail-summary { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.detail-summary h3 { margin: 9px 0 8px; font-size: 23px; }.detail-summary p { margin: 0; color: var(--muted); line-height: 1.5; }
.detail-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,17,22,.72); }
.detail-card h3 { margin: 0 0 14px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.fact { min-width: 0; display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fact span { color: #747884; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }.fact strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 690; }
.action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.action-grid .button { min-height: 48px; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 11px; }
.timeline-item::before { content: ''; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.timeline-item div { display: grid; gap: 4px; }.timeline-item strong { font-size: 13px; }.timeline-item span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.child-safety-warning { padding: 15px; border: 1px solid rgba(255,178,36,.3); border-radius: 12px; background: rgba(255,178,36,.07); color: #e8c57f; font-size: 12px; line-height: 1.55; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%); max-width: min(90vw, 480px); padding: 13px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: #171820; box-shadow: 0 18px 60px rgba(0,0,0,.45); font-size: 13px; }
.toast.error { border-color: rgba(255,36,48,.38); background: #211013; color: #ffb7bb; }

@media (max-width: 980px) {
  .app-view { grid-template-columns: 82px minmax(0,1fr); }
  .sidebar { padding: 22px 12px; }
  .brand-lockup.compact div, .nav-item:not(.active) b, .nav-item { font-size: 0; }
  .brand-lockup.compact { justify-content: center; }.brand-lockup.compact img { width: 44px; height: 44px; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }.nav-item .status-dot { width: 9px; height: 9px; }
  .nav-item b { position: absolute; margin: -25px 0 0 26px; font-size: 9px; min-width: 18px; }
  .moderator-card { justify-content: center; padding: 9px; }.moderator-card div { display: none; }.text-button { text-align: center; font-size: 10px; }
  .report-row { grid-template-columns: minmax(180px,1.3fr) minmax(140px,1fr) 110px 22px; }.report-meta { display: none; }
}

@media (max-width: 700px) {
  .login-card { padding: 28px 22px; }.brand-lockup { margin-bottom: 34px; }
  .app-view { display: block; padding-bottom: 74px; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 68px; padding: 8px 10px; border: 0; border-top: 1px solid var(--line-strong); flex-direction: row; align-items: center; }
  .brand-lockup.compact, .sidebar-footer { display: none; }.sidebar nav { width: 100%; grid-template-columns: repeat(5,1fr); gap: 4px; }.nav-item { min-height: 50px; }
  .workspace { padding: 24px 14px 30px; }.topbar { align-items: flex-start; flex-direction: column; }.topbar-actions { width: 100%; }.topbar-actions select { flex: 1; width: auto; }
  .metrics { grid-template-columns: 1fr 1fr; }.metrics article { min-height: 120px; }.metrics article:last-child { grid-column: 1 / -1; min-height: 100px; }.metrics strong { font-size: 31px; }
  .report-row { grid-template-columns: minmax(0,1fr) 95px 18px; gap: 12px; padding: 16px 14px; }.report-reason, .report-meta { display: none; }.type-badge { display: none; }
  .detail-panel { width: 100%; }.detail-header { min-height: 78px; padding: 15px 16px; }.detail-content { padding: 18px 14px 40px; }
  .detail-hero { grid-template-columns: 92px minmax(0,1fr); }.target-image, .image-placeholder { width: 92px; height: 92px; }
  .facts, .action-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
