@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@700&display=swap');
/* =========================================================
   Bot Hub — design system
   One file for every page: tokens, shell, components.
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;

  --bg: #090a0f;
  --bg-grad-1: rgba(124, 108, 255, .10);
  --bg-grad-2: rgba(56, 189, 248, .05);
  --surface: #11131a;
  --surface-2: #171a23;
  --surface-3: #1e222d;
  --border: #232735;
  --border-strong: #303547;
  --text: #eceef4;
  --text-2: #a7adbd;
  --text-3: #6c7387;

  --accent: #7c6cff;
  --accent-2: #a197ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(124, 108, 255, .13);
  --accent-ring: rgba(124, 108, 255, .35);

  --success: #34d399;  --success-soft: rgba(52, 211, 153, .12);
  --warning: #fbbf24;  --warning-soft: rgba(251, 191, 36, .12);
  --danger:  #f87171;  --danger-soft:  rgba(248, 113, 113, .12);
  --info:    #60a5fa;  --info-soft:    rgba(96, 165, 250, .12);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.7);
  --sidebar-w: 264px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="light"] {
  --bg: #f5f6fa;
  --bg-grad-1: rgba(124, 108, 255, .10);
  --bg-grad-2: rgba(56, 189, 248, .06);
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f5;
  --border: #e3e6ee;
  --border-strong: #d3d7e2;
  --text: #151822;
  --text-2: #4f5668;
  --text-3: #8b92a5;
  --accent: #6a58ff;
  --accent-2: #5644f0;
  --accent-soft: rgba(106, 88, 255, .10);
  --accent-ring: rgba(106, 88, 255, .28);
  --success: #059669; --success-soft: rgba(5, 150, 105, .10);
  --warning: #b45309; --warning-soft: rgba(217, 119, 6, .12);
  --danger:  #dc2626; --danger-soft:  rgba(220, 38, 38, .10);
  --info:    #2563eb; --info-soft:    rgba(37, 99, 235, .10);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, .22);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 100% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg-grad-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-3); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--text); direction: ltr; unicode-bidi: isolate; display: inline-block; line-height: 1.5; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-inline-end: 1px solid var(--border);
  backdrop-filter: blur(16px);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; font-weight: 700; font-size: 16px; letter-spacing: -.2px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #4f46e5 60%, #22d3ee);
  color: #fff; box-shadow: 0 8px 22px -8px var(--accent);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); margin-top: -2px; }

.nav-scroll { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 14px 10px 6px; letter-spacing: .3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .nav a.active { box-shadow: inset -3px 0 0 var(--accent); }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav .count { margin-inline-start: auto; font-size: 11px; background: var(--surface-3); color: var(--text-2); border-radius: 999px; padding: 1px 8px; font-weight: 600; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.avatar.lg { width: 44px; height: 44px; }
.user-card .who { min-width: 0; flex: 1; }
.user-card .nm { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .role { font-size: 11px; color: var(--text-3); }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-3); text-decoration: none; }
.icon-btn svg { width: 16px; height: 16px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 32px; min-height: 64px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs .sep { opacity: .5; }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 28px 32px 60px; width: 100%; max-width: 1240px; margin: 0 auto; }
.content.narrow { max-width: 980px; }

/* ---------- typography helpers ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-title h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-head p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 20px; }
.card + .card { margin-top: 16px; }
.card.hover { transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.card.hover:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.hero {
  position: relative; overflow: hidden;
  padding: 28px; border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(600px 200px at 90% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}
.hero h2 { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.hero p { color: var(--text-2); margin-top: 6px; max-width: 620px; }
.hero .row { margin-top: 18px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stats.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.sticky-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- stat ---------- */
.stat { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat .top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.stat .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.stat .ico svg { width: 16px; height: 16px; }
.stat .ico.green { background: var(--success-soft); color: var(--success); }
.stat .ico.amber { background: var(--warning-soft); color: var(--warning); }
.stat .ico.red { background: var(--danger-soft); color: var(--danger); }
.stat .ico.blue { background: var(--info-soft); color: var(--info); }
.stat .n { font-size: 28px; font-weight: 700; letter-spacing: -.6px; margin-top: 10px; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn, button.save, button.start, button.stop {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  font: 600 13.5px/1 var(--font);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
  text-decoration: none !important;
}
.btn:active, button.save:active, button.start:active, button.stop:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary, button.save, button.start { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:hover, button.save:hover, button.start:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger, button.stop { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn-danger:hover, button.stop:hover { background: color-mix(in srgb, var(--danger) 20%, transparent); }
.btn-success { background: var(--success); color: #062b1f; }
.btn-success:hover { background: color-mix(in srgb, var(--success) 88%, #fff); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], button[disabled] { opacity: .55; cursor: not-allowed; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.online, .badge.success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge.online::before { animation: pulse 1.8s infinite; }
.badge.starting, .badge.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.badge.needs_token, .badge.needs_key, .badge.no_guild, .badge.warn { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge.error, .badge.crashed, .badge.invalid_token, .badge.blocked, .badge.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.badge.accent { background: var(--accent-soft); color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 currentColor; } 60% { box-shadow: 0 0 0 4px transparent; } }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.chip .mono { color: var(--text); direction: ltr; }
.chip button { background: none; border: none; color: var(--accent-2); cursor: pointer; font: inherit; font-weight: 600; padding: 0 2px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
label .opt, .opt { color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.hint { font-size: 12px; color: var(--text-3); }
input, select, textarea {
  width: 100%; font: 400 14px/1.4 var(--font); color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); background: var(--surface); }
input[type="color"] { padding: 4px; height: 40px; width: 72px; cursor: pointer; }
input[type="checkbox"] { width: auto; }
input.ok { border-color: color-mix(in srgb, var(--success) 60%, transparent); }
input.bad, textarea.bad { border-color: var(--danger) !important; box-shadow: 0 0 0 4px var(--danger-soft) !important; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.ltr { direction: ltr; text-align: left; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.check { font-size: 12px; font-weight: 500; min-height: 0; }
.check:empty { display: none; }
.check.msg-ok { color: var(--success); }
.check.msg-bad { color: var(--danger); }
.check.msg-load { color: var(--info); }
.check.msg-info { color: var(--text-3); }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.search { position: relative; }
.search input { padding-inline-start: 36px; }
.search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; line-height: 1.75; color: var(--text-2); }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.alert b { color: var(--text); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert.info svg { color: var(--info); }
.alert.warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 28%, transparent); }
.alert.warn svg { color: var(--warning); }
.alert.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert.success svg { color: var(--success); }
.alert.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.danger svg { color: var(--danger); }
.alert a { font-weight: 600; }

/* inline result messages */
.rmsg, .save-msg, .error, .msg, .err { font-size: 13px; font-weight: 600; }
.rmsg:empty { display: none; }
.rmsg { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.rmsg.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.rmsg.error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.save-msg, .msg { color: var(--success); }
.error, .err { color: var(--danger); }

/* ---------- panels inside the bot page (legacy class names kept) ---------- */
.rp { margin-top: 0; }
.rp-note { display: block; padding: 12px 14px; border-radius: var(--radius); background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent); color: var(--text-2); font-size: 12.8px; line-height: 1.85; margin-bottom: 14px; }
.rp-note b { color: var(--text); }
.rp-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.rp-row input { flex: 1; min-width: 180px; }
.afk-sub { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; background: var(--surface-2); }
.afk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.afk-head b { font-size: 13.5px; font-weight: 700; }
.afk-empty { font-size: 13px; color: var(--text-3); text-align: center; padding: 22px 0; }
.action-card .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.game-grid button.save { height: auto; padding: 12px; flex-direction: column; gap: 4px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.game-grid button.save:hover { border-color: var(--accent); background: var(--accent-soft); }
.game-grid .gi { font-size: 22px; }

/* progress */
.prog { margin-top: 10px; }
.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #22d3ee); border-radius: 999px; transition: width .4s var(--ease); }
.pt { font-size: 12px; color: var(--text-2); margin-top: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* key/value list */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv-row:last-child { border-bottom: none; }
.kv-row span { color: var(--text-2); }
.kv-row b { font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }

/* ---------- bot cards ---------- */
.bot-card { display: flex; flex-direction: column; padding: 18px; gap: 14px; }
.bot-card .top { display: flex; align-items: flex-start; gap: 13px; }
.bot-ic {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(150deg, var(--accent-soft), transparent), var(--surface-2);
  border: 1px solid var(--border);
}
.bot-ic.lg { width: 60px; height: 60px; font-size: 30px; border-radius: 16px; }
.bot-card h4 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.bot-card .desc { font-size: 12.8px; color: var(--text-2); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bot-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.bot-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: auto; flex-wrap: wrap; }
.bot-card .foot > .row { flex-wrap: nowrap; margin-inline-start: auto; gap: 8px; }
.bot-card .rt { font-size: 12px; color: var(--text-3); flex: 1 1 120px; min-width: 0; line-height: 1.6; }
.bot-card .row.between { flex-wrap: nowrap; }
.bot-card h4 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-card [data-badge] { flex-shrink: 0; }
.bot-card .rt.err { color: var(--danger); }

/* list rows */
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-row .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* tabs / segmented */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.seg button { height: 30px; padding: 0 12px; border: none; background: none; color: var(--text-2); font: 600 12.5px var(--font); border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: start; font-weight: 600; color: var(--text-3); font-size: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }

/* empty / skeleton */
.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .em-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3); }
.empty .em-ic svg { width: 26px; height: 26px; }
.empty h4 { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 50%; transform: translateX(50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
[dir="ltr"] .toasts { transform: translateX(-50%); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 600; animation: toastIn .3s var(--ease); }
.toast.err { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.toast.ok { border-color: color-mix(in srgb, var(--success) 45%, transparent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(5, 6, 10, .62); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
.modal { width: 100%; max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .25s var(--ease); }
.modal .vid { aspect-ratio: 16 / 9; background: #000; }
.modal .vid iframe { width: 100%; height: 100%; border: 0; display: block; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }

/* videos */
.vid-card { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; text-align: start; padding: 0; font: inherit; color: inherit; }
.vid-card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3) center / cover no-repeat; }
.vid-card .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5)); }
.vid-card .play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.vid-card .play span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); color: #fff; transition: transform .2s var(--ease), background .2s; }
.vid-card:hover .play span { transform: scale(1.08); background: var(--accent); }
.vid-card .play svg { width: 18px; height: 18px; margin-inline-start: 2px; }
.vid-card .vt { padding: 12px 14px; font-size: 13px; font-weight: 600; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-card .vt small { display: block; font-weight: 400; color: var(--text-3); font-size: 11.5px; margin-top: 2px; }

/* reveal */
.reveal { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; }
.landing-hero { flex: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; max-width: 1180px; width: 100%; margin: 0 auto; padding: 30px 40px 60px; }
.landing h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.15; font-weight: 700; letter-spacing: -1.2px; }
.landing h1 .grad { background: linear-gradient(90deg, var(--accent-2), #22d3ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing .lead { font-size: 17px; color: var(--text-2); margin-top: 18px; max-width: 520px; line-height: 1.9; }
.landing .cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 12px 30px -10px #5865f2; }
.btn-discord:hover { background: #4752c4; }
.trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.trust div { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.trust svg { width: 18px; height: 18px; color: var(--success); }
.preview { position: relative; }
.preview .window { border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.preview .wbar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.preview .wbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.preview .wbody { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.preview .mini { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.preview .mini b { font-size: 13px; }
.preview .mini span.s { font-size: 11.5px; color: var(--text-3); display: block; }
.preview .glow { position: absolute; inset: -40px; z-index: -1; background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(20px); }
.features { max-width: 1180px; margin: 0 auto 70px; padding: 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature .fi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 14px; }
.feature .fi svg { width: 20px; height: 20px; }
.feature h4 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--text-2); font-size: 13.5px; line-height: 1.8; }
.landing-foot { text-align: center; padding: 24px; color: var(--text-3); font-size: 12.5px; border-top: 1px solid var(--border); }

/* salawat overlay */
.prayer { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; overflow: hidden; cursor: pointer;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(214, 170, 76, .16), transparent 70%),
    radial-gradient(120% 90% at 50% 110%, rgba(16, 94, 76, .55), transparent 60%),
    linear-gradient(180deg, #05070d, #0a0f14 55%, #06120f);
  animation: salFade .6s ease both; }
.prayer.show { display: grid; }
.prayer.leaving { animation: salOut .45s ease both; }
.prayer::before { content: ''; position: absolute; inset: -40px; opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23e8c872' stroke-width='1'%3E%3Crect x='24' y='24' width='36' height='36'/%3E%3Crect x='24' y='24' width='36' height='36' transform='rotate(45 42 42)'/%3E%3Ccircle cx='42' cy='42' r='9'/%3E%3Cpath d='M0 0L17 17M84 0L67 17M0 84L17 67M84 84L67 67'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%);
  animation: salDrift 60s linear infinite; }
.prayer .sparks i { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #f3d98b; box-shadow: 0 0 10px 2px rgba(243, 217, 139, .7); opacity: 0; animation: salRise linear infinite; }
.sal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; text-align: center; color: #f4ead2; max-width: 680px; }
.sal-medal { position: relative; width: 190px; height: 190px; display: grid; place-items: center; animation: salPop .9s cubic-bezier(.2, .8, .2, 1) both; }
.sal-medal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sal-medal .spin-slow { animation: salSpin 80s linear infinite; }
.sal-medal .spin-rev { animation: salSpin 120s linear infinite reverse; }
.sal-medal .glyph { position: relative; font-family: 'Amiri', serif; font-size: 66px; line-height: 1; color: #f3d98b; text-shadow: 0 0 28px rgba(232, 200, 114, .65); margin-top: 6px; }
.sal-txt { font-family: 'Aref Ruqaa', 'Amiri', serif; font-size: clamp(34px, 6.4vw, 60px); font-weight: 700; line-height: 1.45;
  background: linear-gradient(180deg, #fff4d2 0%, #e8c872 45%, #b88a2e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(214, 170, 76, .35)); animation: salUp .9s .15s cubic-bezier(.2, .8, .2, 1) both; }
.sal-div { display: flex; align-items: center; gap: 12px; width: min(340px, 80vw); animation: salUp .9s .3s both; }
.sal-div::before, .sal-div::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #c9a24c, transparent); }
.sal-div b { width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid #e8c872; background: rgba(232, 200, 114, .25); }
.sal-hadith { font-family: 'Amiri', serif; font-size: 19px; color: #e9dcbc; line-height: 1.9; animation: salUp .9s .4s both; }
.sal-hadith small { display: block; font-family: var(--font); font-size: 12px; color: #a99a74; margin-top: 2px; }
.sal-btn { margin-top: 6px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 30px; border-radius: 999px; cursor: pointer;
  font: 700 16px var(--font); color: #1a1406; border: 0; background: linear-gradient(180deg, #f6dd94, #d4a94b);
  box-shadow: 0 10px 30px -8px rgba(214, 170, 76, .7), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .2s, box-shadow .2s; animation: salUp .9s .5s both; }
.sal-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 16px 40px -8px rgba(214, 170, 76, .85), inset 0 1px 0 rgba(255, 255, 255, .5); }
.sal-count { font-size: 12.5px; color: #a99a74; animation: salUp .9s .6s both; }
.sal-count b { color: #e8c872; font-variant-numeric: tabular-nums; }
.sal-skip { font-size: 12px; color: #7d7460; animation: salUp .9s .7s both; }
@keyframes salFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes salOut { to { opacity: 0; transform: scale(1.04); } }
@keyframes salPop { from { opacity: 0; transform: scale(.7) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes salUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes salSpin { to { transform: rotate(360deg); } }
@keyframes salDrift { to { transform: translate(84px, 84px); } }
@keyframes salRise { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(-105vh); } }
@media (max-width: 600px) { .sal-medal { width: 150px; height: 150px; } .sal-medal .glyph { font-size: 52px; } .sal-hadith { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .prayer *, .prayer::before { animation: none !important; } }

/* ---------- console (bot logs) ---------- */
.console {
  background: #07080c; color: #d6dae6; border: 1px solid var(--border); border-radius: var(--radius);
  font: 12.5px/1.65 var(--mono); padding: 12px 14px; height: 360px; overflow: auto; direction: ltr; text-align: left;
  white-space: pre-wrap; word-break: break-word;
}
[data-theme="light"] .console { background: #0f1117; color: #dfe3ee; }
.console .l-err { color: #fca5a5; }
.console .l-ok { color: #86efac; }
.console .l-warn { color: #fcd34d; }
.console .l-sep { color: #8b93a7; }
.console .l-ts { color: #6b7387; }
.console mark { background: rgba(251, 191, 36, .35); color: inherit; border-radius: 3px; }

/* ---------- gauges ---------- */
.gauge { display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; --c: var(--accent); width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 17px; font-variant-numeric: tabular-nums; }
.gauge .gl { font-size: 13px; color: var(--text-2); }
.gauge .gv { font-size: 15px; font-weight: 700; margin-top: 2px; }
.gauge .gs { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.spark { width: 100%; height: 56px; display: block; margin-top: 14px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 70px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; transition: background .15s; }
.col-body.over { background: var(--accent-soft); }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; cursor: grab; box-shadow: var(--shadow); transition: border-color .15s, transform .1s; }
.task:hover { border-color: var(--border-strong); }
.task.dragging { opacity: .45; }
.task .tt { font-weight: 600; font-size: 13.5px; line-height: 1.5; }
.task .tn { font-size: 12px; color: var(--text-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task .tm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--text-3); }
.task .tag { background: var(--accent-soft); color: var(--accent-2); border-radius: 6px; padding: 1px 7px; font-weight: 600; }
.task.p-high { box-shadow: inset 3px 0 0 var(--danger), var(--shadow); }
[dir="rtl"] .task.p-high { box-shadow: inset -3px 0 0 var(--danger), var(--shadow); }
.task.p-low { opacity: .9; }
.col-add { margin: 0 10px 10px; }

/* ---------- file manager ---------- */
.fm { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.tree { max-height: calc(100vh - 170px); overflow: auto; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; border-radius: 8px; margin: 1px 6px; color: var(--text-2); }
.tree-row:hover { background: var(--surface-3); color: var(--text); }
.tree-row.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.tree-row svg { width: 15px; height: 15px; flex-shrink: 0; }
.tree-row .sz { margin-inline-start: auto; font-size: 11px; color: var(--text-3); }
.tree-row.heavy { opacity: .55; }
.path-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12.5px; direction: ltr; justify-content: flex-end; }
.path-bar button { background: none; border: none; color: var(--accent-2); cursor: pointer; font: inherit; padding: 2px 4px; border-radius: 5px; }
.path-bar button:hover { background: var(--surface-3); }
.editor-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.editor-wrap .CodeMirror { height: calc(100vh - 290px); min-height: 360px; font: 13px/1.6 var(--mono); direction: ltr; }
.editor-wrap textarea.plain { border: 0; border-radius: 0; min-height: calc(100vh - 290px); font: 13px/1.6 var(--mono); direction: ltr; text-align: left; white-space: pre; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); display: inline-block; }

/* ---------- vault ---------- */
.secret { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; letter-spacing: .5px; word-break: break-all; }

/* ---------- prayer ---------- */
.prayer-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.p-time { padding: 16px; text-align: center; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.p-time .pn { font-size: 13px; color: var(--text-2); }
.p-time .pv { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.p-time.next { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); box-shadow: 0 10px 30px -14px var(--accent); }
.p-time.past { opacity: .55; }
.countdown { font-size: 44px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; direction: ltr; }
.tasbeeh-btn { width: 180px; height: 180px; border-radius: 50%; border: 1px solid var(--border-strong); background: radial-gradient(circle at 35% 30%, var(--surface-3), var(--surface)); color: var(--text); font: 700 44px var(--font); cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .08s; font-variant-numeric: tabular-nums; }
.tasbeeh-btn:active { transform: scale(.96); }
.zikr-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.zikr-chips button { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.zikr-chips button.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }

/* ---------- youtube ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; direction: ltr; }
.bars .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .bv { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); min-height: 3px; transition: height .5s var(--ease); cursor: pointer; }
.bars .bv:hover { filter: brightness(1.15); }
.bars .bl { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }

/* ---------- community ---------- */
.chart { width: 100%; height: 190px; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font: 10px var(--font); }
.chart .grid-l { stroke: var(--border); stroke-dasharray: 3 4; }
.heat { display: grid; grid-template-columns: 52px repeat(24, minmax(0, 1fr)); gap: 3px; direction: ltr; font-size: 10px; color: var(--text-3); }
.heat .hc { aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); min-height: 12px; }
.heat .hl { text-align: right; padding-right: 6px; align-self: center; direction: rtl; }
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.rank:last-child { border-bottom: none; }
.rank:hover { background: var(--surface-2); }
.rank .pos { width: 26px; text-align: center; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rank.top1 .pos { color: #fbbf24; } .rank.top2 .pos { color: #cbd5e1; } .rank.top3 .pos { color: #d97706; }
.rank .grow { flex: 1; min-width: 0; }
.rank .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .bar { height: 5px; margin-top: 6px; }
.rank .val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.role-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; background: var(--surface-3); border: 1px solid var(--border); }
.role-pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.vc-card .person { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.vc-card .person:last-child { border-bottom: none; }
.drawer-back { position: fixed; inset: 0; z-index: 95; background: rgba(5,6,10,.55); backdrop-filter: blur(4px); animation: fade .2s; }
.drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(560px, 100%); z-index: 96; background: var(--surface); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow-y: auto; animation: slideIn .25s var(--ease); }
@keyframes slideIn { from { transform: translateX(-30px); opacity: 0; } }

/* ---------- live map ---------- */
.map { display: flex; flex-direction: column; gap: 14px; }
.map-cat { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; background: var(--surface-2); }
.map-cat .mc-name { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .4px; margin-bottom: 10px; text-transform: uppercase; }
.map-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.map-room { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; background: var(--surface); min-height: 44px; transition: border-color .3s, box-shadow .3s, background .3s; }
.map-room .mr-name { font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-room.text.live, .map-room.text[style*="--glow"] { background: color-mix(in srgb, var(--accent) var(--glow, 0%), var(--surface)); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.map-room.text.live .mr-name, .map-room.voice.live .mr-name { color: var(--text); }
.map-room.voice.live { border-color: color-mix(in srgb, var(--success) 60%, var(--border)); box-shadow: 0 0 0 3px var(--success-soft), 0 8px 24px -12px var(--success); }
.map-room.voice.live::after { content: ''; position: absolute; top: 9px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; color: var(--success); }
.mr-people { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.mr-people img { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); cursor: pointer; transition: transform .15s; animation: pop .3s var(--ease); }
.mr-people img:hover { transform: scale(1.18); }
.mr-people .more { font-size: 11px; color: var(--text-3); align-self: center; }
#tabs { flex-wrap: wrap; }
.net-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 1250px) { .net-split { grid-template-columns: 1fr; } }
.ai-card { background: radial-gradient(500px 160px at 100% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.ai-card .headline { font-size: 18px; font-weight: 700; line-height: 1.6; }
.ai-card ul { margin: 6px 18px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.9; }
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.tag small { font-weight: 400; color: var(--text-3); font-size: 11.5px; }
.net-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px; box-shadow: var(--shadow-lg); max-width: 260px; font-size: 12.5px; line-height: 1.7; }
.score-mini { --p: 0; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; position: relative; margin: 0 auto; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.score-mini::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.score-mini b { position: relative; font-size: 14px; }
.ai-ask { background: radial-gradient(600px 180px at 100% 0%, var(--accent-soft), transparent 70%), var(--surface); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .layout-split { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(105%); transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  [dir="ltr"] .sidebar { transform: translateX(-105%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .menu-btn { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 50px; }
  .landing-hero { grid-template-columns: 1fr; padding: 20px 20px 40px; }
  .landing-nav { padding: 16px 20px; }
  .features { grid-template-columns: 1fr; padding: 0 20px; }
}
@media (max-width: 900px) { .fm { grid-template-columns: 1fr; } .tree { max-height: 300px; } .prayer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .fields, .action-card .fields, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 20px; }
  .hero { padding: 20px; }
  .hero h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* language switch */
.lang-btn { font: 700 12px/1 var(--font, inherit); letter-spacing: .3px; }
.user-card .icon-btn { flex-shrink: 0; }


/* ---------- collapsible sidebar (drag the edge) ---------- */
html.nav-collapsed { --nav-hide-def: var(--sidebar-w); }
.app { overflow-x: clip; }
.sidebar { margin-inline-start: calc(-1 * var(--nav-hide, var(--nav-hide-def, 0px))); transition: margin-inline-start .3s var(--ease); }
.nav-grip { position: fixed; top: 0; bottom: 0; width: 16px; z-index: 40; cursor: col-resize; touch-action: none;
  inset-inline-start: calc(var(--sidebar-w) - var(--nav-hide, var(--nav-hide-def, 0px)) - 8px);
  transition: inset-inline-start .3s var(--ease); display: grid; place-items: center; }
.nav-grip span { width: 5px; height: 54px; border-radius: 99px; background: var(--border-strong); opacity: 0; transition: opacity .2s, background .2s, height .2s, width .2s; }
.nav-grip:hover span, .nav-dragging .nav-grip span { opacity: 1; background: var(--accent); height: 74px; }
html.nav-collapsed .nav-grip { width: 20px; inset-inline-start: 0; }
html.nav-collapsed .nav-grip span { opacity: .9; width: 6px; height: 64px; background: var(--accent); box-shadow: 0 0 18px -2px var(--accent); }
.nav-dragging, .nav-dragging * { user-select: none !important; cursor: col-resize !important; }
.nav-dragging .sidebar, .nav-dragging .nav-grip { transition: none; }
html.nav-collapsed .menu-btn { display: grid; }
@media (max-width: 900px) {
  .sidebar { margin-inline-start: 0; }
  .nav-grip { display: none; }
}

/* =========================================================
   Motion & life layer — ambient background, spotlight cards,
   lively buttons/nav. Everything respects reduced motion.
   ========================================================= */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.app, .landing { position: relative; z-index: 1; }
.ambient .blob { position: absolute; width: 62vmax; height: 62vmax; border-radius: 50%; opacity: 1; will-change: transform; }
.ambient .b1 { top: -30vmax; inset-inline-end: -18vmax; background: radial-gradient(closest-side, rgba(124, 108, 255, .34), transparent); animation: blobA 34s ease-in-out infinite alternate; }
.ambient .b2 { bottom: -34vmax; inset-inline-start: -20vmax; background: radial-gradient(closest-side, rgba(34, 211, 238, .2), transparent); animation: blobB 42s ease-in-out infinite alternate; }
.ambient .b3 { top: 30%; left: 35%; width: 44vmax; height: 44vmax; background: radial-gradient(closest-side, rgba(236, 72, 153, .13), transparent); animation: blobC 50s ease-in-out infinite alternate; }
.ambient .pat { position: absolute; inset: -84px; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23a197ff' stroke-width='1'%3E%3Crect x='24' y='24' width='36' height='36'/%3E%3Crect x='24' y='24' width='36' height='36' transform='rotate(45 42 42)'/%3E%3Ccircle cx='42' cy='42' r='9'/%3E%3Cpath d='M0 0L17 17M84 0L67 17M0 84L17 67M84 84L67 67'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(90% 70% at 70% 0%, #000 10%, transparent 75%); mask-image: radial-gradient(90% 70% at 70% 0%, #000 10%, transparent 75%);
  animation: patDrift 90s linear infinite; }
.ambient .dust i { position: absolute; bottom: -8px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px 1px var(--accent); opacity: 0; animation: dustRise linear infinite; }
[data-theme="light"] .ambient .blob { opacity: .55; }
[data-theme="light"] .card, [data-theme="light"] .stat, [data-theme="light"] .tile { background: color-mix(in srgb, var(--surface) 88%, transparent); }
[data-theme="light"] .ambient .pat { opacity: .07; }
[data-theme="light"] .ambient .dust { display: none; }
@keyframes blobA { to { transform: translate(-14vmax, 12vmax) scale(1.15); } }
@keyframes blobB { to { transform: translate(16vmax, -10vmax) scale(1.2); } }
@keyframes blobC { 0% { transform: translate(-10vmax, -6vmax); } 100% { transform: translate(12vmax, 8vmax) scale(.85); } }
@keyframes patDrift { to { transform: translate(84px, 84px); } }
@keyframes dustRise { 0% { opacity: 0; transform: translateY(0); } 12% { opacity: .55; } 85% { opacity: .35; } 100% { opacity: 0; transform: translateY(-100vh); } }

/* cards: slightly see-through so the background breathes, + mouse spotlight */
.card, .stat, .tile { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.card, .stat, .tile { position: relative; isolation: isolate; }
.card::before, .stat::before, .tile::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%); }
.card::after, .stat::after, .tile::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 75%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.card.lit::before, .stat.lit::before, .tile.lit::before, .card.lit::after, .stat.lit::after, .tile.lit::after { opacity: 1; }
.modal .card::before, .modal .card::after { display: none; }
.stat { transition: transform .25s var(--ease), box-shadow .25s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat .ico { transition: transform .35s var(--ease); }
.stat:hover .ico { transform: rotate(-10deg) scale(1.12); }

/* scroll-in for content that arrives below the fold */
.rv { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rv.rv-in { opacity: 1; transform: none; }

/* page fade */
.content { animation: pageIn .45s var(--ease) both; }
html.leaving .main { opacity: 0; transform: translateY(6px); transition: opacity .16s, transform .16s; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* buttons: gradient + shine sweep */
.btn-primary, button.save, button.start { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); position: relative; overflow: hidden; }
.btn-primary::before, button.save::before, button.start::before { content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s var(--ease); pointer-events: none; }
.btn-primary:hover::before, button.save:hover::before, button.start:hover::before { left: 120%; }
.btn-primary:hover, button.save:hover, button.start:hover { box-shadow: 0 10px 26px -8px var(--accent); transform: translateY(-1px); }
.btn-secondary:hover, .icon-btn:hover { transform: translateY(-1px); }

/* sidebar */
.brand-mark { position: relative; background: linear-gradient(140deg, var(--accent), #4f46e5 50%, #22d3ee); background-size: 200% 200%; animation: brandShift 8s ease-in-out infinite; }
.brand-mark::after { content: ''; position: absolute; inset: -3px; border-radius: 13px; z-index: -1; opacity: .7;
  background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent-2), transparent); animation: brandSpin 4s linear infinite; filter: blur(2px); }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes brandSpin { to { --ang: 360deg; } }
@keyframes brandShift { 50% { background-position: 100% 100%; } }
.nav a { position: relative; overflow: hidden; }
.nav a svg { transition: transform .3s var(--ease), color .2s; }
.nav a:hover svg { transform: scale(1.15) rotate(-6deg); color: var(--accent-2); }
.nav a.active { background: linear-gradient(90deg, var(--accent-soft), color-mix(in srgb, var(--accent) 6%, transparent)); }
.nav a.active::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 70%); background-size: 250% 100%; animation: navShine 3.5s ease-in-out infinite; }
.nav a.active svg { color: var(--accent-2); }
@keyframes navShine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }

/* hero blocks get the pattern + a slow light sweep */
.hero::after, .cc-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9bfff' stroke-width='1.2'%3E%3Crect x='24' y='24' width='36' height='36'/%3E%3Crect x='24' y='24' width='36' height='36' transform='rotate(45 42 42)'/%3E%3Ccircle cx='42' cy='42' r='9'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(110deg, transparent 20%, #000 55%, transparent 90%); mask-image: linear-gradient(110deg, transparent 20%, #000 55%, transparent 90%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; animation: heroSweep 9s ease-in-out infinite; }
@keyframes heroSweep { 0% { -webkit-mask-position: 100% 0; mask-position: 100% 0; } 100% { -webkit-mask-position: -150% 0; mask-position: -150% 0; } }

/* tiles: floating icon on hover */
.tile:hover .ti { animation: tileBob .9s var(--ease); }
@keyframes tileBob { 0% { transform: none; } 35% { transform: translateY(-5px) rotate(-8deg) scale(1.08); } 70% { transform: translateY(1px) rotate(3deg); } 100% { transform: none; } }

/* numbers that just changed glow briefly */
.num-pop { animation: numPop .8s var(--ease); }
@keyframes numPop { 0% { color: var(--accent-2); text-shadow: 0 0 18px var(--accent); } 100% { text-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  .ambient, .nav a.active::after, .brand-mark::after, .hero::after, .cc-hero::after { animation: none !important; display: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .content { animation: none; }
}
@media (max-width: 900px) { .ambient .b3, .ambient .dust { display: none; } }
/* thin moving colour line under the top bar */
.topbar::after { content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), #22d3ee, #ec4899, transparent); background-size: 200% 100%; opacity: .55; animation: lineFlow 8s linear infinite; }
@keyframes lineFlow { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .topbar::after { animation: none; } }

/* =========================================================
   Floating AI assistant
   ========================================================= */
.ai-fab { position: fixed; top: 0; left: 0; z-index: 90; width: 58px; height: 58px; border: 0; padding: 0; background: none; cursor: grab; touch-action: none;
  transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); -webkit-tap-highlight-color: transparent; }
.ai-fab.dragging { transition: none; cursor: grabbing; }
.ai-orb { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0 6%, transparent 7%), conic-gradient(from var(--orb, 0deg), #7c6cff, #22d3ee, #ec4899, #f5c451, #7c6cff);
  box-shadow: 0 10px 30px -6px rgba(124, 108, 255, .8), inset 0 -6px 14px rgba(0, 0, 0, .35), inset 0 4px 10px rgba(255, 255, 255, .35);
  animation: orbSpin 6s linear infinite, orbFloat 3.2s ease-in-out infinite; }
@property --orb { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes orbSpin { to { --orb: 360deg; } }
@keyframes orbFloat { 50% { translate: 0 -5px; } }
.ai-orb::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(15, 12, 35, .82), rgba(15, 12, 35, .95)); }
.ai-face { position: relative; z-index: 1; display: flex; gap: 9px; }
.ai-face i { width: 7px; height: 11px; border-radius: 4px; background: #e9e6ff; box-shadow: 0 0 10px #a197ff; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.ai-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(124, 108, 255, .5); animation: ring 2.6s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.ai-fab:hover .ai-orb { box-shadow: 0 14px 40px -6px rgba(124, 108, 255, 1), inset 0 -6px 14px rgba(0, 0, 0, .35), inset 0 4px 10px rgba(255, 255, 255, .35); }
.ai-fab:hover .ai-face i { height: 9px; border-radius: 9px 9px 3px 3px; }
.ai-fab.on .ai-ring { display: none; }
.ai-orb.sm { width: 38px; height: 38px; animation: orbSpin 6s linear infinite; }
.ai-orb.sm::after { inset: 4px; }
.ai-orb.sm .ai-face { gap: 6px; } .ai-orb.sm .ai-face i { width: 5px; height: 8px; }
.ai-orb.lg { width: 76px; height: 76px; }
.ai-orb.lg::after { inset: 8px; }
.ai-orb.lg .ai-face { gap: 12px; } .ai-orb.lg .ai-face i { width: 9px; height: 14px; }

.ai-panel { position: fixed; z-index: 95; width: 390px; height: min(580px, calc(100vh - 28px)); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset, 0 0 60px -30px var(--accent);
  opacity: 0; transform: translateY(14px) scale(.96); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.3, 1.3, .5, 1); }
.ai-panel.show { opacity: 1; transform: none; pointer-events: auto; }
.ai-panel.sheet { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; height: min(75vh, 620px); }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.ai-head .grow { flex: 1; min-width: 0; line-height: 1.3; }
.ai-head b { font-size: 15px; }
.ai-head small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.ai-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.ai-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-hello { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; }
.ai-hello h4 { font-size: 17px; }
.ai-hello p { color: var(--text-2); font-size: 13px; line-height: 1.8; }
.ai-sug { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 6px; }
.ai-sug button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font: 500 12.5px var(--font); padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .2s; }
.ai-sug button:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); transform: translateY(-1px); }
.ai-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.85; word-wrap: break-word; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.ai-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #22d3ee)); color: #fff; border-end-end-radius: 5px; }
.ai-msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-end-start-radius: 5px; }
.ai-msg.err { border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.ai-msg ul { margin: 4px 0; padding-inline-start: 18px; }
.ai-msg li { margin: 2px 0; }
.ai-msg li.n { list-style: none; position: relative; }
.ai-msg li.n::before { content: attr(data-n) '.'; position: absolute; inset-inline-start: -18px; color: var(--accent-2); font-weight: 700; }
.ai-msg b.h { display: block; margin-top: 4px; font-size: 14px; }
.ai-msg code { font-size: 12px; }
.ai-msg a { color: var(--accent-2); text-decoration: underline; }
.ai-code { position: relative; margin: 6px 0; background: #07080c; color: #d6dae6; border: 1px solid var(--border); border-radius: 10px; padding: 26px 12px 10px; overflow-x: auto; direction: ltr; text-align: left; font: 12px/1.6 var(--mono); }
.ai-code code { background: none; border: 0; padding: 0; display: block; white-space: pre; color: inherit; }
.ai-copy { position: absolute; top: 5px; right: 6px; font: 600 10.5px var(--font); color: #aab; background: #1a1d27; border: 1px solid #2a2e3c; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.ai-msg.typing { display: flex; gap: 5px; padding: 14px 16px; }
.ai-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); animation: typing 1.2s infinite; }
.ai-msg.typing i:nth-child(2) { animation-delay: .15s; } .ai-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }
.ai-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.ai-input textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 13.5px/1.6 var(--font); }
.ai-input textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-send { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 12px; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); box-shadow: 0 8px 20px -8px var(--accent); transition: transform .15s; }
.ai-send:hover { transform: scale(1.06); }
.ai-send svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .ai-orb, .ai-ring, .ai-face i { animation: none !important; } }

/* ===== Cheeny personality: moods, moves, effects, speech bubble ===== */
.ai-act { display: block; width: 58px; height: 58px; }
.ai-face { translate: var(--ex, 0) var(--ey, 0); transition: translate .18s ease-out; align-items: center; }
.ai-face .mouth { position: absolute; left: 50%; top: 15px; width: 10px; height: 5px; margin-left: -5px; opacity: 0; transition: opacity .15s; border: 2px solid #e9e6ff; border-top: 0; border-radius: 0 0 10px 10px; box-shadow: 0 0 6px #a197ff; }
.ai-fab.blink2 .ai-face i { transform: scaleY(.1); }
/* happy ^ ^ */
.ai-fab.mood-happy .ai-face i, .ai-fab.mood-wink .ai-face i:last-of-type { height: 7px; background: none; border-top: 3px solid #e9e6ff; border-radius: 9px 9px 0 0; animation: none; box-shadow: none; filter: drop-shadow(0 0 4px #a197ff); }
.ai-fab.mood-happy .mouth, .ai-fab.mood-love .mouth, .ai-fab.mood-wink .mouth { opacity: 1; }
/* love ♥ ♥ */
.ai-fab.mood-love .ai-face i { width: auto; height: auto; background: none; box-shadow: none; animation: heartBeat .5s ease-in-out infinite alternate; }
.ai-fab.mood-love .ai-face i::before { content: '♥'; color: #ff7ab6; font-size: 14px; line-height: 1; text-shadow: 0 0 8px #ff7ab6; }
@keyframes heartBeat { to { transform: scale(1.25); } }
/* sleep — — */
.ai-fab.mood-sleep .ai-face i { height: 2px; animation: none; opacity: .8; }
.ai-fab.mood-sleep .ai-act { animation: breathe 3s ease-in-out infinite; }
.ai-fab.mood-sleep .ai-orb { filter: saturate(.5) brightness(.85); }
@keyframes breathe { 50% { transform: scale(.94); } }
/* surprised O O */
.ai-fab.mood-surprised .ai-face i { width: 10px; height: 10px; border-radius: 50%; animation: none; }
.ai-fab.mood-surprised .mouth { opacity: 1; width: 7px; height: 7px; margin-left: -3.5px; top: 16px; border: 2px solid #e9e6ff; border-radius: 50%; }
/* dizzy @ @ */
.ai-fab.mood-dizzy .ai-face i { width: auto; height: auto; background: none; box-shadow: none; animation: spinEye .6s linear infinite; }
.ai-fab.mood-dizzy .ai-face i::before { content: '@'; color: #e9e6ff; font: 700 13px/1 var(--mono); }
@keyframes spinEye { to { transform: rotate(360deg); } }
/* thinking: eyes look up and wander */
.ai-fab.mood-think .ai-face { translate: 0 -3px; animation: thinkEyes 1.6s ease-in-out infinite; }
@keyframes thinkEyes { 0%, 100% { translate: -3px -3px; } 50% { translate: 3px -4px; } }
/* sad */
.ai-fab.mood-sad .ai-face i { height: 6px; border-radius: 0 0 6px 6px; animation: none; }
.ai-fab.mood-sad .mouth { opacity: 1; top: 17px; border: 2px solid #e9e6ff; border-bottom: 0; border-radius: 10px 10px 0 0; }
/* squint > < */
.ai-fab.mood-squint .ai-face i { width: auto; height: auto; background: none; box-shadow: none; animation: none; }
.ai-fab.mood-squint .ai-face i:first-of-type::before { content: '>'; } .ai-fab.mood-squint .ai-face i:last-of-type::before { content: '<'; }
.ai-fab.mood-squint .ai-face i::before { color: #e9e6ff; font: 800 13px/1 var(--mono); }
/* looking around */
.ai-fab.mood-look .ai-face { animation: lookAround 1.8s ease-in-out; }
@keyframes lookAround { 0%, 100% { translate: 0 0; } 25% { translate: -4px 0; } 60% { translate: 4px -1px; } }

/* moves */
.ai-act.act-hop { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes hop { 0% { transform: none; } 30% { transform: translateY(-16px) scale(.95, 1.05); } 55% { transform: translateY(0) scale(1.1, .88); } 75% { transform: translateY(-4px); } 100% { transform: none; } }
.ai-act.act-spin { animation: spinAll .9s cubic-bezier(.5, 0, .3, 1); }
@keyframes spinAll { to { transform: rotate(360deg); } }
.ai-act.act-wave { animation: wave 1.2s ease-in-out; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 15%, 45%, 75% { transform: rotate(-14deg); } 30%, 60%, 90% { transform: rotate(12deg); } }
.ai-act.act-dizzy { animation: wobble 1.5s ease-in-out; }
@keyframes wobble { 0%, 100% { transform: none; } 20% { transform: rotate(-18deg) translateX(-4px); } 40% { transform: rotate(14deg) translateX(4px); } 60% { transform: rotate(-9deg); } 80% { transform: rotate(5deg); } }
.ai-act.act-dance { animation: dance 1.5s ease-in-out; }
@keyframes dance { 0%, 100% { transform: none; } 15% { transform: translate(-5px, -6px) rotate(-10deg); } 30% { transform: translate(5px, 0) rotate(10deg); } 45% { transform: translate(-5px, -6px) rotate(-10deg); } 60% { transform: translate(5px, 0) rotate(10deg); } 80% { transform: translateY(-10px) scale(1.08); } }
.ai-act.act-sneeze { animation: sneeze 1.3s ease-in-out; }
@keyframes sneeze { 0% { transform: none; } 40% { transform: translateY(2px) rotate(-8deg) scale(1.05); } 52% { transform: translateY(-3px) rotate(12deg) scale(.92); } 64% { transform: rotate(-4deg); } 100% { transform: none; } }
.ai-act.act-love { animation: pulseLove 1.2s ease-in-out; }
@keyframes pulseLove { 0%, 100% { transform: none; } 25% { transform: scale(1.12); } 50% { transform: scale(.97); } 75% { transform: scale(1.08); } }

/* floating emoji effects */
.ai-fx { position: fixed; z-index: 96; font-size: 18px; pointer-events: none; animation: fxUp 1.7s ease-out both; }
@keyframes fxUp { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 15% { opacity: 1; transform: translate(calc(var(--dx) * .2), -10px) scale(1.1); } 100% { opacity: 0; transform: translate(var(--dx), -70px) scale(.9) rotate(12deg); } }

/* speech bubble */
.ai-bubble { position: fixed; z-index: 94; max-width: 230px; padding: 8px 13px; border-radius: 14px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); color: var(--text); font: 600 13px/1.6 var(--font);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6), 0 0 24px -12px var(--accent);
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: var(--tail, 50%) 100%; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.ai-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.ai-bubble::after { content: ''; position: absolute; bottom: -6px; left: calc(var(--tail, 50%) - 6px); width: 11px; height: 11px; background: inherit; border: inherit; border-top: 0; border-left: 0; transform: rotate(45deg); }
.ai-bubble.below { transform-origin: var(--tail, 50%) 0; }
.ai-bubble.below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
@media (prefers-reduced-motion: reduce) { .ai-act, .ai-fx { animation: none !important; } }

/* =========================================================
   Sahab skies — night (gold), day (soft sky), neon (default), auto
   ========================================================= */
.brand-word { font-family: 'Aref Ruqaa', var(--font); font-size: 22px; line-height: 1; letter-spacing: 0; }
.brand-word small { font-family: var(--font); letter-spacing: 2px; text-transform: uppercase; margin-top: 4px; }
html.sky-switching body, html.sky-switching .card, html.sky-switching .sidebar, html.sky-switching .topbar, html.sky-switching .stat, html.sky-switching .tile { transition: background-color .6s, color .6s, border-color .6s; }
.sky-btn { font-size: 15px; }

/* ---- night: calm & luxurious, gold + violet, stars ---- */
[data-sky="night"] {
  --bg: #06070d; --bg-grad-1: rgba(212, 169, 75, .07); --bg-grad-2: rgba(124, 108, 255, .06);
  --surface: #0f1018; --surface-2: #151622; --surface-3: #1c1d2b; --border: #23243a; --border-strong: #31324d;
  --accent: #d4a94b; --accent-2: #f0cf7a; --accent-ink: #1a1306; --accent-soft: rgba(212, 169, 75, .13); --accent-ring: rgba(212, 169, 75, .35);
}
[data-sky="night"] .brand-mark { background: linear-gradient(140deg, #f3d98b, #c9962f 55%, #7c6cff); color: #1a1306; }
[data-sky="night"] .ambient .b1 { background: radial-gradient(closest-side, rgba(212, 169, 75, .22), transparent); }
[data-sky="night"] .ambient .b2 { background: radial-gradient(closest-side, rgba(124, 108, 255, .18), transparent); }
[data-sky="night"] .ambient .b3 { background: radial-gradient(closest-side, rgba(16, 94, 76, .16), transparent); }
[data-sky="night"] .ambient .pat { filter: hue-rotate(160deg) saturate(.6) brightness(1.4); }
[data-sky="night"] .ambient .dust i { background: #f3d98b; box-shadow: 0 0 8px 1px rgba(243, 217, 139, .8); }

/* ---- day: soft daytime sky, light & airy, drifting clouds ---- */
[data-sky="day"] {
  --bg: #eaf3ff; --bg-grad-1: rgba(120, 180, 255, .30); --bg-grad-2: rgba(255, 255, 255, .7);
  --surface: #ffffff; --surface-2: #f4f8ff; --surface-3: #e8f0fc; --border: #d9e5f7; --border-strong: #c4d5ee;
  --text: #13213a; --text-2: #46577a; --text-3: #8293b3;
  --accent: #2f80ff; --accent-2: #1d64d8; --accent-ink: #fff; --accent-soft: rgba(47, 128, 255, .10); --accent-ring: rgba(47, 128, 255, .28);
}
[data-sky="day"] body { background: linear-gradient(180deg, #cfe5ff 0%, #eaf3ff 35%, #f6f9ff 100%); background-attachment: fixed; }
[data-sky="day"] .brand-mark { background: linear-gradient(140deg, #7cc4ff, #2f80ff 60%, #7c6cff); }
[data-sky="day"] .ambient .blob { opacity: .8; }
[data-sky="day"] .ambient .b1 { background: radial-gradient(closest-side, rgba(255, 214, 120, .35), transparent); }
[data-sky="day"] .ambient .b2 { background: radial-gradient(closest-side, rgba(120, 190, 255, .35), transparent); }
[data-sky="day"] .ambient .b3 { background: radial-gradient(closest-side, rgba(255, 255, 255, .6), transparent); }
[data-sky="day"] .ambient .pat { opacity: .05; filter: hue-rotate(-40deg); }

/* stars (night + neon) and clouds (day) live in the ambient layer */
.ambient .stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0; animation: starTw 4s ease-in-out infinite; }
[data-sky="night"] .ambient .stars i { opacity: .8; }
[data-sky="neon"] .ambient .stars i { opacity: .35; }
@keyframes starTw { 50% { opacity: .15; } }
.ambient .clouds { display: none; }
[data-sky="day"] .ambient .clouds { display: block; }
[data-sky="day"] .ambient .dust, [data-sky="day"] .ambient .stars { display: none; }
.ambient .cloud { position: absolute; height: 46px; border-radius: 60px; background: #fff; opacity: .85; filter: blur(1.5px); box-shadow: 0 10px 30px rgba(120, 160, 220, .25); animation: cloudDrift linear infinite; }
.ambient .cloud::before, .ambient .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.ambient .cloud::before { width: 50%; height: 170%; top: -85%; left: 14%; }
.ambient .cloud::after { width: 36%; height: 130%; top: -55%; left: 50%; }
@keyframes cloudDrift { from { transform: translateX(-30vw) scale(var(--s, 1)); } to { transform: translateX(130vw) scale(var(--s, 1)); } }
@media (prefers-reduced-motion: reduce) { .ambient .cloud, .ambient .stars i { animation: none !important; } }
