/* Orases LT Metrics Dashboard — Brand-aligned styles */

/* Reset and base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #243846;
  --navy-light: #2f4a5a;
  --navy-dark: #1a2a35;
  --lime: #c2d501;
  --lime-hover: #d4e620;
  --lime-muted: rgba(194, 213, 1, 0.12);
  --teal: #007da4;
  --teal-light: #0093c1;
  --teal-muted: rgba(0, 125, 164, 0.08);
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #e2e6ea;
  --border-hover: #cdd3d8;
  --text-primary: #243846;
  --text-secondary: #5a6b78;
  --text-muted: #8a97a3;
  --red: #e63946;
  --red-bg: rgba(230, 57, 70, 0.08);
  --amber: #f0a500;
  --amber-bg: rgba(240, 165, 0, 0.08);
  --green: #2d936c;
  --green-bg: rgba(45, 147, 108, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(36, 56, 70, 0.06);
  --shadow-md: 0 4px 12px rgba(36, 56, 70, 0.08);
}

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

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Header and navigation */
header {
  background: var(--navy);
  padding: 0 32px;
  margin-bottom: 0;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  padding: 18px 0 0;
  margin-bottom: 0;
}

header h1 .brand-accent {
  color: var(--lime);
}

nav {
  display: flex;
  gap: 0;
  align-items: center;
  padding-top: 12px;
}

nav a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

nav a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}

nav a.active {
  color: #fff;
  background: transparent;
  font-weight: 600;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px 2px 0 0;
}

#user-info {
  margin-left: auto !important;
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 12px;
  font-weight: 500;
}

/* Form elements */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="month"],
textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="month"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-muted);
}

input[type="text"].error,
input[type="month"].error {
  border-color: var(--red);
}

button,
.btn-primary,
.btn-secondary {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

button:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px);
}

button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--teal);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--teal-light);
}

.btn-secondary {
  background-color: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--border);
}

/* Metric cards */
.metric-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.metric-card:hover {
  box-shadow: var(--shadow-md);
}

.metric-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.metric-card .metric-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.metric-card .metric-category {
  display: inline-block;
  padding: 2px 10px;
  background-color: var(--bg);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.metric-card .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
}

.metric-card .metric-target {
  font-size: 13px;
  color: var(--text-secondary);
}

.metric-card .metric-owner {
  font-size: 12px;
  color: var(--text-muted);
}

/* Metric input row (for batch entry) */
.metric-input-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.metric-input-row:last-child {
  border-bottom: none;
}

.metric-input-row .metric-info {
  flex: 1;
}

.metric-input-row .metric-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.metric-input-row .metric-input {
  flex: 0 0 200px;
}

.metric-input-row .input-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Inline edit form */
.inline-edit-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inline-edit-form input[type="month"],
.inline-edit-form input[type="text"] {
  flex: 1;
}

.inline-edit-form button {
  padding: 6px 12px;
}

.inline-edit-input {
  width: 100%;
  padding: 8px;
  border: 2px solid var(--teal);
  border-radius: var(--radius);
}

/* Status messages */
.status-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}

.status-message.success {
  background-color: var(--green-bg);
  color: var(--green);
  border-left: 3px solid var(--green);
}

.status-message.error {
  background-color: var(--red-bg);
  color: var(--red);
  border-left: 3px solid var(--red);
}

.status-message.loading {
  background-color: var(--bg);
  color: var(--text-muted);
  border-left: 3px solid var(--text-muted);
}

.status-message.info {
  background-color: var(--teal-muted);
  color: var(--teal);
  border-left: 3px solid var(--teal);
}

/* History list */
.history-list {
  list-style: none;
}

