:root {
  --navy-900: #0b2545;
  --navy-800: #12385f;
  --navy-700: #19517f;
  --bg-100: #f4f8fc;
  --bg-200: #e6eef7;
  --text-900: #112030;
  --text-700: #3e556d;
  --text-500: #6f8398;
  --border: #d6e1ed;
  --orange-500: #f28c28;
  --orange-600: #d97819;
  --green-500: #1c9a6d;
  --green-600: #157e58;
  --red-500: #d94f4f;
  --shadow: 0 14px 26px rgba(11, 37, 69, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-900);
  background: radial-gradient(circle at 10% 0%, #ffffff 0%, #eef4fb 36%, #e8f1fa 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.main-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(110deg, var(--navy-900), var(--navy-700));
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 22, 42, 0.35);
}

.top-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: 0.3px;
}

.brand span {
  font-size: 0.73rem;
  opacity: 0.82;
}

.menu-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  display: none;
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.menu-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-link.active {
  color: var(--navy-900);
  background: #fff;
  box-shadow: 0 2px 14px rgba(255, 255, 255, 0.27);
  font-weight: 700;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-500);
  box-shadow: 0 0 0 6px rgba(242, 140, 40, 0.28);
}

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

.page-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--text-700);
  font-size: 0.9rem;
}

.date-chip {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text-700);
  font-size: 0.82rem;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(25, 81, 127, 0.1);
}

.metric-label {
  color: var(--text-700);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy-900);
  margin: 0;
}

.metric-delta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-500);
}

.metric-delta.positive {
  color: var(--green-600);
  font-weight: 700;
}

.metric-delta.negative {
  color: var(--red-500);
  font-weight: 700;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.card-link {
  color: var(--navy-700);
  font-size: 0.83rem;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
}

.data-table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.83rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 11px 10px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--text-500);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  font-weight: 800;
}

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

.data-table tbody tr:hover {
  background: #f7fbff;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.badge.open {
  background: #e7f0ff;
  color: #205a95;
}

.badge.pending {
  background: #fff3df;
  color: #9a6400;
}

.badge.confirmed {
  background: #def8ee;
  color: #0f724d;
}

.badge.intransit {
  background: #e7f4ff;
  color: #1d5f99;
}

.badge.done {
  background: #ebedf0;
  color: #475569;
}

.badge.cancelled {
  background: #fde8e8;
  color: #a63737;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn.primary:hover {
  background: var(--orange-600);
}

.btn.secondary {
  border-color: var(--border);
  background: #fff;
  color: var(--text-700);
}

.btn.secondary:hover {
  border-color: #c1d2e4;
  background: #f8fbff;
}

.btn.success {
  background: var(--green-500);
  color: #fff;
}

.btn.success:hover {
  background: var(--green-600);
}

.btn.ghost {
  color: var(--navy-700);
  background: #edf4ff;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
}

.activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--navy-700);
}

.activity-body p {
  margin: 0;
  font-size: 0.84rem;
}

.activity-body small {
  color: var(--text-500);
  font-size: 0.75rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--text-900);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: #8caed2;
  box-shadow: 0 0 0 3px rgba(25, 81, 127, 0.12);
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-700);
}

.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.toggle {
  background: #fff;
  border: 0;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-700);
}

.toggle.active {
  background: var(--navy-700);
  color: #fff;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #dce9f5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), #57c594);
  border-radius: inherit;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.timeline li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7d8ea;
  position: absolute;
  left: 0;
  top: 4px;
}

.timeline li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  bottom: -14px;
  width: 2px;
  background: #d5e1ee;
}

.timeline li:last-child::after {
  display: none;
}

.timeline li.active::before {
  background: var(--green-500);
}

.timeline li p {
  margin: 0;
  font-weight: 700;
}

.timeline li small {
  color: var(--text-500);
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px;
  font-size: 0.82rem;
}

.kv strong {
  color: var(--text-500);
}

.map-placeholder {
  min-height: 230px;
  border-radius: 14px;
  border: 1px dashed #b3c8de;
  background: repeating-linear-gradient(
    135deg,
    #f4f9ff,
    #f4f9ff 12px,
    #ecf3fb 12px,
    #ecf3fb 24px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-700);
  font-size: 0.85rem;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.84rem;
}

.stat-row:last-child {
  border-bottom: 0;
}

.footer-note {
  margin-top: 18px;
  font-size: 0.74rem;
  color: var(--text-500);
  text-align: right;
}

@media (max-width: 1200px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .top-nav-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu {
    width: 100%;
    display: none;
    padding-top: 4px;
  }

  .menu.open {
    display: flex;
    flex-wrap: wrap;
  }

  .user-panel {
    margin-left: auto;
  }

  .grid-cols-3,
  .grid-cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .main-shell {
    padding: 16px;
  }

  .top-nav-inner {
    padding: 12px 16px;
  }

  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .data-table {
    min-width: 680px;
  }
}

.public-hero {
  background: linear-gradient(125deg, #0f2d4f, #1a5f91);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 34px rgba(9, 27, 49, 0.3);
}

.public-hero h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

.public-hero p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.88);
  max-width: 780px;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.trust-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f2ff;
  color: var(--navy-800);
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.auth-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.auth-side {
  background: linear-gradient(145deg, #102c4a, #1a5988);
  color: #fff;
}

.auth-side h2 {
  margin: 0;
  font-size: 1.5rem;
}

.auth-side p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.9);
}

.auth-points {
  margin-top: 18px;
  padding-left: 16px;
}

.auth-points li {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
}

.doc-hero {
  background: linear-gradient(120deg, #0f2a48, #1b4f77);
  color: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.doc-hero h1 {
  margin: 0;
  font-size: 1.8rem;
}

.doc-hero p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.docs-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px 1fr;
}

.doc-nav {
  position: sticky;
  top: 86px;
}

.doc-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.83rem;
  color: var(--text-700);
}

.doc-nav a:hover {
  background: #edf4ff;
  color: var(--navy-800);
}

.code-block {
  margin: 0;
  border-radius: 12px;
  border: 1px solid #cdd9e8;
  background: #0f2236;
  color: #cde6ff;
  padding: 12px;
  font-size: 0.76rem;
  line-height: 1.55;
  overflow: auto;
}

.endpoint-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.endpoint-pill.get {
  background: #e5f6ec;
  color: #0f7a52;
}

.endpoint-pill.post {
  background: #e7f0ff;
  color: #1a5f98;
}

.endpoint-pill.patch {
  background: #fff1df;
  color: #9f5f00;
}

.kpi-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kpi-list li {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  font-size: 0.84rem;
}

.kpi-list li:last-child {
  border-bottom: 0;
}

@media (max-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .doc-nav {
    position: static;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .public-hero h1 {
    font-size: 1.6rem;
  }

  .feature-grid,
  .role-grid {
    grid-template-columns: 1fr;
  }
}
