:root {
  --ovb-blue: #003366;
  --ovb-blue-medium: #336699;
  --ovb-blue-light: #6699cc;
  --white: #ffffff;
  --light-grey: #e5e5e5;
  --lettering-white: #f2f2f2;
  --black: #111111;
  --teal: #009999;
  --ocean: #006666;
  --hot-pink: #ff3399;
  --berry: #cc0066;
  --orchid: #9966cc;
  --border: 2px solid var(--light-grey);
  --sidebar-width: 288px;
  --topbar-height: 92px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family: "Segoe UI", "Segoe UI Variable", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  touch-action: manipulation;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  border-right: var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
}

.brand {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 28px;
  color: var(--ovb-blue);
  text-decoration: none;
  border-bottom: var(--border);
}

.brand-logo {
  width: auto;
  height: 78px;
  display: block;
}

.tenant-switch {
  padding: 20px 28px;
  border-bottom: var(--border);
}

label,
.label {
  display: block;
  margin-bottom: 6px;
  color: var(--ovb-blue-medium);
  font-size: .75rem;
  font-weight: 600;
}

select,
input,
textarea {
  width: 100%;
  border: 2px solid var(--light-grey);
  background: var(--white);
  color: var(--black);
  padding: .45rem .75rem;
  min-height: 42px;
  border-radius: 0;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--ovb-blue-light);
  outline-offset: 2px;
}

.nav-list {
  padding: 18px 0;
  display: grid;
  gap: 2px;
}

.nav-list a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  color: var(--ovb-blue);
  text-decoration: none;
  border-left: 6px solid transparent;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--ocean);
  border-left-color: var(--teal);
  background: var(--lettering-white);
}

.icon {
  font-family: "Segoe UI Symbol", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1;
  color: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 24px 28px;
  color: var(--ovb-blue-medium);
  border-top: var(--border);
  display: grid;
  gap: 3px;
  font-size: .8rem;
}

.main-area {
  min-width: 0;
  background: var(--white);
}

