/* Ark Cyber Theme - Matching Legacy Ark Ledger (web-root) */
:root {
  color-scheme: dark;
  --users-bg: #081018;
  --users-surface: #0d1822;
  --users-surface-2: #101e2a;
  --users-line: #253747;
  --users-line-soft: rgba(121, 158, 189, 0.14);
  --users-text: #e5eef6;
  --users-muted: #8299ad;
  --users-blue: #2998f3;
  --users-green: #22d36b;
  --brand-green: #056635;
  --brand-green-light: #2ea043;
  --users-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  --ark-footer-height: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% -12%, rgba(41, 152, 243, 0.12), transparent 34rem),
    radial-gradient(circle at 15% 95%, rgba(5, 102, 53, 0.12), transparent 30rem),
    #081018;
  color: var(--users-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: var(--ark-footer-height);
}

/* Monospace font standard */
.font-mono, code, pre, .stat-number, .badge, .code-pill {
  font-family: Consolas, "SF Mono", "Fira Code", monospace;
}

/* Topbar */
.cyber-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 24px;
  height: 68px;
  border-bottom: 1px solid var(--users-line);
  background: rgba(8, 17, 25, 0.94);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.cyber-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #22d36b;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.cyber-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #056635, #2ea043);
  box-shadow: 0 8px 20px rgba(5, 102, 53, 0.35);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  font-family: Consolas, monospace;
}

.cyber-brand span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 16px;
  color: #fff;
}

.cyber-brand small {
  color: #71859a;
  font-size: 10px;
  font-weight: 600;
  font-family: Consolas, monospace;
}

.cyber-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cyber-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: #b7c6d3;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.cyber-nav a.active,
.cyber-nav a:hover {
  background: #152536;
  color: #fff;
  border-color: #253747;
}

.cyber-account {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.cyber-account .account-info {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.25;
}

.cyber-account .account-info strong {
  color: #e5eef6;
}

.cyber-account .account-info small {
  color: #70869a;
  font-family: Consolas, monospace;
  font-size: 11px;
}

/* Flash Messages */
.cyber-flash {
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid transparent;
}

.cyber-flash.notice {
  background: rgba(34, 211, 107, 0.12);
  color: #75f0a8;
  border-color: rgba(34, 211, 107, 0.28);
}

.cyber-flash.alert {
  background: rgba(248, 81, 73, 0.12);
  color: #ff7b72;
  border-color: rgba(248, 81, 73, 0.28);
}

/* Hero Section */
.cyber-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--users-line);
  background: linear-gradient(120deg, rgba(41, 152, 243, 0.08), transparent 46%), rgba(10, 20, 30, 0.88);
}

.cyber-eyebrow {
  margin: 0 0 6px;
  color: #48aaff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: Consolas, monospace;
}

.cyber-hero h1 {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.cyber-hero p {
  max-width: 660px;
  margin: 6px 0 0;
  color: var(--users-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cyber-overview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cyber-stat-card {
  display: flex;
  min-height: 74px;
  min-width: 120px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--users-line-soft);
  border-radius: 12px;
  background: rgba(5, 15, 24, 0.55);
}

.cyber-stat-card span {
  color: var(--users-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: Consolas, monospace;
}

.cyber-stat-card strong {
  margin-top: 4px;
  color: #fff;
  font-size: 24px;
  font-family: Consolas, monospace;
}

/* Cards & Panels */
.cyber-card {
  background: var(--users-surface);
  border: 1px solid var(--users-line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cyber-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--users-line-soft);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.cyber-card-header h2, .cyber-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
}

/* Forms & Inputs */
.cyber-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #b7c6d3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-family: Consolas, monospace;
}

.cyber-input, .cyber-select {
  width: 100%;
  background: #081018;
  border: 1px solid #253747;
  border-radius: 8px;
  color: #e5eef6;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: Consolas, monospace;
}

.cyber-input:focus, .cyber-select:focus {
  border-color: #2998f3;
  box-shadow: 0 0 0 3px rgba(41, 152, 243, 0.2);
}

.cyber-input[readonly] {
  background: #060c12;
  color: #7fa8c9;
  cursor: default;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  font-family: Inter, sans-serif;
  line-height: 1.2;
}

.btn-primary {
  background: #056635;
  border-color: #2ea043;
  color: #fff;
}

.btn-primary:hover {
  background: #067c41;
  border-color: #3fb950;
  box-shadow: 0 0 14px rgba(46, 160, 67, 0.4);
}

.btn-secondary {
  background: #111d28;
  border-color: #32485c;
  color: #dce8f2;
}

.btn-secondary:hover {
  background: #182838;
  border-color: #4a6782;
  color: #fff;
}

.btn-danger {
  background: rgba(218, 54, 55, 0.16);
  border-color: #da3637;
  color: #ff7b72;
}

.btn-danger:hover {
  background: #da3637;
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge.enabled, .badge.active, .badge.online {
  background: rgba(34, 211, 107, 0.14);
  border: 1px solid rgba(34, 211, 107, 0.32);
  color: #75f0a8;
}

.badge.locked, .badge.warning, .badge.attention {
  background: rgba(210, 153, 34, 0.16);
  border: 1px solid rgba(210, 153, 34, 0.38);
  color: #f0c564;
}

.badge.disabled, .badge.offline {
  background: rgba(130, 153, 173, 0.12);
  border: 1px solid rgba(130, 153, 173, 0.25);
  color: #8299ad;
}

.badge.danger {
  background: rgba(248, 81, 73, 0.16);
  border: 1px solid rgba(248, 81, 73, 0.38);
  color: #ff7b72;
}

.badge.master, .badge.admin {
  background: rgba(41, 152, 243, 0.16);
  border: 1px solid rgba(41, 152, 243, 0.38);
  color: #58a6ff;
}

/* Cyber Data Tables */
.cyber-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.cyber-table th {
  background: #09121a;
  color: #8299ad;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--users-line);
  text-align: left;
  font-family: Consolas, monospace;
}

.cyber-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--users-line-soft);
  color: #c9d1d9;
}

.cyber-table tr:hover td {
  background: rgba(21, 37, 54, 0.4);
}

/* Backup Codes Box */
.backup-codes-box {
  background: #050b10;
  border: 1px solid #2ea043;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.backup-code-item {
  background: #0b151e;
  border: 1px solid #253747;
  padding: 6px 10px;
  border-radius: 4px;
  text-align: center;
  font-family: Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #75f0a8;
  letter-spacing: 0.08em;
}

/* STRICT RULE: Fixed Bottom Menubar & Right Footer Alignment Flush at h-12 (48px) */
.cyber-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  box-sizing: border-box;
  background: rgba(8, 17, 25, 0.96);
  border-top: 1px solid var(--users-line);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  font-size: 11px;
}

.cyber-footer .footer-left,
.cyber-footer .footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
}

.cyber-footer a {
  color: #8299ad;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.cyber-footer a:hover {
  color: #fff;
}
