/* ==========================================================================
   SANGAIA MASTER DESIGN SYSTEM
   Standardized layout, typography (Segoe WP), and ministerial theme engine.
   Strictly aligned with the user-defined One Live architecture.
   ========================================================================== */

:root {
  --primary: #d97706;
  --bg: #f3f3f3;
  --card-bg: #ffffff;
  --border: #e1dfdd;
  --border-dark: #cccccc;
  --text-main: #201f1e;
  --text-muted: #605e5c;
  --text-light: #8a8886;
  --accent-btn: #6e8494;
  --accent-btn-hover: #5d707e;
  --metro-blue: #002050;
  --font-family: 'Segoe WP', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* Windows Live / Metro Atmospheric Hero Defaults (Sky Blue -> White) */
  --hero-bg: #d7ecfa;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #96cdef 0%, #b3def6 18%, #cbe8f8 38%, #e2f2fc 65%, #f4fafd 86%, #ffffff 100%);
  --hero-title-color: #14405c;
  --hero-sub-color: #3f6579;
  --hero-brand-color: #14405c;
  --glow-color: rgba(0, 120, 212, 0.65);
  --glow-color-soft: rgba(0, 120, 212, 0.3);
}

/* --- Ministerial Theme Overrides --- */
body.theme-executive {
  --primary: #1e3a8a; /* Imperial Navy & Gold */
  --accent-btn: #1e3a8a;
  --accent-btn-hover: #172554;
  --hero-bg: #dbeafe;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #93b7eb 0%, #b2cef4 18%, #cbdffa 38%, #e2edfd 65%, #f3f7fe 86%, #ffffff 100%);
  --hero-title-color: #172554;
  --hero-sub-color: #334155;
  --hero-brand-color: #1e3a8a;
  --glow-color: rgba(30, 58, 138, 0.65);
  --glow-color-soft: rgba(30, 58, 138, 0.3);
}

body.theme-treasury {
  --primary: #0f766e; /* Slate & Emerald */
  --accent-btn: #0f766e;
  --accent-btn-hover: #115e59;
  --hero-bg: #ccfbf1;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #6ee7b7 0%, #99f6e4 18%, #bbf7ec 38%, #dcfbf5 65%, #f0fdfa 86%, #ffffff 100%);
  --hero-title-color: #115e59;
  --hero-sub-color: #285e61;
  --hero-brand-color: #0f766e;
  --glow-color: rgba(15, 118, 110, 0.65);
  --glow-color-soft: rgba(15, 118, 110, 0.3);
}

body.theme-work {
  --primary: #6b21a8; /* Industrial Purple */
  --accent-btn: #6b21a8;
  --accent-btn-hover: #581c87;
  --hero-bg: #f3e8ff;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #d8b4fe 0%, #e5ccff 18%, #eee0ff 38%, #f6efff 65%, #faf6ff 86%, #ffffff 100%);
  --hero-title-color: #581c87;
  --hero-sub-color: #6b21a8;
  --hero-brand-color: #581c87;
  --glow-color: rgba(107, 33, 168, 0.65);
  --glow-color-soft: rgba(107, 33, 168, 0.3);
}

body.theme-healthcare {
  --primary: #b91c1c; /* Clinical Crimson */
  --accent-btn: #b91c1c;
  --accent-btn-hover: #991b1b;
  --hero-bg: #ffe4e6;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #fda4af 0%, #fecdd3 18%, #fedfe3 38%, #ffeef0 65%, #fff7f8 86%, #ffffff 100%);
  --hero-title-color: #991b1b;
  --hero-sub-color: #881337;
  --hero-brand-color: #991b1b;
  --glow-color: rgba(185, 28, 28, 0.65);
  --glow-color-soft: rgba(185, 28, 28, 0.3);
}

body.theme-education {
  --primary: #d97706; /* Scholarly Gold / Amber */
  --accent-btn: #d97706;
  --accent-btn-hover: #b45309;
  --hero-bg: #fef08a;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #fef08a 0%, #fef9c3 18%, #fefce8 38%, #fffbeb 65%, #fffdf5 86%, #ffffff 100%);
  --hero-title-color: #713f12;
  --hero-sub-color: #854d0e;
  --hero-brand-color: #713f12;
  --glow-color: rgba(217, 119, 6, 0.65);
  --glow-color-soft: rgba(217, 119, 6, 0.3);
}

