:root {
  --bg: #f4f7fb;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --muted-bg: #f1f5f9;
  --border: #e6edf5;
  --text: #0f172a;
  --text-light: #64748b;
  --primary: #2563eb;
  --primary-soft: #eff6ff;
  --success: #10b981;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* =========================
   Sidebar + Topbar + Responsive
========================= */

/* Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 22px;
}

/* Sidebar - Desktop */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  padding: 28px 18px;
  position: static;
  height: auto;
  box-shadow: none;
  transition: transform 0.3s ease, right 0.3s ease, visibility 0.3s ease;
}

.sidebar-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h2 {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  transition: 0.25s ease;
}

.menu-item:hover {
  background: #f8fafc;
  color: var(--primary);
}

.menu-item.active {
  background: #eef4ff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.menu-text {
  white-space: nowrap;
}

.menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 15px;
  transition: 0.25s ease;
  flex-shrink: 0;
}

.menu-item.active .menu-icon,
.menu-item:hover .menu-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Sidebar Toggle Button */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.menu-toggle:hover {
  background: #f1f5f9;
  transform: scale(1.05);
}

.menu-toggle i {
  transition: all 0.3s ease;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1040;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.sidebar-open {
  overflow: hidden;
}

/* Topbar */
.topbar {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text);
  line-height: 1.2;
}

.topbar-title p {
  color: var(--text-light);
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================
   Tablet / Mobile
========================= */
@media (max-width: 991px) {
  .menu-toggle {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: -290px;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    background: #fff;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.08);
    visibility: hidden;
    overflow-y: auto;
  }

  .sidebar.open {
    right: 0;
    visibility: visible;
    box-shadow: -15px 0 40px rgba(15, 23, 42, 0.12);
  }

  .main-content {
    width: 100%;
    padding: 14px;
  }

  .topbar {
    padding: 16px;
    border-radius: 18px;
  }

  .topbar-title h1 {
    font-size: 30px;
  }

  .point-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-info h3 {
    font-size: 42px;
  }
}

/* =========================
   Small Mobile
========================= */
@media (max-width: 767px) {
  .section-card,
  .stat-card,
  .point-card {
    padding: 14px;
    border-radius: 16px;
  }

  .topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .topbar > .d-flex,
  .topbar-left {
    width: 100%;
    min-width: 0;
  }

  .topbar-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-title h1 {
    font-size: 24px;
  }

  .topbar-title p {
    font-size: 13px;
  }

  .topbar-user {
    width: 100%;
    justify-content: flex-start;
  }

  .section-header h2 {
    font-size: 17px;
  }

  .stat-info h3 {
    font-size: 34px;
  }

  .table-header {
    flex-direction: column;
    align-items: stretch;
  }

  .export-btn {
    width: 100%;
  }

  .sidebar-header h2 {
    font-size: 28px;
  }

  .menu-item {
    font-size: 15px;
    padding: 12px 14px;
  }

  .menu-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }
}
/* =========================
   Dashboard Page
========================= */
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* =========================
   Shared Cards
========================= */
.section-card,
.stat-card,
.point-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

/* =========================
   Stat Cards
========================= */
.stat-card {
  padding: 22px;
  min-height: 140px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 100%;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.stat-label {
  color: var(--text-light);
  font-size: 15px;
  font-weight: 600;
}

.stat-info h3 {
  font-size: 52px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1;
  font-feature-settings: "tnum";
}

.positive-text {
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
}

/* =========================
   Section Header
========================= */
.section-card {
  padding: 20px;
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

/* =========================
   Summary Type Boxes
========================= */
.type-box {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  padding: 18px 12px;
  text-align: center;
  height: 100%;
  transition: 0.25s ease;
}

.type-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.type-box span {
  display: block;
  color: var(--text-light);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.type-box strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-feature-settings: "tnum";
}

/* =========================
    Chart
========================= */
.real-chart-wrapper {
  position: relative;
  width: 100%;
  height: 360px;
  background: #fcfdff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  padding: 16px;
}

.real-chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

/* =========================
   Point Cards
========================= */
.point-card {
  padding: 20px;
  height: 100%;
}

.point-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 14px;
}

.point-card-top h3 {
  font-size: 22px;
  margin-bottom: 2px;
  font-weight: 800;
  color: var(--text);
}

.point-card-top p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.point-total {
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: var(--text);
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  font-feature-settings: "tnum";
}

.point-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

/* =========================
   Table
========================= */
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.export-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: 0.25s ease;
}

.export-btn:hover {
  background: #f8fafc;
}

