:root {
  --provider-primary: #0b7dd1;
  --provider-secondary: #10b79f;
  --provider-bg: #f2f8fd;
  --provider-surface: #ffffff;
  --provider-text: #1f2f3d;
  --provider-muted: #6f8193;
  --provider-border: #d8e7f3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f7fbff 0%, #edf6fc 100%);
  color: var(--provider-text);
  font-size: 15px;
}

.provider-app {
  min-height: 100vh;
  display: flex;
}

.provider-sidebar {
  width: 262px;
  background: var(--provider-surface);
  border-right: 1px solid var(--provider-border);
}

.sidebar-content {
  padding: 18px 14px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1d64b8;
  margin-bottom: 18px;
  font-size: 1rem;
}

.sidebar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.sidebar-brand strong {
  font-size: 1.32rem;
  line-height: 1.2;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  color: #3d536c;
  text-decoration: none;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.sidebar-nav .nav-link:hover {
  background: #edf6ff;
  color: #1066c4;
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, #e4f2ff, #d9effd);
  color: #0f6fcc;
  box-shadow: inset 0 0 0 1px #d1e8ff;
}

.sidebar-nav .nav-link-danger {
  color: #dc3545;
}

.provider-main {
  flex: 1;
  padding: 20px;
  background: var(--provider-bg);
}

.main-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title-wrap h1 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #162433;
}

.btn-menu {
  border: 1px solid var(--provider-border);
  background: #fff;
  color: #1f5fa2;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfe1f2;
  color: #1f3f67;
  background: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

.btn-refresh i {
  transition: transform 0.4s ease;
}

.btn-refresh.is-loading i {
  transform: rotate(360deg);
}

.panel-card {
  background: var(--provider-surface);
  border: 1px solid var(--provider-border);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}

.summary-panel {
  padding: 14px;
}

.summary-item {
  border: 1px solid var(--provider-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
}

.summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.summary-meta p {
  margin: 0;
}

.summary-label {
  color: var(--provider-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.summary-value {
  color: #1e2a36;
  font-size: 1.7rem;
  font-weight: 700;
}

.panel-title {
  padding: 13px 16px;
  border-bottom: 1px solid var(--provider-border);
  background: #fbfdff;
}

.panel-title h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #193147;
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-table {
  min-width: 820px;
}

.provider-table thead th {
  font-size: 0.78rem;
  color: #637b93;
  font-weight: 700;
  background: #f3f8fc;
  border-bottom: 1px solid var(--provider-border);
}

.provider-table td {
  padding-top: 13px;
  padding-bottom: 13px;
  border-color: #edf3f8;
}

.customer-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #22354a;
}

.customer-phone {
  margin-top: 2px;
  font-size: 0.82rem;
  color: #7a8ea3;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status-pending {
  color: #2c65b5;
  background: #e8f1ff;
}

.status-received {
  color: #a97400;
  background: #fff5d7;
}

.status-working {
  color: #905f00;
  background: #ffeacc;
}

.status-done {
  color: #0f7f4d;
  background: #d7f7e7;
}

.btn-outline-cyan {
  border-color: #22a9a9;
  color: #0e7f88;
  font-weight: 600;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.82rem;
}

.btn-outline-cyan:hover {
  background: #e7fbfb;
  border-color: #0d8080;
  color: #0b7070;
}

.empty-state {
  text-align: center;
  padding: 34px 20px;
  border: 1px dashed #d6e5f3;
  border-radius: 12px;
  margin: 12px;
  color: #7990a7;
  font-size: 1rem;
}

.empty-state i {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.order-detail-modal .modal-content {
  border-radius: 18px;
  border: 1px solid #d3e3f2;
  overflow: hidden;
}

.order-detail-modal .modal-header {
  background: linear-gradient(135deg, #1b8c8e, #3788d4);
  color: #fff;
  border-bottom: 0;
}

.order-detail-modal .btn-close {
  filter: invert(1);
}

.order-detail-modal .modal-body {
  background: #f5f9fe;
}

.order-detail-modal .detail-card {
  border: 1px solid #d5e3f1;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}

.order-detail-modal .detail-card h6 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  text-transform: uppercase;
  color: #0b6e67;
  font-weight: 800;
}

.order-detail-modal .detail-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: baseline;
}

.order-detail-modal .detail-row span {
  min-width: 140px;
  color: #3b5368;
  font-weight: 700;
}

.order-detail-modal .detail-row strong {
  color: #1d2f43;
  font-weight: 600;
}

.order-detail-modal .detail-row strong.payment-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.order-detail-modal .detail-row strong.payment-status-paid {
  color: #0f7f4d;
  background: #d7f7e7;
}

.order-detail-modal .detail-row strong.payment-status-unpaid {
  color: #a97400;
  background: #fff5d7;
}

.order-detail-modal .detail-row strong.payment-status-unknown {
  color: #5d7287;
  background: #eaf1f7;
}

.order-detail-modal .detail-note {
  border: 1px solid #efdcb0;
  background: #fffaf0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
}

.order-detail-modal .detail-note span {
  font-weight: 700;
  color: #3b5368;
}

.order-detail-modal .detail-note strong {
  color: #1d2f43;
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .provider-main {
    padding: 14px;
  }

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

  .btn-refresh {
    justify-content: center;
  }

  .sidebar-brand strong {
    font-size: 1.2rem;
  }

  .order-detail-modal .detail-row {
    display: block;
  }

  .order-detail-modal .detail-row span {
    display: block;
    min-width: 0;
    margin-bottom: 2px;
  }

  .provider-table {
    min-width: 720px;
  }
}

@media (max-width: 575.98px) {
  .provider-main {
    padding: 12px;
  }

  .topbar-title-wrap {
    min-width: 0;
  }

  .topbar-title-wrap h1 {
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.25;
    gap: 8px;
  }

  .topbar-title-wrap h1 i {
    flex-shrink: 0;
  }

  .btn-refresh {
    width: 100%;
    min-height: 40px;
  }

  .summary-item {
    min-height: 76px;
  }

  .summary-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .summary-label {
    font-size: 0.82rem;
  }

  .summary-value {
    font-size: 1.45rem;
  }

  .panel-title h2 {
    font-size: 1.05rem;
  }

  .panel-title {
    padding: 11px 12px;
  }

  .table-responsive {
    border-radius: 0 0 14px 14px;
    overflow: visible;
  }

  .provider-table {
    min-width: 0;
    width: 100%;
  }

  .provider-table thead {
    display: none;
  }

  .provider-table tbody,
  .provider-table tr,
  .provider-table td {
    display: block;
    width: 100%;
  }

  .provider-table tbody tr {
    border: 1px solid var(--provider-border);
    border-radius: 12px;
    margin: 10px 10px 12px;
    padding: 8px 10px;
    background: #fff;
  }

  .provider-table tbody td {
    border: 0;
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    text-align: right;
  }

  .provider-table tbody td::before {
    content: attr(data-label);
    color: #637b93;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-align: left;
    flex: 0 0 42%;
  }

  .provider-table .customer-name,
  .provider-table .customer-phone {
    text-align: right;
  }

  .provider-table .status-pill {
    margin-left: auto;
  }

  .provider-table .btn-accept-order,
  .provider-table .btn-order-detail {
    margin-left: auto;
  }

  .order-detail-modal .modal-dialog {
    margin: 0.4rem;
  }

  .order-detail-modal .modal-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .order-detail-modal .modal-footer .btn {
    flex: 1 1 100%;
  }
}
