/* ============================================================
   Pallotti Store — design tokens
   Palette: deep ink navy shell, warm brass accent (institutional,
   not the generic cream/terracotta or dark/neon AI defaults).
   ============================================================ */
:root {
  --ink-900: #0f1f2e;
  --ink-800: #16293b;
  --ink-700: #1e3549;
  --ink-600: #2a4761;
  --paper: #f6f7f5;
  --paper-card: #ffffff;
  --line: #e2e5e0;
  --text-900: #17222b;
  --text-600: #4b5a63;
  --text-400: #8a9399;
  --brass: #b8862f;
  --brass-dark: #93691e;
  --brass-tint: #f4e8d0;
  --ok: #2f7d5c;
  --warn: #b8862f;
  --danger: #a63b3b;
  --info: #2a6f8c;
  --radius: 10px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

@font-face {
  font-family: 'Fraunces';
  src: local('Georgia');
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text-900);
  font-size: 14.5px;
}

h1, h2, h3, h4, .brand-font {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

a { color: var(--brass-dark); }
a:hover { color: var(--brass); }

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

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--ink-900), var(--ink-800));
  color: #dfe6ea;
  min-height: 100vh;
  position: sticky;
  top: 0;
}
.sidebar .brand {
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar .brand .name { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.sidebar .brand .sub { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); }

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 16px 20px 6px;
}
.sidebar .nav-link {
  color: #c4ced3;
  padding: 9px 20px;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .nav-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar .nav-link.active {
  background: rgba(184,134,47,0.14);
  color: #fff;
  border-left-color: var(--brass);
  font-weight: 600;
}

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

.topbar {
  background: var(--paper-card);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .role-badge {
  background: var(--brass-tint);
  color: var(--brass-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.page-body { padding: 24px; flex: 1; }
.page-title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 2px; }
.page-subtitle { color: var(--text-600); font-size: 0.85rem; margin-bottom: 20px; }
.breadcrumb-row { font-size: 0.78rem; color: var(--text-400); margin-bottom: 6px; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15,31,46,0.03); }
.stat-card { padding: 18px 20px; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink-900); }
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-600); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }

/* ---------- Buttons ---------- */
.btn-brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn-brass:hover { background: var(--brass-dark); border-color: var(--brass-dark); color: #fff; }
.btn-outline-ink { border-color: var(--ink-700); color: var(--ink-700); }
.btn-outline-ink:hover { background: var(--ink-700); color: #fff; }

/* ---------- Tables ---------- */
.table-card .table { margin-bottom: 0; }
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-600);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.table td { vertical-align: middle; font-size: 0.87rem; }
.table-toolbar { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.status-pill { padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; display: inline-block; }
.status-pill.P, .status-pill.Approved, .status-pill.success, .status-pill.Completed { background: #e3f2e9; color: var(--ok); }
.status-pill.I, .status-pill.Requested, .status-pill.Pending { background: #fdf1de; color: var(--warn); }
.status-pill.Rejected, .status-pill.danger { background: #f6e4e4; color: var(--danger); }
.status-pill.Issued, .status-pill.info { background: #e2eff3; color: var(--info); }

/* ---------- Login ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.login-visual {
  flex: 1.1;
  background: radial-gradient(circle at 20% 20%, var(--ink-700), var(--ink-900) 65%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(184,134,47,0.06) 0 2px, transparent 2px 26px);
}
.login-visual .mark { font-family: var(--font-display); font-size: 2.6rem; position: relative; z-index: 1; }
.login-visual .tagline { color: rgba(255,255,255,0.75); max-width: 380px; position: relative; z-index: 1; margin-top: 10px; }
.login-form-col { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--paper-card); padding: 40px; }
.login-card { width: 100%; max-width: 380px; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-400); }
.badge-role { text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.05em; }
.filter-bar .form-control, .filter-bar .form-select { font-size: 0.85rem; }
.spinner-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; z-index: 2000; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; transition: left .2s; z-index: 1000; }
  .sidebar.open { left: 0; }
  .login-visual { display: none; }
}
