/* Brew OS - Professional Business Operating System */
/* Palette: British Racing Green (#101f16), Paper White (#ffffff), Light Grey (#f5f6f8), Charcoal (#111827 / #1f2937) */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 400 500 600 700;
  font-display: swap;
}

:root {
  --bg-app: #f4f5f7;
  --bg-card: #ffffff;
  --bg-subtle: #f9fafb;
  --bg-hover: #f3f4f6;

  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-focus: #1b3d2b;

  --text-main: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  --green-primary: #122319;
  --green-dark: #122319;
  --green-surface: #182e21;
  --green-accent: #1e5b3a;
  --green-accent-hover: #27744b;
  --green-light: #ecfdf5;
  --green-border: #a7f3d0;

  --amber-light: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --font-serif: "Young Serif", Georgia, serif;
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-subtle: 0 1px 3px 0 rgba(0,0,0,0.07), 0 1px 2px -1px rgba(0,0,0,0.06);
  --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-dropdown: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);

  --transition-fast: 0.12s ease;
  --transition-base: 0.18s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

body {
  display: flex;
}

/* Sidebar */
.app-sidebar {
  width: 250px;
  background-color: var(--green-primary);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  transition: width 0.2s ease;
}

.sidebar-header {
  padding: 24px 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.brand-titles h1 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.brand-titles span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 3px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.8);
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 18px 14px 7px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: var(--green-accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(30, 91, 58, 0.3);
}

.nav-icon-svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-snippet {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
}

/* Main Layout */
.app-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-navbar {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 var(--border-light);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-heading h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.navbar-heading p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Button & Form Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--green-primary);
  color: #ffffff;
  border-color: var(--green-primary);
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(18, 35, 25, 0.2);
}

.btn-primary:hover {
  background: var(--green-accent);
  border-color: var(--green-accent);
  box-shadow: 0 2px 6px rgba(18, 35, 25, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

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

.input, .select, .textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.84rem;
  padding: 7px 11px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 2px rgba(18, 35, 25, 0.1);
}

/* Views & Content */
.main-stage {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.os-view {
  display: none;
}

.os-view.active {
  display: block;
  animation: viewFadeIn 0.2s ease;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card Component */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow 0.15s;
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-header-bar h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0;
  color: var(--text-main);
}

.card-header-bar p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Metric / Stat Tiles */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-subtle);
  transition: box-shadow 0.15s, transform 0.15s;
}

.metric-tile:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric-number {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-family: var(--font-serif);
}

.metric-footnote {
  font-size: 0.74rem;
  color: var(--green-accent);
  margin-top: 5px;
  font-weight: 500;
}

/* Counter Barista Terminal Quick-Action Banner */
.counter-pos-panel {
  background: linear-gradient(135deg, #122319 0%, #1c3829 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.counter-pos-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 4px;
}

.counter-pos-panel p {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.counter-search-row {
  display: flex;
  gap: 10px;
  max-width: 580px;
}

.counter-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.counter-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.counter-search-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.45);
}

.counter-customer-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.stamp-slot-row {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.stamp-slot-box {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

.stamp-slot-box.filled {
  background: #ffffff;
  color: var(--green-primary);
  border-style: solid;
  border-color: #ffffff;
}

.stamp-slot-box.reward-slot.filled {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
}

/* Data Table */
.table-wrapper {
  overflow-x: auto;
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.records-table th {
  padding: 9px 12px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.records-table th:first-child { border-radius: var(--radius-xs) 0 0 0; }
.records-table th:last-child  { border-radius: 0 var(--radius-xs) 0 0; }

.records-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
  line-height: 1.4;
}

.records-table tbody tr:last-child td {
  border-bottom: none;
}

.records-table tbody tr:hover {
  background: var(--bg-hover);
}

/* Clean Status Pills (No Emojis) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-green {
  background: var(--green-light);
  color: #065f46;
  border: 1px solid var(--green-border);
}

.badge-amber {
  background: var(--amber-light);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.badge-grey {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.badge-blue {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: var(--shadow-dropdown);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-bar h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
}

.modal-content-area {
  padding: 18px 20px;
  overflow-y: auto;
}

.modal-actions {
  padding: 14px 20px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast */
.toast-shelf {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-pill {
  background: #1a1f2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-dropdown);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  transition: opacity 0.2s;
}

/* ========================================================
   LOGIN SCREEN & AUTHENTICATION OVERLAY
   ======================================================== */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: 
    radial-gradient(ellipse at 30% 0%, rgba(30, 91, 58, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(18, 35, 25, 0.6) 0%, transparent 60%),
    linear-gradient(160deg, #0a1710 0%, #101f16 40%, #0d1b12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-screen-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px);
  pointer-events: none;
}

.login-screen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: loginCardPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes loginCardPop {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

.login-card-header {
  background: linear-gradient(140deg, #122319 0%, #1a3528 60%, #16311f 100%);
  color: #ffffff;
  padding: 32px 28px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.login-mascot-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(255,255,255,0.06);
  padding: 10px;
}

.login-mascot-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-card-header h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 6px;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.login-card-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.login-card-body {
  padding: 26px 28px 24px;
  background: #fff;
}

.login-field-group {
  margin-bottom: 18px;
}

.login-field-group label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap input {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.93rem;
  border: 1.5px solid var(--border-medium);
  border-radius: 8px;
  background: #fafafa;
  font-family: inherit;
  color: var(--text-main);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--green-accent);
  box-shadow: 0 0 0 3px rgba(30, 91, 58, 0.12);
  background: #ffffff;
}

/* Credentials helper callout */
.login-credentials-box {
  background: #f6f9f7;
  border: 1px solid #d2e3d9;
  border-left: 3px solid var(--green-accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.login-credentials-box strong {
  color: var(--green-accent);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-credentials-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.login-credentials-grid .key { color: var(--text-muted); }
.login-credentials-grid .val { font-weight: 600; color: var(--text-main); }

.btn-sign-in {
  width: 100%;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1a3528 0%, #122319 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(18, 35, 25, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-sign-in:hover {
  background: linear-gradient(135deg, #1e5b3a 0%, #1a3528 100%);
  box-shadow: 0 4px 14px rgba(18, 35, 25, 0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.btn-sign-in:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(18, 35, 25, 0.3);
}

.login-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-quick-fill {
  background: none;
  border: none;
  color: var(--green-accent);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  font-family: inherit;
}

.btn-quick-fill:hover {
  background: rgba(30, 91, 58, 0.08);
}

.login-status-alert {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  background: #fff1f1;
  color: #991b1b;
  border: 1px solid #fecaca;
  display: none;
}

/* Sidebar Lock / Sign Out button */
.sidebar-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-sidebar-lock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}

.btn-sidebar-lock:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ========================================================
   FINANCE & COSTS SPREADSHEET LINK & STATUS ENHANCEMENTS
   ======================================================== */
.finance-banner {
  background: linear-gradient(135deg, #122319 0%, #1a3528 50%, #0f1e17 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.finance-banner h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 4px;
  font-weight: 400;
}

.finance-banner p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.btn-spreadsheet-link {
  background: #ffffff;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn-spreadsheet-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.finance-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.finance-kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}

.finance-kpi-card .kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.finance-kpi-card .kpi-val {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-main);
  line-height: 1.1;
}

.finance-kpi-card .kpi-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Purchased status pills and interactive toggles */
.purchased-btn-toggle {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge-purchased {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.status-badge-pending {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 500;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.status-badge-purchased:hover,
.status-badge-pending:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
