:root {
  --cv-navy: #0f2c59;
  --cv-blue: #1b4f9c;
  --cv-accent: #f5a623;
  --cv-bg: #f4f6fb;
  --cv-sidebar: #0b1f40;
  --cv-card: #ffffff;
}
body {
  background: var(--cv-bg);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1c2434;
  overflow-x: hidden;
}
.app-shell {
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--cv-sidebar), #12305f);
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 1030;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar.show {
  transform: translateX(0);
}
@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0);
  }
}
.sidebar .brand {
  padding: 1.2rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar .brand h1 {
  font-size: 1rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: .02em;
}
.sidebar .brand small {
  opacity: .7;
}
.sidebar .brand .sidebar-close {
  display: none;
  width: 1.5rem;
  height: 1.5rem;
}
@media (max-width: 991.98px) {
  .sidebar .brand .sidebar-close {
    display: block;
  }
}
.sidebar a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  display: block;
  padding: .55rem 1.25rem;
  border-left: 3px solid transparent;
}
.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-left-color: var(--cv-accent);
}
.sidebar .nav-label {
  padding: .9rem 1.25rem .3rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .55;
}

/* Main Content */
.main {
  min-height: 100vh;
  width: 100%;
  margin-left: 0;
  transition: margin-left 0.3s ease;
}
@media (min-width: 992px) {
  .main {
    width: calc(100% - 250px);
    margin-left: 250px;
  }
}

/* Topbar */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e6ebf5;
  padding: .85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-menu {
  display: none;
}
@media (max-width: 991.98px) {
  .topbar-menu {
    display: block;
  }
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Page Content */
.page {
  padding: 1.25rem 1.5rem 2rem;
}

/* KPI Cards */
.kpi {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,44,89,.06);
}
.kpi .kpi-value {
  font-size: 1.7rem;
  font-weight: 700;
}
.kpi .kpi-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b778c;
}
.card-soft {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15,44,89,.06);
}

/* Priority Colors */
.priority-active {
  background: #e8f8ee;
  color: #176b38;
}
.priority-planning {
  background: #fff8db;
  color: #8a6d00;
}
.priority-due {
  background: #ffedd8;
  color: #b45309;
}
.priority-urgent {
  background: #fde8e8;
  color: #b42318;
}
.priority-expired {
  background: #eceff3;
  color: #111827;
}
.badge {
  font-weight: 600;
}
.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #5b6577;
}

/* Auth Pages */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0b1f40, #1b4f9c);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  border: 0;
  border-radius: 16px;
}
.section-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #5b6577;
  margin-bottom: .75rem;
}
.detail-grid dt {
  color: #6b778c;
  font-weight: 600;
  font-size: .82rem;
}
.detail-grid dd {
  margin-bottom: .7rem;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1020;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Document Upload Help Modal */
.modal-content {
  border-radius: 0.5rem;
}
.modal-header {
  border-bottom: 1px solid #e9ecef;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
}
.modal-body {
  font-size: 0.9rem;
}

/* Utility classes */
.min-w-100 {
  min-width: 100%;
}

/* Nowrap utility for table cells */
.nowrap th,
.nowrap td {
  white-space: nowrap !important;
}