:root {
  color-scheme: light;
  --app-ink: #17233b;
  --app-ink-soft: #44516a;
  --app-muted: #8290a8;
  --app-canvas: #f3f6fb;
  --app-surface: #ffffff;
  --app-line: #e6ebf2;
  --app-navy: #101a2d;
  --app-navy-soft: #18253b;
  --app-accent: #32d6bb;
  --app-accent-dark: #16a991;
  --app-violet: #7773f5;
  --app-radius: 16px;
  --app-shadow: 0 12px 34px rgb(23 35 59 / 6%);
  font-family: "Public Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body.app-body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-canvas);
  color: var(--app-ink);
  font-family: "Public Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 264px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 22px 15px 14px;
  overflow: auto;
  background: var(--app-navy);
  color: #e8eef8;
}

.app-brand {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 0 9px 18px;
  color: #fff;
  text-decoration: none;
}

.app-brand:hover {
  color: #fff;
}

.app-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #4ae5cf, #20b49e);
  color: #0c2430;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.06em;
  box-shadow: 0 6px 18px rgb(50 214 187 / 20%);
}

.app-brand-copy,
.app-account-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.app-brand-copy strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.app-brand-copy small {
  color: #8390a7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.app-navigation {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0 18px;
}

.app-nav-caption {
  margin: 18px 10px 7px;
  color: #74829a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.app-nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aab6c9;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.app-nav-link i {
  width: 18px;
  color: #8795ad;
  font-size: 18px;
  text-align: center;
}

.app-nav-link:hover {
  background: rgb(255 255 255 / 5%);
  color: #fff;
}

.app-nav-link:hover i {
  color: var(--app-accent);
}

.app-nav-link.active {
  border-color: rgb(50 214 187 / 15%);
  background: linear-gradient(100deg, rgb(50 214 187 / 17%), rgb(50 214 187 / 6%));
  color: #fff;
}

.app-nav-link.active i {
  color: var(--app-accent);
}

.app-sidebar-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 14px 5px 3px;
  border-top: 1px solid rgb(255 255 255 / 9%);
}

.app-account-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgb(50 214 187 / 30%);
  border-radius: 50%;
  background: rgb(50 214 187 / 12%);
  color: var(--app-accent);
  font-size: 13px;
  font-weight: 700;
}

.app-account-copy {
  flex: 1;
}

.app-account-copy strong {
  overflow: hidden;
  color: #eef3fb;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-account-copy small {
  color: #8390a7;
  font-size: 10px;
}

.app-logout {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 9px;
  color: #aab6c9;
  font-size: 17px;
  text-decoration: none;
}

.app-logout:hover {
  background: rgb(255 255 255 / 8%);
  color: #fff;
}

.app-main {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgb(230 235 242 / 80%);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(16px);
}

.app-topbar-title {
  display: grid;
  gap: 4px;
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 700;
}

.app-topbar-title small {
  color: var(--app-muted);
  font-size: 11px;
  font-weight: 400;
}

.app-topbar-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--app-muted);
  font-size: 11px;
}

.app-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526179;
  font-weight: 600;
}

.app-live-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-accent-dark);
  box-shadow: 0 0 0 4px rgb(22 169 145 / 11%);
}

.app-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: #fff;
  color: var(--app-ink);
  font-size: 21px;
}

.app-content {
  width: 100%;
  max-width: 1680px;
  flex: 1;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 42px);
}

