﻿:root {
  --bg: #090a0e;
  --bg2: #0e1016;
  --card: #13161e;
  --card2: #181c26;
  --line: #232837;
  --line2: #2d3446;
  --text: #e9edf5;
  --mut: #8d97ad;
  --primary: #4a90e2;
  --primary2: #2f6bc4;
  --cyan: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(74, 144, 226, .4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; }
.mut { color: var(--mut); }
.mono { font-family: Consolas, 'Courier New', monospace; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; }
.hidden { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); cursor: pointer; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--primary); background: #1d2230; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(74, 144, 226, .28); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.btn.danger:hover { background: rgba(248, 113, 113, .1); border-color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 26px; font-size: 16px; border-radius: 12px; }
.btn svg, .nav a svg { width: 18px; height: 18px; flex: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .lbl { font-size: 13px; font-weight: 700; color: #c4cbdb; }
.hint { font-size: 12.5px; color: var(--mut); }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 13px; outline: none; transition: .15s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 144, 226, .18); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238d97ad' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 13px center; padding-left: 34px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 42px; height: 24px; background: var(--line2); border-radius: 20px; position: relative; transition: .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { right: 21px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { cursor: pointer; }
.chip input { display: none; }
.chip span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line2); background: var(--bg2); font-size: 13.5px; transition: .15s; }
.chip span::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #99aab5); }
.chip input:checked + span { border-color: var(--primary); background: rgba(74, 144, 226, .15); color: #fff; }

/* ---------- cards / layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 16px; margin-bottom: 4px; }
.card .sub { color: var(--mut); font-size: 13.5px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stack > * + * { margin-top: 18px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.stat { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat::after { content: ''; position: absolute; inset: auto -30px -40px auto; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--glow, rgba(74, 144, 226, .25)), transparent 70%); }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .l { color: var(--mut); font-size: 13.5px; }
.stat .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(74, 144, 226, .14); color: var(--primary); margin-bottom: 12px; }
.stat .ic svg { width: 20px; height: 20px; }
.stat.ok { --glow: rgba(52, 211, 153, .25); } .stat.ok .ic { background: rgba(52, 211, 153, .14); color: var(--ok); }
.stat.warn { --glow: rgba(251, 191, 36, .25); } .stat.warn .ic { background: rgba(251, 191, 36, .14); color: var(--warn); }
.stat.bad { --glow: rgba(248, 113, 113, .25); } .stat.bad .ic { background: rgba(248, 113, 113, .14); color: var(--bad); }
.stat.cy { --glow: rgba(34, 211, 238, .25); } .stat.cy .ic { background: rgba(34, 211, 238, .14); color: var(--cyan); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 700; background: rgba(141, 151, 173, .15); color: var(--mut); }
.badge.ok { background: rgba(52, 211, 153, .14); color: var(--ok); }
.badge.warn { background: rgba(251, 191, 36, .14); color: var(--warn); }
.badge.bad { background: rgba(248, 113, 113, .14); color: var(--bad); }
.badge.blue { background: rgba(74, 144, 226, .16); color: #7db4f5; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .2); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; border: 1px solid; margin-bottom: 18px; }
.banner.warn { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .35); color: #fde68a; }
.banner.bad { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); color: #fecaca; }

.empty { text-align: center; padding: 50px 20px; color: var(--mut); }
.empty > img, .empty > svg { width: 64px; height: 64px; opacity: .6; margin-bottom: 12px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: right; font-size: 12.5px; color: var(--mut); font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
.cellbot { display: flex; align-items: center; gap: 12px; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--card2); border: 2px solid var(--line2); flex: none; }
.avatar.lg { width: 76px; height: 76px; border-width: 3px; }
.avatar.sm { width: 34px; height: 34px; border-width: 1px; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg2); border-left: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.brand b { font-size: 18px; display: block; line-height: 1.2; }
.brand small { color: var(--mut); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav h6 { font-size: 11.5px; color: var(--mut); padding: 14px 12px 6px; font-weight: 700; letter-spacing: .5px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #b9c1d3; font-weight: 600; transition: .15s; }
.nav a:hover { background: var(--card); color: #fff; }
.nav a.on { background: linear-gradient(90deg, rgba(74, 144, 226, .22), rgba(74, 144, 226, .06)); color: #fff; box-shadow: inset -3px 0 0 var(--primary); }
.sidefoot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.sidefoot .who { flex: 1; min-width: 0; }
.sidefoot .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 28px 34px 60px; min-width: 0; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.3px; }
.page-head p { color: var(--mut); }
.menu-btn { display: none; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 11px 18px; color: var(--mut); font-weight: 700; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; transition: .15s; }
.tabs a:hover { color: #fff; }
.tabs a.on { color: #fff; border-color: var(--primary); }

.botcard { display: flex; flex-direction: column; gap: 16px; transition: .2s; cursor: pointer; }
.botcard:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow); }
.botcard .head { display: flex; align-items: center; gap: 14px; }
.botcard .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); gap: 12px; }
.kv:last-child { border: none; }

.typecard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.typecard .em { width: 42px; height: 42px; display: grid; place-items: center; font-size: 22px; border-radius: 10px; background: var(--card2); flex: none; }
.typecard .info { flex: 1; min-width: 0; }

/* Discord-like preview */
.dc { background: #313338; border-radius: 10px; padding: 16px; direction: rtl; }
.dc .bot { display: flex; gap: 12px; }
.dc .msg { flex: 1; min-width: 0; }
.dc .nm { font-weight: 700; margin-bottom: 4px; }
.dc .nm em { font-style: normal; background: #5865f2; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-right: 6px; }
.dc .emb { background: #2b2d31; border-radius: 4px; padding: 12px 14px; border-right: 4px solid var(--primary); max-width: 480px; }
.dc .emb b { display: block; margin-bottom: 4px; font-size: 16px; }
.dc .emb p { white-space: pre-wrap; font-size: 14px; color: #dbdee1; }
.dc .emb img { width: 100%; border-radius: 6px; margin-top: 10px; }
.dc .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc .btns span { background: #4e5058; padding: 6px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; }
.dc .btns span.primary { background: #5865f2; } .dc .btns span.success { background: #248046; } .dc .btns span.danger { background: #da373c; }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--mut); font-size: 11px; font-family: inherit; }
.chart .val { fill: #cdd5e5; font-weight: 700; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4, 5, 8, .72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .15s; }
.modal { background: var(--card); border: 1px solid var(--line2); border-radius: 16px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow); animation: pop .18s; }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal header h3 { font-size: 17px; }
.modal .body { padding: 22px; }
.modal footer { display: flex; gap: 10px; justify-content: flex-start; padding: 16px 22px; border-top: 1px solid var(--line); }
.x { background: none; border: none; color: var(--mut); cursor: pointer; font-size: 22px; line-height: 1; }
.toasts { position: fixed; bottom: 22px; left: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--card2); border: 1px solid var(--line2); border-right: 4px solid var(--primary); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); animation: slide .2s; max-width: 360px; }
.toast.ok { border-right-color: var(--ok); } .toast.err { border-right-color: var(--bad); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line2); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 60px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } }

/* ---------- landing ---------- */
.land { position: relative; overflow-x: clip; }
.land::before { content: ''; position: absolute; top: -260px; left: 50%; transform: translateX(-50%); width: 900px; height: 700px; background: radial-gradient(circle, rgba(74, 144, 226, .28), transparent 65%); pointer-events: none; }
.nav-top { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 22px 24px; position: relative; }
.hero { max-width: 900px; margin: 0 auto; text-align: center; padding: 60px 24px 40px; position: relative; }
.hero img.logo { width: 170px; height: 170px; border-radius: 50%; box-shadow: 0 0 80px rgba(74, 144, 226, .35); margin-bottom: 28px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.15; font-weight: 800; letter-spacing: -1px; }
.hero h1 span { background: linear-gradient(90deg, #7db4f5, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--mut); font-size: 18px; max-width: 620px; margin: 18px auto 32px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { max-width: 1180px; margin: 30px auto 80px; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; position: relative; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: .2s; }
.feature:hover { border-color: var(--primary); transform: translateY(-3px); }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(74, 144, 226, .14); color: var(--primary); margin-bottom: 14px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--mut); font-size: 14.5px; }
.alert { max-width: 560px; margin: 0 auto 20px; padding: 12px 18px; border-radius: 12px; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; }
footer.site { text-align: center; color: var(--mut); padding: 30px; border-top: 1px solid var(--line); font-size: 14px; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; right: 0; top: 0; z-index: 90; width: 270px; transform: translateX(100%); transition: .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .main { padding: 20px 16px 50px; }
  .grid.c2 { grid-template-columns: 1fr; }
}


/* ---------- landing v2 (general Node site) ---------- */
.topnav { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px max(24px, calc((100% - 1180px) / 2)); background: rgba(9, 10, 14, .78); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.topnav .links { display: flex; gap: 4px; }
.topnav .links a { padding: 8px 14px; border-radius: 9px; color: #b9c1d3; font-weight: 600; transition: .15s; }
.topnav .links a:hover { background: var(--card); color: #fff; }
.topnav .acts { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.topnav .brand { flex-shrink: 0; white-space: nowrap; }
.topnav .links a { white-space: nowrap; }
.menu-toggle { display: none; }
.pill { display: inline-block; padding: 5px 14px; border-radius: 20px; background: rgba(74, 144, 226, .14); border: 1px solid rgba(74, 144, 226, .3); color: #8fbff7; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.hero { padding-top: 70px; }
.hero img.logo { width: 150px; height: 150px; }
.section { max-width: 1180px; margin: 0 auto; padding: 70px 24px; position: relative; }
.section.narrow { max-width: 820px; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.5px; margin-bottom: 10px; }
.sec-head p { color: var(--mut); max-width: 640px; margin: 0 auto; font-size: 16.5px; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.product { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: .2s; }
.product.live { border-color: rgba(74, 144, 226, .45); background: linear-gradient(160deg, rgba(74, 144, 226, .1), var(--card) 55%); }
.product.soon { border-style: dashed; opacity: .85; }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product .ph { display: flex; justify-content: space-between; align-items: center; }
.product .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(74, 144, 226, .16); color: var(--primary); }
.product .ic svg { width: 26px; height: 26px; }
.product h3 { font-size: 22px; }
.product p { color: var(--mut); }
.product ul { list-style: none; display: grid; gap: 8px; margin: 6px 0 10px; }
.product li { padding-right: 26px; position: relative; color: #cfd6e6; }
.product li::before { content: '✓'; position: absolute; right: 0; color: var(--ok); font-weight: 800; }
.product .btn { margin-top: auto; align-self: flex-start; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; position: relative; }
.step i { font-style: normal; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary2)); font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--mut); }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: .15s; }
.faq details[open] { border-color: var(--primary); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--primary); transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 22px 20px; color: var(--mut); }
.cta-box { text-align: center; padding: 54px 24px; border-radius: 24px; border: 1px solid rgba(74, 144, 226, .35); background: radial-gradient(circle at 50% 0%, rgba(74, 144, 226, .22), transparent 70%), var(--card); }
.cta-box h2 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 10px; }
.cta-box p { color: var(--mut); margin-bottom: 26px; font-size: 17px; }
.cta-box .cta, .hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
footer.site { padding: 36px max(24px, calc((100% - 1180px) / 2)) 28px; text-align: initial; }
footer.site .foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.flinks { display: flex; gap: 20px; flex-wrap: wrap; }
.flinks a { color: var(--mut); }
.flinks a:hover { color: #fff; }
footer.site .copy { color: var(--mut); font-size: 13px; text-align: center; padding-top: 20px; border-top: 1px solid var(--line); }
[id] { scroll-margin-top: 80px; }

/* the menu folds into the burger button before the bar gets crowded (language + account stay side by side) */
@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .topnav .links { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; padding: 12px 20px 18px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .topnav .links.open { display: flex; }
}
@media (max-width: 560px) {
  .topnav { padding-inline: 14px; gap: 8px; }
  .topnav .brand > div { display: none; }
  .topnav .acts { gap: 6px; }
}
@media (max-width: 860px) {
  .topnav #loginTop { display: none; }
  .section { padding: 48px 20px; }
}


/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes glowpulse { 0%, 100% { box-shadow: 0 0 60px rgba(74, 144, 226, .28); } 50% { box-shadow: 0 0 110px rgba(74, 144, 226, .55); } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-70px, 50px) scale(1.1); } }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: .9; transform: scale(1.3); } }
@keyframes shine { to { transform: translateX(-120%) skewX(-20deg); } }
@keyframes sweep { to { background-position: 200% 0; } }