.history-list li {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr 150px 120px;
  gap: 12px;
  align-items: center;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-list .history-month {
  font-weight: 600;
  color: var(--text-primary);
}

.history-list .history-value {
  font-size: 16px;
  color: var(--teal);
  font-weight: 600;
}

.history-list .history-user {
  font-size: 13px;
  color: var(--text-secondary);
}

.history-list .history-date {
  font-size: 12px;
  color: var(--text-muted);
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* === Dashboard Styles === */

/* Tab navigation - pill style */
.tab-bar {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.nav-tab {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: 100px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-tab:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.nav-tab.active {
  background: var(--navy);
  color: #fff;
}

.nav-tab:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Dashboard metric cards grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.metrics-grid.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Dashboard card */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}

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

.dash-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-card-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.dash-card-target {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dash-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.dash-card-owner {
  font-size: 11px;
  color: var(--text-muted);
}

.dash-card-sparkline { height: 24px; }

/* Dashboard card - compact */
.dash-card.compact { padding: 12px; }
.dash-card.compact .dash-card-value { font-size: 22px; }
.dash-card.compact .dash-card-sparkline { height: 18px; }

/* Status colors */
.status-success { color: var(--green); }
.status-warning { color: var(--amber); }
.status-critical { color: var(--red); }
.status-neutral { color: var(--text-muted); }

/* Staleness badges */
.staleness-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.staleness-mild { background: var(--amber-bg); color: var(--amber); }
.staleness-stale { background: rgba(255, 152, 0, 0.1); color: #ff9800; }
.staleness-critical { background: var(--red-bg); color: var(--red); }

/* Summary scorecard */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}

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

.summary-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.summary-card-status {
  font-size: 13px;
  margin-bottom: 4px;
}

.summary-card-stale {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.summary-totals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.summary-totals .total-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sparkline SVG */
.sparkline-svg { display: block; }
.sparkline-svg polyline { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.no-sparkline { color: var(--text-muted); font-size: 13px; }

/* Loading and error states */
.dashboard-loading { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 15px; }
.dashboard-error { text-align: center; padding: 60px 20px; color: var(--red); }

/* === Trends Page Styles === */

/* Controls bar */
.trends-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.trends-controls .btn-group {
  display: flex;
  gap: 0;
}

.trends-controls .btn-group button {
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.trends-controls .btn-group button:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.trends-controls .btn-group button:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.trends-controls .btn-group button:not(:first-child) {
  border-left: none;
}

.trends-controls .btn-group button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.trends-controls .target-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.trends-controls .target-toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--teal);
}

.trends-controls .comparison-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.trends-controls .comparison-control label {
  margin: 0;
  font-weight: 500;
}

.trends-controls .comparison-control select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  cursor: pointer;
}

/* Category sections */
.trends-category {
  margin-bottom: 32px;
}

.trends-category h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Chart grid */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Chart card */
.trend-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.trend-card:hover {
  box-shadow: var(--shadow-md);
}

.trend-card.highlighted {
  box-shadow: 0 0 0 2px var(--teal);
}

.trend-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.trend-card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.trend-card-header .trend-current-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
  white-space: nowrap;
  margin-left: 12px;
}

.trend-card .trend-delta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.trend-chart-container {
  position: relative;
  height: 280px;
}

.trend-chart-container canvas {
  width: 100% !important;
}

.trend-insufficient {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
}

/* Mobile sparkline (hidden on desktop, shown on mobile) */
.trend-sparkline {
  display: none;
  padding: 8px 0;
}

/* === Mobile Responsive Styles === */

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  header {
    padding: 0 16px;
  }

  header h1 {
    font-size: 14px;
  }

  nav {
    gap: 0;
    overflow-x: auto;
  }

  nav a {
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .tab-bar {
    display: none;
  }

  .mobile-tab-dropdown {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    background: var(--surface);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .metrics-grid.compact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dash-card {
    padding: 10px;
  }

  .dash-card-title {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .dash-card-value {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .dash-card-target {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .dash-card-footer {
    margin-top: 4px;
  }

  .dash-card-owner {
    font-size: 10px;
  }

  .staleness-badge {
    font-size: 9px;
    padding: 1px 6px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .summary-totals {
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
  }

  .trends-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trend-chart-container {
    display: none;
  }

  .trend-sparkline {
    display: block;
  }

  .trends-controls {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .trends-controls .btn-group {
    justify-content: stretch;
  }

  .trends-controls .btn-group button {
    flex: 1;
    padding: 10px 8px;
  }

  .trends-controls .comparison-control {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .trends-controls .comparison-control select {
    width: 100%;
    padding: 10px;
  }

  .metric-card .metric-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .metric-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-input-row .metric-input {
    flex: 1;
  }

  .history-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}

/* Phone (480px) */
@media (max-width: 480px) {
  .container {
    padding: 8px;
  }

  header h1 {
    font-size: 13px;
  }

  nav a {
    padding: 8px 10px;
    font-size: 11px;
  }

  .dash-card-value {
    font-size: 18px;
  }

  .dash-card-title {
    font-size: 10px;
  }

  .trend-card {
    padding: 10px;
  }

  .trend-card-header h3 {
    font-size: 12px;
  }

  .trend-card-header .trend-current-value {
    font-size: 14px;
  }
}

/* Desktop: hide mobile elements */
@media (min-width: 769px) {
  .mobile-tab-dropdown {
    display: none;
  }

  .trend-sparkline {
    display: none;
  }

  .trend-chart-container {
    display: block;
  }
}

/* === Executive Visualization Enhancements === */

/* Card background tinting for critical/warning */
.dash-card.card-critical {
  background: var(--red-bg);
  border-color: var(--red);
}

.dash-card.card-warning {
  background: var(--amber-bg);
  border-color: var(--amber);
}

/* Trend arrows */
.trend-arrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin-left: 8px;
  vertical-align: middle;
}

.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-muted); }

/* Needs Attention panel */
.needs-attention {
  background: var(--red-bg);
  border: 1px solid var(--red);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.needs-attention-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 12px;
}

.needs-attention-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(230, 57, 70, 0.15);
  font-size: 13px;
}

.needs-attention-item:last-child {
  border-bottom: none;
}

.needs-attention-metric {
  font-weight: 600;
  color: var(--text-primary);
}

.needs-attention-value {
  color: var(--red);
  font-weight: 600;
}

.needs-attention-owner {
  color: var(--text-secondary);
  font-size: 12px;
}

.needs-attention-reason {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(230, 57, 70, 0.15);
  color: var(--red);
}

/* Category health bars */
.health-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
  background: var(--bg);
}

.health-segment {
  height: 100%;
  transition: width 0.3s;
}

.health-segment-success { background: var(--green); }
.health-segment-warning { background: var(--amber); }
.health-segment-critical { background: var(--red); }
.health-segment-neutral { background: var(--text-muted); }

.health-counts {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.health-counts span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.health-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.health-dot-success { background: var(--green); }
.health-dot-warning { background: var(--amber); }
.health-dot-critical { background: var(--red); }
.health-dot-neutral { background: var(--text-muted); }

/* Executive KPI strip */
.kpi-strip {
  background: var(--navy-dark);
  padding: 10px 32px;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.kpi-item {
  text-align: center;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Progress rings */
.progress-ring-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-ring {
  flex-shrink: 0;
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s;
}

.progress-ring-text {
  font-size: 11px;
  font-weight: 700;
  fill: var(--text-primary);
  text-anchor: middle;
  dominant-baseline: central;
}

/* Owner view tab */
.owner-section {
  margin-bottom: 28px;
}

.owner-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.owner-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.owner-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
}

.owner-stat {
  padding: 2px 10px;
  border-radius: 100px;
}

.owner-stat-success { background: var(--green-bg); color: var(--green); }
.owner-stat-warning { background: var(--amber-bg); color: var(--amber); }
.owner-stat-critical { background: var(--red-bg); color: var(--red); }
.owner-stat-total { background: var(--bg); color: var(--text-secondary); }

/* Notes indicator on cards */
.dash-card-notes {
  font-size: 12px;
  color: var(--teal);
  background: var(--teal-muted);
  border: 1px solid rgba(0, 125, 164, 0.15);
  border-radius: var(--radius);
  padding: 6px 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card-notes:hover {
  background: rgba(0, 125, 164, 0.12);
}

.dash-card-notes.expanded {
  white-space: pre-line;
  overflow: visible;
}

.notes-icon {
  font-size: 13px;
  vertical-align: middle;
}

/* Mobile responsive for new enhancements */
@media (max-width: 768px) {
  .kpi-strip {
    padding: 8px 12px;
    gap: 16px;
  }

  .kpi-value {
    font-size: 16px;
  }

  .kpi-label {
    font-size: 10px;
  }

  .needs-attention-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .owner-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .owner-stats {
    flex-wrap: wrap;
  }

  .trend-arrow {
    font-size: 12px;
  }

  .health-counts {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .kpi-strip {
    gap: 12px;
    padding: 8px;
  }

  .kpi-value {
    font-size: 14px;
  }

  .kpi-label {
    font-size: 9px;
  }

  .progress-ring-container {
    gap: 8px;
  }
}

/* === Revenue Analysis Tables === */

.revenue-analysis {
  margin-bottom: 32px;
}

.revenue-analysis-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.revenue-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.revenue-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.revenue-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.revenue-table {
  width: 100%;
  border-collapse: collapse;
}

.revenue-table th {
  text-align: right;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

.revenue-table th:first-child {
  text-align: left;
}

.revenue-table td {
  padding: 12px 12px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.revenue-table td:first-child {
  text-align: left;
  font-weight: 600;
}

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

.revenue-table tr.revenue-total-row td {
  border-top: 2px solid var(--navy);
  font-weight: 700;
  padding-top: 14px;
}

.revenue-table tr.revenue-total-row td:first-child {
  font-weight: 700;
}

.revenue-table .variance-positive {
  color: var(--green);
  font-weight: 600;
}

.revenue-table .variance-negative {
  color: var(--red);
  font-weight: 600;
}

.revenue-table .revenue-vs-previous {
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
}

.revenue-table tr.revenue-vs-previous td {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 13px;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.revenue-table tr.revenue-vs-previous td .variance-positive,
.revenue-table tr.revenue-vs-previous td .variance-negative {
  font-style: normal;
}

/* Revenue batch entry table */
.revenue-entry-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.revenue-entry-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.revenue-entry-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.revenue-entry-table {
  width: 100%;
  border-collapse: collapse;
}

.revenue-entry-table th {
  text-align: right;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
}

.revenue-entry-table th:first-child {
  text-align: left;
}

.revenue-entry-table td {
  padding: 10px 10px;
  font-size: 13px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.revenue-entry-table td:first-child {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.revenue-entry-table tr:last-child td {
  border-bottom: none;
}

.revenue-entry-table tr.revenue-entry-total td {
  border-top: 2px solid var(--navy);
  font-weight: 700;
  font-size: 14px;
}

.revenue-entry-table input[type="text"] {
  width: 110px;
  padding: 6px 8px;
  font-size: 13px;
  text-align: right;
}

.revenue-entry-table .computed {
  color: var(--text-secondary);
  font-size: 13px;
}

.revenue-entry-table .variance-positive {
  color: var(--green);
  font-weight: 600;
}

.revenue-entry-table .variance-negative {
  color: var(--red);
  font-weight: 600;
}

.revenue-entry-table .owner-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* No-data state for revenue tables */
.revenue-no-data {
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .revenue-panels {
    grid-template-columns: 1fr;
  }

  .revenue-panel {
    padding: 16px;
  }

  .revenue-table th,
  .revenue-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .revenue-table td:first-child {
    font-size: 12px;
  }

  .revenue-entry-table th,
  .revenue-entry-table td {
    padding: 8px 4px;
    font-size: 11px;
  }

  .revenue-entry-table input[type="text"] {
    width: 80px;
    font-size: 12px;
  }

  .revenue-entry-section {
    padding: 12px;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }
