/* ───────────────────────────────────────────────────────────────
   Accounting Reconcile — single source of design tokens + styles.
   Loaded by base.html (app pages) and login.html.
   ─────────────────────────────────────────────────────────────── */
:root {
  /* Brand — finance navy */
  --brand: #1e3a5f;
  --brand-600: #16304f;
  --brand-100: #e7edf5;

  /* Surfaces */
  --surface: #ffffff;
  --app-bg: #f4f6f9;
  --border: #e2e6ec;

  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;

  /* Elevation */
  --shadow-sm: 0 2px 12px rgba(16, 32, 64, .08);
  --shadow-lg: 0 6px 28px rgba(16, 32, 64, .14);

  /* Map Bootstrap's primary onto the brand so bg-primary / text-primary follow */
  --bs-primary: #1e3a5f;
  --bs-primary-rgb: 30, 58, 95;
}

body { background: var(--app-bg); }

.navbar-brand { font-weight: 700; letter-spacing: -0.3px; }

.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.card-header {
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.entity-row {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.entity-row:hover { border-color: var(--brand); }

.btn-add {
  border: 2px dashed var(--brand);
  color: var(--brand);
  background: transparent;
}
.btn-add:hover {
  background: var(--brand-100);
  border-color: var(--brand-600);
  color: var(--brand-600);
}

/* One unified primary CTA across every page (Bootstrap 5.3 --bs-btn-* vars) */
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-600);
  --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-600);
  --bs-btn-active-border-color: var(--brand-600);
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}
.text-primary { color: var(--brand) !important; }

/* App launcher grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.app-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
  color: inherit;
}
.app-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.app-tile-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: var(--brand-100);
  color: var(--brand);
}
.app-tile-label { font-weight: 600; font-size: .95rem; text-align: center; }
.app-tile-sub { font-size: .76rem; color: #6c757d; text-align: center; line-height: 1.3; }

/* Neutral month tag — months are labels, not warnings */
.badge-month {
  background: var(--brand-100);
  color: var(--brand);
  border: 1px solid #d4dfec;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Shared banner <pre> (was inline + inconsistent across pages) */
.banner-pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: .875rem;
  margin: 0;
}

/* Loading overlay */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
#loading-overlay.active { display: flex; }

/* ── Login page ── */
.login-card {
  width: 380px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6c757d;
  font-size: .85rem;
  margin: 20px 0;
}
.divider-or::before, .divider-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  background: #fff;
  color: #5e5e5e;
  font-weight: 500;
  border: 1px solid #8c8c8c;
  border-radius: 6px;
  transition: background-color .15s ease;
}
.btn-microsoft:hover { background: #f3f3f3; color: #5e5e5e; }
.btn-microsoft:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
