/*
 * SentinelRE Executive Design System™ v1.0
 * Final platform-wide luxury branding layer.
 * Palette inspired by the SRCG crest: executive black, metallic gold,
 * platinum, and royal lavender.
 */

:root {
  --sr-black-950: #070709;
  --sr-black-900: #0b0b0d;
  --sr-black-850: #101013;
  --sr-black-800: #141416;
  --sr-black-750: #19191d;
  --sr-black-700: #202026;
  --sr-gold-300: #ead087;
  --sr-gold-400: #d9b967;
  --sr-gold-500: #c8a45a;
  --sr-gold-600: #a98235;
  --sr-platinum-100: #f5f5f7;
  --sr-platinum-200: #e6e6ea;
  --sr-platinum-300: #d8d8dc;
  --sr-platinum-500: #a8a8b0;
  --sr-lavender-300: #b89ae8;
  --sr-lavender-400: #9c7bd3;
  --sr-lavender-500: #8060bb;
  --sr-success: #5faf72;
  --sr-warning: #d4a646;
  --sr-critical: #b94b4b;
  --sr-info: #4d8bf5;
  --sr-text-on-dark: #ffffff;
  --sr-text-muted-on-dark: #c7c7ce;
  --sr-text-on-light: #17171b;
  --sr-text-muted-on-light: #5d5d66;
  --sr-border-gold: rgba(200, 164, 90, .52);
  --sr-border-soft: rgba(216, 216, 220, .16);
  --sr-shadow: 0 18px 44px rgba(0, 0, 0, .34);
  --sr-shadow-soft: 0 10px 28px rgba(0, 0, 0, .22);
  --sr-radius-sm: 8px;
  --sr-radius-md: 12px;
  --sr-radius-lg: 16px;
  --sr-serif: Georgia, "Times New Roman", serif;
  --sr-sans: Inter, Montserrat, "Segoe UI", Arial, sans-serif;
}

html { color-scheme: dark; }
body {
  background:
    radial-gradient(circle at 85% 5%, rgba(128, 96, 187, .11), transparent 28rem),
    linear-gradient(145deg, var(--sr-black-950), var(--sr-black-900) 52%, #0d0b11);
  color: var(--sr-text-on-dark);
  font-family: var(--sr-sans);
  letter-spacing: .005em;
}

body, p, li, label, td, input, select, textarea, button { font-family: var(--sr-sans); }
h1, h2, h3, h4, h5, h6, .brand h1, .hero h1 {
  font-family: var(--sr-serif);
  letter-spacing: .025em;
}

a { color: var(--sr-gold-300); }
a:hover { color: #fff1b8; }

/* Core shell */
.layout { background: transparent; }
.sidebar {
  background:
    linear-gradient(180deg, rgba(7, 7, 9, .99), rgba(11, 11, 13, .98)),
    var(--sr-black-950);
  border-right: 1px solid var(--sr-border-gold);
  box-shadow: 12px 0 34px rgba(0, 0, 0, .3);
}
.sidebar::before {
  content: "";
  display: block;
  width: 142px;
  height: 142px;
  margin: 2px auto 14px;
  background: url("../img/srcg-executive-crest.png") center/contain no-repeat;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.65));
}
.brand { text-align: center; padding-bottom: 18px; border-bottom: 1px solid rgba(200,164,90,.28); }
.brand h1 { color: var(--sr-gold-300); text-transform: uppercase; letter-spacing: .12em; font-size: 21px; }
.brand p { color: var(--sr-platinum-300); line-height: 1.45; }
.content { background: transparent; }