.table-wrapper {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.dashboard-table thead th {
  text-align: right;
  padding: 16px 12px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dashboard-table tbody td {
  padding: 16px 12px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #eef2f7;
  font-weight: 600;
}

.dashboard-table tbody tr:hover {
  background: #fafcff;
}

.badge-custom {
  display: inline-block;
  padding: 6px 12px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

/* =========================
   Table & Checkboxes
========================= */
.dashboard-table th:first-child, 
.dashboard-table td:first-child {
    padding-right: 15px !important;
    text-align: center;
}

.form-check-input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    border: 2px solid #cbd5e1;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-check-input:hover {
    border-color: #3b82f6;
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.card-checkbox-wrap .form-check-input {
    width: 26px !important;
    height: 26px !important;
    border: 2px solid #cbd5e1;
    box-shadow: var(--shadow-sm);
}

/* =========================
   Utility
========================= */
h1,
h2,
h3 {
  font-weight: 800;
}

p,
span {
  font-weight: 500;
}


/* =========================
   Distribution Log Page
========================= */
.distribution-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.filters-group {
  display: grid;
  gap: 14px;
  flex: 1;
}

.filters-grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  width: 100%;
  gap: 14px;
}

/* Better Checkboxes */
.form-check-input {
    width: 1.4em;
    height: 1.4em;
    cursor: pointer;
    border: 2px solid #cbd5e1;
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.filter-field select,
.filter-field input {
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

.filter-field select:focus,
.filter-field input:focus {
  border-color: #c7dbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.search-field-full {
  grid-column: span 2;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-btn {
  height: 48px;
  border: none;
  background: var(--primary);
  color: #fff !important;
  border-radius: 999px;
  padding: 0 25px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.primary-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
}

[dir="rtl"] .dashboard-table thead th {
  text-align: right;
}
[dir="ltr"] .dashboard-table thead th {
  text-align: left;
}

.secondary-btn {
  height: 48px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: 0.25s ease;
}

.secondary-btn:hover {
  background: #f8fafc;
}

.results-count {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-light);
  font-weight: 700;
}

@media (max-width: 1400px) {
  .filters-grid-6 {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .search-field-full {
    grid-column: span 3;
  }
}

@media (max-width: 900px) {
  .filters-grid-6 {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .search-field-full {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .filters-grid-6 {
    grid-template-columns: 1fr;
  }

  .search-field-full {
    grid-column: span 1;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .primary-btn,
  .toolbar-actions .secondary-btn,
  .toolbar-actions .dropdown,
  .toolbar-actions .export-btn {
    width: 100%;
  }

  .toolbar-actions .dropdown button {
    width: 100%;
  }
}

/* =========================
   Add Distribution Modal
========================= */
.custom-modal {
  border: none;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16);
  font-family: "Tajawal", sans-serif;
}

.custom-modal-header {
  border-bottom: none;
  padding: 26px 28px 10px;
  align-items: flex-start;
   display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl; /* مهم */
}

.custom-modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
    order: 1;
}

.custom-close-btn {
  margin: 0 !important;
  box-shadow: none !important;
    order: 2;
}

.custom-modal-body {
  padding: 10px 28px 28px;
}

.modal-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.modal-input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
}

.modal-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.modal-input::placeholder {
  color: #94a3b8;
}

.modal-submit-btn {
  width: 100%;
  height: 54px;
  border: none;
  background: #3b82f6;
  color: #fff;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  margin-top: 8px;
  transition: 0.25s ease;
}

.modal-submit-btn:hover {
  background: #2563eb;
}

.modal-backdrop.show {
  opacity: 0.45;
}
.inline-add-btn {
  border: none;
  background: transparent;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 0;
}

.inline-add-btn:hover {
  color: #2563eb;
}

@media (max-width: 767px) {
  .custom-modal-header {
    padding: 20px 18px 8px;
  }

  .custom-modal-body {
    padding: 8px 18px 20px;
  }

  .custom-modal-title {
    font-size: 20px;
  }

  .modal-submit-btn {
    font-size: 16px;
    height: 50px;
  }
}


/* =========================
   Parcel Types Page
========================= */
.parcel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 22px;
  padding-top: 45px; /* Added padding to prevent checkbox overlap */
  height: 100%;
  transition: 0.25s ease;
  position: relative;
}

.parcel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-checkbox-wrap {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.parcel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.parcel-title-wrap h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}

.parcel-title-wrap p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  font-weight: 600;
}

.parcel-total {
  font-size: 34px;
  font-weight: 800;
  color: #3b82f6;
  line-height: 1;
  font-feature-settings: "tnum";
}

.parcel-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.parcel-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}

.parcel-stat-row span {
  color: var(--text-light);
  font-weight: 600;
}

.parcel-stat-row strong {
  font-weight: 800;
  color: var(--text);
  font-feature-settings: "tnum";
}

.parcel-months {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.month-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.parcel-divider {
  height: 1px;
  background: #e9eff6;
  margin: 14px 0 12px;
}

.parcel-meta-title {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 10px;
}

.parcel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 767px) {
  .parcel-card {
    padding: 16px;
    border-radius: 18px;
  }
  .parcel-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .parcel-total {
    font-size: 28px;
  }

  .parcel-title-wrap h3 {
    font-size: 18px;
  }
}


/* =========================
   Distribution Points Page
========================= */
.distribution-point-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  padding: 22px;
  padding-top: 45px; /* Added padding to prevent checkbox overlap */
  height: 100%;
  transition: 0.25s ease;
  position: relative;
}

.distribution-point-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.distribution-point-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.distribution-point-total {
  font-size: 34px;
  font-weight: 800;
  color: #3b82f6;
  line-height: 1;
  font-feature-settings: "tnum";
}

.distribution-point-total-label {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
}

.distribution-point-title-wrap {
  text-align: right;
}

.distribution-point-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  margin-bottom: 4px;
}

