/* Light Material Dashboard theme with a black brand sidebar and gold accents. */
:root {
  --gold: #d4af37;
  --gold-bright: #e8c65a;
  --gold-dim: #9c7f24;
  --black: #0a0a0b;
  --sidebar-edge: #26262b;
}
* { box-sizing: border-box; }
body {
  font-family: 'Roboto', system-ui, sans-serif; margin: 0;
  background: #eef0f4; color: #3c4858; display: flex; min-height: 100vh;
}

/* ---------- sidebar (black w/ photo backdrop, gold accents) ---------- */
.sidebar {
  width: 250px; flex-shrink: 0; color: #fff; padding: 24px 0;
  background:
    linear-gradient(rgba(6,6,8,.92), rgba(6,6,8,.92)),
    url('sidebar-bg.jpg') center/cover no-repeat,
    var(--black);
  box-shadow: 2px 0 10px rgba(0,0,0,.35);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo-wrap { text-align: center; padding: 0 16px 18px; margin-bottom: 14px;
  border-bottom: 1px solid var(--sidebar-edge); }
.logo-wrap img { max-width: 150px; width: 100%; display: block; margin: 0 auto 10px; }
.brand { font-family: 'Playfair Display', serif; font-size: 24px; letter-spacing: .1em;
  color: var(--gold); }
.brand-sub { font-size: 11px; letter-spacing: .42em; color: var(--gold-dim); margin-top: 2px; }
nav#tabs { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
nav#tabs button {
  display: block; width: 100%; background: transparent; border: none;
  border-left: 3px solid transparent;
  color: #b9b4a9; padding: 12px 16px; font-size: 14px; letter-spacing: .05em;
  cursor: pointer; border-radius: 4px; text-align: left; text-transform: uppercase;
}
nav#tabs button:hover { background: rgba(212,175,55,.1); color: #fff; }
nav#tabs button.active {
  background: linear-gradient(90deg, rgba(212,175,55,.2), rgba(212,175,55,.05));
  border-left-color: var(--gold); color: var(--gold-bright); font-weight: 500;
}

/* ---------- content (light) ---------- */
.content { flex: 1; min-width: 0; }
.topbar { padding: 18px 26px 0; font-size: 20px; color: #3c4858; font-weight: 400; }
main { padding: 16px 26px 40px; max-width: 1400px; }
h2 { font-weight: 400; margin: 10px 0 14px; } h3 { font-weight: 500; margin: 14px 0 8px; }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px; margin: 14px 0 22px; }
.stat {
  background: #fff; border-radius: 8px; padding: 14px 16px 12px; position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
.stat .icon {
  position: absolute; top: -14px; left: 14px; width: 48px; height: 48px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #111;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dim));
  box-shadow: 0 6px 14px rgba(0,0,0,.3);
}
.stat .label { text-align: right; color: #999; font-size: 13px; }
.stat .value { text-align: right; font-size: 24px; color: #3c4858; margin-top: 2px; }
.stat .foot { border-top: 1px solid #eee; margin-top: 12px; padding-top: 8px;
  font-size: 12px; color: #999; }
.stat.red .value { color: #e53935; }

/* ---------- panels & tables ---------- */
.panel { background: #fff; border-radius: 8px; padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.14); margin-bottom: 20px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef0f4; font-size: 14px; }
th { color: #9aa7b3; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: #fafbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.totals td { font-weight: 700; background: #f7f4ea; }

/* ---------- pipeline board ---------- */
.board { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding-top: 6px; }
.col { background: #e7eaf0; border-radius: 8px; padding: 10px; min-width: 200px; flex: 1; }
.col h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: #6b7a89; }
.col > small { color: #8593a2; }
.card { background: #fff; border-radius: 6px; padding: 10px; margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12); cursor: pointer; border-left: 3px solid var(--gold); }
.card b { display: block; } .card small { color: #8593a2; display: block; }

/* ---------- forms & bits ---------- */
form.inline { display: flex; flex-wrap: wrap; gap: 10px; background: #fff; padding: 14px;
  border-radius: 8px; margin: 12px 0; align-items: flex-end; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.panel form.inline { box-shadow: none; padding: 8px 0 0; margin: 6px 0 0; }
form.inline label { display: flex; flex-direction: column; font-size: 11px; color: #9aa7b3;
  gap: 3px; text-transform: uppercase; letter-spacing: .04em; }
input, select, textarea { padding: 7px 9px; border: 1px solid #d6dce4; border-radius: 5px;
  font-size: 14px; font-family: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
button.btn { background: linear-gradient(135deg, var(--gold-bright), var(--gold-dim));
  color: #111; border: none; padding: 9px 18px; border-radius: 6px; cursor: pointer;
  font-weight: 700; letter-spacing: .03em; box-shadow: 0 3px 10px rgba(156,127,36,.35); }
button.btn:hover { filter: brightness(1.08); }
button.btn.small { padding: 5px 10px; font-size: 12px; }
button.danger { background: linear-gradient(135deg, #c0463f, #8f2f2a); color: #fff;
  box-shadow: 0 3px 10px rgba(143,47,42,.3); }
.flag { color: #e53935; font-weight: 700; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: #f4ecd4; color: #7a621c; font-size: 12px; }
.neg { color: #e53935; } .pos { color: #43a047; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
a.link { color: #9c7f24; cursor: pointer; text-decoration: underline; }

/* ---------- sidebar footer & login ---------- */
.side-footer { padding: 16px 12px 8px; margin-top: 12px; }
.side-card {
  border-radius: 8px; padding: 18px 14px; text-align: center; color: #fff;
  background: linear-gradient(rgba(6,10,16,.55), rgba(6,10,16,.75)),
    url('sidebar-bg.jpg') center/cover no-repeat;
  border: 1px solid var(--sidebar-edge);
}
.side-card div { font-size: 11px; letter-spacing: .3em; color: var(--gold-bright); }
.side-card a { color: #fff; font-size: 19px; font-weight: 700; text-decoration: none; }
.side-user { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 12px; font-size: 12px; color: #9b968c; }
.login-bg {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(6,10,16,.8), rgba(6,10,16,.9)),
    url('sidebar-bg.jpg') center/cover no-repeat #0b1a2b;
}
.login-card { background: #fff; border-radius: 10px; padding: 34px 38px; width: 340px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.login-card img { width: 120px; margin-bottom: 6px; }
.login-card h2 { margin: 0 0 14px; font-weight: 400; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-card small { color: #9aa7b3; }

/* ---------- dashboard extras ---------- */
.hbar-row { display: grid; grid-template-columns: 130px 1fr 70px; gap: 10px;
  align-items: center; margin: 7px 0; font-size: 13px; }
.hbar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.hbar { background: #eef0f4; border-radius: 4px; height: 14px; overflow: hidden; }
.hbar > div { height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold-dim)); }
.pill.pending { background: #f0f1f4; color: #9aa7b3; }
code { background: #f4f5f8; padding: 2px 5px; border-radius: 4px; font-size: 12.5px; }
pre { background: #14181d; color: #e6e6e6; padding: 12px; border-radius: 8px;
  overflow-x: auto; font-size: 13px; }

@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 12px 0; }
  nav#tabs { flex-direction: row; flex-wrap: wrap; }
  .grid2 { grid-template-columns: 1fr; }
}