body.theme-domestic {
  --primary: #1e293b; /* Deep Navy Blue */
  --accent-btn: #334155;
  --accent-btn-hover: #0f172a;
  --hero-bg: #e2e8f0;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #94a3b8 0%, #b6c2d1 18%, #cbd5e1 38%, #e2e8f0 65%, #f1f5f9 86%, #ffffff 100%);
  --hero-title-color: #0f172a;
  --hero-sub-color: #334155;
  --hero-brand-color: #1e293b;
  --glow-color: rgba(30, 41, 59, 0.65);
  --glow-color-soft: rgba(30, 41, 59, 0.3);
}

body.theme-external {
  --primary: #db2777; /* Diplomatic Rose / Pink */
  --accent-btn: #db2777;
  --accent-btn-hover: #be185d;
  --hero-bg: #fce7f3;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #f472b6 0%, #f9a0ce 18%, #fbcfe8 38%, #fce4f2 65%, #fdf2f8 86%, #ffffff 100%);
  --hero-title-color: #831843;
  --hero-sub-color: #9d174d;
  --hero-brand-color: #9d174d;
  --glow-color: rgba(219, 39, 119, 0.65);
  --glow-color-soft: rgba(219, 39, 119, 0.3);
}

body.theme-environment {
  --primary: #15803d; /* Forest Green */
  --accent-btn: #15803d;
  --accent-btn-hover: #166534;
  --hero-bg: #dcfce7;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #86efac 0%, #aaf2c3 18%, #c7f7d7 38%, #e1fbe9 65%, #f2fdf6 86%, #ffffff 100%);
  --hero-title-color: #14532d;
  --hero-sub-color: #15803d;
  --hero-brand-color: #14532d;
  --glow-color: rgba(21, 128, 61, 0.65);
  --glow-color-soft: rgba(21, 128, 61, 0.3);
}

body.theme-propaganda {
  --primary: #ea580c; /* Vibrant Orange */
  --accent-btn: #ea580c;
  --accent-btn-hover: #c2410c;
  --hero-bg: #ffedd5;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #fdba74 0%, #fecd99 18%, #fedebb 38%, #ffeedd 65%, #fff7ef 86%, #ffffff 100%);
  --hero-title-color: #7c2d12;
  --hero-sub-color: #c2410c;
  --hero-brand-color: #7c2d12;
  --glow-color: rgba(234, 88, 12, 0.65);
  --glow-color-soft: rgba(234, 88, 12, 0.3);
}

body.theme-federal,
body.theme-default {
  --primary: #0078d4; /* Sovereign Windows Live Blue */
  --accent-btn: #6e8494;
  --accent-btn-hover: #5d707e;
  --hero-bg: #d7ecfa;
  --hero-gradient: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%), linear-gradient(180deg, #96cdef 0%, #b3def6 18%, #cbe8f8 38%, #e2f2fc 65%, #f4fafd 86%, #ffffff 100%);
  --hero-title-color: #14405c;
  --hero-sub-color: #3f6579;
  --hero-brand-color: #14405c;
  --glow-color: rgba(0, 120, 212, 0.65);
  --glow-color-soft: rgba(0, 120, 212, 0.3);
}

/* ==========================================================================
   METRO UI ICON & COLOR UTILITIES
   Aligned with Metro UI Font & Colors (v4.metroui.org.ua/colors.html)
   ========================================================================== */

