/* ==========================================================
   ADMIN THEME — MODERN, RESPONSIVE, SHOPIFY-LIKE UI
   Fully responsive for desktop, tablet, mobile
   ========================================================== */

/* ------------------------
   1. Root Theme Colors
------------------------- */
:root {
  --primary: #244289;
  --bg: #f6f8fb;
  --card-bg: #ffffff;
  --border: #e6ebf2;
  --muted: #6c7380;
  --success: #2f8f57;
  --danger: #d9534f;
  --radius: 12px;
}

/* ------------------------
   2. Global Styles
------------------------- */
body {
  background: var(--bg);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  margin: 0;
}

.page-title {
  font-size: 22px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.breadcrumb {
  background: transparent;
  padding-left: 0;
  margin-top: -6px;
  font-size: 13px;
}

/* ------------------------
   3. Card (shared)
------------------------- */
.card-box,
.portlet {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 6px 22px rgba(18, 24, 40, 0.06);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* ------------------------
   4. Alerts
------------------------- */
.alert {
  border-radius: 10px;
  padding: 12px 16px;
  border: none !important;
}

.alert-success {
  background: #e8f8ef;
  color: var(--success);
}

.alert-danger {
  background: #fff0f2;
  color: #b32f39;
}

/* ------------------------
   5. Form Controls
------------------------- */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  font-weight: 600;
  color: var(--primary);
}

.form-control {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(36, 66, 137, 0.15);
}

/* ------------------------
   6. Buttons
------------------------- */
.btn {
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 600;
  transition: 0.15s;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

.btn-default {
  background: #eef3fb;
  color: var(--primary);
}

/* Hover animations */
.btn:hover {
  transform: translateY(-1px);
}

/* ------------------------
   7. Action Icons (User List Style)
------------------------- */
.action-icons-wrapper {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.12s;
  font-size: 14px;
  cursor: pointer;
}

.action-icon:hover {
  background: var(--primary) !important;
  color: white !important;
}

.action-icon.delete {
  border-color: #f2a7a7;
  color: var(--danger);
}

.action-icon.delete:hover {
  background: var(--danger);
  color: white;
}

/* Large icons for mobile */
@media (max-width: 420px) {
  .action-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* ------------------------
   8. Table (listing.php)
------------------------- */
.table {
  width: 100%;
}

.table thead th {
  background: #f6f8fb !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
}

.bootstrap-table .table {
  border-radius: var(--radius);
  overflow: hidden;
}

/* MOBILE TABLE — Scrollable */
@media (max-width: 767px) {
  .bootstrap-table .fixed-table-body {
    overflow-x: auto !important;
  }
}

/* ------------------------
   9. Maps
------------------------- */
#map_canvas,
#map {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  background: white;
}

/* Lower height for mobile */
@media (max-width: 600px) {
  #map_canvas,
  #map {
    height: 350px;
  }
}

/* ------------------------
   10. Time Slots (add/edit)
------------------------- */
.time-slot-box {
  background: #f7f9fb;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 14px;
}

.time-slot-box h3 {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* ------------------------
   11. Responsive Layout Rules
------------------------- */

/* Tablet <= 992px */
@media (max-width: 992px) {
  .col-lg-6,
  .col-lg-8,
  .col-lg-12 {
    width: 100% !important;
  }
}

/* Mobile <= 767px */
@media (max-width: 767px) {

  /* Stack form labels above inputs */
  .form-group {
    display: block !important;
  }

  .form-group .col-sm-4,
  .form-group .col-sm-8 {
    width: 100%;
    padding: 0;
  }

  .page-title {
    font-size: 20px;
  }

  .card-box {
    padding: 16px;
  }
}

/* Very small screens <= 360px */
@media (max-width: 360px) {

  body {
    font-size: 13px;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }

  .action-icon {
    width: 38px;
    height: 38px;
  }
}
#toolbar .btn {
    border-radius:10px; padding:9px 16px; font-size:14px; font-weight:600;
    background:#244289; color:#fff; display:flex; align-items:center; gap:8px;
    transition:all .12s;
}
#toolbar .btn:hover { background:#1b3266; transform:translateY(-1px); }

/* Submenu active state */
.submenu-list li.active a {
    color: white !important;
    font-weight: 600;
}

.submenu-list li a {
    color: var(--muted);
    padding: 8px 15px;
    display: block;
    transition: all 0.2s ease;
}

.submenu-list li a:hover {
    background: rgba(36, 66, 137, 0.1);
    color: var(--primary);
    border-radius: 6px;
}

/* ===== Customer Form UI ===== */ 
.customer-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
}

.customer-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
    border-left: 4px solid #1e3a8a;
    padding-left: 10px;
    margin-bottom: 20px;
}

.form-control,
.select2-container--default .select2-selection--single {
    height: 44px !important;
    border-radius: 8px;
}

.select2-selection__rendered {
    line-height: 42px !important;
}

.select2-selection__arrow {
    height: 42px !important;
}

.credit-box {
    background: #f8fbff;
    border: 1px dashed #c7d2fe;
    border-radius: 10px;
    padding: 20px;
}

.radio-inline {
    margin-right: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 30px;
}

.form-footer .btn {
    min-width: 140px;
    height: 44px;
    border-radius: 8px;
}