:root {
  --bg: #09090b;
  --panel: #101014;
  --panel-2: #15151a;
  --panel-3: #1b1b21;
  --line: #27272e;
  --line-soft: #1d1d23;
  --text: #f7f7f8;
  --muted: #96969f;
  --muted-2: #6d6d75;
  --pink: #ed1d48;
  --green: #51ff00;
  --yellow: #f4c95d;
  --orange: #ff9158;
  --blue: #6aa8ff;
  --danger: #ff5d7d;
  --radius: 14px;
  --shadow: 0 24px 70px rgba(0,0,0,.34);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(237,29,72,.08), transparent 33%),
    radial-gradient(circle at 90% 15%, rgba(81,255,0,.035), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card {
  width: min(720px, 100%);
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(20,20,25,.96), rgba(12,12,15,.98));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.login-card::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px; border-radius: 50%;
  top: -190px; right: -160px;
  background: rgba(237,29,72,.12);
  filter: blur(30px);
  pointer-events: none;
}
.brand-mark, .side-brand { font-weight: 900; letter-spacing: -.04em; }
.brand-mark { font-size: 32px; margin-bottom: 52px; }
.brand-mark span, .side-brand span { color: var(--pink); }
.eyebrow { color: var(--pink); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 11px; }
.login-card h1 { margin: 0; font-size: clamp(38px, 7vw, 72px); line-height: .98; letter-spacing: -.055em; max-width: 550px; }
.login-copy { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 580px; margin: 24px 0 28px; }
.discord-button {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  border-radius: 10px; padding: 14px 20px; background: var(--pink); font-weight: 850;
  box-shadow: 0 12px 32px rgba(237,29,72,.18); transition: .18s ease;
}
.discord-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.login-security { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 46px; }
.login-security div { padding: 17px; background: #0b0b0e; border: 1px solid var(--line-soft); border-radius: 11px; }
.login-security strong { display:block; font-size: 12px; margin-bottom: 6px; }
.login-security span { display:block; color: var(--muted-2); font-size: 11px; line-height: 1.5; }
.tiny { color: #55555e; font-size: 11px; margin: 24px 0 0; }
.alert { border: 1px solid rgba(237,29,72,.35); background: rgba(237,29,72,.08); color: #ff9aae; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 18px; }

.app { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 245px; z-index: 20;
  background: rgba(12,12,15,.97); border-right: 1px solid var(--line); padding: 24px 16px;
  display: flex; flex-direction: column; backdrop-filter: blur(18px);
}
.side-brand { font-size: 24px; padding: 4px 9px 28px; border-bottom: 1px solid var(--line-soft); }
.side-brand small { color: var(--muted-2); font-size: 8px; letter-spacing: .18em; margin-left: 7px; }
.nav { display: grid; gap: 5px; padding-top: 22px; }
.nav button {
  width: 100%; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; padding: 11px 12px;
  background: transparent; color: #a7a7af; text-align: left; cursor: pointer; font-size: 13px; transition: .15s ease;
}
.nav button span { color: #4f4f58; font-size: 9px; font-weight: 800; min-width: 18px; }
.nav button:hover { background: #15151a; color: white; }
.nav button.active { background: rgba(237,29,72,.11); color: white; box-shadow: inset 2px 0 0 var(--pink); }
.nav button.active span { color: var(--pink); }
.side-bottom { margin-top: auto; border-top: 1px solid var(--line-soft); padding: 16px 6px 2px; }
.side-user { display: flex; gap: 10px; align-items: center; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #24242b; border: 1px solid #383840; }
.user-copy { min-width: 0; }
.user-copy strong { display:block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy span { display:block; color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.logout-button { margin-top: 12px; width: 100%; border: 1px solid var(--line); background: #111115; color: #a9a9b1; padding: 9px; border-radius: 8px; cursor: pointer; font-size: 11px; }
.logout-button:hover { border-color: #3a3a43; color: white; }

.shell { grid-column: 2; min-width: 0; }
.topbar {
  min-height: 94px; padding: 22px 34px; border-bottom: 1px solid var(--line); background: rgba(9,9,11,.82); backdrop-filter: blur(18px);
  display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 15;
}
.topbar h2 { margin: 0; font-size: 23px; letter-spacing: -.025em; }
.top-actions { display:flex; align-items:center; gap:10px; }
.icon-button, .notification-button, .menu-button {
  border:1px solid var(--line); background:#111115; color:#b5b5bd; border-radius:8px; padding:9px 12px; cursor:pointer; font-size:11px;
}
.icon-button:hover, .notification-button:hover, .menu-button:hover { color:white; border-color:#3a3a43; }
.notification-button b { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:5px; border-radius:999px; background:var(--pink); color:white; font-size:9px; }
.menu-button { display:none; }
.top-user { display:flex; gap:9px; align-items:center; margin-left:4px; }
.top-user .avatar { width:34px; height:34px; }

.content { padding: 30px 34px 80px; max-width: 1680px; margin: 0 auto; }
.loading-card, .empty {
  border: 1px dashed #303038; border-radius: var(--radius); padding: 42px; color: var(--muted); text-align:center; background:rgba(18,18,22,.5);
}
.page-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-end; margin-bottom:22px; }
.page-head h3 { margin:0; font-size:18px; }
.page-head p { color:var(--muted); margin:6px 0 0; font-size:12px; }
.toolbar { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.toolbar input, .toolbar select, .field input, .field select, .field textarea {
  border:1px solid var(--line); background:#0c0c0f; color:white; border-radius:8px; padding:10px 11px; outline:none; min-height:39px;
}
.toolbar input:focus, .toolbar select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color:#555560; }
.toolbar input { min-width:240px; }
.button, .button-ghost, .button-danger {
  border:1px solid transparent; border-radius:8px; padding:10px 13px; cursor:pointer; font-weight:800; font-size:11px; transition:.15s ease;
}
.button { background:var(--pink); color:white; }
.button:hover { filter:brightness(1.08); }
.button-ghost { background:#121217; border-color:var(--line); color:#c0c0c8; }
.button-ghost:hover { color:white; border-color:#44444d; }
.button-danger { background:rgba(237,29,72,.08); border-color:rgba(237,29,72,.28); color:#ff8fa7; }
.button:disabled, .button-ghost:disabled, .button-danger:disabled { opacity:.45; cursor:not-allowed; }

.stat-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:28px; }
.stat-card { border:1px solid var(--line); background:linear-gradient(160deg,#131318,#0e0e12); border-radius:var(--radius); padding:20px; min-width:0; }
.stat-card .stat-label { color:var(--muted-2); font-size:9px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.stat-card strong { display:block; font-size:30px; letter-spacing:-.04em; margin-top:10px; }
.stat-card small { color:var(--muted); font-size:10px; }
.stat-card.accent strong { color:var(--pink); }
.stat-card.good strong { color:var(--green); }

.two-col { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.85fr); gap:16px; }
.panel { border:1px solid var(--line); background:rgba(16,16,20,.88); border-radius:var(--radius); overflow:hidden; }
.panel-head { padding:16px 18px; border-bottom:1px solid var(--line-soft); display:flex; justify-content:space-between; gap:14px; align-items:center; }
.panel-head h3 { margin:0; font-size:13px; }
.panel-head span { color:var(--muted-2); font-size:10px; }
.panel-body { padding:18px; }

.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; min-width:760px; }
th { color:#777780; text-align:left; font-size:9px; letter-spacing:.12em; text-transform:uppercase; font-weight:850; padding:12px 14px; background:#0d0d10; border-bottom:1px solid var(--line-soft); }
td { padding:13px 14px; border-bottom:1px solid var(--line-soft); font-size:12px; vertical-align:middle; }
tbody tr { transition:.12s ease; }
tbody tr[data-order-id] { cursor:pointer; }
tbody tr[data-order-id]:hover { background:#141419; }
.order-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:11px; color:#d8d8dd; }
.muted { color:var(--muted); }
.subtle { color:var(--muted-2); font-size:10px; }
.money { font-variant-numeric:tabular-nums; }
.badge { display:inline-flex; align-items:center; border:1px solid #34343c; background:#16161b; color:#bcbcc4; border-radius:999px; padding:5px 8px; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.badge.submitted, .badge.urgent, .badge.rejected { color:#ff8fa7; border-color:rgba(237,29,72,.35); background:rgba(237,29,72,.07); }
.badge.in_progress, .badge.reviewing, .badge.pending { color:#8ebcff; border-color:rgba(106,168,255,.3); background:rgba(106,168,255,.06); }
.badge.quality_check, .badge.quoted, .badge.high { color:#ffd478; border-color:rgba(244,201,93,.3); background:rgba(244,201,93,.06); }
.badge.completed, .badge.paid, .badge.approved, .badge.available { color:#84ff4f; border-color:rgba(81,255,0,.25); background:rgba(81,255,0,.05); }
.badge.cancelled, .badge.offline { color:#92929a; }
.badge.busy { color:#ffad79; border-color:rgba(255,145,88,.3); }
.badge.away { color:#ffd478; border-color:rgba(244,201,93,.3); }

.order-list-compact { display:grid; }
.order-compact { padding:13px 16px; display:grid; grid-template-columns:minmax(120px,.7fr) minmax(130px,1fr) minmax(100px,.7fr) auto; gap:12px; align-items:center; border-bottom:1px solid var(--line-soft); cursor:pointer; }
.order-compact:last-child { border-bottom:0; }
.order-compact:hover { background:#15151a; }
.order-compact strong { font-size:11px; }
.order-compact span { color:var(--muted); font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.announcement-stack { display:grid; gap:10px; }
.announcement-item { border:1px solid var(--line-soft); border-radius:10px; background:#0d0d11; padding:14px; }
.announcement-item.pinned { border-color:rgba(81,255,0,.22); box-shadow:inset 2px 0 0 var(--green); }
.announcement-item h4 { margin:0 0 7px; font-size:12px; }
.announcement-item p { margin:0; color:var(--muted); white-space:pre-wrap; font-size:11px; line-height:1.55; }
.announcement-item small { display:block; color:#5e5e66; margin-top:9px; font-size:9px; }

.cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.staff-card, .review-card, .analytics-card { border:1px solid var(--line); background:#111115; border-radius:var(--radius); padding:18px; }
.staff-card { display:flex; gap:13px; align-items:flex-start; }
.staff-card .avatar { width:50px; height:50px; }
.staff-card h4 { margin:1px 0 4px; font-size:13px; }
.staff-card p { margin:5px 0 0; color:var(--muted); font-size:10px; }
.review-card h4 { margin:0 0 8px; font-size:12px; }
.review-card blockquote { margin:12px 0; color:#c5c5cb; font-size:12px; line-height:1.6; border-left:2px solid #33333c; padding-left:12px; }
.review-actions { display:flex; gap:7px; margin-top:14px; }
.stars { color:#ffd478; letter-spacing:.08em; }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.field { display:flex; flex-direction:column; gap:7px; }
.field.full { grid-column:1 / -1; }
.field label { color:#8d8d96; font-size:10px; font-weight:800; letter-spacing:.04em; }
.field textarea { min-height:110px; resize:vertical; }
.checkline { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; }

.chart-list { display:grid; gap:12px; }
.chart-row { display:grid; grid-template-columns:160px 1fr 70px; gap:12px; align-items:center; }
.chart-row span { font-size:11px; color:#b7b7bf; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-track { height:8px; border-radius:999px; background:#24242b; overflow:hidden; }
.chart-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,var(--pink),#ff5a7a); min-width:2px; }
.chart-row strong { text-align:right; font-size:11px; }
.analytics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.analytics-card h3 { margin:0 0 17px; font-size:13px; }

.toast-root { position:fixed; right:18px; bottom:18px; display:grid; gap:8px; z-index:100; }
.toast { width:min(340px,calc(100vw - 36px)); border:1px solid var(--line); background:#15151a; box-shadow:var(--shadow); border-radius:10px; padding:12px 14px; font-size:11px; animation:toastin .18s ease; }
.toast.error { border-color:rgba(237,29,72,.45); }
.toast.success { border-color:rgba(81,255,0,.3); }
@keyframes toastin { from { opacity:0; transform:translateY(8px); } }

.modal, .drawer { position:fixed; inset:0; z-index:80; }
.modal-backdrop, .drawer-backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgba(0,0,0,.72); backdrop-filter:blur(6px); cursor:default; }
.modal-card { position:relative; width:min(1100px,calc(100vw - 40px)); max-height:calc(100vh - 40px); margin:20px auto; overflow:auto; border:1px solid #303038; border-radius:18px; background:#0d0d11; box-shadow:var(--shadow); }
.modal-head { position:sticky; top:0; z-index:3; display:flex; justify-content:space-between; align-items:center; padding:18px 22px; background:rgba(13,13,17,.96); backdrop-filter:blur(15px); border-bottom:1px solid var(--line); }
.modal-head h3 { margin:0; font-size:19px; }
.modal-head > button, .drawer-head button { border:1px solid var(--line); background:#16161b; color:#aaaab2; border-radius:7px; padding:7px 10px; cursor:pointer; font-size:10px; }
.modal-content { padding:22px; }
.order-detail-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:16px; }
.detail-card { border:1px solid var(--line); border-radius:12px; background:#111115; overflow:hidden; margin-bottom:14px; }
.detail-card h4 { margin:0; padding:13px 15px; border-bottom:1px solid var(--line-soft); font-size:11px; }
.detail-body { padding:15px; }
.detail-pairs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.detail-pair span { display:block; color:var(--muted-2); font-size:9px; text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.detail-pair strong { font-size:11px; word-break:break-word; }
.description-box { white-space:pre-wrap; line-height:1.65; color:#c7c7cd; font-size:12px; }
.timeline { display:grid; gap:10px; }
.timeline-item { padding-left:13px; border-left:2px solid #2c2c34; }
.timeline-item strong { display:block; font-size:10px; }
.timeline-item p { color:var(--muted); margin:4px 0 0; font-size:10px; line-height:1.5; }
.timeline-item small { color:#5c5c64; font-size:9px; }
.note { border:1px solid var(--line-soft); background:#0c0c0f; border-radius:9px; padding:12px; margin-bottom:9px; }
.note.client { border-color:rgba(81,255,0,.17); }
.note p { white-space:pre-wrap; color:#bdbdc5; font-size:11px; line-height:1.55; margin:7px 0; }
.note small { color:#66666e; font-size:9px; }
.file-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid var(--line-soft); }
.file-row:last-child { border-bottom:0; }
.file-row span { font-size:11px; }
.file-row a { font-size:10px; color:#ff88a0; }

.drawer-panel { position:absolute; top:0; right:0; width:min(430px,100%); height:100%; overflow:auto; background:#0e0e12; border-left:1px solid var(--line); box-shadow:var(--shadow); }
.drawer-head { display:flex; justify-content:space-between; align-items:center; padding:18px; border-bottom:1px solid var(--line); position:sticky; top:0; background:#0e0e12; }
.drawer-head h3 { margin:0; font-size:15px; }
.notification-item { padding:14px 18px; border-bottom:1px solid var(--line-soft); }
.notification-item.unread { background:rgba(237,29,72,.04); }
.notification-item strong { font-size:11px; }
.notification-item p { color:var(--muted); font-size:10px; margin:5px 0; }
.notification-item small { color:#5e5e66; font-size:9px; }

.health-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.health-item { border:1px solid var(--line); background:#111115; border-radius:11px; padding:16px; }
.health-item span { color:var(--muted); font-size:10px; }
.health-item strong { display:block; margin-top:8px; font-size:12px; }
.health-item strong.ok { color:var(--green); }
.health-item strong.bad { color:#ff8fa7; }

@media (max-width: 1250px) {
  .stat-grid { grid-template-columns:repeat(3,1fr); }
  .cards { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 980px) {
  .app { grid-template-columns:1fr; }
  .sidebar { transform:translateX(-102%); transition:.2s ease; box-shadow:var(--shadow); }
  .sidebar.open { transform:translateX(0); }
  .shell { grid-column:1; }
  .menu-button { display:inline-block; margin-right:9px; }
  .topbar > div:first-child { display:grid; grid-template-columns:auto 1fr; align-items:center; }
  .topbar .eyebrow { grid-column:2; }
  .topbar h2 { grid-column:2; }
  .two-col, .order-detail-grid, .analytics-grid { grid-template-columns:1fr; }
  .login-security { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  .login-card { padding:32px 23px; }
  .brand-mark { margin-bottom:38px; }
  .topbar { padding:16px 18px; min-height:80px; }
  .content { padding:22px 18px 70px; }
  .top-user .user-copy, .icon-button { display:none; }
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .cards, .form-grid, .health-grid { grid-template-columns:1fr; }
  .toolbar { width:100%; }
  .toolbar input, .toolbar select { flex:1 1 150px; min-width:0; }
  .order-compact { grid-template-columns:1fr auto; }
  .order-compact > :nth-child(2), .order-compact > :nth-child(3) { display:none; }
  .detail-pairs { grid-template-columns:1fr; }
  .modal-card { width:100%; max-height:100vh; height:100vh; margin:0; border-radius:0; border:0; }
  .chart-row { grid-template-columns:100px 1fr 50px; }
}