[class*="mif-"] {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.fg-cyan { color: #1ba1e2 !important; }
.fg-teal { color: #00aba9 !important; }
.fg-emerald { color: #008a00 !important; }
.fg-green { color: #60a917 !important; }
.fg-forest { color: #15803d !important; }
.fg-lime { color: #a4c400 !important; }
.fg-yellow { color: #e3c800 !important; }
.fg-amber { color: #f0a30a !important; }
.fg-orange { color: #fa6800 !important; }
.fg-red { color: #e51400 !important; }
.fg-crimson { color: #b91c1c !important; }
.fg-magenta { color: #d80073 !important; }
.fg-pink { color: #db2777 !important; }
.fg-purple { color: #6b21a8 !important; }
.fg-violet { color: #aa00ff !important; }
.fg-indigo { color: #1e293b !important; }
.fg-blue { color: #0078d4 !important; }
.fg-cobalt { color: #0050ef !important; }
.fg-navy { color: #1e3a8a !important; }
.fg-steel { color: #647687 !important; }
.fg-mauve { color: #76608a !important; }
.fg-taupe { color: #87794e !important; }
.fg-brown { color: #825a2c !important; }
.fg-gray { color: #605e5c !important; }
.fg-dark { color: #201f1e !important; }
.fg-white { color: #ffffff !important; }
.fg-primary { color: var(--primary) !important; }

/* Global Reset */
html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 16px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.4;
  min-height: 100vh;
  position: relative;
  padding-bottom: 48px; /* space for docked messages */
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Top Hero Header
   ========================================================================== */
.hero-header {
  position: relative;
  z-index: 100;
  background-color: var(--hero-bg, #d7ecfa);
  background-image: var(--hero-gradient, linear-gradient(180deg, #96cdef 0%, #b3def6 18%, #cbe8f8 38%, #e2f2fc 65%, #f4fafd 86%, #ffffff 100%));
  background-repeat: no-repeat;
  background-position: top center;
  color: var(--text-main);
  padding: 16px 36px 24px 36px;
  border-bottom: none;
}

body.theme-federal .hero-header,
body.theme-default .hero-header {
  background-color: #d7ecfa;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #96cdef 0%, #b3def6 18%, #cbe8f8 38%, #e2f2fc 65%, #f4fafd 86%, #ffffff 100%);
}

body.theme-executive .hero-header {
  background-color: #dbeafe;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #93b7eb 0%, #b2cef4 18%, #cbdffa 38%, #e2edfd 65%, #f3f7fe 86%, #ffffff 100%);
}

body.theme-treasury .hero-header {
  background-color: #ccfbf1;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #6ee7b7 0%, #99f6e4 18%, #bbf7ec 38%, #dcfbf5 65%, #f0fdfa 86%, #ffffff 100%);
}

body.theme-work .hero-header {
  background-color: #f3e8ff;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #d8b4fe 0%, #e5ccff 18%, #eee0ff 38%, #f6efff 65%, #faf6ff 86%, #ffffff 100%);
}

body.theme-healthcare .hero-header {
  background-color: #ffe4e6;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #fda4af 0%, #fecdd3 18%, #fedfe3 38%, #ffeef0 65%, #fff7f8 86%, #ffffff 100%);
}

body.theme-education .hero-header {
  background-color: #fef08a;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #fef08a 0%, #fef9c3 18%, #fefce8 38%, #fffbeb 65%, #fffdf5 86%, #ffffff 100%);
}

body.theme-domestic .hero-header {
  background-color: #e2e8f0;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #94a3b8 0%, #b6c2d1 18%, #cbd5e1 38%, #e2e8f0 65%, #f1f5f9 86%, #ffffff 100%);
}

body.theme-external .hero-header {
  background-color: #fce7f3;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #f472b6 0%, #f9a0ce 18%, #fbcfe8 38%, #fce4f2 65%, #fdf2f8 86%, #ffffff 100%);
}

body.theme-environment .hero-header {
  background-color: #dcfce7;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #86efac 0%, #aaf2c3 18%, #c7f7d7 38%, #e1fbe9 65%, #f2fdf6 86%, #ffffff 100%);
}

body.theme-propaganda .hero-header {
  background-color: #ffedd5;
  background-image: radial-gradient(ellipse at 42% 120%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
                    linear-gradient(180deg, #fdba74 0%, #fecd99 18%, #fedebb 38%, #ffeedd 65%, #fff7ef 86%, #ffffff 100%);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.brand a, .brand span {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand a {
  position: relative;
  padding: 0;
  color: var(--primary);
  background: linear-gradient(
    110deg,
    var(--primary) 0%,
    var(--primary) 35%,
    #ffffff 50%,
    var(--primary) 65%,
    var(--primary) 100%
  );
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand a:hover {
  text-decoration: none;
  animation: brandShine 0.5s ease-out forwards;
}

@keyframes brandShine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

.brand [class*="mif-"] {
  font-size: 18px;
  display: inline-block;
  line-height: 1;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 6px !important;
}

.search-box {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: width 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.search-box input {
  border: none;
  outline: none;
  padding: 6px 10px;
  font-size: 12.5px;
  width: auto;
  min-width: 50px;
  max-width: 380px;
  field-sizing: content;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
  transition: width 0.12s ease;
}

.search-box button {
  background: transparent;
  border: none;
  padding: 6px 10px;
  color: #605e5c;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.search-box button:hover {
  background: #f0f0f0;
  color: var(--primary);
}

.top-icons {
  display: none !important;
}

.top-icons span {
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.top-icons span:hover {
  opacity: 1;
  color: var(--primary);
}

.user-profile-btn,
.user-profile-menu {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 2px;
  color: var(--hero-brand-color, #14405c);
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.user-profile-btn:hover,
.user-profile-menu:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.user-profile-btn .mif-user,
.user-profile-menu .mif-user {
  color: var(--primary) !important;
  font-size: 14px;
}

.user-profile-menu .mif-arrow-drop-down {
  color: var(--hero-sub-color, #4b6b82);
  font-size: 14px;
  transition: transform 0.2s ease, color 0.15s ease;
}

.user-profile-menu.open .mif-arrow-drop-down {
  transform: rotate(180deg);
  color: var(--primary);
}

.user-profile-btn.authenticated {
  padding: 4px 10px 4px 6px;
  gap: 8px;
}

.user-profile-btn img,
.user-profile-menu img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  object-fit: cover;
  background: #ffffff;
  display: block;
}

.user-profile-menu .user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  border-radius: 2px;
  width: 210px;
  z-index: 10000;
  padding: 6px 0;
}

.user-profile-menu.open .user-dropdown,
.user-profile-menu:focus-within .user-dropdown {
  display: block;
}

.user-profile-menu .user-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.user-dropdown .user-dropdown-header {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: lowercase;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.user-dropdown a {
  display: block;
  padding: 6px 14px;
  color: var(--text-main);
  font-size: 13px;
  text-decoration: none;
}

.user-dropdown a:hover {
  background: #f0f0f0;
  color: var(--primary);
  text-decoration: none;
}

.hero-content h1 {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  color: var(--hero-title-color, #14405c);
}

.hero-content p {
  font-size: 13.5px;
  color: var(--hero-sub-color, #3f6579);
  margin-bottom: 4px;
}

.hero-breadcrumbs {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  font-style: normal;
  color: var(--hero-sub-color, #3f6579);
}

.hero-breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  transition: text-decoration 0.15s ease;
}

.hero-breadcrumbs a:hover {
  text-decoration: underline;
}

.hero-breadcrumbs .bc-sep {
  opacity: 0.6;
  font-size: 11px;
  user-select: none;
  color: var(--hero-sub-color, #3f6579);
}

/* ==========================================================================
   Sub-Navigation Bar
   ========================================================================== */
.subnav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 36px;
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.subnav a {
  color: var(--text-main);
  padding: 12px 2px;
  font-size: 13.5px;
  text-decoration: none;
  display: inline-block;
  position: relative;
  white-space: nowrap;
}

.subnav a.active {
  font-weight: 600;
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
}

.subnav a:hover:not(.active) {
  color: var(--primary);
}

/* ==========================================================================
   Main Content Grid
   ========================================================================== */
.main-wrapper {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.left-col {
  display: flex;
  flex-direction: column;
}

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

/* Standard Card */
.card,
.ol-card,
section.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.card h2,
.ol-card h2,
section.card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary);
}

.card h3,
.ol-card h3,
section.card h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card h4,
.ol-card h4,
section.card h4 {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 12px 0 8px 0;
}

/* ==========================================================================
   Sovereign Portals, Registries & Document Dockets
   ========================================================================== */
.sovereign-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 16px;
}

.docket-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 2px;
  margin-bottom: 10px;
}

.docket-entry:last-child {
  margin-bottom: 0;
}

.docket-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.docket-entry-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.docket-entry-title:hover {
  text-decoration: underline;
}

.docket-entry-body {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.45;
}

.docket-entry-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.ol-proclamation-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  border-radius: 2px;
}

/* ==========================================================================
   Universal Component Utilities (Tables, Forms, Modals, Badges, Metrics)
   ========================================================================== */

/* Badges */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

.badge-primary { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-neutral { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(0.92);
  text-decoration: none;
}

.btn-secondary {
  background: var(--accent-btn);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--accent-btn-hover);
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  border-color: var(--border-dark);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f7f7f7;
  text-decoration: none;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
}

/* Data Tables */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  padding: 8px 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.data-table td {
  border-bottom: 1px solid #f1f5f9;
  padding: 8px 10px;
  color: var(--text-main);
}

.data-table tr:hover td {
  background: #fbfcfd;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-dark);
  border-radius: 2px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text-main);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}

/* Department Tool Cards */
.dept-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff;
  transition: box-shadow 0.15s ease;
}

.dept-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dept-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.dept-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.dept-mandate {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.45;
}

.dept-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dept-tool-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dept-tool-item h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: var(--text-main);
}

.dept-tool-item p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  flex: 1;
}

/* Metric / Telemetry Cards */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.metric-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px;
  text-align: center;
}

.metric-box .metric-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.metric-box .metric-lbl {
  font-size: 11px;
  text-transform: lowercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Quick Nav Sidebar List */
.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-list a {
  display: block;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-main);
  border-radius: 2px;
  text-decoration: none;
}

.sidebar-nav-list a:hover {
  background: #f0f0f0;
  color: var(--primary);
}

.sidebar-nav-list a.active {
  background: #eef5fc;
  font-weight: 600;
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

/* Modal Dialog System */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  background: #ffffff;
  border-radius: 3px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-dark);
}

.modal-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
}

.modal-close:hover {
  color: #000;
}

.modal-body {
  padding: 18px;
}

.modal-footer {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-result-box {
  display: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 2px;
  padding: 12px;
  margin-top: 14px;
  font-size: 12.5px;
}

.modal-result-box.active {
  display: block;
}

/* Audio Player Widget (Ministry of Propaganda) */
.radio-player-card {
  background: #1c1917;
  color: #fff;
  border-radius: 2px;
  padding: 16px;
  margin-bottom: 16px;
}

.radio-player-card h3 {
  color: #fb923c;
}

.radio-stream-btn {
  background: #ea580c;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radio-stream-btn:hover {
  background: #c2410c;
}

/* Compatibility Aliases for components */
.ol-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px; }
.ol-modal-overlay.active { display: flex; }
.ol-modal-dialog { background: #fff; border-radius: 3px; width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 25px rgba(0,0,0,0.25); border: 1px solid var(--border-dark); }
.ol-modal-head { padding: 14px 18px; background: #f8fafc; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.ol-modal-title { font-size: 16px; font-weight: 600; color: var(--text-main); }
.ol-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #888; }
.ol-modal-close:hover { color: #000; }
.ol-modal-foot { padding: 12px 18px; background: #f8fafc; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.ol-input, .ol-select, .ol-textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--border-dark); border-radius: 2px; font-size: 13px; font-family: inherit; background: #fff; color: var(--text-main); outline: none; box-sizing: border-box; }
.ol-input:focus, .ol-select:focus, .ol-textarea:focus { border-color: var(--primary); }
.ol-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; font-size: 13px; font-weight: 500; border-radius: 2px; cursor: pointer; border: 1px solid var(--border-dark); background: #fff; color: var(--text-main); font-family: inherit; text-decoration: none; }
.ol-btn:hover { background: #f7f7f7; text-decoration: none; }
.ol-btn-primary { background: var(--primary); color: #fff; border-color: transparent; }
.ol-btn-primary:hover { filter: brightness(0.92); color: #fff; }
.ol-btn-sm { padding: 4px 8px; font-size: 11.5px; }
.ol-badge-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 2px; text-transform: lowercase; letter-spacing: 0.3px; background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.ol-badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.ol-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ol-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ol-note { background: #f8fafc; border-left: 3px solid var(--primary); padding: 8px 12px; font-size: 12.5px; color: var(--text-muted); }
.ol-sidebox { background: var(--card-bg); border: 1px solid var(--border); border-radius: 2px; padding: 14px; margin-bottom: 14px; }
.ol-sidebox h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ol-status-bubble { background: #f8fafc; border: 1px solid var(--border); border-left: 4px solid var(--primary); padding: 12px 16px; margin-bottom: 16px; font-size: 13px; border-radius: 2px; }
.ol-status-date { font-style: normal; font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.ol-card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; color: var(--primary); }
.ol-title-link { font-size: 12px; font-weight: 500; }
.ol-small { font-size: 12px; }
.ol-muted { color: var(--text-muted); }
.ol-mt-10 { margin-top: 10px; }
.modal-telemetry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.telemetry-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 2px; padding: 8px; text-align: center; }
.telemetry-name { font-size: 11px; color: var(--text-muted); text-transform: lowercase; font-weight: 600; }
.telemetry-val { font-size: 18px; font-weight: 700; color: var(--primary); margin: 2px 0; }
.telemetry-sub { font-size: 11px; color: var(--text-light); }
.modal-results-box { display: none; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 2px; padding: 12px; margin: 12px 18px; font-size: 12.5px; }
.modal-results-box.active { display: block; }
#modal-dynamic-fields { padding: 14px 18px; }

/* Responsive adjustments */
@media (max-width: 800px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .subnav {
    overflow-x: auto;
  }
  .hero-header {
    padding: 16px 20px 20px 20px;
  }
}

/* ==========================================================================
   Dedicated Uncluttered Sign In Page Layout (.auth-page-wrapper)
   ========================================================================== */
.auth-page-wrapper {
  max-width: 440px;
  width: 100%;
  margin: 36px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.auth-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e1dfdd);
  border-radius: 2px;
  padding: 28px 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.auth-card-head h2 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.3px;
  color: var(--text-main, #201f1e);
  margin-bottom: 6px;
}

.auth-card-head p {
  font-size: 13px;
  color: var(--text-muted, #605e5c);
  margin-bottom: 18px;
  line-height: 1.45;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border, #e1dfdd);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted, #605e5c);
  cursor: pointer;
  text-transform: lowercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.auth-tab.active {
  color: var(--primary, #0078d4);
  border-bottom-color: var(--primary, #0078d4);
  font-weight: 600;
}

.auth-card-footer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e1dfdd);
  font-size: 11.5px;
  color: var(--text-light, #8a8886);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* ==========================================================================
   Metro All-Lowercase Typography for Headings, Titles & Navigation
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.brand a,
.brand span,
.hero-content h1,
.hero-breadcrumbs a,
.subnav a,
.sidebar h3,
.sidebar h4,
.card h1,
.card h2,
.card h3,
.card h4,
.ol-card-title,
.ol-card-title span,
.sovereign-card h3,
.docket-entry-title,
.docket-entry-header strong,
.sidebar-nav-list a,
.side-nav-item,
.side-nav-group-title,
.side-nav-heading,
.side-nav-group a,
.ol-title-link,
.dept-title,
.dept-tool-item h4,
.data-table th,
.ol-table th,
th,
.badge,
.ol-badge-tag,
.btn,
.ol-btn,
button,
.telemetry-name,
.metric-lbl,
.user-dropdown a,
.user-dropdown-header,
.ol-proclamation-card div:first-child {
  text-transform: lowercase;
}

.ol-card-title .ol-badge-tag, .docket-entry-header .ol-badge-tag { display: none !important; }
