@font-face { font-family: "Plus Jakarta Sans"; src: url(/web/fonts/PlusJakartaSans-Regular.woff2) format("woff2"); font-weight: 400; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/web/fonts/PlusJakartaSans-SemiBold.woff2) format("woff2"); font-weight: 600; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/web/fonts/PlusJakartaSans-Bold.woff2) format("woff2"); font-weight: 700; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/web/fonts/PlusJakartaSans-ExtraBold.woff2) format("woff2"); font-weight: 800; }

/* Hushavia Admin — "Ink & Coral" console */
:root {
  --bg: #f4f5fa;
  --panel: #ffffff;
  --text: #12152a;
  --muted: #6b7189;
  --line: #e7e9f2;
  --line-strong: #d8dce8;
  --brand: #ef5a3c;
  --brand-2: #e0417a;
  --brand-3: #8b5cf6;
  --aurora: linear-gradient(135deg, #ff7a59 0%, #f0446e 55%, #8b5cf6 100%);
  --ink: #12162a;
  --ink-2: #1a1f38;
  --side-text: #a9afc6;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active: rgba(255, 255, 255, .10);
  --ok: #0f8a5f;
  --ok-bg: #e3f6ee;
  --warn: #a16207;
  --warn-bg: #fdf3dc;
  --bad: #d23b3b;
  --bad-bg: #fdecec;
  --info: #3b6fe0;
  --info-bg: #e8effd;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(18, 22, 42, .04), 0 6px 20px rgba(18, 22, 42, .05);
  --shadow-lg: 0 20px 50px rgba(18, 22, 42, .18);
  --side-w: 264px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(255, 122, 89, .25), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(139, 92, 246, .25), transparent 60%),
    var(--ink);
}
.login {
  width: 100%; max-width: 400px; background: var(--panel); border-radius: 22px; padding: 30px 28px 26px;
  box-shadow: var(--shadow-lg);
}
.login .mark { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 18px; box-shadow: 0 10px 24px rgba(240, 68, 110, .35); }
.login h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login p { margin: 0 0 22px; color: var(--muted); }
.login .btn.primary { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
.login .foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- layout ---------- */
.layout { min-height: 100vh; padding-left: var(--side-w); }
.side {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--side-w);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--side-text);
  display: flex; flex-direction: column; transition: transform .22s ease;
}
.side .brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; color: #fff; }
.side .brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.side .brand b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; display: block; }
.side .brand small { font-size: 11.5px; color: var(--side-text); }
.side .nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; scrollbar-width: thin; scrollbar-color: #2b3150 transparent; }
.side .section { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #6d7393; padding: 16px 10px 6px; }
.side .item {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 10px; color: var(--side-text); font-weight: 600; font-size: 13.5px; margin: 1px 0;
}
.side .item:hover { background: var(--side-hover); color: #fff; }
.side .item.active { background: var(--side-active); color: #fff; }
.side .item.active svg.i { color: #ff8a6e; }
.side .item .grow { flex: 1; }
.side .account { border-top: 1px solid rgba(255, 255, 255, .07); padding: 12px; }
.side .me { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.side .me .ini {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: var(--aurora); flex: 0 0 auto;
}
.side .me b { color: #fff; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.side .me small { font-size: 11.5px; text-transform: capitalize; }
.side .acts { display: flex; gap: 6px; }
.side .acts button {
  all: unset; box-sizing: border-box; cursor: pointer; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, .05); font-size: 11.5px; font-weight: 600; color: var(--side-text); white-space: nowrap;
}
.side .acts button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.side .acts button svg.i { width: 15px; height: 15px; }
.side .acts button.out:hover { background: rgba(210, 59, 59, .25); color: #fff; }
.badge { background: var(--aurora); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 8px; font-weight: 700; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: rgba(244, 245, 250, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu { display: none; }
.topbar .crumb { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.topbar .crumb b { color: var(--text); }
.topbar .grow { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.topbar .who .dot { width: 8px; height: 8px; border-radius: 50%; background: #22b573; box-shadow: 0 0 0 3px rgba(34, 181, 115, .18); }

main { padding: 22px 28px 40px; min-width: 0; max-width: 1400px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.scrim { position: fixed; inset: 0; background: rgba(10, 13, 26, .45); z-index: 35; }

/* ---------- components ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stat .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; background: #eef0f7; color: var(--muted); }
.stat .ic svg.i { width: 20px; height: 20px; }
.stat.t0 .ic { background: #ffece6; color: #e2553a; }
.stat.t1 .ic { background: #fde8f0; color: #c8366e; }
.stat.t2 .ic { background: #efe9ff; color: #6d4fd8; }
.stat.t3 .ic { background: #e3f6ee; color: #0f8a5f; }
.stat.t4 .ic { background: #e8effd; color: #3b6fe0; }
.stat.t5 .ic { background: #fdf3dc; color: #a16207; }
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat .value { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stats.hero { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.stats.hero .stat { padding: 20px; }
.stats.hero .stat .value { font-size: 28px; }
.group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 2px 10px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; margin-bottom: 18px; }
.chart h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.chart svg { width: 100%; height: 190px; display: block; }
.chart .bar { fill: url(#aurora-bars); fill: var(--brand); }
.chart .axis { fill: var(--muted); font-size: 10px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line-strong); border-radius: 11px; padding: 0 12px; height: 40px; background: #fff; min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 30px; appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7189' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center; }
textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; height: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(239, 90, 60, .14); }
input[readonly] { background: #f7f8fc; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  border: 1px solid var(--line-strong); background: #fff; border-radius: 11px; cursor: pointer; white-space: nowrap;
  font-weight: 650; font-size: 13.5px; color: var(--text); transition: background .15s, box-shadow .15s, transform .05s, border-color .15s;
}
.btn:hover { background: #f5f6fb; border-color: #c9cede; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--aurora); border: 0; color: #fff; box-shadow: 0 6px 16px rgba(240, 68, 110, .28); }
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 8px 20px rgba(240, 68, 110, .34); }
.btn.danger { color: var(--bad); border-color: #f3c9c9; background: #fff; }
.btn.danger:hover { background: var(--bad-bg); border-color: #eab3b3; }
.btn.small { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: #fafbfe; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8f9fd; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.empty { padding: 36px; text-align: center; color: var(--muted); }

.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eef0f6; color: var(--muted); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: #ffe9e1; color: #d2432a; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-weight: 600; font-size: 13px; }

.tabs { display: flex; gap: 4px; background: #eceef5; padding: 4px; border-radius: 12px; margin-bottom: 14px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { all: unset; cursor: pointer; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.tabs button.active { color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(18, 22, 42, .1); }

/* ---------- drawer & modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 13, 26, .45); z-index: 50; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); background: var(--panel); z-index: 51; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.drawer h3 { margin: 0; font-size: 19px; font-weight: 800; }
.drawer section { margin-top: 22px; }
.drawer section h4 { margin: 0 0 10px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; }
.kv div:nth-child(odd) { color: var(--muted); font-weight: 600; }
.close { float: right; }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 28px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.overlay.top { z-index: 60; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: #4b5170; font-weight: 700; }
.field input, .field select { width: 100%; }
.check { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 600; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.bubble { background: #f1f2f8; border-radius: 6px 16px 16px 16px; padding: 9px 12px; margin-bottom: 6px; white-space: pre-wrap; word-break: break-word; }
.bubble.hl { background: var(--warn-bg); border: 1px solid #f3d9a4; }
.bubble small { display: block; color: var(--muted); margin-bottom: 2px; }
.preview-media img, .preview-media video { max-width: 100%; border-radius: 12px; }
.avatar { width: 60px; height: 60px; border-radius: 34%; object-fit: cover; background: linear-gradient(135deg, #2a3152, #151a2e); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 80; max-width: calc(100% - 32px); font-weight: 600; box-shadow: var(--shadow-lg); }
.toast.error { background: var(--bad); }

/* ---------- phones & small tablets ---------- */
@media (max-width: 960px) {
  .layout { padding-left: 0; }
  .side { transform: translateX(-102%); box-shadow: none; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { padding: 10px 14px; }
  .topbar .menu { display: inline-flex; }
  .topbar .who span { display: none; }
  main { padding: 16px 14px 32px; }
  .page-head h2 { font-size: 21px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv div:nth-child(odd) { margin-top: 8px; }
  .stats, .stats.hero { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat .value, .stats.hero .stat .value { font-size: 21px; }
  .charts { grid-template-columns: 1fr; }
  .toolbar > input[type=text], .toolbar > input[type=search] { flex: 1 1 100%; }
}

/* elements marked hidden stay hidden even when a class sets display */
[hidden] { display: none !important; }

/* plan prices per currency */
.cur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.cur-grid .cur { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cur-grid .cur span { width: 34px; font-weight: 600; color: var(--muted, #6b7189); }
.cur-grid .cur input { width: 100%; min-width: 0; }
