@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(fonts/arabic-400.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(fonts/arabic-600.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(fonts/arabic-700.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: 'Plex Arabic'; font-weight: 400; font-display: swap; src: url(fonts/latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Plex Arabic'; font-weight: 600; font-display: swap; src: url(fonts/latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Plex Arabic'; font-weight: 700; font-display: swap; src: url(fonts/latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --bg: #0b1020; --surface: #121a2e; --surface-2: #19223a; --border: #26304a; --fg: #e8edf6; --muted: #98a3ba;
  --subtle: #6c7891; --primary: #12b886; --sky: #0ea5e9; --danger: #f43f5e; --warning: #f5a524;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); }
body { font: 15px/1.6 'Plex Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.wrap { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.glow { position: absolute; inset: -20% -10% auto; height: 70%; background: radial-gradient(60% 60% at 50% 30%, rgba(18,184,134,.22), transparent 70%), radial-gradient(40% 40% at 80% 10%, rgba(14,165,233,.18), transparent 70%); pointer-events: none; }
.wrap::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); pointer-events: none; }
.card { position: relative; z-index: 1; width: min(420px, 100%); background: rgba(18,26,46,.88); border: 1px solid var(--border); border-radius: 24px; padding: 28px 24px 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); backdrop-filter: blur(12px); }
.card.wide { width: min(1100px, 100%); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.logo { width: 44px; height: 44px; flex: none; }
.logo svg { width: 100%; height: 100%; display: block; }
.name { font-weight: 700; font-size: 20px; line-height: 1.2; }
.tag { color: var(--muted); font-size: 12px; }
.lang { margin-inline-start: auto; height: 34px; min-width: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lang:hover { border-color: #3a4566; }
h1 { margin: 0; font-size: 22px; line-height: 1.35; }
.sub { margin: 6px 0 18px; color: var(--muted); font-size: 13.5px; }
label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
input[type=text], input[type=password], input[type=search] { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(18,184,134,.18); }
input::placeholder { color: var(--subtle); }
.pw { position: relative; }
.pw input { padding-inline-end: 48px; }
.eye { position: absolute; inset-block: 6px; inset-inline-end: 6px; width: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
html[dir=rtl] .pw input { padding-inline-end: 14px; padding-left: 48px; }
html[dir=rtl] .eye { inset-inline-end: auto; left: 6px; }
.go { width: 100%; height: 50px; margin-top: 20px; border: 0; border-radius: 14px; background: linear-gradient(90deg, var(--primary), var(--sky)); color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 0 12px 30px -12px rgba(18,184,134,.7); transition: filter .15s, transform .15s; }
.go:hover { filter: brightness(1.06); }
.go:active { transform: translateY(1px); }
.alert { margin-bottom: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.35); color: #fda4af; font-size: 13.5px; }
.foot { margin: 18px 0 0; text-align: center; color: var(--subtle); font-size: 11.5px; }

/* log viewer */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 12px; }
.toolbar form { flex: 1 1 240px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--fg); text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn:hover { border-color: #3a4566; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.table { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; background: rgba(25,34,58,.6); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, .num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.ok, .bad { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.ok { background: rgba(18,184,134,.15); color: #34d399; }
.bad { background: rgba(244,63,94,.14); color: #fda4af; }
.ua { color: var(--subtle); max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 480px) { .card { padding: 22px 18px 18px; border-radius: 20px; } h1 { font-size: 20px; } }
