/* JZ ISP Billing — Complete readable dark skin
   CSS ONLY: does not modify PHP, database, payment processing, QR codes, or MikroTik.
   Intended to replace the existing style.css after a backup.
*/
:root {
  color-scheme: dark;
  --jz-bg: #0b1020;
  --jz-surface: #141d30;
  --jz-surface-2: #19263c;
  --jz-surface-3: #20344f;
  --jz-text: #f3f7ff;
  --jz-muted: #c2cee0;
  --jz-brand: #1685d9;
  --jz-brand-hover: #279bea;
  --jz-border: #344660;
  --jz-danger: #ff7777;
  --jz-success: #6ee7b7;
  --jz-radius: 14px;
  --jz-shadow: 0 10px 28px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--jz-bg); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background: var(--jz-bg) !important;
  color: var(--jz-text) !important;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: #8bd5ff; text-decoration: none; }
a:hover, a:focus { color: #c3eaff; text-decoration: underline; }
h1, h2, h3, h4, h5 {
  color: #fff;
  line-height: 1.3;
  margin-top: 0;
  font-weight: 750;
}
h1 { font-size: clamp(1.65rem, 3vw, 2rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.65rem); }
h3 { font-size: 1.2rem; }
p, li { color: var(--jz-text); }
small, .muted, .footer, .text-muted, .help, .hint { color: var(--jz-muted) !important; }
.top, header {
  background: #0d1425 !important;
  color: #fff !important;
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--jz-border);
}
.brand { color: #fff; font-size: 21px; font-weight: 850; letter-spacing: .2px; }
.wrap, main, .container {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 9px 13px;
  background: var(--jz-surface) !important; color: var(--jz-text) !important;
  border: 1px solid var(--jz-border) !important; border-radius: 9px;
  font-weight: 650; text-decoration: none;
}
.nav a:hover, .nav a.active {
  background: #1268ad !important; color: #fff !important;
  border-color: #39a9f5 !important;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.card, .login, .panel, .stat-card {
  min-width: 0;
  background: var(--jz-surface) !important; color: var(--jz-text) !important;
  border: 1px solid var(--jz-border) !important; border-radius: var(--jz-radius);
  padding: 22px; box-shadow: var(--jz-shadow);
}
.card h2, .card h3, .panel h2, .panel h3 { margin-bottom: 10px; }
.metric { font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 850; margin-top: 6px; color: #fff; overflow-wrap: anywhere; }
.badge, .status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 750;
  background: #26344b; color: #f3f7ff; border: 1px solid #405574;
}
.success, .badge.ok, .status.active {
  background: #123b32 !important; color: var(--jz-success) !important; border-color: #23765b;
}
.error, .badge.bad, .status.expired {
  background: #48232b !important; color: #ffd0d0 !important; border-color: #8c3d4b;
}
.alert { padding: 15px 17px; border-radius: 10px; margin: 0 0 16px; border: 1px solid var(--jz-border); }
.alert.success { background: #123b32 !important; color: var(--jz-success) !important; }
.alert.error { background: #48232b !important; color: #ffd0d0 !important; }
button, .btn, input[type="submit"], input[type="button"], .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 16px; border: 1px solid transparent;
  border-radius: 9px; background: var(--jz-brand); color: #fff !important;
  font: inherit; font-weight: 750; line-height: 1.3; cursor: pointer;
  text-decoration: none; transition: background .15s ease, transform .15s ease;
}
button:hover, .btn:hover, input[type="submit"]:hover, input[type="button"]:hover, .button:hover {
  background: var(--jz-brand-hover); color: #fff !important; text-decoration: none;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #76c9ff; outline-offset: 2px;
}
.btn.secondary, button.secondary { background: #34445e !important; border-color: #506582; }
.btn.danger, button.danger { background: #b83245 !important; }
form { max-width: 100%; }
label { display: block; color: #f3f7ff; font-weight: 700; margin: 8px 0 4px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select, textarea {
  display: block; width: 100%; min-height: 46px; padding: 11px 12px;
  border: 1px solid #50617b !important; border-radius: 9px; margin: 6px 0 14px;
  background: #10192a !important; color: #fff !important; font: inherit;
}
input::placeholder, textarea::placeholder { color: #bdc9da !important; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--jz-brand); }
.tablewrap, .table-responsive {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--jz-border); border-radius: 11px; background: var(--jz-surface);
}
table {
  width: 100%; border-collapse: collapse; background: #111a2c !important;
  color: var(--jz-text) !important; min-width: 560px;
}
th, td {
  padding: 12px 14px; border-bottom: 1px solid var(--jz-border) !important;
  text-align: left; vertical-align: top; line-height: 1.55; white-space: normal;
}
th { background: #1c2b43 !important; color: #fff !important; font-weight: 800; }
td { background: var(--jz-surface) !important; color: var(--jz-text) !important; }
tbody tr:nth-child(even) td { background: #182338 !important; }
tbody tr:hover td { background: var(--jz-surface-3) !important; }
hr, .divider { border: 0; border-top: 1px solid var(--jz-border); margin: 20px 0; }
.footer { text-align: center; padding: 28px 16px; }
code, pre { color: #d9f0ff; }
:disabled { opacity: .65; cursor: not-allowed; }
@media (max-width: 700px) {
  .top, header { padding: 13px 15px; align-items: flex-start; flex-wrap: wrap; }
  .brand { font-size: 19px; }
  .wrap, main, .container { width: calc(100% - 22px); margin: 16px auto; }
  .nav { gap: 7px; margin-bottom: 16px; }
  .nav a { padding: 9px 11px; font-size: 15px; }
  .card, .login, .panel, .stat-card { padding: 17px; border-radius: 12px; }
  .grid, .row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metric { font-size: 1.55rem; }
  button, .btn, input[type="submit"], input[type="button"], .button { width: 100%; min-height: 46px; }
  table { min-width: 520px; }
  th, td { padding: 11px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
