/* ==========================================================
   Assets Management System 1.0 — "Official Registry" theme
   Distinct from other institutional apps: slate-navy + brass
   seal accent, paper-grey surfaces, mono reference codes.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --navy: #1C2B39;
  --navy-deep: #131E29;
  --brass: #9C7A3C;
  --brass-light: #C4A365;
  --paper: #F3F1EB;
  --paper-white: #FBFAF7;
  --ink: #2A2F35;
  --ink-soft: #5B6470;
  --rule: #D8D3C6;
  --seal-red: #8C3A34;
  --moss: #4C6B4F;
  --amber: #A87A2E;

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 3px;
  --shadow-card: 0 1px 2px rgba(28, 43, 57, 0.08), 0 1px 0 rgba(28, 43, 57, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 600;
  margin: 0 0 0.4em;
}

.mono, .ref-code, code {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

a { color: var(--navy); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--navy-deep);
  color: #E7E2D6;
  padding: 20px 0 40px;
}

.sidebar .brand {
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}
.sidebar .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1.5px solid var(--brass-light);
  border-radius: 50%;
  color: var(--brass-light);
  font-family: var(--font-display);
  font-weight: 700;
  margin-right: 10px;
}
.sidebar .brand-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: #fff; }
.sidebar .brand-sub { font-size: 11px; color: #9AA6AE; margin-top: 2px; }

.sidebar nav { padding: 8px 10px; }
.sidebar .nav-group-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7C8894;
  padding: 14px 10px 6px;
}
.sidebar a.nav-link {
  display: block;
  padding: 8px 12px;
  color: #C9D0D6;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 1px;
}
.sidebar a.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar a.nav-link.active {
  background: var(--brass);
  color: #1C1500;
  font-weight: 500;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px;
  background: var(--paper-white);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.topbar .who { font-size: 13px; color: var(--ink-soft); }
.topbar .who strong { color: var(--ink); }

.content { padding: 26px 28px 60px; }

.breadcrumb-bar { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumb-bar a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb-bar a:hover { color: var(--navy); }

/* ---------- Cards / ledger cards ---------- */
.card {
  background: var(--paper-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-body { padding: 18px 20px; }
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Ledger card: corner-notch signature element for record cards */
.ledger-card {
  position: relative;
  background: var(--paper-white);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.ledger-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 14px 14px 0;
  border-color: transparent var(--paper) transparent transparent;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--paper-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.kpi .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.kpi .value { font-family: var(--font-mono); font-size: 26px; font-weight: 600; color: var(--navy); margin-top: 4px; }
.kpi .value.brass { color: var(--brass); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-brass { background: var(--brass); color: #1C1500; }
.btn-brass:hover { background: var(--brass-light); }
.btn-outline { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy); }
.btn-danger { background: var(--seal-red); color: #fff; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-bottom: 4px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brass-light);
  outline-offset: 0;
  border-color: var(--brass);
}
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1.5px solid var(--rule);
  padding: 10px 12px;
  background: var(--paper);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--rule); }
tr:hover td { background: rgba(156, 122, 60, 0.05); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-active, .badge-success { background: #E4EBE4; color: var(--moss); }
.badge-inactive, .badge-muted { background: #E9E7E1; color: var(--ink-soft); }
.badge-warning { background: #F2E7D3; color: var(--amber); }
.badge-danger { background: #F0DEDC; color: var(--seal-red); }

/* ---------- Alerts ---------- */
.alert { padding: 11px 15px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #E4EBE4; color: var(--moss); border-color: #C7D6C8; }
.alert-error { background: #F0DEDC; color: var(--seal-red); border-color: #E0C1BD; }
.alert-info { background: #E4E9EC; color: var(--navy); border-color: #C9D3D9; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  background-image: radial-gradient(circle at 20% 20%, rgba(156,122,60,0.08), transparent 40%);
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--paper-white);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.auth-seal {
  width: 52px; height: 52px;
  border: 2px solid var(--brass);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brass);
  font-size: 20px;
  margin: 0 auto 14px;
}
.auth-title { text-align: center; font-size: 17px; margin-bottom: 2px; }
.auth-sub { text-align: center; font-size: 12px; color: var(--ink-soft); margin-bottom: 22px; }

.text-muted { color: var(--ink-soft); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
