/* ── CSS Invoice Generator — Professional Theme ────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --green: #2aa342;
  --green-dark: #228b36;
  --green-light: #dcfce7;
  --dark: #0f172a;
  --text: #1e293b;
  --text-secondary: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --warn: #f59e0b;
  --warn-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 0.925rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header ─────────────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #0f1f15 0%, #162b1d 50%, #1a3524 100%);
  color: #fff;
  padding: 0 2.5rem;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.04) inset;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

header h1 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Morpheus Brand ─────────────────────────────────────────────────── */
.morpheus-wordmark {
  font-family: 'Orbitron', 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  position: relative;
  padding-left: 0.6rem;
  margin-left: 0.15rem;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

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

.header-user a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.header-user a:hover { color: rgba(255,255,255,0.95); }

.header-logo {
  height: 32px;
  width: auto;
  border-radius: 6px;
}

/* ── Layout ─────────────────────────────────────────────────────────── */
main {
  max-width: 100%;
  margin: 2rem auto;
  padding: 0 2rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ── Forms ──────────────────────────────────────────────────────────── */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}

input[type=date],
input[type=text],
input[type=email],
input[type=password],
input[type=number],
select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  margin-top: 0.3rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input[type=date] {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.625rem 0.875rem;
  cursor: pointer;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

input[type=number].amount-input {
  width: 140px;
  display: inline-block;
  margin-left: 0.5rem;
}

.row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.row label { flex: 1; min-width: 200px; }

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
  background: var(--border-light);
}

legend {
  font-weight: 600;
  padding: 0 0.5rem;
  font-size: 0.9rem;
  color: var(--dark);
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 1.25rem;
  font-weight: 400;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio input[type=radio] {
  width: auto;
  margin: 0;
  accent-color: var(--green);
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover {
  background: var(--border-light);
  border-color: #cbd5e1;
}

.btn.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  box-shadow: var(--shadow);
}

.btn.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Tables ─────────────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--dark);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td { background: #fff; }
tr:nth-child(even) td { background: #fafbfc; }
tr:hover td { background: #f0fdf4; }
tr:last-child td { border-bottom: none; }
tr.needs-review td { background: #fffbeb; }

.col-check {
  width: 40px;
  text-align: center !important;
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.badge-count {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

/* ── Details/Summary ────────────────────────────────────────────────── */
details {
  margin: 1rem 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0;
  color: var(--dark);
  user-select: none;
}

summary:hover { color: var(--green-dark); }

/* ── Flash Messages ─────────────────────────────────────────────────── */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.flash.success {
  background: var(--green-light);
  color: #166534;
  border: 1px solid #bbf7d0;
}

.flash.warning {
  background: var(--warn-bg);
  color: #92400e;
  border: 1px solid #fde68a;
}

.flash.error {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── Review Section ─────────────────────────────────────────────────── */
.review-section {
  background: var(--warn-bg);
  border-color: #fde68a;
}

.review-item {
  padding: 0.75rem;
  border-bottom: 1px solid #fde68a;
  margin-bottom: 0.5rem;
}

.review-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
}

/* ── Login ──────────────────────────────────────────────────────────── */
.login-card {
  max-width: 420px;
  margin: 4rem auto;
  text-align: center;
}

.login-card h2 {
  margin-bottom: 1.5rem;
}

.login-card form {
  text-align: left;
}

.login-card .btn.primary {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  font-size: 0.95rem;
}

.forgot-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

.forgot-link a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link a:hover { text-decoration: underline; }

/* ── Select-All Bar ─────────────────────────────────────────────────── */
.select-all-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

/* ── Multi-select Org Picker ────────────────────────────────────────── */
.multiselect-container {
  margin-top: 0.75rem;
  position: relative;
}

.multiselect-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.ms-tag {
  background: var(--green);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ms-tag button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color var(--transition);
}

.ms-tag button:hover { color: #fff; }

.multiselect-search {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.multiselect-search:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.multiselect-dropdown {
  display: none;
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  width: 100%;
  box-shadow: var(--shadow-lg);
  margin-top: 0.25rem;
}

.ms-option {
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}

.ms-option:hover { background: var(--green-light); }
.ms-no-match { color: var(--text-secondary); cursor: default; }
.ms-no-match:hover { background: transparent; }

/* ── Results Page ───────────────────────────────────────────────────── */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.email-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.email-input {
  width: 260px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
}

.email-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

/* ── Invoice Checkboxes ─────────────────────────────────────────────── */
.select-invoices { margin: 1rem 0; }

.select-all-row {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.invoice-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 250px;
  overflow-y: auto;
}

.invoice-check { font-size: 0.875rem; }

/* ── Stats Bar ──────────────────────────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  margin-bottom: 0.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ── Loading spinner ────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  header { padding: 0 1rem; }
  main { padding: 0 1rem; }
  .card { padding: 1.25rem; }
  .row { flex-direction: column; }
  .email-group { margin-left: 0; width: 100%; }
  .email-input { width: 100%; }
  .actions-row { flex-direction: column; align-items: stretch; }
}

/* ── Header brand link ──────────────────────────────────────────────── */
.header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}

.header-brand-link:hover { opacity: 0.9; }

/* ── Sub-navigation ─────────────────────────────────────────────────── */
.sub-nav {
  background: linear-gradient(135deg, #1a2e20 0%, #223828 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 56px;
  z-index: 49;
}

.sub-nav-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0.45rem 2.5rem;
  display: flex;
  align-items: center;
}

.sub-nav-label {
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Dashboard Tiles ────────────────────────────────────────────────── */
.dashboard {
  text-align: center;
  padding: 2rem 0;
}

.dashboard-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
  margin: 0 auto;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.tile:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tile:hover .tile-icon { color: var(--green); }

.tile-icon {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  transition: color var(--transition);
}

.tile h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.tile p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.tile-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ── Table footer ───────────────────────────────────────────────────── */
tfoot td {
  background: var(--border-light) !important;
  border-top: 2px solid var(--border);
}

/* ── Header Navigation ──────────────────────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

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

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}

/* ── Sticky Table Headers ───────────────────────────────────────────── */
.table-sticky-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-sticky-wrap table {
  border: none;
  border-radius: 0;
  margin: 0;
}

.table-sticky-wrap th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-sticky-wrap td:first-child,
.table-sticky-wrap th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

.table-sticky-wrap th:first-child {
  z-index: 3;
}

/* ── Table Filter Bar ───────────────────────────────────────────────── */
.table-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.table-filter-input {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  min-width: 200px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.table-filter-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.filter-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Date Preset Buttons ────────────────────────────────────────────── */
.date-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.preset-btn {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: #fff;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.preset-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
}

.preset-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* ── Progress Overlay ───────────────────────────────────────────────── */
.progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 200;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

.progress-overlay.active {
  display: flex;
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.progress-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.progress-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── Cache Age Badge ────────────────────────────────────────────────── */
.cache-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--green-light);
  color: #166534;
  border: 1px solid #bbf7d0;
}

.cache-badge.stale {
  background: var(--warn-bg);
  color: #92400e;
  border-color: #fde68a;
}

/* ── Responsive nav ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  header {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
  }
}


/* ── Executive Dashboard ────────────────────────────────────────────── */
.exec-dashboard {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2.5rem 3rem;
}
.exec-divider {
  margin-top: 3rem;
  margin-bottom: 2.5rem;
  border: none;
  border-top: 1px solid var(--border);
}
.exec-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
}
.exec-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 0;
}

/* Period header */
.exec-period-label {
  text-align: center;
  margin-bottom: 1rem;
}
.exec-period-tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.exec-period-dates {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.2rem;
}

/* Tile grid */
.exec-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Tile card */
.exec-tile-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s, transform 0.15s;
}
.exec-tile-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.exec-tile-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.exec-tile-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

/* Comparison rows inside tile */
.exec-tile-comp {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.7;
}
.exec-tile-comp-label {
  color: #9ca3af;
}
.exec-tile-comp-val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #6b7280;
}
.exec-tile-pct {
  display: inline;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 0.3rem;
}
.exec-tile-pct.pct-up { color: #1a5632; }
.exec-tile-pct.pct-down { color: #c0392b; }
.exec-tile-pct.pct-flat { color: #6b7280; }

/* Chart cards */
.exec-chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.exec-chart-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.exec-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}
.exec-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.exec-chart-wrap-sm {
  height: 400px;
}

/* Chart grid layouts */
.exec-chart-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.exec-chart-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.exec-chart-card + .exec-chart-row,
.exec-chart-row + .exec-chart-row,
.exec-chart-row + .exec-chart-row-3,
.exec-chart-row-3 + .exec-chart-row-3 {
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .exec-tile-grid { grid-template-columns: 1fr; }
  .exec-chart-row { grid-template-columns: 1fr; }
  .exec-chart-row-3 { grid-template-columns: 1fr; }
  .exec-tile-value { font-size: 1.3rem; }
}