/* animated backdrop */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx i.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.bg-fx i.o1 { width: 520px; height: 520px; background: #2f6bc4; top: -140px; right: -120px; animation: drift1 16s ease-in-out infinite; }
.bg-fx i.o2 { width: 460px; height: 460px; background: #0e7490; bottom: -160px; left: -120px; opacity: .32; animation: drift2 19s ease-in-out infinite; }
.bg-fx i.o3 { width: 380px; height: 380px; background: #4c3bb8; top: 45%; left: 35%; opacity: .22; animation: drift1 23s ease-in-out infinite reverse; }
.bg-fx i.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #cfe3ff; animation: twinkle var(--t, 4s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
.land::before { display: none; }

/* scroll progress + back to top */
#progress { position: fixed; top: 0; right: 0; height: 3px; width: 0; z-index: 100; background: linear-gradient(90deg, var(--primary), var(--cyan)); box-shadow: 0 0 12px rgba(74, 144, 226, .7); transition: width .1s linear; }
#toTop { position: fixed; bottom: 24px; left: 24px; z-index: 70; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card2); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; transform: translateY(16px); pointer-events: none; transition: .25s; }
#toTop.show { opacity: 1; transform: none; pointer-events: auto; }
#toTop:hover { border-color: var(--primary); background: var(--primary2); }
.topnav { transition: .25s; }
.topnav.scrolled { background: rgba(9, 10, 14, .92); box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
.topnav .links a.on { color: #fff; background: rgba(74, 144, 226, .16); }

/* hero entrance + floating logo */
.hero > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero > :nth-child(1) { animation-delay: .05s; } .hero > :nth-child(2) { animation-delay: .12s; } .hero > :nth-child(3) { animation-delay: .2s; }
.hero > :nth-child(4) { animation-delay: .3s; } .hero > :nth-child(5) { animation-delay: .4s; } .hero > :nth-child(6) { animation-delay: .5s; }
.hero img.logo { animation: rise .9s both, floaty 6s ease-in-out .9s infinite, glowpulse 4s ease-in-out infinite; }
.hero h1 span { background-size: 200% 100%; background-image: linear-gradient(90deg, #7db4f5, var(--cyan), #a78bfa, #7db4f5); animation: sweep 6s linear infinite; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(30px) scale(.985); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* interactive polish */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(120%) skewX(-20deg); }
.btn.primary:hover::after { animation: shine .7s; }
.btn:active { transform: scale(.97); }
.feature, .step, .product { position: relative; overflow: hidden; }
.feature::before, .step::before, .product::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(74, 144, 226, .14), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.feature:hover::before, .step:hover::before, .product:hover::before { opacity: 1; }
.feature .ic, .product .ic { transition: .3s; }
.feature:hover .ic, .product:hover .ic { transform: rotate(-8deg) scale(1.1); background: rgba(74, 144, 226, .28); }
.step i { transition: .3s; }
.step:hover i { transform: scale(1.15) rotate(8deg); box-shadow: 0 0 24px rgba(74, 144, 226, .6); }
.faq details[open] p { animation: rise .35s both; }
.cta-box { position: relative; overflow: hidden; }
.cta-box::after { content: ''; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; background: linear-gradient(110deg, transparent 20%, rgba(125, 180, 245, .8) 50%, transparent 80%) 0 0 / 250% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: sweep 5s linear infinite; pointer-events: none; }

/* dashboard motion */
.main > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) backwards; }
.main > :nth-child(2) { animation-delay: .06s; } .main > :nth-child(3) { animation-delay: .12s; } .main > :nth-child(4) { animation-delay: .18s; }
.grid.stats > *, .grid.c3 > *, .grid.c2 > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.grid > :nth-child(2) { animation-delay: .06s; } .grid > :nth-child(3) { animation-delay: .12s; } .grid > :nth-child(4) { animation-delay: .18s; } .grid > :nth-child(5) { animation-delay: .24s; } .grid > :nth-child(6) { animation-delay: .3s; }
.tablewrap tbody tr { animation: rise .4s backwards; }
.stat { transition: .25s; } .stat:hover { transform: translateY(-3px); border-color: var(--line2); }
.chart rect[fill="url(#bar)"] { transform-box: fill-box; transform-origin: bottom; animation: grow .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes grow { from { transform: scaleY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ---------- signed-in user chip (landing nav) ---------- */
.userbox { position: relative; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 14px; border-radius: 40px; background: var(--card2); border: 1px solid var(--line2); cursor: pointer; transition: .2s; }
.userchip:hover, .userbox.open .userchip { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 144, 226, .15); }
.userchip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.userchip b { font-size: 14px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip svg { width: 16px; height: 16px; color: var(--mut); transition: .2s; }
.userbox.open .userchip svg { transform: rotate(180deg); }
.usermenu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px; background: var(--card); border: 1px solid var(--line2); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top left; pointer-events: none; transition: .18s; z-index: 80; }
.userbox.open .usermenu { opacity: 1; transform: none; pointer-events: auto; }
.usermenu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu .who small { color: var(--mut); display: block; }
.usermenu a, .usermenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; background: none; border: none; color: #d5dbe9; font-weight: 600; cursor: pointer; text-align: right; }
.usermenu a:hover, .usermenu button:hover { background: var(--card2); color: #fff; }
.usermenu button.out:hover { background: rgba(248, 113, 113, .12); color: var(--bad); }
.usermenu svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 860px) { .userchip b, .userchip > svg { display: none; } .userchip { padding: 4px; } }

/* ================= v3 polish ================= */
/* skeleton loading */
.skel { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-height: 110px; }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 50%, transparent 80%); transform: translateX(100%); animation: skelmove 1.4s infinite; }
@keyframes skelmove { to { transform: translateX(-100%); } }
.skel.h { min-height: 60px; max-width: 360px; margin-bottom: 24px; }
.skel.big { min-height: 260px; }

/* mobile drawer backdrop */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px); z-index: 80; opacity: 0; pointer-events: none; transition: .25s; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sidebar .sidelinks { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-bottom: 10px; }
.sidebar .sidelinks a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--mut); font-weight: 600; font-size: 14px; }
.sidebar .sidelinks a:hover { background: var(--card); color: #fff; }
.sidebar .sidelinks svg { width: 17px; height: 17px; }
.sidefoot { margin-top: 0; }
.mobilebar { display: none; margin-bottom: 14px; }
@media (max-width: 920px) { .mobilebar { display: block; } }

/* bot hero header */
.bothero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; margin-bottom: 22px; background: linear-gradient(135deg, rgba(74, 144, 226, .16), rgba(34, 211, 238, .05) 55%, var(--card)); border-color: rgba(74, 144, 226, .3); }
.bothero::before { content: ''; position: absolute; top: -90px; left: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(74, 144, 226, .35), transparent 70%); pointer-events: none; }
.bothero .avatar.lg { box-shadow: 0 0 0 4px rgba(74, 144, 226, .25), 0 10px 30px rgba(0, 0, 0, .4); }
.bothero .info { flex: 1; min-width: 220px; position: relative; }
.bothero h1 { font-size: 24px; line-height: 1.3; }
.bothero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.bothero .acts { position: relative; align-items: center; }

/* setup checklist */
.setup { margin-bottom: 20px; }
.progressbar { height: 8px; border-radius: 8px; background: var(--bg2); overflow: hidden; margin: 10px 0 18px; }
.progressbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 8px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.steps-list { display: grid; gap: 10px; }
.stepi { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); transition: .15s; }
.stepi:hover { border-color: var(--line2); }
.stepi .chk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line2); flex: none; font-size: 14px; color: transparent; }
.stepi.done .chk { background: var(--ok); border-color: var(--ok); color: #05261b; font-weight: 800; }
.stepi.done b { color: var(--mut); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .2); }
.stepi .t { flex: 1; min-width: 0; }
.stepi .t small { display: block; color: var(--mut); }