.app-content > .container,
.app-content > .container-fluid,
.app-content > .container-xxl {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.app-content h1,
.app-content h2,
.app-content h3,
.app-content h4 {
  color: var(--app-ink);
  font-weight: 700;
  letter-spacing: -.035em;
}

.app-content h1 {
  margin: 0 0 18px;
  font-size: clamp(24px, 2.4vw, 32px);
}

.app-content h2 {
  font-size: 19px;
}

.app-content h4 {
  font-size: 15px;
}

.app-content hr {
  margin: 18px 0;
  border-color: var(--app-line);
  opacity: 1;
}

.app-content p {
  color: var(--app-ink-soft);
}

.app-content .card,
.app-content .agile_info_shadow {
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.app-content .card-header,
.app-content .card-footer {
  border-color: var(--app-line);
  background: transparent;
}

.app-content .form-group,
.app-content .mb-3 {
  margin-bottom: 16px;
}

.app-content label,
.app-content .control-label,
.app-content .form-label {
  margin-bottom: 7px;
  color: #4a5870;
  font-size: 12px;
  font-weight: 600;
}

.app-content .form-control,
.app-content .form-select,
.app-content select,
.app-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="hidden"]),
.app-content textarea {
  min-height: 43px;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background-color: #fff;
  color: var(--app-ink);
  font-size: 13px;
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.app-content textarea {
  min-height: 100px;
}

.app-content .form-control:focus,
.app-content .form-select:focus,
.app-content select:focus,
.app-content input:focus,
.app-content textarea:focus {
  border-color: var(--app-accent-dark);
  box-shadow: 0 0 0 3px rgb(22 169 145 / 12%);
  outline: 0;
}

.app-content .form-check-input {
  min-height: auto;
  border-color: #cbd4e1;
}

.app-content .form-check-input:checked {
  border-color: var(--app-accent-dark);
  background-color: var(--app-accent-dark);
}

.app-content .btn {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.app-content .btn:hover {
  transform: translateY(-1px);
  filter: brightness(.98);
}

.app-content .btn-primary,
.app-content .btn-success {
  border-color: var(--app-accent-dark);
  background: var(--app-accent-dark);
  box-shadow: 0 5px 14px rgb(22 169 145 / 16%);
}

.app-content .btn-primary:hover,
.app-content .btn-success:hover {
  border-color: #108d79;
  background: #108d79;
}

.app-content .btn-warning {
  border-color: #eab656;
  background: #f6c96f;
  color: #47320d;
}

.app-content .btn-danger {
  border-color: #de6d75;
  background: #e87980;
}

.app-content a:not(.btn):not(.app-nav-link):not(.dashboard-card) {
  color: #197f78;
  font-weight: 600;
  text-decoration: none;
}

.app-content a:not(.btn):not(.app-nav-link):not(.dashboard-card):hover {
  text-decoration: underline;
}

.app-content .table {
  margin: 0;
  border-color: var(--app-line);
  color: var(--app-ink-soft);
  font-size: 12px;
  vertical-align: middle;
}

.app-content .table thead th {
  padding: 13px 14px;
  border-bottom: 1px solid var(--app-line);
  background: #f6f8fb;
  color: #718098;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-content .table tbody td {
  padding: 13px 14px;
  border-bottom-color: #edf0f5;
}

.app-content .table tbody tr {
  transition: background-color .15s ease;
}

.app-content .table tbody tr:hover {
  background: #f7fbfa;
}

.app-content .table-responsive {
  overflow-x: auto;
  border: 1px solid var(--app-line);
  border-radius: 12px;
}

.app-content .table-responsive .table {
  min-width: 760px;
}

.app-content table:not(.table-responsive .table) {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.app-content .text-danger,
.app-content .field-validation-error,
.app-content .validation-summary-errors {
  color: #c74450 !important;
  font-size: 11px;
}

.app-content .text-success {
  color: #118b76 !important;
}

.app-content dl.row {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
}

.app-content dt {
  color: #718098;
  font-size: 11px;
  font-weight: 600;
}

.app-content dd {
  color: var(--app-ink);
  font-size: 13px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px clamp(18px, 3vw, 42px);
  border-top: 1px solid var(--app-line);
  background: #fff;
  color: var(--app-muted);
  font-size: 11px;
}

.app-footer a {
  color: #197f78;
  font-weight: 600;
  text-decoration: none;
}

.app-sidebar-scrim {
  display: none;
}

.table-tools {
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}

.table-search {
  width: min(100%, 280px);
  min-height: 38px !important;
  margin: 0;
}

.table-empty-state {
  padding: 24px !important;
  color: var(--app-muted) !important;
  text-align: center;
}

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-toolbar h1 {
  margin: 0;
}

.dashboard-eyebrow {
  margin: 0 0 6px !important;
  color: var(--app-accent-dark) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.dashboard-subtitle {
  margin: 8px 0 0 !important;
  color: var(--app-muted) !important;
  font-size: 13px;
}

.dashboard-date {
  padding: 9px 12px;
  border: 1px solid var(--app-line);
  border-radius: 9px;
  background: #fff;
  color: #63718a;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}

.dashboard-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  padding: 21px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
  color: var(--app-ink) !important;
  text-decoration: none !important;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  border-color: #b7e9df;
  box-shadow: 0 16px 36px rgb(23 35 59 / 10%);
}

.dashboard-card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid #d2f3ed;
  border-radius: 13px;
  background: #eafaf7;
  color: #138f7d;
  font-size: 21px;
}

.dashboard-card-title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-card-description {
  color: var(--app-muted);
  font-size: 11px;
  line-height: 1.65;
}

.dashboard-card-link {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 17px;
  color: #197f78;
  font-size: 11px;
  font-weight: 700;
}

.orders-filter-card,
.orders-table-card {
  margin-bottom: 18px;
  padding: 19px;
  border: 1px solid var(--app-line);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.orders-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 14px;
}

.filter-field {
  display: grid;
  gap: 7px;
  margin: 0 !important;
  color: #4a5870;
  font-size: 11px;
  font-weight: 600;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.orders-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.orders-table-heading h2 {
  margin: 0;
  font-size: 15px;
}

.orders-table-heading > span {
  color: var(--app-muted);
  font-size: 11px;
}

.orders-table-card .table-tools {
  padding: 0 0 12px;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  background: #fff;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(30px, 6vw, 80px);
  background: radial-gradient(circle at 75% 20%, rgb(50 214 187 / 23%), transparent 29%), linear-gradient(145deg, #101a2d, #172b42 70%, #134b50);
  color: #fff;
}

.auth-visual::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 480px;
  height: 480px;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgb(255 255 255 / 3%), 0 0 0 90px rgb(255 255 255 / 2%);
  content: "";
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.auth-brand .app-brand-mark {
  width: 46px;
  height: 46px;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto 0;
  padding: 65px 0;
}

.auth-visual-copy h1 {
  margin: 0 0 19px;
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1.06;
}

.auth-visual-copy p {
  max-width: 440px;
  color: #b8c5d5;
  font-size: 15px;
  line-height: 1.8;
}

.auth-visual-foot {
  position: relative;
  z-index: 1;
  color: #93a2b7;
  font-size: 11px;
}

.auth-form-panel {
  display: grid;
  min-height: 100vh;
  padding: 30px;
  place-items: center;
  background: #fff;
}

.auth-form-card {
  width: min(100%, 420px);
  padding: clamp(24px, 4vw, 42px);
}

.auth-form-card h2 {
  margin: 0 0 8px;
  color: var(--app-ink);
  font-size: 25px;
  letter-spacing: -.04em;
}

.auth-form-card > p {
  margin-bottom: 27px;
  color: var(--app-muted);
  font-size: 12px;
}

.auth-form-card label {
  display: block;
  margin-bottom: 7px;
  color: #4a5870;
  font-size: 11px;
  font-weight: 600;
}

.auth-form-card .form-control {
  min-height: 47px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  font-size: 13px;
}

.auth-password-field {
  position: relative;
}

.auth-password-field .form-control {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--app-muted);
  font-size: 18px;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  background: #f0f7f6;
  color: var(--app-accent-dark);
}

.auth-form-card .btn {
  min-height: 47px;
  border: 0;
  border-radius: 10px;
  background: var(--app-accent-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.auth-form-card .btn:hover {
  background: #108d79;
}

.auth-footer {
  padding-top: 22px;
  color: var(--app-muted);
  font-size: 10px;
  text-align: center;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .orders-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    width: min(285px, calc(100vw - 52px));
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .app-menu-open .app-sidebar {
    transform: translateX(0);
  }

  .app-sidebar-scrim {
    position: fixed;
    z-index: 19;
    inset: 0;
    display: block;
    visibility: hidden;
    border: 0;
    background: rgb(9 17 30 / 52%);
    opacity: 0;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .app-menu-open .app-sidebar-scrim {
    visibility: visible;
    opacity: 1;
  }

  .app-menu-toggle {
    display: grid;
  }

  .app-topbar {
    min-height: 68px;
  }

  .app-topbar-meta {
    gap: 0;
  }

  .app-live-indicator {
    display: none;
  }

  .auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
  }
}

@media (max-width: 640px) {
  .app-topbar {
    gap: 11px;
    padding: 10px 15px;
  }

  .app-topbar-title {
    font-size: 12px;
  }

  .app-topbar-title small {
    font-size: 10px;
  }

  .app-topbar-meta time {
    max-width: 96px;
    font-size: 10px;
    text-align: right;
  }

  .app-content {
    padding: 21px 14px;
  }

  .app-footer {
    padding: 14px;
  }

  .page-toolbar {
    align-items: flex-start;
  }

  .orders-filter-form {
    grid-template-columns: 1fr;
  }

  .filter-actions > * {
    flex: 1 1 auto;
  }

  .orders-filter-card,
  .orders-table-card {
    padding: 14px;
  }

  .dashboard-card {
    min-height: 195px;
  }

  .auth-page {
    display: block;
  }

  .auth-visual {
    min-height: 230px;
    padding: 24px;
  }

  .auth-visual-copy {
    margin: 30px 0 0;
    padding: 0 0 18px;
  }

  .auth-visual-copy h1 {
    margin-bottom: 9px;
    font-size: 34px;
  }

  .auth-visual-copy p,
  .auth-visual-foot {
    display: none;
  }

  .auth-form-panel {
    min-height: calc(100vh - 230px);
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