.sv2-header {
  background: rgba(7, 7, 9, .96) !important;
  border-bottom: 1px solid var(--sr-border-gold) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.32) !important;
  backdrop-filter: blur(14px);
}
.sv2-header, .sv2-header * { color: var(--sr-text-on-dark); }
.sv2-header__powered strong, .sv2-header__hello { color: var(--sr-gold-300) !important; }
.sv2-header__avatar { border: 1px solid var(--sr-gold-500) !important; background: linear-gradient(145deg, #241a31, #0d0d10) !important; }

.sentinel-mini-brand {
  color: var(--sr-gold-300) !important;
  background: rgba(7,7,9,.92) !important;
  border: 1px solid var(--sr-border-gold) !important;
  box-shadow: var(--sr-shadow-soft) !important;
}

/* Navigation */
.nav-section-title, .nav-section-heading, .nav-section-toggle {
  color: var(--sr-platinum-300) !important;
}
.nav-section-toggle { border-color: transparent !important; background: transparent !important; }
.nav-section-links a, .sidebar-nav > a, .nav a {
  color: #f7f7f9 !important;
  border-left: 2px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nav-section-links a:hover, .sidebar-nav > a:hover, .nav a:hover,
.nav-section-links a[aria-current="page"], .sidebar-nav > a.active {
  background: linear-gradient(90deg, rgba(200,164,90,.18), rgba(128,96,187,.08)) !important;
  color: var(--sr-gold-300) !important;
  border-left-color: var(--sr-gold-500);
  transform: translateX(2px);
}
.nav-section-icon, .nav-icon-library { color: var(--sr-gold-400); stroke: currentColor; }

/* Page titles and hero areas */
.topbar, .hero {
  background: linear-gradient(135deg, rgba(20,20,22,.96), rgba(9,9,11,.96));
  color: var(--sr-text-on-dark);
  border: 1px solid var(--sr-border-gold);
  border-radius: var(--sr-radius-lg);
  box-shadow: var(--sr-shadow-soft);
  padding: 22px 24px;
}
.topbar h1, .hero h1, .hero h2, .eyebrow { color: var(--sr-gold-300) !important; }
.hero p, .topbar p, .small-note, .text-muted { color: var(--sr-text-muted-on-dark) !important; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; }

/* Dark luxury cards */
.card, article, .panel, .metric-card, .kpi-card, .dashboard-card,
[class*="-card"]:not(.light-card):not(.card-light) {
  color: var(--sr-text-on-dark);
}
.card {
  background: linear-gradient(145deg, rgba(25,25,29,.98), rgba(11,11,13,.98));
  border: 1px solid var(--sr-border-gold);
  border-radius: var(--sr-radius-lg);
  box-shadow: var(--sr-shadow-soft);
}
.card:hover { border-color: rgba(234,208,135,.72); }
.card h1, .card h2, .card h3, .card h4 { color: var(--sr-gold-300) !important; }
.card p, .card li, .card td, .card label { color: var(--sr-text-on-dark); }
.card .small-note, .card small, .card .text-muted { color: var(--sr-text-muted-on-dark) !important; }
.metric { color: #fff !important; font-family: var(--sr-serif); }

/* Explicit light surfaces: always dark typography */
.light-card, .card-light, .surface-light, .bg-white, .white-card,
[style*="background:#fff"], [style*="background: #fff"],
[style*="background:white"], [style*="background: white"] {
  background: #fff !important;
  color: var(--sr-text-on-light) !important;
  border-color: rgba(23,23,27,.14) !important;
}
.light-card *, .card-light *, .surface-light *, .bg-white *, .white-card * {
  color: inherit;
}
.light-card h1, .light-card h2, .light-card h3,
.card-light h1, .card-light h2, .card-light h3,
.surface-light h1, .surface-light h2, .surface-light h3,
.bg-white h1, .bg-white h2, .bg-white h3 {
  color: #282024 !important;
}

/* Forms */
input, select, textarea {
  background: #0e0e11 !important;
  color: #fff !important;
  border: 1px solid rgba(216,216,220,.28) !important;
  border-radius: var(--sr-radius-sm) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
input::placeholder, textarea::placeholder { color: #8f8f99; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sr-gold-400) !important;
  box-shadow: 0 0 0 3px rgba(200,164,90,.16) !important;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--sr-gold-500); }

/* Buttons */
.button, button, .btn, input[type="submit"] {
  background: linear-gradient(135deg, #e2c775, var(--sr-gold-500)) !important;
  color: #111114 !important;
  border: 1px solid #f0d991 !important;
  border-radius: var(--sr-radius-sm) !important;
  box-shadow: 0 8px 18px rgba(200,164,90,.16);
  font-weight: 700;
  letter-spacing: .025em;
}
.button:hover, button:hover, .btn:hover, input[type="submit"]:hover {
  background: linear-gradient(135deg, #f0dc9d, #d2ad60) !important;
  color: #070709 !important;
  transform: translateY(-1px);
}
.btn-secondary, .button.secondary, button.secondary, .secondary-button {
  background: #111114 !important;
  color: var(--sr-gold-300) !important;
  border: 1px solid var(--sr-gold-500) !important;
}
.btn-secondary:hover, .button.secondary:hover, button.secondary:hover {
  background: rgba(200,164,90,.12) !important;
  color: #fff !important;
}

/* Tables */
.table-wrap { border: 1px solid var(--sr-border-soft); border-radius: var(--sr-radius-md); overflow: auto; }
table { background: rgba(10,10,12,.72); color: var(--sr-text-on-dark); }
th {
  background: linear-gradient(180deg, #171719, #0d0d0f);
  color: var(--sr-gold-300) !important;
  border-bottom: 1px solid var(--sr-border-gold) !important;
  text-transform: uppercase;
  letter-spacing: .075em;
}
td { color: #f3f3f5; border-bottom-color: rgba(216,216,220,.12) !important; }
tbody tr:hover { background: rgba(200,164,90,.075); }

/* Badges and alerts */
.badge, .pill {
  background: rgba(128,96,187,.16) !important;
  color: var(--sr-lavender-300) !important;
  border: 1px solid rgba(156,123,211,.48);
}
.flash, .alert {
  background: linear-gradient(135deg, rgba(128,96,187,.17), rgba(20,20,22,.98)) !important;
  color: #fff !important;
  border: 1px solid rgba(184,154,232,.48) !important;
  box-shadow: var(--sr-shadow-soft);
}
.alert-success, .badge-success { border-color: rgba(95,175,114,.6) !important; color: #aee6ba !important; }
.alert-warning, .badge-warning { border-color: rgba(212,166,70,.65) !important; color: #f1cf7d !important; }
.alert-danger, .badge-danger { border-color: rgba(185,75,75,.7) !important; color: #f2a0a0 !important; }

/* Login refinement */
.login-brand-logo img { width: 112px !important; height: 112px !important; object-fit: contain; }
.login-brand-logo h2 { color: var(--sr-gold-300) !important; font-family: var(--sr-serif); letter-spacing: .12em; text-transform: uppercase; }
.login-brand-logo p { color: var(--sr-lavender-300) !important; }

/* Footer-like legal treatment if present */
footer, .footer {
  color: var(--sr-platinum-500);
  border-top: 1px solid rgba(200,164,90,.3);
}

/* Accessibility and responsive behavior */
:focus-visible { outline: 2px solid var(--sr-gold-300); outline-offset: 3px; }
@media (max-width: 900px) {
  .sidebar::before { width: 92px; height: 92px; }
  .topbar, .hero { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}


/* Phase 16.5.1 — Executive quick actions and status controls */
.sr-executive-hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.sr-executive-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.sr-luxury-action,
.sr-luxury-action-secondary {
  min-height: 44px;
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.sr-luxury-action {
  color: #0b0b0d !important;
  background: linear-gradient(135deg, #e0c27a 0%, #c8a45a 48%, #a67c32 100%) !important;
  border: 1px solid #e7cf93 !important;
  box-shadow: 0 10px 28px rgba(200, 164, 90, 0.2);
}

.sr-luxury-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 34px rgba(200, 164, 90, 0.3);
}

.sr-luxury-action-secondary {
  color: #ffffff !important;
  background: #141416 !important;
  border: 1px solid rgba(200, 164, 90, 0.75) !important;
}

.sr-luxury-panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.sr-luxury-panel-heading h3,
.sr-luxury-panel-heading p {
  margin-top: 0;
}

.sr-luxury-status-filter {
  display: grid;
  gap: 0.35rem;
  min-width: 210px;
  color: #d8d8dc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sr-luxury-status-filter select {
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 2.2rem 0.65rem 0.8rem;
  color: #ffffff;
  background-color: #111113;
  border: 1px solid rgba(200, 164, 90, 0.65);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sr-luxury-status-filter select:focus {
  outline: 2px solid rgba(141, 106, 200, 0.55);
  outline-offset: 2px;
  border-color: #c8a45a;
}

.sr-action-guidance {
  max-width: 220px;
  color: #d8d8dc !important;
}

tr[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .sr-executive-hero-actions,
  .sr-luxury-panel-heading {
    align-items: stretch;
  }

  .sr-executive-action-group,
  .sr-luxury-status-filter {
    width: 100%;
  }

  .sr-executive-action-group .btn {
    flex: 1 1 190px;
    text-align: center;
  }
}