.distribution-point-title-row h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.distribution-point-title-wrap p {
  margin: 0;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

.distribution-point-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
}

.distribution-point-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.distribution-point-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 10px 14px;
  gap: 12px;
}

.distribution-point-item strong {
  font-weight: 800;
  color: var(--text);
  font-feature-settings: "tnum";
}

.distribution-point-item span {
  color: var(--text);
  font-weight: 600;
}

.summary-total {
  color: #3b82f6;
  font-weight: 800 !important;
}

@media (max-width: 767px) {
  .distribution-point-card {
    padding: 16px;
    border-radius: 18px;
  }

  .distribution-point-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .distribution-point-total {
    font-size: 28px;
  }

  .distribution-point-title-row h3 {
    font-size: 18px;
  }
}


/* =========================
   Reports Page
========================= */
.reports-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.reports-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.summary-card-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
  text-align: center;
  height: 100%;
}

.summary-label {
  display: block;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.summary-card-box h3 {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  font-feature-settings: "tnum";
}

.chart-card {
  height: 100%;
}

.small-chart {
  height: 300px;
}

@media (max-width: 767px) {
  .summary-card-box h3 {
    font-size: 34px;
  }

  .reports-toolbar {
    align-items: stretch;
  }

  .reports-filters,
  .reports-filters .filter-field,
  .toolbar-actions,
  .toolbar-actions .dropdown,
  .toolbar-actions .dropdown button {
    width: 100%;
  }
}

.counter {
  font-feature-settings: "tnum";
  letter-spacing: 0.5px;
  transition: 0.3s ease;
}

.counter {
  font-feature-settings: "tnum";
  letter-spacing: 0.5px;
  transition: 0.3s ease;
}

/* =========================
   Login Page
========================= */
.login-page-body {
  min-height: 100vh;
  background: #f2f5fa;
  font-family: "Tajawal", sans-serif;
}

.login-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 34px 28px;
}

.login-logo-box {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.24);
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.login-header p {
  color: var(--text-light);
  font-size: 15px;
  margin: 0;
  font-weight: 600;
}

.form-check.bg-light {
    padding-left: 12px;
    padding-right: 38px !important;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.form-check.bg-light .form-check-input {
    position: absolute;
    right: 12px;
    margin: 0;
}

.card-checkbox-wrap {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.parcel-card, .distribution-point-card {
    padding-top: 45px !important;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.login-field input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
}

.login-field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-field input::placeholder {
  color: #94a3b8;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-left: 48px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
}

.login-submit-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #3b82f6;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.25s ease;
  margin-top: 4px;
}

.login-submit-btn:hover {
  background: #2563eb;
}

.login-error-message {
  display: none;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

.login-error-message.show {
  display: block;
}

.login-divider {
  height: 1px;
  background: #e8eef5;
  margin: 26px 0 18px;
}

.demo-accounts {
  text-align: center;
}

.demo-title {
  color: var(--text-light);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.demo-accounts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.demo-account-btn {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
  cursor: pointer;
}

.demo-account-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.demo-account-btn strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.demo-account-btn span {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

@media (max-width: 576px) {
  .login-card {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .login-header h1 {
    font-size: 22px;
  }

  .login-submit-btn {
    font-size: 16px;
  }

  .demo-accounts-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Points Page
========================= */

.point-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 18px;
  padding: 20px;
  transition: 0.25s ease;
  height: 100%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.point-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.point-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.point-card p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 14px;
}

/* stats */
.point-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.point-stats span {
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

/* total */
.point-total {
  background: #eff6ff;
  color: #2563eb;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  display: inline-block;
}

/* =========================
   Table
========================= */

.section-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #e8eef5;
}

.section-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.table-wrapper {
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  color: #475569;
}

.dashboard-table td {
  padding: 12px;
  font-size: 14px;
  border-top: 1px solid #e8eef5;
}

.dashboard-table tr:hover {
  background: #f9fafb;
}

/* =========================
   Buttons
========================= */

.export-btn {
  border: none;
  background: #f1f5f9;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
}

.export-btn:hover {
  background: #3b82f6;
  color: #fff;
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
  .point-card {
    padding: 16px;
  }

  .point-card h3 {
    font-size: 16px;
  }

  .dashboard-table th,
  .dashboard-table td {
    font-size: 12px;
    padding: 8px;
  }
}

/* =========================
   Logout Button
========================= */
.logout-btn {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: #ef4444;
}

.logout-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.logout-btn .menu-icon {
  background: #fef2f2;
  color: #ef4444;
}