:root {
  --navy: #0b1d33;
  --navy-deep: #071525;
  --green: #18b787;
  --green-dark: #0f7859;
  --green-soft: #e6f8f2;
  --amber: #ffb703;
  --amber-soft: #fff4cc;
  --blue: #176fc1;
  --red: #d94a4a;
  --red-soft: #fff0f0;
  --surface: #ffffff;
  --canvas: #f4f6f7;
  --line: #e0e5e8;
  --muted: #687689;
  --shadow: 0 18px 55px rgba(7, 21, 37, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #152333;
  background: var(--canvas);
  font-family: "DM Sans", system-ui, sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 183, 3, 0.22), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(24, 183, 135, 0.17), transparent 28%),
    var(--navy-deep);
}

.login-card {
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.32);
}

.login-brand,
.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand img,
.dashboard-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.login-brand strong,
.dashboard-brand strong {
  display: block;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.02rem;
}

.login-brand span,
.dashboard-brand span {
  color: #ef8b00;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.8rem;
}

.login-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  color: #3f4e61;
  font-size: 0.76rem;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #d8dfe4;
  border-radius: 13px;
  outline: 0;
  color: var(--navy);
  background: #fff;
}

.field textarea {
  min-height: 94px;
  padding-block: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(24, 183, 135, 0.12);
}

.field small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.icon-picker-control {
  display: grid;
  align-items: center;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
}

.icon-picker-preview,
.provider-admin-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ccefe3;
  border-radius: 13px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 1.25rem;
}

.provider-admin-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.provider-admin-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  font-size: 1.05rem;
}

.provider-admin-icon.has-logo {
  overflow: hidden;
  border-color: var(--line);
  background: #fff;
}

.provider-admin-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.provider-image-summary {
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 800;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.btn {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.btn-primary {
  color: var(--navy-deep);
  background: var(--amber);
}

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

.btn-blue {
  color: #fff;
  background: var(--blue);
}

.btn-dark {
  color: #fff;
  background: var(--navy);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--navy);
  background: #fff;
}

.btn-danger {
  color: var(--red);
  background: var(--red-soft);
}

.btn-small {
  min-height: 36px;
  padding-inline: 11px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.dashboard-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 22px 17px;
  color: rgba(255, 255, 255, 0.75);
  background: var(--navy-deep);
}

.dashboard-brand {
  padding: 0 8px 22px;
}

.dashboard-brand strong {
  color: #fff;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.sidebar-nav button,
.sidebar-nav a {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
}

.sidebar-nav button:hover,
.sidebar-nav button.active,
.sidebar-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav button.active {
  box-shadow: inset 3px 0 var(--amber);
}

.sidebar-bottom {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-main {
  min-width: 0;
}

.dashboard-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.dashboard-topbar h1 {
  margin: 0;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
}

.dashboard-topbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.topbar-actions {
  display: flex;
  gap: 9px;
}

.mobile-sidebar-toggle {
  display: none;
}

.dashboard-content {
  padding: 28px;
}

.view[hidden] {
  display: none;
}

.section-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.section-bar h2 {
  margin: 0;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.45rem;
}

.section-bar p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(7, 21, 37, 0.04);
}

.stat-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--green-dark);
  background: var(--green-soft);
}