.topbar {
  min-height: var(--topbar-height);
  border-bottom: 2px solid var(--ovb-blue-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topline {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--ovb-blue);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0;
}

h2 {
  color: var(--ovb-blue);
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

h3 {
  color: var(--ovb-blue);
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

button,
.button {
  border-radius: 0;
  min-height: 42px;
  padding: .45rem 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.primary {
  background: var(--ovb-blue);
  color: var(--white);
  border-color: var(--ovb-blue);
}

.primary:hover { background: var(--ocean); border-color: var(--ocean); }

.secondary {
  background: var(--white);
  color: var(--ovb-blue);
  border-color: var(--ovb-blue);
}

.secondary:hover { color: var(--ocean); border-color: var(--ocean); }

.tertiary {
  background: transparent;
  color: var(--ovb-blue);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tertiary:hover { color: var(--ocean); }

.icon-button {
  width: 44px;
  padding: 0;
  background: var(--white);
  color: var(--ovb-blue);
  border-color: var(--light-grey);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ovb-blue);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.content {
  padding: 32px;
  display: grid;
  gap: 28px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  min-height: 260px;
  background: var(--ovb-blue);
  color: var(--white);
}

.hero-copy {
  padding: 34px;
  align-self: end;
}

.hero-copy h2,
.hero-copy p {
  color: var(--white);
}

.hero-copy h2 {
  font-size: 2.25rem;
  margin-bottom: 12px;
}

.hero-metrics {
  background: var(--lettering-white);
  color: var(--black);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  align-content: center;
}

.metric-tile {
  background: var(--white);
  border: var(--border);
  padding: 18px;
  min-height: 112px;
}

.metric-tile strong {
  display: block;
  color: var(--ovb-blue);
  font-size: 1.8rem;
  line-height: 1.1;
}

.metric-tile span {
  color: var(--ovb-blue-medium);
  font-size: .85rem;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel {
  border: var(--border);
  background: var(--white);
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--ovb-blue-medium);
}
.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.status-row,
.timeline-row,
.approval-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 0;
  border-top: 2px solid var(--light-grey);
}

.status-row:first-child,
.timeline-row:first-child,
.approval-row:first-child {
  border-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 9px;
  border: 2px solid currentColor;
  color: var(--ovb-blue);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.teal { color: var(--ocean); }
.badge.pink { color: var(--berry); }
.badge.grey { color: var(--ovb-blue-medium); }

.table-wrap {
  overflow-x: auto;
  border: var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: var(--white);
}

th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 2px solid var(--light-grey);
  vertical-align: top;
}

th {
  color: var(--ovb-blue);
  background: var(--lettering-white);
  font-weight: 700;
}

tr:last-child td { border-bottom: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.segment-list {
  display: grid;
  gap: 12px;
}

.segment-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: var(--border);
}

.segment-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
}

.rule-card {
  border-left: 8px solid var(--teal);
}

.rule-card.warning { border-left-color: var(--hot-pink); }

.split-workspace {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.progress-track {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.progress-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.progress-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ovb-blue);
}

.progress-step.pending .progress-dot { background: var(--light-grey); color: var(--ovb-blue); }
.progress-step.current .progress-dot { background: var(--teal); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 51, 102, .42);
  z-index: 20;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100vh;
  background: var(--white);
  border-left: 2px solid var(--ovb-blue);
  z-index: 21;
  transform: translateX(100%);
  transition: transform 160ms ease-out;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  min-height: 92px;
  border-bottom: var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.drawer-body {
  padding: 24px;
  overflow: auto;
  display: grid;
  gap: 20px;
}

.mobile-tabs {
  display: none;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 92px minmax(0, 1fr); }
  .sidebar { width: 92px; }
  .brand { justify-content: center; padding: 22px 12px; }
  .brand-logo { width: auto; height: 52px; }
  
  .tenant-switch,
  .nav-list span:not(.icon),
  .sidebar-footer { display: none; }
  .nav-list a { justify-content: center; padding: 0; border-left-width: 0; border-right: 6px solid transparent; }
  .nav-list a.active { border-right-color: var(--teal); }
  .hero-band,
  .split-workspace { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; background: var(--white); }
  .login-brand { background: var(--ovb-blue); padding: 32px 24px; }
  .login-panel { margin: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .identity-grid, .identity-grid.stacked { grid-template-columns: 1fr; }
  .app-shell { display: block; padding-bottom: 72px; }
  .sidebar { display: none; }
  .topbar { position: static; align-items: stretch; flex-direction: column; padding: 20px; }
  .top-actions { justify-content: flex-start; }
  .role-switch { min-width: 100%; }
  .content { padding: 20px; }
  .hero-copy { padding: 24px; }
  .hero-copy h2 { font-size: 1.7rem; }
  .hero-metrics,
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid { grid-template-columns: 1fr; }
  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    border-top: var(--border);
    z-index: 10;
  }
  .mobile-tabs a {
    min-height: 68px;
    display: grid;
    place-items: center;
    color: var(--ovb-blue);
    text-decoration: none;
  }
}

/* Offline fallback for icon-only glyphs. The CD prefers Material Icons Sharp; in this prototype we avoid external font loading. */
.icon {
  font-size: 0;
  width: 22px;
  height: 22px;
  position: relative;
  flex: 0 0 22px;
}

.icon::before,
.icon::after {
  content: "";
  position: absolute;
  display: block;
}

.icon::before {
  inset: 3px;
  border: 2px solid currentColor;
}

.icon::after {
  width: 8px;
  height: 2px;
  background: currentColor;
  left: 7px;
  top: 10px;
}




.role-switch {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.role-switch label {
  margin: 0;
  font-size: .68rem;
}

.role-switch select {
  min-height: 38px;
  padding: .35rem .65rem;
  border-color: var(--ovb-blue);
}

.role-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 22px;
  align-items: start;
  border: 2px solid var(--ovb-blue-light);
  border-left: 8px solid var(--teal);
  background: linear-gradient(135deg, var(--white), var(--lettering-white));
  padding: 20px 22px;
}

.role-banner h2 {
  margin-bottom: 6px;
}

.role-banner p:last-child {
  margin-bottom: 0;
}

.role-permissions {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.role-permissions ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ovb-blue);
}

.role-permissions li + li {
  margin-top: 4px;
}
/* Final responsive role overrides */
@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; background: var(--white); }
  .login-brand { background: var(--ovb-blue); padding: 32px 24px; }
  .login-panel { margin: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .identity-grid, .identity-grid.stacked { grid-template-columns: 1fr; }
  .role-banner {
    grid-template-columns: 1fr;
  }
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  background: linear-gradient(135deg, var(--ovb-blue) 0%, var(--ovb-blue) 54%, var(--lettering-white) 54%, var(--white) 100%);
}

.login-brand {
  color: var(--white);
  padding: clamp(36px, 7vw, 92px);
  align-self: end;
}

.login-brand h1 {
  color: var(--white);
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.login-brand p {
  color: var(--white);
  max-width: 640px;
  font-size: 1.1rem;
}

.login-signal {
  margin-top: 34px;
  max-width: 560px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 2px solid rgba(255,255,255,.55);
  padding: 18px;
}

.login-signal strong {
  color: var(--white);
  text-transform: uppercase;
}

.login-panel {
  align-self: center;
  margin: 32px;
  padding: 32px;
  background: var(--white);
  border: 2px solid var(--ovb-blue);
  box-shadow: 18px 18px 0 rgba(0, 51, 102, .12);
  display: grid;
  gap: 14px;
}

.demo-users {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.demo-user-card {
  min-height: auto;
  justify-content: start;
  text-align: left;
  border-color: var(--light-grey);
  background: var(--lettering-white);
  color: var(--black);
  padding: 12px;
}

.demo-user-card:hover {
  border-color: var(--teal);
  background: var(--white);
}

.login-note {
  color: var(--ovb-blue-medium);
  font-size: .85rem;
  margin-bottom: 0;
}

.avatar.mini {
  width: 34px;
  height: 34px;
  font-size: .75rem;
}

.avatar.large {
  width: 68px;
  height: 68px;
  font-size: 1.2rem;
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: var(--border);
}

.identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.identity-grid.stacked {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.identity-grid span {
  border: var(--border);
  padding: 10px 12px;
  background: var(--lettering-white);
}

.identity-grid strong {
  display: block;
  color: var(--ovb-blue-medium);
  font-size: .72rem;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.role-banner .identity-grid {
  align-content: start;
}