/* =============================================================
   SimpleBill: premium light glass theme. One stylesheet.
   Bright background with soft colour glows, crisp white glass
   panels, strong dark text and gradient accents. Colours at the top.
   ============================================================= */
:root {
  color-scheme: light;
  --bg: #f4f6fc;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-line: rgba(255, 255, 255, 0.9);
  --edge: rgba(15, 23, 42, 0.07);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 28px rgba(30, 41, 99, 0.08);
  --shadow-hi: 0 2px 4px rgba(15, 23, 42, 0.05), 0 18px 44px rgba(30, 41, 99, 0.14);
  --blur: blur(20px) saturate(180%);
  --card: var(--glass);
  --text: #0f172a;
  --muted: #5a6683;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #c026d3 100%);
  --grad-cool: linear-gradient(135deg, #0891b2, #4f46e5);
  --ok: #047857;   --ok-bg: #dcfce7;   --ok-line: #a7f3d0;
  --warn: #a16207; --warn-bg: #fef3c7; --warn-line: #fde68a;
  --bad: #be123c;  --bad-bg: #ffe4e6;  --bad-line: #fecdd3;
  --info-bg: #eef2ff;
  --radius: 18px;
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: var(--bg);
  font: 15px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Soft colour glows + a faint grid behind the glass (fixed, does not scroll). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 4% -6%, rgba(99, 102, 241, 0.22), transparent 62%),
    radial-gradient(34rem 28rem at 100% -4%, rgba(217, 70, 239, 0.14), transparent 60%),
    radial-gradient(42rem 34rem at 90% 108%, rgba(6, 182, 212, 0.16), transparent 62%),
    radial-gradient(30rem 24rem at 6% 104%, rgba(139, 92, 246, 0.12), transparent 60%),
    linear-gradient(180deg, #f8f9ff 0%, #f2f4fb 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .6;
  background-image: linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
::selection { background: rgba(79, 70, 229, 0.2); }
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { color: var(--brand-dark); }
h1 { font-size: 1.75rem; font-weight: 750; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; letter-spacing: -.025em; }
h2 { font-size: 1.06rem; font-weight: 700; margin: 0 0 .9rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
code { background: #eef1f8; padding: 1px 6px; border-radius: 6px; font-size: .88em; }
pre { white-space: pre-wrap; word-break: break-word; }
:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }

/* ---------- Glass surfaces ---------- */
.topbar, .sidebar, .card, .stat {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--edge);
}

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 1.4rem;
  border-width: 0 0 1px; background: rgba(255, 255, 255, 0.75);
}
.topbar a { color: #334155; font-weight: 550; }
.topbar a:hover { color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.08rem; letter-spacing: -.015em; color: var(--text) !important; }
.brand::before {
  content: ""; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; background: var(--grad);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1.3rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar a, .topbar .btn, .brand { white-space: nowrap; flex-shrink: 0; }
.topbar .btn { color: #fff; }
.topbar .btn-light { color: #1e293b; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }

.sidebar {
  position: fixed; top: 76px; bottom: 12px; left: 12px; width: calc(var(--sidebar) - 12px); overflow-y: auto;
  padding: .8rem .6rem; border-radius: var(--radius); box-shadow: var(--shadow);
  scrollbar-width: thin; scrollbar-color: rgba(15,23,42,.15) transparent;
}
.sidebar a { display: flex; align-items: center; gap: .7rem; padding: .52rem .8rem; margin: 2px 0; border-radius: 11px; color: #334155; font-weight: 550; font-size: .93rem; transition: background .15s, color .15s; }
.sidebar a svg { width: 18px; height: 18px; flex-shrink: 0; color: #64748b; }
.sidebar a:hover { background: rgba(79, 70, 229, 0.07); color: var(--text); }
.sidebar a:hover svg { color: var(--brand); }
.sidebar a.active {
  color: #fff; font-weight: 650; background: var(--grad);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sidebar a.active svg { color: #fff; }
.nav-title { padding: 1rem .8rem .3rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #8792ad; font-weight: 750; }

.main { padding: 1.8rem; max-width: 1320px; margin: 0 auto; }
.has-sidebar .main { margin-left: var(--sidebar); }

.card { border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1.1rem; overflow-x: auto; box-shadow: var(--shadow); }
.narrow { max-width: 460px; margin: 3rem auto; }
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.grid-2 > .card { margin-bottom: 1.1rem; }
.layout-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 1.1rem; align-items: start; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; }
.row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.row label { margin: 0; }
.stack { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.mt { margin-top: 1.4rem; }
.text-right { text-align: right; }

/* ---------- Forms ---------- */
label { display: block; margin-bottom: .9rem; font-weight: 600; font-size: .88rem; color: #1e293b; }
input, select, textarea {
  display: block; width: 100%; margin-top: .35rem; padding: .66rem .85rem; font: inherit; font-size: .95rem; color: var(--text);
  background: #fff; border: 1px solid #d5dbe8; border-radius: 11px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #94a0ba; }
input:hover, select:hover, textarea:hover { border-color: #b9c2d6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16); }
input[type=checkbox], input[type=radio] { display: inline; width: auto; margin: 0 .45rem 0 0; accent-color: var(--brand); box-shadow: none; }
input:disabled { background: #f1f4f9; color: #64748b; }
.choice { font-weight: 400; display: flex; align-items: center; gap: .2rem; }
fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 0 0 1rem; padding: .7rem 1rem; }
legend { font-weight: 650; padding: 0 .35rem; }
form.inline { display: inline; }
.toolbar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar input { max-width: 340px; margin: 0; }
.toolbar select { max-width: 180px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1.15rem; cursor: pointer;
  border: 1px solid transparent; border-radius: 11px; background: var(--grad); color: #fff; font: inherit; font-weight: 650; font-size: .93rem;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform .14s, box-shadow .14s, filter .14s;
}
.btn:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn:active { transform: none; }
.btn-light { background: #fff; color: #1e293b; border-color: #d5dbe8; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.btn-light:hover { color: var(--text); background: #f8faff; border-color: #b9c2d6; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); filter: none; }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 6px 18px rgba(225, 29, 72, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-danger:hover { box-shadow: 0 10px 24px rgba(225, 29, 72, 0.36); }
.btn-sm { padding: .36rem .8rem; font-size: .84rem; border-radius: 9px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #6b7794; font-weight: 750; background: rgba(241, 244, 251, 0.7); }
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table thead th { border-bottom: 0; }
.table thead th a { color: inherit; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: rgba(79, 70, 229, 0.04); }
.table tfoot th, .table tfoot td { border-bottom: 0; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }

/* ---------- Bits ---------- */
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.alert { display: flex; gap: .6rem; align-items: center; padding: .85rem 1.1rem; border-radius: 13px; margin-bottom: 1.1rem; background: var(--info-bg); border: 1px solid #c7d2fe; color: #3730a3; font-weight: 550; }
.alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15); flex-shrink: 0; }
.alert-success { background: #ecfdf5; color: var(--ok); border-color: var(--ok-line); }
.alert-success::before { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18); }
.alert-error { background: #fff1f2; color: var(--bad); border-color: var(--bad-line); }
.alert-error::before { box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .16rem .62rem; border-radius: 99px; font-size: .73rem; font-weight: 700; text-transform: capitalize; background: #f1f4f9; color: #475569; border: 1px solid #e2e8f0; vertical-align: middle; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-active, .b-paid, .b-done, .b-sent, .b-verified, .b-available { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-pending, .b-unpaid, .b-queued, .b-running, .b-logged, .b-unverified, .b-pending_transfer, .b-unknown { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-suspended, .b-overdue, .b-failed, .b-fraud, .b-terminated, .b-taken, .b-expired { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; }
.links { margin-top: 1.1rem; text-align: center; font-size: .92rem; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0 0 1rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; word-break: break-word; }
.note { background: var(--warn-bg); color: #713f12; padding: .55rem .85rem; border-radius: 11px; white-space: pre-wrap; }
.bank, .email-body { background: #f8faff; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line); }
.qr { display: block; margin: .5rem 0; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); }

.filters { display: flex; gap: .4rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.filters a { padding: .34rem .95rem; border-radius: 99px; color: #334155; text-transform: capitalize; font-size: .88rem; font-weight: 600; background: #fff; border: 1px solid #dfe4ef; transition: background .15s, color .15s, border-color .15s; }
.filters a:hover { border-color: #b9c2d6; color: var(--text); }
.filters a.active { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3); }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.stat { position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.15rem 1.25rem; color: var(--muted); font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad); }
.stat::after { content: ""; position: absolute; top: -45%; right: -18%; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 70%); pointer-events: none; }
.stat:nth-child(2)::before { background: linear-gradient(180deg, #06b6d4, #3b82f6); }
.stat:nth-child(2)::after { background: radial-gradient(circle, rgba(6, 182, 212, 0.16), transparent 70%); }
.stat:nth-child(3)::before { background: linear-gradient(180deg, #8b5cf6, #d946ef); }
.stat:nth-child(3)::after { background: radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 70%); }
.stat:nth-child(5)::before { background: linear-gradient(180deg, #10b981, #06b6d4); }
.stat:nth-child(5)::after { background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%); }
a.stat:hover { color: var(--muted); transform: translateY(-3px); box-shadow: var(--shadow-hi); }
.stat span { display: block; margin-top: .25rem; font-size: 1.85rem; font-weight: 800; color: var(--text); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat.warn span { color: var(--bad); }
.stat.warn::before { background: linear-gradient(180deg, #f43f5e, #f97316); }
.stat.warn::after { background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent 70%); }

.bars { display: flex; align-items: flex-end; gap: .5rem; height: 190px; padding-top: .5rem; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 22px; }
.bar-fill { background: linear-gradient(180deg, #818cf8 0%, #6366f1 55%, #a5b4fc 100%); border-radius: 8px 8px 3px 3px; min-height: 2px; height: 0; box-shadow: 0 6px 14px rgba(99, 102, 241, 0.22), inset 0 1px 0 rgba(255,255,255,.4); }
.bar:last-child .bar-fill { background: linear-gradient(180deg, #c026d3 0%, #7c3aed 60%, #a78bfa 100%); box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35); }
.bar-label { font-size: .7rem; color: var(--muted); text-align: center; margin-top: .4rem; white-space: nowrap; font-weight: 600; }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.2rem; }
.product { position: relative; display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.product::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-hi); border-color: rgba(99, 102, 241, 0.25); }
.product .btn { margin-top: auto; }
.price { font-size: 2.1rem; font-weight: 800; margin: .4rem 0 1.2rem; letter-spacing: -.035em; color: var(--text); }

/* ---------- Phones and small screens ---------- */
@media (max-width: 900px) {
  .layout-2-1, .grid-2 { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .sidebar { transform: translateX(-110%); transition: transform .2s; z-index: 30; background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-hi); }
  .sidebar.open { transform: none; }
  .has-sidebar .main { margin-left: 0; }
  .main { padding: 1.1rem; }
  .hide-sm { display: none; }
  .topbar { padding: 0 .9rem; gap: .6rem; }
  .topbar-right { gap: .9rem; font-size: .92rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .stat { padding: .9rem 1rem; font-size: .8rem; }
  .stat span { font-size: 1.35rem; }
  h1 { font-size: 1.45rem; }
}

/* No blur support, or the user asked for less transparency: solid white panels. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar, .sidebar, .card, .stat { background: #fff; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .sidebar, .card, .stat { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:hover, a.stat:hover, .product:hover { transform: none; }
}

/* Support tickets */
.b-open, .b-customer_reply, .b-waiting { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-answered, .b-published, .b-on { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-high { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.msg { border-left: 3px solid #cbd5e1; }
.msg-staff { border-left-color: #6366f1; background: rgba(238, 242, 255, 0.85); }
.msg-note { border-left-color: #d97706; background: rgba(255, 251, 235, 0.9); }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.msg-body { white-space: pre-wrap; word-break: break-word; color: #1e293b; }
.attachments { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.attachments a { word-break: break-all; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .5rem 0; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.strong { font-weight: 700; }
.short { max-width: 90px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
/* Knowledge base */
.kb-item { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.kb-item:last-child { border-bottom: 0; }
.kb-item p { margin: .3rem 0 0; }
.article { line-height: 1.75; color: #1e293b; }
.article h2, .article h3, .article h4 { margin-top: 1.5rem; color: var(--text); }
.article pre, .card pre { background: #f6f8fd; padding: .9rem; border-radius: 12px; overflow-x: auto; border: 1px solid var(--line); }
.article code { background: #eef1f8; padding: .05rem .35rem; border-radius: 6px; }
.article pre code { background: none; padding: 0; }
.filters.keep-case a { text-transform: none; }

/* Domains */
.grow { flex: 1 1 16rem; }
.tld-tags .tag { margin-right: .6rem; }
.code-box { font-family: ui-monospace, "Cascadia Code", monospace; background: #f6f8fd; border: 1px dashed #a5b4fc; padding: .55rem .8rem; border-radius: 11px; user-select: all; word-break: break-all; color: #3730a3; }
.tld-row { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.tld-row .short { width: 6.5rem; }
.tld-name { min-width: 4.5rem; align-self: center; }
.dns-value { word-break: break-all; max-width: 28rem; }
