@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/vazirmatnregular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/vazirmatnmedium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/vazirmatnbold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('/assets/fonts/vazirmatnextrabold.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --bg: #040a18;
  --bg-2: #07122b;
  --bg-3: #0a1734;
  --panel: rgba(11, 25, 52, 0.72);
  --panel-strong: rgba(8, 20, 44, 0.94);
  --line: rgba(126, 208, 255, 0.13);
  --line-strong: rgba(126, 208, 255, 0.28);
  --text: #edf5ff;
  --muted: #a5b7d2;
  --muted-2: #7d8fae;
  --cyan: #79dbff;
  --blue: #4f8cff;
  --purple: #a78bfa;
  --green: #36d399;
  --gold: #ffc857;
  --red: #ff6474;
  --grad: linear-gradient(120deg, #8ee6ff 0%, #4f8cff 48%, #a78bfa 100%);
  --grad-gpt: linear-gradient(120deg, #b8a6ff 0%, #79dbff 55%, #8ff0cd 100%);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  --font: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(79, 140, 255, 0.15), transparent),
    radial-gradient(900px 500px at 0% 100%, rgba(167, 139, 250, 0.12), transparent),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
img { max-width: 100%; }

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(121, 219, 255, 0.06); color: var(--text);
  font-family: inherit; font-size: 15px; cursor: pointer; transition: 0.2s;
}
.btn:hover { background: rgba(121, 219, 255, 0.12); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #04101f; font-weight: 700; border: none; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.link-btn { background: none; border: none; color: var(--cyan); cursor: pointer; font-family: inherit; font-size: 14px; padding: 4px; }
.icon-btn { background: rgba(121, 219, 255, 0.08); border: 1px solid var(--line); color: var(--text); width: 38px; height: 38px; border-radius: 12px; cursor: pointer; font-size: 16px; }

.brand-logo { width: 46px; height: 46px; border-radius: 14px; }
.brand-logo.sm { width: 34px; height: 34px; border-radius: 10px; }
.brand-logo.lg { width: 64px; height: 64px; border-radius: 18px; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert.ok { background: rgba(54, 211, 153, 0.12); border-color: rgba(54, 211, 153, 0.35); color: #b8f5dc; }
.alert.error { background: rgba(255, 100, 116, 0.12); border-color: rgba(255, 100, 116, 0.35); color: #ffd3d8; }
.toast { position: fixed; inset-block-end: 22px; inset-inline-start: 22px; background: rgba(11, 25, 52, 0.96); border: 1px solid var(--line-strong); padding: 10px 16px; border-radius: 14px; font-size: 13px; z-index: 80; }
.toast.error { border-color: rgba(255, 100, 116, 0.5); }
.toast.ok { border-color: rgba(54, 211, 153, 0.5); }
.only-mobile { display: none; }
.only-desktop { display: inline-flex; }
input, select, textarea { font-family: inherit; }

/* ==================== ورود (کارت ساده) ==================== */
.auth-body { display: grid; place-items: center; padding: 28px 18px; }
.auth-wrap { width: min(520px, 100%); }
.auth-card { padding: 28px 24px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.auth-brand h1 { font-size: 22px; margin: 0 0 4px; }
.auth-brand p { margin: 0; font-size: 13px; }
.auth-step { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(4, 12, 28, 0.7); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; outline: none; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(167, 139, 250, 0.6); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1); }
.code-input { text-align: center; font-size: 26px !important; letter-spacing: 12px !important; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.auth-links { text-align: center; font-size: 13px; margin-top: 16px; }
.fineprint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.9; }

/* ==================== ورود شینا جی‌پی‌تی (صفحهٔ اختصاصی) ==================== */
.gpt-auth {
  position: relative;
  display: block;
  padding: 34px 22px 46px;
  overflow-x: hidden;
}
.gpt-auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.gpt-auth-bg .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: authFloat 14s ease-in-out infinite; }
.gpt-auth-bg .orb.a { width: 420px; height: 420px; top: -120px; inset-inline-end: -80px; background: radial-gradient(circle, rgba(79, 140, 255, 0.55), transparent 68%); }
.gpt-auth-bg .orb.b { width: 380px; height: 380px; bottom: -140px; inset-inline-start: -90px; background: radial-gradient(circle, rgba(167, 139, 250, 0.5), transparent 68%); animation-delay: -4s; }
.gpt-auth-bg .orb.c { width: 300px; height: 300px; top: 40%; inset-inline-start: 45%; background: radial-gradient(circle, rgba(54, 211, 153, 0.32), transparent 70%); animation-delay: -8s; }
.gpt-auth-bg .grid { position: absolute; inset: 0; opacity: 0.35; background-image: linear-gradient(rgba(126, 208, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 208, 255, 0.06) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 78%); }
@keyframes authFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -26px, 0); } }

.auth-shell { position: relative; z-index: 1; width: min(1140px, 100%); margin: 0 auto; display: grid; gap: 30px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; }
.auth-hero { display: grid; gap: 18px; align-content: start; }
.auth-top { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; width: max-content; }
.auth-top:hover { color: var(--text); text-decoration: none; }
.auth-pill { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(167, 139, 250, 0.34); background: linear-gradient(120deg, rgba(167, 139, 250, 0.16), rgba(79, 140, 255, 0.1)); font-size: 12px; color: #dcd4ff; }
.auth-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(54, 211, 153, 0.16); animation: pulseDot 2.2s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.auth-hero h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.35; }
.auth-hero h1 span { background: var(--grad-gpt); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-lead { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 2.05; max-width: 520px; }
.auth-models { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auth-models span { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.auth-models img { width: 26px; height: 26px; object-fit: contain; }
.auth-models .auth-models-more { display: inline-flex; align-items: center; height: 46px; font-size: 12px; color: var(--muted); border: none; background: none; width: auto; padding: 0 4px; }
.auth-benefits { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; max-width: 520px; }
.auth-benefits li { display: grid; gap: 2px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(9, 20, 44, 0.55); }
.auth-benefits b { font-size: 0.86rem; }
.auth-benefits small { font-size: 0.72rem; color: var(--muted); }
.auth-card.gpt-card { width: 100%; padding: 26px 22px; background: rgba(7, 16, 36, 0.86); }
.gpt-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.gpt-card-head .orb { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(167, 139, 250, 0.3), rgba(79, 140, 255, 0.16)); border: 1px solid rgba(255, 255, 255, 0.1); }
.gpt-card-head .orb img { width: 30px; height: 30px; object-fit: contain; }
.gpt-card-head b { display: block; font-size: 1.05rem; }
.gpt-card-head small { color: var(--muted); font-size: 0.74rem; }
.phone-full { direction: ltr; text-align: center; font-size: 20px !important; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.phone-help { margin: -2px 0 0; font-size: 0.72rem; color: var(--muted); }
.phone-help b { color: var(--cyan); }
.btn.is-ready { box-shadow: 0 16px 38px rgba(79, 140, 255, 0.35); }
.btn.is-ready::after { content: "✓"; font-weight: 800; }
.auth-switch { margin: 14px 0 0; font-size: 0.72rem; color: var(--muted); text-align: center; }
.gpt-auth-foot { position: relative; z-index: 1; margin: 22px auto 0; font-size: 0.72rem; color: var(--muted-2); text-align: center; }

/* ==================== شینا جی‌پی‌تی (چت وب) ==================== */
.app-body { padding: 0; overflow: hidden; position: relative; }
.app-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.app-bg span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.app-bg span:nth-child(1) { width: 520px; height: 520px; top: -180px; inset-inline-end: -120px; background: radial-gradient(circle, rgba(79, 140, 255, 0.55), transparent 70%); }
.app-bg span:nth-child(2) { width: 460px; height: 460px; bottom: -200px; inset-inline-start: -140px; background: radial-gradient(circle, rgba(167, 139, 250, 0.45), transparent 70%); }
.app-bg span:nth-child(3) { width: 320px; height: 320px; top: 45%; inset-inline-start: 40%; background: radial-gradient(circle, rgba(54, 211, 153, 0.24), transparent 72%); }

.app-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 312px minmax(0, 1fr); height: 100vh; }

.sidebar {
  display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px;
  background: linear-gradient(180deg, rgba(9, 20, 44, 0.94), rgba(6, 14, 32, 0.9));
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}
.side-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.side-head .side-orb { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; background: linear-gradient(140deg, rgba(167, 139, 250, 0.3), rgba(79, 140, 255, 0.16)); border: 1px solid rgba(255, 255, 255, 0.1); }
.side-head .side-orb img { width: 25px; height: 25px; object-fit: contain; }
.side-head-copy { display: flex; flex-direction: column; line-height: 1.35; flex: 1; min-width: 0; }
.side-head-copy b { font-size: 0.92rem; }
.side-head-copy small { font-size: 0.62rem; color: var(--muted-2); }
.side-head .icon-btn { display: none; }
.side-list { flex: 1; overflow-y: auto; display: grid; gap: 6px; align-content: start; padding-inline-end: 2px; }
.side-label { font-size: 0.62rem; color: var(--muted-2); letter-spacing: 0.04em; margin-top: 4px; }
.chat-item { text-align: right; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--text); font-family: inherit; display: grid; gap: 2px; transition: 0.22s; }
.chat-item:hover { background: rgba(121, 219, 255, 0.08); border-color: var(--line-strong); transform: translateY(-2px); }
.chat-item.active { border-color: rgba(167, 139, 250, 0.45); background: linear-gradient(120deg, rgba(167, 139, 250, 0.16), rgba(79, 140, 255, 0.08)); }
.ci-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-date { font-size: 11px; color: var(--muted-2); direction: ltr; text-align: right; }
.side-foot { border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 12px; display: grid; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 13px; background: var(--grad-gpt); color: #05101f; display: grid; place-items: center; font-weight: 800; }
.who b { display: block; font-size: 0.82rem; direction: ltr; text-align: right; }
.who small { font-size: 0.66rem; color: var(--muted-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--cyan); }

.main { display: flex; flex-direction: column; min-height: 0; }
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 12, 28, 0.72); backdrop-filter: blur(14px);
}
.model-select {
  background: rgba(6, 14, 32, 0.9); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 9px 16px; font-family: inherit; font-size: 13.5px; cursor: pointer;
}
.model-select:focus { outline: none; border-color: rgba(167, 139, 250, 0.55); }
.chips { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(121, 219, 255, 0.09); border: 1px solid var(--line); white-space: nowrap; }
.chip-free { background: rgba(54, 211, 153, 0.12); border-color: rgba(54, 211, 153, 0.3); }

.messages { flex: 1; overflow-y: auto; padding: 24px 20px 10px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.msg { display: flex; animation: msgIn 0.35s ease backwards; }
.msg.me { justify-content: flex-start; }
.msg.bot { justify-content: flex-end; }
.bubble { max-width: min(760px, 84%); padding: 13px 17px; border-radius: 20px; background: rgba(9, 20, 44, 0.85); border: 1px solid rgba(255, 255, 255, 0.07); word-break: break-word; line-height: 2; }
.msg.me .bubble { background: linear-gradient(120deg, rgba(79, 140, 255, 0.3), rgba(167, 139, 250, 0.24)); border-color: var(--line-strong); }
.msg.bot .bubble { border-color: rgba(54, 211, 153, 0.16); }
.bubble pre { background: rgba(2, 8, 20, 0.9); padding: 12px; border-radius: 12px; overflow-x: auto; direction: ltr; text-align: left; font-size: 13px; }
.bubble code { background: rgba(2, 8, 20, 0.7); padding: 2px 6px; border-radius: 6px; font-size: 13px; direction: ltr; display: inline-block; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.attach-img { display: block; margin-top: 10px; border-radius: 12px; max-height: 320px; }
.attach-file { display: block; margin-top: 8px; font-size: 13px; }
.typing .dot { width: 7px; height: 7px; margin: 0 2px; background: var(--cyan); border-radius: 50%; display: inline-block; animation: blink 1.2s infinite; }
.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.welcome { margin: auto; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 26px 10px; max-width: 720px; }
.welcome .welcome-orb { width: 82px; height: 82px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(140deg, rgba(167, 139, 250, 0.3), rgba(79, 140, 255, 0.16)); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 22px 54px rgba(79, 140, 255, 0.24); }
.welcome .welcome-orb img { width: 48px; height: 48px; object-fit: contain; animation: floatSoft 5.5s ease-in-out infinite; }
@keyframes floatSoft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.welcome h2 { margin: 6px 0 0; font-size: clamp(1.3rem, 2.6vw, 1.85rem); }
.welcome p { margin: 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.suggest button { background: rgba(121, 219, 255, 0.06); border: 1px solid var(--line); color: #cfe4fb; border-radius: 999px; padding: 8px 15px; cursor: pointer; font-family: inherit; font-size: 13px; transition: 0.22s; }
.suggest button:hover { background: rgba(167, 139, 250, 0.14); border-color: rgba(167, 139, 250, 0.4); color: #f0eaff; transform: translateY(-2px); }
.quota { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }

.composer {
  display: flex; align-items: flex-end; gap: 8px; margin: 0 18px 16px; padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 22px;
  background: rgba(6, 14, 32, 0.85); backdrop-filter: blur(12px); position: relative;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.composer:focus-within { border-color: rgba(167, 139, 250, 0.45); box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.09); }
.composer textarea { flex: 1; resize: none; background: transparent; border: none; color: var(--text); font-family: inherit; font-size: 15px; padding: 11px 6px; max-height: 180px; outline: none; }
.attach-btn { cursor: pointer; width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 13px; font-size: 17px; }
.attach-btn:hover { background: rgba(121, 219, 255, 0.12); }
.composer .btn-primary { flex: none; padding: 10px 22px; border-radius: 15px; }
.attach-preview { position: absolute; inset-block-end: 100%; inset-inline-start: 12px; margin-bottom: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: rgba(11, 25, 52, 0.95); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
.pill button { background: none; border: none; color: var(--red); cursor: pointer; }
.empty { padding: 12px; font-size: 13px; }

.modal { position: fixed; inset: 0; background: rgba(2, 6, 16, 0.72); display: grid; place-items: center; padding: 18px; z-index: 50; backdrop-filter: blur(6px); }
.modal-card { width: min(690px, 100%); max-height: 86vh; overflow-y: auto; padding: 24px; position: relative; }
.modal-close { position: absolute; inset-inline-start: 16px; top: 16px; }
.plans-body h4 { margin: 16px 0 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.plan-card { background: rgba(121, 219, 255, 0.05); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px; display: grid; gap: 4px; }
.plan-card .price { color: var(--gold); font-weight: 700; }
.plan-card .buy-btn { margin-top: 6px; width: 100%; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(121, 219, 255, 0.18), rgba(121, 219, 255, 0.06)); color: var(--text); font: inherit; cursor: pointer; transition: 0.2s; }
.plan-card .buy-btn:hover { border-color: var(--gold); }
.plan-card .buy-btn[disabled] { opacity: 0.6; cursor: progress; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.shop-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.ticks { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 13px; }
.ticks li::before { content: "✓"; color: var(--green); margin-inline-end: 8px; }
.account-note { margin-top: 14px; padding: 13px 15px; border-radius: 15px; border: 1px solid var(--line); background: rgba(121, 219, 255, 0.05); font-size: 13px; line-height: 1.95; display: grid; gap: 6px; justify-items: start; text-align: right; }
.account-note.ok { border-color: rgba(54, 211, 153, 0.45); }
.account-note.warn { border-color: rgba(255, 180, 80, 0.45); }
.buy-inline { display: inline-block; margin-top: 4px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(121, 219, 255, 0.18), rgba(121, 219, 255, 0.06)); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.buy-inline:hover { border-color: var(--gold); }

/* ==================== پنل پشتیبانی ==================== */
.admin-body { padding: 22px; }
.admin-shell { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; }
.admin-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-bar .spacer { flex: 1; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: rgba(121, 219, 255, 0.05); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.stat b { display: block; font-size: 22px; }
.stat small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
tr:hover td { background: rgba(121, 219, 255, 0.04); }
.inline-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(121, 219, 255, 0.12); border: 1px solid var(--line); }
.tag.green { background: rgba(54, 211, 153, 0.14); border-color: rgba(54, 211, 153, 0.32); }
.tag.red { background: rgba(255, 100, 116, 0.14); border-color: rgba(255, 100, 116, 0.32); }
.tag.gold { background: rgba(255, 200, 87, 0.14); border-color: rgba(255, 200, 87, 0.32); }
.scroll-x { overflow-x: auto; }
.perms-box { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.perms-box label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(121, 219, 255, 0.04); }

@media (max-width: 1020px) {
  .auth-shell { grid-template-columns: 1fr; gap: 22px; }
  .auth-hero h1 { font-size: clamp(1.7rem, 7vw, 2.3rem); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 0 0 0; z-index: 40; width: 84%; max-width: 330px; transform: translateX(100%); transition: transform 0.25s ease; border-inline-end: 1px solid var(--line-strong); }
  .sidebar.open { transform: translateX(0); }
  .side-head .icon-btn { display: grid; }
  .only-mobile { display: inline-flex; }
  .only-desktop { display: none; }
  .bubble { max-width: 92%; }
  .topbar { padding: 10px 12px; }
  .messages { padding: 18px 12px 8px; }
  .composer { margin: 0 10px 12px; }
}
