:root {
  --bg: #f1f5f9; --card: #fff; --line: #e2e8f0; --txt: #0f172a; --mut: #64748b;
  --pri: #1d4ed8; --pri-d: #1e3a8a; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Calibri, Arial, sans-serif; font-size: 14px; color: var(--txt); background: var(--bg); }
h1 { font-size: 22px; margin: 0 0 6px; } h2 { font-size: 20px; margin: 0 0 14px; } h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--mut); } .sm { font-size: 12px; } .b { font-weight: 700; } .r { text-align: right; } .c { text-align: center; }
.nowrap { white-space: nowrap; } .mono { font-family: Consolas, monospace; } .pad { padding: 14px; } .grow { flex: 1; }
.bad-t { color: var(--bad); } .hidden { display: none !important; }
.boot { padding: 40px; color: var(--mut); }

.btn { border: 1px solid var(--line); background: #fff; color: var(--txt); border-radius: 8px; padding: 7px 13px; font: inherit; cursor: pointer; }
.btn:hover { border-color: #94a3b8; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; } .btn.primary:hover { background: var(--pri-d); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: #f1f5f9; }
.btn.sm { padding: 3px 8px; font-size: 13px; }
.file-btn { position: relative; overflow: hidden; } .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

input, select { font: inherit; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; width: 100%; }
input[type=checkbox] { width: auto; }
label { display: block; font-size: 13px; color: #334155; } label > input, label > select { margin-top: 4px; }
label.chk { display: flex; gap: 8px; align-items: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.card.nopad { padding: 0; overflow: auto; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: #e2e8f0; color: #334155; white-space: nowrap; }
.pill.ok { background: #dcfce7; color: var(--ok); } .pill.warn { background: #fef3c7; color: var(--warn); } .pill.bad { background: #fee2e2; color: var(--bad); }
.note { padding: 10px 14px; border-radius: 9px; background: #eff6ff; border: 1px solid #bfdbfe; margin: 0 0 12px; }
.note.warn { background: #fffbeb; border-color: #fcd34d; } .note.bad { background: #fef2f2; border-color: #fca5a5; } .note.ok { background: #f0fdf4; border-color: #86efac; }

.auth { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: 360px; display: grid; gap: 12px; }
.err { color: var(--bad); min-height: 18px; }

.top { display: flex; align-items: center; gap: 16px; background: #0f172a; color: #e2e8f0; padding: 10px 20px; }
.brand { font-size: 18px; } .brand b { color: #60a5fa; }
.top-mid { flex: 1; display: flex; gap: 8px; }
.top-user { display: flex; gap: 10px; align-items: center; } .top-user .btn { color: #e2e8f0; }
.top-user .btn:hover { background: #1e293b; }
.layout { display: flex; min-height: calc(100vh - 48px); }
.side { width: 220px; background: #fff; border-right: 1px solid var(--line); padding: 12px 8px; position: relative; }
.side a { display: flex; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--txt); text-decoration: none; margin-bottom: 2px; }
.side a:hover { background: #f1f5f9; } .side a.on { background: #dbeafe; color: var(--pri-d); font-weight: 600; }
.side-ver { position: absolute; bottom: 10px; left: 20px; font-size: 11px; color: #94a3b8; }
main { flex: 1; padding: 22px 26px; min-width: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mod-h { display: flex; gap: 8px; align-items: center; font-size: 15px; margin-bottom: 6px; } .mod-i { font-size: 22px; }
.mod-s { margin-top: 10px; } .mod.off { opacity: .7; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.kpi div { color: var(--mut); font-size: 12px; } .kpi b { font-size: 22px; } .kpi b.sm { font-size: 14px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; } .toolbar input[type=search] { max-width: 340px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--mut); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; position: sticky; top: 0; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr.dim td { color: #94a3b8; }
.tbl th.r, .tbl td.r { text-align: right; }

.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs a { padding: 8px 14px; border-radius: 8px 8px 0 0; text-decoration: none; color: var(--mut); }
.tabs a.on { background: #fff; color: var(--txt); font-weight: 600; border: 1px solid var(--line); border-bottom-color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; } .span2 { grid-column: span 2; }
.bank-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin: 6px 0; }
.logo-row { display: flex; gap: 12px; align-items: center; } .logo-row input[type=file] { width: auto; }
.logo-prev { max-height: 48px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: #fff; }
.sep { display: inline-block; width: 20px; } #smtp-to { width: 220px; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: grid; place-items: center; z-index: 50; }
.modal-box { background: #fff; border-radius: 14px; padding: 18px 20px; width: min(520px, 94vw); max-height: 92vh; overflow: auto; display: grid; gap: 12px; }
.modal-box.wide { width: min(960px, 96vw); }
.modal-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; }
iframe.preview { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 8px; }
.scroll { max-height: 60vh; overflow: auto; }

.toast { position: fixed; bottom: 22px; right: 22px; padding: 11px 18px; border-radius: 10px; background: #0f172a; color: #fff; z-index: 60; max-width: 480px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.err { background: var(--bad); }

/* --- server αδειών --- */
.keybox { font-family: Consolas, monospace; font-size: 20px; letter-spacing: 1px; padding: 14px; text-align: center; background: #f8fafc; border: 2px dashed #94a3b8; border-radius: 10px; user-select: all; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sub-mods { display: flex; gap: 4px; flex-wrap: wrap; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #f8fafc; }
.back { margin-bottom: 10px; display: inline-block; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; }
textarea { font: inherit; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 7px; width: 100%; min-height: 60px; margin-top: 4px; }