.stat-card strong {
  display: block;
  margin-top: 18px;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.75rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(7, 21, 37, 0.035);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.panel-head h3 {
  margin: 0;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.data-table th {
  padding: 10px 11px;
  color: var(--muted);
  background: #f7f8f9;
  font-size: 0.68rem;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.empty-panel {
  padding: 34px 15px;
  color: var(--muted);
  text-align: center;
}

.empty-panel i {
  display: block;
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #7c5d00;
  background: var(--amber-soft);
  font-size: 0.66rem;
  font-weight: 900;
}

.status-badge.done {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-badge.cancelled {
  color: var(--red);
  background: var(--red-soft);
}

.order-list,
.provider-list,
.review-admin-list {
  display: grid;
  gap: 12px;
}

.order-card,
.provider-admin-card,
.review-admin-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}

.order-card-top,
.provider-card-top,
.review-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.order-card h3,
.provider-admin-card h3,
.review-admin-card h3 {
  margin: 0;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
}

.order-card p,
.provider-admin-card p,
.review-admin-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.order-meta span {
  padding: 10px;
  border-radius: 11px;
  color: var(--muted);
  background: #f7f8f9;
  font-size: 0.68rem;
}

.order-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 0.76rem;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions select,
.compact-input {
  min-height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  font-size: 0.73rem;
}

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

.category-toggle {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.category-admin-media {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  overflow: hidden;
  color: var(--green-dark);
  background: var(--green-soft);
}

.category-admin-media i {
  font-size: 1.15rem;
}

.category-admin-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-toggle-copy {
  min-width: 0;
  flex: 1;
}

.category-toggle-copy strong,
.category-toggle-copy small {
  display: block;
}

.category-toggle-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-toggle-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.category-edit {
  display: inline-flex;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: #f1f4f6;
  cursor: pointer;
}

.category-edit span {
  color: inherit;
  font-size: 0.66rem;
  font-weight: 900;
}

.category-edit:hover {
  color: var(--green-dark);
  background: var(--green-soft);
}

.switch {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch b {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd2d7;
  cursor: pointer;
  transition: 180ms ease;
}

.switch b::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
  transition: 180ms ease;
}

.switch input:checked + b {
  background: var(--green);
}

.switch input:checked + b::after {
  transform: translateX(18px);
}

.provider-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.provider-photos img,
.photo-draft img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

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

.settings-form {
  display: grid;
  gap: 14px;
}

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

.category-language-block {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafb;
}

.category-language-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-language-head > div {
  display: grid;
  gap: 3px;
}

.category-language-head strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.category-language-head small {
  color: var(--muted);
  font-size: 0.7rem;
}

.category-language-head > span {
  display: grid;
  width: 36px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #087d63;
  background: #dff7ef;
  font-weight: 800;
  font-size: 0.72rem;
}

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

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 11, 20, 0.78);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 85px rgba(3, 11, 20, 0.4);
}

.modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.modal-head h2 {
  margin: 0;
  color: var(--navy);
  font-family: "Manrope", sans-serif;
  font-size: 1.2rem;
}

.icon-button {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
}

.modal-form {
  padding: 20px;
}

.photo-drafts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}

.logo-draft-wrap {
  min-height: 76px;
}

.logo-empty {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px dashed #cbd5dc;
  border-radius: 13px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 0.74rem;
}

.logo-empty i {
  color: var(--green-dark);
  font-size: 1.25rem;
}

.logo-draft img {
  width: 86px;
  height: 86px;
  padding: 5px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.category-photo-draft img {
  width: min(100%, 320px);
  height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover;
}

.photo-draft {
  position: relative;
}

.photo-draft button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  cursor: pointer;
  font-size: 0.65rem;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 28px));
  padding: 13px 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.courier-shell,
.tracking-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.mobile-hero {
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 183, 3, 0.3), transparent 30%),
    var(--navy);
}

.mobile-hero h1 {
  margin: 18px 0 7px;
  font-family: "Manrope", sans-serif;
  font-size: 1.8rem;
}

.mobile-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.mobile-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-brand img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
}

.courier-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 16px 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.courier-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
}

.courier-tabs button.active {
  color: var(--navy);
  background: var(--amber);
}

.tracking-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 18px;
}

.tracking-search input {
  min-width: 0;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
}

.timeline {
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 12px;
  min-height: 70px;
}

.timeline-step::before {
  position: absolute;
  top: 32px;
  bottom: 0;
  left: 16px;
  width: 2px;
  content: "";
  background: #dfe4e8;
}

.timeline-step:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #8a96a5;
  background: #e9edf0;
}

.timeline-step.complete .timeline-dot,
.timeline-step.active .timeline-dot {
  color: #fff;
  background: var(--green);
}

.timeline-step h3 {
  margin: 3px 0 4px;
  color: var(--navy);
  font-size: 0.88rem;
}

.timeline-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 1050px) {
  .stats-grid,
  .categories-admin {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100% - 45px));
    transform: translateX(-105%);
    transition: 180ms ease;
  }

  .sidebar.open {
    transform: none;
    box-shadow: 20px 0 50px rgba(3, 11, 20, 0.3);
  }

  .mobile-sidebar-toggle {
    display: grid;
  }

  .dashboard-topbar {
    min-height: 66px;
    padding: 0 14px;
  }

  .dashboard-topbar h1 {
    font-size: 1.04rem;
  }

  .dashboard-topbar p {
    display: none;
  }

  .topbar-actions .btn span {
    display: none;
  }

  .dashboard-content {
    padding: 16px 14px 28px;
  }

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

  .stats-grid,
  .categories-admin,
  .settings-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .field.full {
    grid-column: auto;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 100dvh;
    border-radius: 24px 24px 0 0;
  }

  .courier-shell,
  .tracking-shell {
    padding: 14px;
  }

  .tracking-search {
    grid-template-columns: 1fr;
  }
}