/* toolbar: search + filters */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search input { padding-right: 40px; }
.search svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--mut); pointer-events: none; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--line2); background: var(--bg2); color: var(--mut); font-weight: 700; font-size: 13px; cursor: pointer; transition: .15s; }
.fchip:hover { color: #fff; }
.fchip.on { background: rgba(74, 144, 226, .18); border-color: var(--primary); color: #fff; }
.fchip em { font-style: normal; opacity: .65; margin-right: 5px; }

/* ranking list (admin) */
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rank:last-child { border: none; }
.rank .no { width: 24px; height: 24px; border-radius: 8px; background: var(--card2); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--mut); flex: none; }
.rank:first-child .no { background: rgba(251, 191, 36, .18); color: var(--warn); }
.rank .bar { height: 5px; border-radius: 5px; background: var(--bg2); margin-top: 6px; overflow: hidden; }
.rank .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--cyan)); border-radius: 5px; }

/* landing: dashboard preview */
.preview-wrap { perspective: 1400px; }
.mock { max-width: 980px; margin: 0 auto; border: 1px solid var(--line2); border-radius: 18px; overflow: hidden; background: var(--bg2); box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 90px rgba(74, 144, 226, .18); transform: rotateX(5deg); transition: transform .6s; }
.mock:hover { transform: rotateX(0); }
.mock .bar { display: flex; gap: 7px; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.mock .bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4155; }
.mock .bar i:nth-child(1) { background: #f87171; } .mock .bar i:nth-child(2) { background: #fbbf24; } .mock .bar i:nth-child(3) { background: #34d399; }
.mock .bar span { margin-right: 14px; font-size: 12px; color: var(--mut); background: var(--bg2); padding: 3px 14px; border-radius: 20px; }
.mock .body { display: grid; grid-template-columns: 170px 1fr; min-height: 330px; }
.mock .side { background: var(--bg); border-left: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.mock .side b { font-size: 13px; padding: 0 6px 8px; } .mock .side div { height: 30px; border-radius: 8px; background: var(--card); } .mock .side div.on { background: rgba(74, 144, 226, .25); box-shadow: inset -3px 0 0 var(--primary); }
.mock .main2 { padding: 20px; }
.mock .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.mock .tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; } .mock .tile b { font-size: 22px; display: block; } .mock .tile small { color: var(--mut); font-size: 11.5px; }
.mock .bars { display: flex; align-items: flex-end; gap: 9px; height: 130px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.mock .bars i { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #7db4f5, #2f6bc4); height: var(--h); transform-origin: bottom; animation: grow 1.2s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * .06s); }
.preview-note { text-align: center; color: var(--mut); font-size: 13px; margin-top: 22px; }
@media (max-width: 700px) { .mock .body { grid-template-columns: 1fr; } .mock .side { display: none; } .mock .tiles { grid-template-columns: repeat(2, 1fr); } .mock { transform: none; } }

.mock.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }

.banner svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.banner b { display: block; }
.empty > svg { display: block; margin: 0 auto 12px; }


/* live preview inside the "ticket type" modal */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.pvcol { position: sticky; top: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.pvlbl { font-size: 12.5px; color: var(--mut); font-weight: 700; margin: 14px 0 7px; }
.dc .chname { display: flex; flex-direction: column; gap: 2px; color: #dbdee1; }
.dc .chname small { color: #949ba4; font-size: 11px; letter-spacing: .5px; font-weight: 700; }
.dc .chname span { background: #3f4147; padding: 6px 12px; border-radius: 6px; font-weight: 600; width: fit-content; }
.dc .emb pre.code { background: #1e1f22; border-radius: 4px; padding: 8px 10px; margin: 6px 0 8px; font: inherit; font-size: 13px; white-space: pre-wrap; color: #b5bac1; }
.dc .emb .fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; font-size: 13px; }
.dc .emb .fields .w { grid-column: 1 / -1; }
.dc .emb .fields i { display: block; font-style: normal; font-weight: 700; color: #fff; font-size: 12px; }
.dc .mention { background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 4px; border-radius: 3px; }
@media (max-width: 860px) { .twocol { grid-template-columns: 1fr; } .pvcol { position: static; } }

.dc.ltr { direction: ltr; }
.dc .chname { align-items: flex-start; }
.dc .mention { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* per-bot navigation inside the sidebar */
.botnav { margin: 6px 0 10px; padding: 8px 0 4px; border-right: 2px solid var(--line2); margin-right: 20px; padding-right: 0; animation: rise .3s both; }
.botnav .bn-head { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px 8px; }
.botnav .bn-head b { display: block; font-size: 13.5px; line-height: 1.2; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botnav .bn-head small { color: var(--mut); font-size: 11.5px; }
.botnav a { position: relative; margin-right: 10px; padding: 8px 12px; font-size: 14px; }
.botnav a svg { width: 17px; height: 17px; }
.botnav a::before { content: ''; position: absolute; right: -12px; top: 50%; width: 10px; height: 2px; background: var(--line2); }
.botnav a.on::before { background: var(--primary); }
.only-mobile { display: none; }
@media (max-width: 920px) { .only-mobile { display: flex; } }

/* button colour swatches (the only four colours Discord allows) */
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { cursor: pointer; }
.sw input { display: none; }
.bp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 6px; color: #fff; font-weight: 600; font-size: 14px; background: #4e5058; border: 2px solid transparent; transition: .15s; }
.bp.primary { background: #5865f2; } .bp.success { background: #248046; } .bp.danger { background: #da373c; } .bp.secondary { background: #4e5058; }
.sw input:checked + .bp { border-color: #fff; box-shadow: 0 0 0 3px rgba(74, 144, 226, .5); transform: translateY(-1px); }
.sw input:checked + .bp::before { content: '✓'; font-weight: 800; }
.sw:hover .bp { filter: brightness(1.12); }

/* free colour field */
.colorrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cpick { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg2); cursor: pointer; }
.dots { display: flex; gap: 7px; flex-wrap: wrap; }
.dot-c { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); background: var(--c, transparent); cursor: pointer; transition: .15s; padding: 0; color: var(--mut); font-size: 13px; line-height: 1; }
.dot-c:hover { transform: scale(1.18); border-color: #fff; }
.dot-c.reset { background: var(--bg2); }
.colorrow .hexin { width: 110px; flex: none; }

/* presence / activity */
.pres { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); font-weight: 600; transition: .15s; }
.pres i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.sw input:checked + .pres { border-color: var(--primary); background: rgba(74, 144, 226, .15); box-shadow: 0 0 0 3px rgba(74, 144, 226, .25); }
.dc .mem { display: flex; align-items: center; gap: 12px; }
.dc .mem .av { position: relative; flex: none; }
.dc .mem .av i { position: absolute; bottom: -2px; left: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--c); border: 3px solid #313338; }
.dc .mem b { font-weight: 700; } .dc .mem em { font-style: normal; background: #5865f2; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-right: 6px; }
.dc .mem .act { font-size: 13px; color: #b5bac1; }
.dc .mem .act b { color: #dbdee1; }

.banner.ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.healthlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hchip { padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 700; direction: ltr; }
.hchip.ok { background: rgba(52, 211, 153, .14); color: var(--ok); }
.hchip.no { background: rgba(248, 113, 113, .16); color: var(--bad); }

/* preview: linked embed title is blue, ansi-green text block (same as Discord) */
.dc .emb b.lnk { color: #00a8fc; }
.dc .emb pre.code { color: #859900; }

/* field labels drawn as code pills, like the real embed */
.dc .emb .fields i { display: inline-block; background: #1e1f22; color: #dbdee1; font-family: Consolas, 'Courier New', monospace; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 4px; margin-bottom: 4px; }

/* message after opening: emoji picker + preview emoji */
.cemo { width: 22px; height: 22px; vertical-align: -5px; }
.emojibox summary { cursor: pointer; color: var(--mut); font-size: 13px; margin-top: 8px; }
.emojigrid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 150px; overflow: auto; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.emo { background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px; cursor: pointer; }
.emo:hover { background: var(--card2); border-color: var(--primary); }
.emo img { width: 28px; height: 28px; display: block; }

/* ================= Bot System screens ================= */
.sysnote { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 18px; border-radius: 10px; background: rgba(251, 191, 36, .07); border: 1px solid rgba(251, 191, 36, .28); color: #fde68a; font-size: 13.5px; }
.sysnote svg { width: 18px; height: 18px; flex: none; }
.sec-title { margin-bottom: 16px; } .sec-title h3 { font-size: 19px; } .grp { font-size: 15px; color: var(--mut); margin: 22px 0 10px; }
.savebar { position: sticky; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding: 12px 16px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(19, 22, 30, .92); backdrop-filter: blur(8px); box-shadow: var(--shadow); z-index: 5; }
.swrow { padding: 6px 0; } .swrow b { display: block; } .swrow small { display: block; color: var(--mut); font-size: 12.5px; }
.botnav .bn-sec { font-size: 11px; color: var(--mut); font-weight: 700; padding: 12px 22px 4px 8px; letter-spacing: .5px; }
.nbadge { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: rgba(74, 144, 226, .2); color: #8fbff7; margin-right: auto; }
.cmdgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cmd { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; transition: .15s; }
.cmd:hover { border-color: var(--primary); } .cmd .top { display: flex; justify-content: space-between; align-items: center; } .cmd code { background: var(--bg2); padding: 2px 9px; border-radius: 6px; font-weight: 700; color: #8fbff7; }
.cmd p { color: var(--mut); font-size: 13px; flex: 1; } .cmd .btn { align-self: flex-start; }
.card.quick .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(74, 144, 226, .14); color: var(--primary); } .card.quick .ic svg { width: 22px; height: 22px; }
.limits { display: grid; gap: 10px; margin-top: 12px; } .limit { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; align-items: end; padding: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; } .limit .field { margin: 0; }
.rule .hint { display: block; margin-top: 2px; }
.tokens { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .token { background: var(--bg2); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: #8fbff7; cursor: pointer; direction: ltr; } .token:hover { border-color: var(--primary); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg2); } .tags input { flex: 1; min-width: 140px; border: none; background: none; padding: 4px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(74, 144, 226, .18); padding: 3px 10px; border-radius: 20px; font-size: 13px; } .tag button { background: none; border: none; color: var(--mut); cursor: pointer; }
.replyrow { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; } .replyrow textarea, .replyrow input, .replyrow select { flex: 1; }
.dc .wmsg { margin-bottom: 8px; font-size: 14px; } .dc .fld { margin-top: 8px; font-size: 13px; }
.wimg { position: relative; width: 100%; aspect-ratio: 1000 / 437; border-radius: 10px; overflow: hidden; background-size: cover; background-color: #1f2229; margin-top: 8px; container-type: inline-size; }
.wimg .wav { position: absolute; aspect-ratio: 1; object-fit: cover; transform: translate(-50%, -50%); cursor: grab; touch-action: none; user-select: none; }
.wimg .wt { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 700; text-shadow: 0 2px 8px #000; cursor: grab; touch-action: none; user-select: none; line-height: 1.2; }
.wimg .wt.wn { font-weight: 600; }
.wimg .wav:hover, .wimg .wt:hover { outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: 4px; }

/* ================= English / LTR ================= */
html[lang=en] body { font-family: 'Inter', 'Tajawal', 'Segoe UI', sans-serif; }
html[dir=ltr] select { background-position: right 13px center; padding-left: 13px; padding-right: 34px; }
html[dir=ltr] .switch i::after { right: auto; left: 3px; }
html[dir=ltr] .switch input:checked + i::after { left: 21px; }
html[dir=ltr] th { text-align: left; }
html[dir=ltr] .sidebar { border-left: 0; border-right: 1px solid var(--line); }
html[dir=ltr] .nav a.on { background: linear-gradient(270deg, rgba(74, 144, 226, .22), rgba(74, 144, 226, .06)); box-shadow: inset 3px 0 0 var(--primary); }
html[dir=ltr] .dc { direction: ltr; }
html[dir=ltr] .dc .nm em, html[dir=ltr] .dc .mem em { margin-right: 0; margin-left: 6px; }
html[dir=ltr] .dc .emb { border-right: 0; border-left: 4px solid var(--primary); }
html[dir=ltr] .toast { border-right: 1px solid var(--line2); border-left: 4px solid var(--primary); }
html[dir=ltr] .toast.ok { border-left-color: var(--ok); } html[dir=ltr] .toast.err { border-left-color: var(--bad); }
html[dir=ltr] #progress { right: auto; left: 0; }
html[dir=ltr] #toTop { left: auto; right: 24px; }
html[dir=ltr] .usermenu { left: auto; right: 0; transform-origin: top right; }
html[dir=ltr] .usermenu a, html[dir=ltr] .usermenu button { text-align: left; }
html[dir=ltr] .search input { padding-right: 13px; padding-left: 40px; }
html[dir=ltr] .search svg { right: auto; left: 13px; }
html[dir=ltr] .fchip em { margin-right: 0; margin-left: 5px; }
html[dir=ltr] .mock .bar span { margin-right: 0; margin-left: 14px; }
html[dir=ltr] .mock .side { border-left: 0; border-right: 1px solid var(--line); }
html[dir=ltr] .mock .side div.on { box-shadow: inset 3px 0 0 var(--primary); }
html[dir=ltr] .botnav { border-right: 0; border-left: 2px solid var(--line2); margin-right: 0; margin-left: 20px; }
html[dir=ltr] .botnav a { margin-right: 0; margin-left: 10px; }
html[dir=ltr] .botnav a::before { right: auto; left: -12px; }
html[dir=ltr] .botnav .bn-sec { padding: 12px 8px 4px 22px; }
html[dir=ltr] .botnav .bn-head { padding: 6px 8px 10px 12px; }
html[dir=ltr] .nbadge { margin-right: 0; margin-left: auto; }
html[dir=ltr] .dc .mem .av i { left: auto; right: -2px; }
html[dir=ltr] .product li { padding-right: 0; padding-left: 26px; }
html[dir=ltr] .product li::before { right: auto; left: 0; }
html[dir=ltr] .bothero::before { left: auto; right: -60px; }
html[dir=ltr] .tabs, html[dir=ltr] .filters { direction: ltr; }
@media (max-width: 920px) {
  html[dir=ltr] .sidebar { right: auto; left: 0; transform: translateX(-100%); }
  html[dir=ltr] .sidebar.open { transform: none; }
}

/* Bot System: extra pieces (lists, tree editor, embed buttons) */
.reasonrow { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.limit.wide { grid-template-columns: 1fr; }
.cmd.off, .card.off { opacity: .55; }
ul.tree { list-style: none; margin: 0; padding: 0 22px 0 0; border-right: 2px solid var(--line); }
ul.tree ul.tree { margin-top: 6px; }
ul.tree li { margin-bottom: 4px; }
html[dir=ltr] ul.tree { padding: 0 0 0 22px; border-right: 0; border-left: 2px solid var(--line); }
.dc .btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc .dbtn { background: #4e5058; padding: 6px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; color: #fff; }
.dc .dbtn.primary { background: #5865f2; } .dc .dbtn.success { background: #248046; } .dc .dbtn.danger { background: #da373c; } .dc .dbtn.link { background: #4e5058; text-decoration: underline; }
.card h4, .modal h4 { font-size: 14px; }
/* language picker */
.langbtn { display: inline-flex; align-items: center; gap: 8px; }
.langbtn svg:first-child { border-radius: 3px; flex: none; }
.langbtn svg:last-child { opacity: .7; margin-inline-start: auto; }
.langmenu { position: fixed; z-index: 1000; background: var(--card, #161a22); border: 1px solid var(--line, #2a303c); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); animation: langIn .12s ease-out; }
.langmenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: transparent; color: inherit; font: inherit; border-radius: 8px; cursor: pointer; text-align: start; }
.langmenu button:hover { background: rgba(255,255,255,.07); }
.langmenu button.on { background: rgba(88,101,242,.16); }
.langmenu button svg { border-radius: 3px; flex: none; }
.langmenu button i { margin-inline-start: auto; font-style: normal; color: var(--primary, #5b8def); }
@keyframes langIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* ---- save bar: only appears when something changed ---- */
.savewrap { position: sticky; bottom: 14px; height: 0; z-index: 20; }
.savebar { position: absolute; inset-inline: 0; bottom: 0; margin: 0; opacity: 0; transform: translateY(24px) scale(.98); pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s cubic-bezier(.2, .9, .3, 1.2), visibility 0s .3s; }
.savebar.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
/* the "save all" bar at the end of a settings form: a normal block that sticks to the bottom of the screen (not the floating one above) */
.savefoot { position: sticky; bottom: 14px; z-index: 60; display: none; isolation: isolate; }
.savefoot.dirty { display: block; animation: savein .25s ease-out; }
@keyframes savein { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
#sysbody { padding-bottom: 84px; }

/* ---- switch: springy knob, glow when on ---- */
.switch i { transition: background .25s, box-shadow .3s; }
.switch i::after { transition: right .32s cubic-bezier(.34, 1.56, .64, 1), width .18s ease, box-shadow .25s; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.switch:active i::after { width: 25px; }
.switch:active input:checked + i::after { right: 14px; }
.switch input:checked + i { box-shadow: 0 0 0 4px rgba(74, 144, 226, .16), 0 0 16px rgba(74, 144, 226, .4); }
.switch input:checked + i::after { box-shadow: 0 1px 6px rgba(74, 144, 226, .6); }
html[dir=ltr] .switch i::after { transition: left .32s cubic-bezier(.34, 1.56, .64, 1), width .18s ease, box-shadow .25s; }
html[dir=ltr] .switch:active input:checked + i::after { left: 14px; right: auto; }

/* ---- searchable pickers ---- */
.ssel-native { display: none !important; }
.ssel, .msel { position: relative; width: 100%; }
.replyrow .ssel, .replyrow .msel { flex: 1; min-width: 0; }
.ssel-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; color: inherit; font: inherit; cursor: pointer; text-align: start; transition: border-color .2s, box-shadow .2s; }
.ssel-btn:hover { border-color: var(--primary); }
.ssel-btn:disabled { opacity: .5; cursor: not-allowed; }
.ssel.open .ssel-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 144, 226, .18); }
.ssel-btn svg, .msel-chev { flex: none; opacity: .65; transition: transform .25s; }
.ssel.open .ssel-btn svg, .msel.open .msel-chev { transform: rotate(180deg); }
.ssel-val.ph { color: var(--mut); }
.ssel-panel, .msel-panel { display: none; margin-top: 6px; background: var(--card2, var(--card)); border: 1px solid var(--line2); border-radius: 12px; padding: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.ssel.open .ssel-panel, .msel.open .msel-panel { display: block; animation: pickIn .2s cubic-bezier(.2, .9, .3, 1.1); transform-origin: top; }
@keyframes pickIn { from { opacity: 0; transform: translateY(-8px) scaleY(.92); } to { opacity: 1; transform: none; } }
.ssel-sw input { width: 100%; margin-bottom: 6px; }
.ssel-list, .msel-list { max-height: 244px; overflow-y: auto; display: grid; gap: 2px; }
.ssel-opt { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; cursor: pointer; transition: background .12s, transform .12s; }
.ssel-opt:hover, .ssel-opt.hl { background: rgba(74, 144, 226, .14); }
.ssel-opt:active { transform: scale(.98); }
.ssel-opt em { font-style: normal; color: var(--primary); opacity: 0; transform: scale(.4); transition: .2s; }
.ssel-opt.on { background: rgba(74, 144, 226, .1); font-weight: 600; }
.ssel-opt.on em { opacity: 1; transform: none; }
.ssel-opt.none { color: var(--mut); }
.ssel-empty, .msel-empty { padding: 14px; text-align: center; color: var(--mut); font-size: 13px; }
.msel-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; min-height: 46px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; cursor: text; transition: border-color .2s, box-shadow .2s; }
.msel-box:hover, .msel.open .msel-box { border-color: var(--primary); }
.msel.open .msel-box { box-shadow: 0 0 0 3px rgba(74, 144, 226, .18); }
.msel-tags { display: contents; }
.mtag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 20px; font-size: 13px; background: color-mix(in srgb, var(--c, #99aab5) 16%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--c, #99aab5) 45%, transparent); animation: tagPop .22s cubic-bezier(.3, 1.6, .5, 1); }
.mtag .dot, .opt .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, #99aab5); flex: none; }
.msel-x { width: 18px; height: 18px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: inherit; cursor: pointer; line-height: 1; padding: 0; transition: background .15s; }
.msel-x:hover { background: rgba(248, 113, 113, .5); }
@keyframes tagPop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.msel-search { flex: 1; min-width: 110px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 4px !important; outline: none; }
.msel-count { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: rgba(74, 144, 226, .22); color: #8fbff7; }
.msel-count:empty { display: none; }
.msel-acts { display: flex; gap: 8px; padding: 2px 4px 8px; }
.msel-acts button { background: none; border: 0; color: var(--primary); font: inherit; font-size: 12.5px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.msel-acts button:hover { background: rgba(74, 144, 226, .14); }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: background .12s; }
.opt:hover { background: rgba(255, 255, 255, .05); }
.opt input { display: none; }
.opt .cb { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; transition: .18s; }
.opt .cb::after { content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s cubic-bezier(.3, 1.8, .5, 1); }
.opt input:checked + .cb { background: var(--primary); border-color: var(--primary); animation: cbPop .25s; }
.opt input:checked + .cb::after { transform: rotate(-45deg) scale(1); }
.opt:has(input:checked) { background: rgba(74, 144, 226, .09); }
@keyframes cbPop { 50% { transform: scale(1.25); } }
/* ---- server logs ---- */
.logall { margin-bottom: 18px; }
.lgh { display: flex; align-items: center; gap: 10px; } .lgh span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(74, 144, 226, .14); color: var(--primary); } .lgh span svg { width: 16px; height: 16px; } .lgh em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--bg2); }
.logcard { transition: opacity .25s, border-color .2s, transform .2s; } .logcard:hover { border-color: color-mix(in srgb, var(--c) 60%, var(--line)); transform: translateY(-2px); } .logcard.off { opacity: .5; }
.lgt { display: flex; align-items: center; gap: 10px; } .lgi { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); } .lgi svg { width: 18px; height: 18px; }
.lgp { position: relative; display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 12px 14px; background: #2b2d31; border-radius: 6px; border-inline-start: 4px solid var(--c); overflow: hidden; direction: rtl; }
html[dir=ltr] .lgp { direction: ltr; }
.lgp-body { min-width: 0; font-size: 13.5px; color: #dbdee1; } .lgp-body > b { display: block; font-size: 15px; margin-bottom: 8px; color: #fff; }
.lgp-lines { display: grid; gap: 2px; } .lgp-lines .k { font-weight: 700; color: #fff; }
.mn { font-style: normal; background: rgba(88, 101, 242, .3); color: #c9cdfb; padding: 0 4px; border-radius: 3px; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.lgp .rs { margin: 8px 0 0; padding: 7px 10px; background: #1e1f22; border-radius: 4px; font: 12.5px Consolas, 'Courier New', monospace; color: #b5bac1; white-space: pre-wrap; }
.lgp-ft { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11.5px; color: #949ba4; } .lgp-ft img { width: 18px; height: 18px; border-radius: 50%; } .lgp-ft i { font-weight: 600; color: #b5bac1; }
.lgp-ic { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 8px; color: var(--c); opacity: .35; } .lgp-ic svg { width: 56px; height: 56px; stroke-width: 1.4; }
/* ---- log previews (reference look) ---- */
.lgp { background: #2b2d31; border-inline-start: 4px solid var(--c); border-radius: 4px; padding: 10px 12px; gap: 10px; }
.lgp-au { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 8px; direction: ltr; }
.lgp .av { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: #5865f2; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.lgp-body { direction: ltr; text-align: left; min-width: 0; flex: 1; }
.lgp-t { display: block; font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.lgp-lines { display: grid; gap: 1px; font-size: 13.5px; color: #dbdee1; }
.lgp-lines.tight { margin-bottom: 8px; }
.lgp-lines.stack { gap: 8px; } .lgp-lines.stack > div > b { display: block; }
.lgp-lines b { color: #fff; font-weight: 700; }
code.ci { background: #1e1f22; border-radius: 3px; padding: 1px 5px; font: 12.5px Consolas, 'Courier New', monospace; color: #dbdee1; }
.lgp .rs { margin-top: 8px; padding: 8px 10px; background: #1e1f22; border: 1px solid #3a3c42; border-radius: 4px; font: 12.5px Consolas, 'Courier New', monospace; color: #dbdee1; white-space: pre-wrap; }
.lgp-ft { margin-top: 10px; direction: ltr; }
.lgp-ic { width: 72px; height: 72px; align-self: flex-start; opacity: .55; }
.lgp-ic svg { width: 100%; height: 100%; stroke-width: 1.2; }
.vcard { margin-top: 10px; padding: 14px; background: #1e1f22; border-radius: 6px; color: #949ba4; font-weight: 700; display: grid; gap: 8px; } .vcard i { height: 18px; border-radius: 10px; background: #2b2d31; }
.reasonbox { padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; } .reasonbox .reasonrow { margin-bottom: 4px; }
.emopop { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow: auto; padding: 10px; margin: 8px 0; background: var(--bg-2, #1b1d22); border: 1px solid var(--line, #2a2d35); border-radius: 10px; } .emopop.hidden { display: none; } .emopop .emo { width: 40px; height: 40px; padding: 4px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer; } .emopop .emo:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); } .emopop .emo img { width: 100%; height: 100%; object-fit: contain; }
.dc .selmock { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.25); color: #b5bac1; font-size: 14px; } .dc .selmock i { font-style: normal; } .dc .pimg { display: block; max-width: 100%; border-radius: 8px; margin: 6px 0; }

.dc .mdbody { line-height: 1.5; } .dc .mdh { font-weight: 700; margin: 8px 0 4px; } .dc .mdh1 { font-size: 20px; } .dc .mdh2 { font-size: 17px; } .dc .mdh3 { font-size: 15px; }
