:root {
  --bg: #080b10 !important;
  --card: #111722 !important;
  --card-bg: #111722 !important;
  --card-bg-soft: #17202d !important;
  --soft: #17202d !important;
  --card2: #17202d !important;
  --border: #293445 !important;
  --b: #293445 !important;
  --gold: #d7b46a !important;
  --gold2: #e4c77f !important;
  --gold-soft: #e4c77f !important;
  --accent: #d7b46a !important;
  --accent-2: #9fb7c9 !important;
  --ink: #eef3f8 !important;
  --text: #eef3f8 !important;
  --text-main: #eef3f8 !important;
  --muted: #aab7c5 !important;
  --text-muted: #aab7c5 !important;
  --danger: #ef7d7d !important;
  --success: #73c89b !important;
  --shadow: 0 18px 46px rgba(0, 0, 0, .32) !important;
}

* { box-sizing: border-box; }
html { background: #080b10; }
body {
  background:
    linear-gradient(180deg, rgba(22, 31, 45, .98), rgba(8, 11, 16, 1) 260px) !important;
  color: var(--text-main) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(215,180,106,.08), transparent 28%, rgba(159,183,201,.08));
  opacity: .55;
  z-index: -1;
}

a { color: var(--gold-soft) !important; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f0d99a !important; }

.container, main, .top, .grid, .wide-wrap { width: min(100%, 1220px); }
.top, .mini-header, header {
  border-color: rgba(159, 183, 201, .18) !important;
  background: rgba(12, 17, 25, .74) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0,0,0,.22) !important;
}
.top, .mini-header { border-radius: 14px !important; padding: 12px 14px !important; }
header { box-shadow: 0 10px 34px rgba(0,0,0,.24) !important; }

.brand img, .brand-logo, .logo img {
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.28));
}
.brand .t, .brand-text-main, .logo .t, header .brand {
  color: #f7fafc !important;
  font-weight: 750 !important;
}
.brand .s, .brand-text-sub, .logo .s, .user, .muted, p, label {
  color: var(--muted) !important;
}

.box, .card, .wide-card, .item-card, .note, .kv, .stat, .panel, section.card {
  background: linear-gradient(180deg, rgba(20, 28, 40, .96), rgba(14, 20, 29, .98)) !important;
  border: 1px solid rgba(159, 183, 201, .18) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow) !important;
}
.card, .wide-card, .box { padding: 18px !important; }
.card h1, .card h2, .card h3, h1, h2, h3, .card-title, .wide-title h2 {
  color: #f3d58f !important;
  letter-spacing: 0 !important;
}
.card-header-bar, .wide-bar, .bar {
  background: linear-gradient(180deg, #f0d99a, #b98f3f) !important;
  box-shadow: 0 0 0 3px rgba(215,180,106,.11);
}

input, select, textarea,
input[type="text"], input[type="date"], input[type="month"], input[type="url"], input[type="number"], input[type="password"], input[type="file"] {
  background: #0d131c !important;
  color: #eef3f8 !important;
  border: 1px solid rgba(159, 183, 201, .24) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03) !important;
}
input::placeholder, textarea::placeholder { color: #718195 !important; }
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(215, 180, 106, .85) !important;
  box-shadow: 0 0 0 3px rgba(215, 180, 106, .16) !important;
}
input[readonly], input:disabled, select:disabled, textarea:disabled {
  opacity: .78 !important;
  cursor: not-allowed;
}

button, .btn, .btn-link, .pill, input[type="submit"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 34px;
  border-radius: 8px !important;
  border: 1px solid rgba(215, 180, 106, .9) !important;
  background: linear-gradient(180deg, #e3c57b, #bd9345) !important;
  color: #111722 !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.28) !important;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease !important;
}
button:hover, .btn:hover, .btn-link:hover, .pill:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #efd89d, #cba254) !important;
  border-color: #efd89d !important;
  box-shadow: 0 14px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35) !important;
  text-decoration: none !important;
}
button:active, .btn:active, .btn-link:active, .pill:active { transform: translateY(0); }

.btn2, .btn-secondary, button.secondary, .secondary, .btn-link:not(.active), .btn-copy {
  background: rgba(215, 180, 106, .07) !important;
  color: #f0d99a !important;
  border-color: rgba(215, 180, 106, .48) !important;
  box-shadow: none !important;
}
.btn2:hover, .btn-secondary:hover, button.secondary:hover, .secondary:hover, .btn-link:not(.active):hover, .btn-copy:hover {
  background: rgba(215, 180, 106, .14) !important;
  color: #ffe5a4 !important;
  border-color: rgba(215, 180, 106, .76) !important;
}
.btn-danger, .danger button, button.danger, .pill[style*="ff7a7a"] {
  background: rgba(239, 125, 125, .14) !important;
  border-color: rgba(239, 125, 125, .68) !important;
  color: #ffd8d8 !important;
  box-shadow: none !important;
}
.btn-danger:hover, .danger button:hover, button.danger:hover, .pill[style*="ff7a7a"]:hover {
  background: rgba(239, 125, 125, .22) !important;
  border-color: #ef7d7d !important;
}
.btn-wa { background: rgba(215,180,106,.07) !important; color: #f0d99a !important; border-color: rgba(215,180,106,.48) !important; }

.table-wrapper, .table-wrap {
  background: #0d131c !important;
  border: 1px solid rgba(159, 183, 201, .18) !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.2) !important;
}
table { border-collapse: separate !important; border-spacing: 0 !important; }
th, td {
  border-color: rgba(159, 183, 201, .14) !important;
}
th {
  background: #17202d !important;
  color: #d9e3ee !important;
  font-weight: 750 !important;
}
td { background: rgba(14, 20, 29, .92) !important; color: #e8eef5 !important; }
tr:nth-child(even) td { background: rgba(18, 26, 37, .92) !important; }
tr:hover td { background: rgba(36, 49, 66, .92) !important; }

.msg, .flash {
  background: rgba(215, 180, 106, .12) !important;
  border: 1px solid rgba(215, 180, 106, .35) !important;
  color: #f8df9f !important;
  border-radius: 8px !important;
}
.chip {
  background: rgba(159, 183, 201, .08) !important;
  border-color: rgba(159, 183, 201, .22) !important;
  color: #c8d3df !important;
}
.chip.gold, .chip.green, .chip.red {
  background: rgba(215, 180, 106, .11) !important;
  border-color: rgba(215, 180, 106, .48) !important;
  color: #f0d99a !important;
}
.dropzone, .doc-row {
  background: rgba(13, 19, 28, .84) !important;
  border-color: rgba(159, 183, 201, .24) !important;
}

@media (max-width: 768px) {
  body { padding: 12px !important; }
  .top, .mini-header { padding: 12px !important; }
  .card, .wide-card, .box { border-radius: 10px !important; padding: 14px !important; }
  button, .btn, .btn-link, .pill { min-height: 40px; }
  th, td { padding: 9px 10px !important; }
}
