:root {
  --bg: #f5f1e8;
  --bg-secondary: #fffaf2;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text-main: #1f2937;
  --text-soft: #6b7280;
  --line: rgba(31, 41, 55, 0.08);
  --highlight: #c96c31;
  --highlight-dark: #9f4f1f;
  --navy: #19486a;
  --teal: #2c8c82;
  --gold: #d7a437;
  --shadow: 0 24px 60px rgba(79, 52, 27, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(201, 108, 49, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(25, 72, 106, 0.18), transparent 30%),
    linear-gradient(180deg, #fcf8f2 0%, #f2ebe1 100%);
  min-height: 100vh;
}

.app-backdrop {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
}

.layout-shell {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}

.sidebar {
  width: 310px;
  min-height: calc(100vh - 3rem);
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(15, 32, 45, 0.96), rgba(31, 50, 63, 0.9));
  color: #fdf6ee;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  position: sticky;
  top: 1.5rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f0b66f, #c96c31);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.brand-title,
.page-title,
.hero-title,
.section-head h3,
.panel-card h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.76;
}

.panel-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: 0 16px 34px rgba(91, 71, 52, 0.08);
}

.sidebar .panel-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.workflow-rail {
  display: grid;
  gap: 0.75rem;
}

.workflow-rail span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
}

.workflow-rail span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f0b66f, #c96c31);
  box-shadow: 0 0 0 6px rgba(240, 182, 111, 0.12);
}

.app-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  color: inherit;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.app-nav .nav-link.active,
.app-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.14);
}

.quick-note p {
  color: rgba(255, 255, 255, 0.78);
}

.btn-highlight {
  background: linear-gradient(135deg, var(--highlight), #e08942);
  border: none;
  color: #fff;
  border-radius: 14px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
  box-shadow: 0 14px 24px rgba(201, 108, 49, 0.25);
}

.btn-highlight:hover,
.btn-highlight:focus {
  background: linear-gradient(135deg, var(--highlight-dark), var(--highlight));
  color: #fff;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(91, 71, 52, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 320px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.search-pill .form-control {
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(25, 72, 106, 0.1);
  color: var(--navy);
  font-weight: 700;
}

.app-section {
  display: none;
  animation: fadeSection 0.35s ease;
}

.app-section.is-visible {
  display: block;
}

@keyframes fadeSection {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.75rem;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(240, 182, 111, 0.32), transparent 24%),
    linear-gradient(135deg, rgba(16, 41, 57, 0.96), rgba(25, 72, 106, 0.9));
  color: #fef9f2;
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  bottom: -90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  max-width: 12ch;
}

.hero-copy {
  max-width: 56ch;
  color: rgba(254, 249, 242, 0.78);
}

.hero-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.metric-tile {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.metric-tile span,
.metric-tile small {
  display: block;
}

.metric-tile strong {
  display: block;
  margin: 0.3rem 0;
  font-size: 2rem;
  line-height: 1;
}

.accent-orange strong { color: #ffcf99; }
.accent-teal strong { color: #99f6e4; }
.accent-blue strong { color: #b8dbff; }
.accent-gold strong { color: #ffe49b; }

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 100%;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(201, 108, 49, 0.18), rgba(25, 72, 106, 0.16));
  color: var(--navy);
  font-size: 1.3rem;
}

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

.pipeline-step {
  padding: 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.step-number {
  font-weight: 800;
  color: var(--highlight);
  margin-bottom: 0.75rem;
}

.alert-feed {
  display: grid;
  gap: 1rem;
}

.alert-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.alert-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.dot-red { background: #dc3545; }
.dot-gold { background: #d7a437; }
.dot-blue { background: #0d6efd; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.filter-pill {
  background: rgba(25, 72, 106, 0.08);
  color: var(--navy);
  padding: 0.7rem 1rem;
  font-weight: 700;
}

.filter-pill.active {
  background: rgba(201, 108, 49, 0.14);
  color: var(--highlight-dark);
}

.form-control,
.form-select,
.accordion-button {
  border-radius: 14px;
}

.form-control,
.form-select {
  border-color: rgba(31, 41, 55, 0.12);
  padding: 0.82rem 0.95rem;
}

.form-control:focus,
.form-select:focus,
.accordion-button:focus {
  border-color: rgba(201, 108, 49, 0.4);
  box-shadow: 0 0 0 0.2rem rgba(201, 108, 49, 0.14);
}

.app-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  margin-bottom: 0;
}

.app-table th {
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  padding-bottom: 1rem;
}

.app-table td,
.app-table th {
  border-color: rgba(31, 41, 55, 0.08);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.timeline-board {
  display: grid;
  gap: 1rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.timeline-meta p {
  margin: 0;
  color: var(--text-soft);
}

.timeline-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: center;
}

.stage {
  padding: 0.75rem 0.55rem;
  border-radius: 14px;
  text-align: center;
  font-size: 0.83rem;
  font-weight: 700;
  background: rgba(25, 72, 106, 0.06);
  color: var(--text-soft);
}

.stage.completed {
  background: rgba(44, 140, 130, 0.14);
  color: #16645d;
}

.stage.active {
  background: rgba(201, 108, 49, 0.16);
  color: var(--highlight-dark);
}

.progress {
  height: 0.7rem;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.08);
}

.task-stack {
  display: grid;
  gap: 0.8rem;
}

.task-pill {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(25, 72, 106, 0.06);
  font-weight: 700;
}

.task-pill.overdue {
  background: rgba(220, 53, 69, 0.12);
  color: #9b1c31;
}

.warehouse-list,
.payment-summary,
.role-grid {
  display: grid;
  gap: 0.95rem;
}

.warehouse-item,
.payment-card,
.role-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.warehouse-item.active {
  background: linear-gradient(135deg, rgba(25, 72, 106, 0.9), rgba(44, 140, 130, 0.78));
  color: #fff;
  border-color: transparent;
}

.warehouse-item p {
  color: inherit;
  opacity: 0.78;
}

.divider-label {
  margin: 1.4rem 0 1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
  font-weight: 700;
}

.timeline-simple {
  display: grid;
  gap: 1rem;
}

.timeline-simple-item {
  padding: 1rem;
  border-left: 4px solid rgba(201, 108, 49, 0.6);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 16px 16px 0;
}

.report-card {
  min-height: 100%;
}

.report-label {
  color: var(--text-soft);
  margin-bottom: 0.55rem;
}

.app-accordion .accordion-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
}

.app-accordion .accordion-item + .accordion-item {
  margin-top: 0.9rem;
}

.app-accordion .accordion-button {
  background: transparent;
  font-weight: 700;
}

.app-accordion .accordion-button:not(.collapsed) {
  color: var(--highlight-dark);
  background: rgba(201, 108, 49, 0.08);
  box-shadow: none;
}

.offcanvas {
  background: #f7f1e7;
}

@media (max-width: 1199.98px) {
  .timeline-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .layout-shell {
    padding: 1rem;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }
}

@media (max-width: 767.98px) {
  .layout-shell {
    gap: 1rem;
    padding: 0.85rem;
  }

  .hero-card,
  .panel-card,
  .topbar {
    border-radius: 22px;
  }

  .hero-status-grid,
  .pipeline-grid,
  .timeline-progress {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: 1.5rem;
  }
}
