/* -----------------------------------
   GLOBAL RESET & BASE
----------------------------------- */

body {
  padding: 1.2rem;
  background-color: #f8f9fc;
  font-family: "Inter", system-ui, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
}

.small-muted {
  font-size: 0.85rem;
  color: #666;
}

textarea { resize: vertical; }

.table td, .table th {
  vertical-align: middle !important;
}

/* -----------------------------------
   LOADING SCREEN
----------------------------------- */

#app-loading {
  padding-top: 22vh;
}

#app-loading h3 {
  font-weight: 700;
  color: #0d6efd;
}

/* -----------------------------------
   LOGIN PAGE
----------------------------------- */

#login-container .card {
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(0,0,0,0.12);
}

#login-logo {
  max-height: 90px;
}

/* Eye-friendly spacing */
#login-container input {
  height: 45px;
}

/* -----------------------------------
   HEADER & NAVBAR
----------------------------------- */

#app-container {
  margin-top: 10px;
}

#header-logo {
  height: 42px;
  margin-right: 10px;
}

.nav-tabs .nav-link {
  font-size: 0.92rem;
  padding: 0.6rem 1rem;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  font-weight: 600;
}

/* -----------------------------------
   DASHBOARD CARDS
----------------------------------- */

.card.clickable-card {
  cursor: pointer;
  transition: 0.2s;
  border-radius: 12px;
}

.card.clickable-card:hover {
  background-color: #eef5ff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card h5 i {
  margin-right: 8px;
}

/* Quick action buttons */
#dashboard .btn {
  border-radius: 8px;
}

/* -----------------------------------
   CUSTOMER TABLE
----------------------------------- */

#customers-table tbody tr:hover {
  background-color: #f4f8ff;
  cursor: pointer;
}

/* Badges for status */
.badge.bg-primary { background-color: #0d6efd !important; }
.badge.bg-success { background-color: #28a745 !important; }
.badge.bg-danger { background-color: #dc3545 !important; }
.badge.bg-warning { background-color: #ffc107 !important; color: #000 !important; }

/* -----------------------------------
   CUSTOMER MODAL & FORM
----------------------------------- */

#customerModal .modal-content {
  border-radius: 14px;
}

#customerModal input,
#customerModal select,
#customerModal textarea {
  border-radius: 8px;
}

/* Subscription product rows */
.sub-item-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.sub-item-remove {
  background: #ffe5e5;
  border: 1px solid #ffb4b4;
  color: #b30000;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 1rem;
}

.sub-item-remove:hover {
  background: #ffcccc;
}

/* -----------------------------------
   DELIVERY LIST PAGE
----------------------------------- */

#delivery-list .card {
  border-radius: 12px;
}

#delivery-list table {
  font-size: 0.9rem;
}

.mark-deliver {
  border-radius: 6px;
  font-size: 0.8rem;
}

/* -----------------------------------
   REPORTS UI
----------------------------------- */

#reports .card {
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

#billing-summary {
  border-radius: 8px;
}

#billing-summary .fs-5 {
  font-weight: 600;
}

/* -----------------------------------
   COMPLAINTS
----------------------------------- */

#complaints-list .card {
  border-left: 5px solid #0d6efd;
  border-radius: 10px;
  background: #ffffff;
}

#complaints-list .card-header {
  background: #eef5ff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

/* -----------------------------------
   PENDING REQUESTS
----------------------------------- */

#pending-list table {
  font-size: 0.85rem;
}

#pending-summary .card {
  border-left: 4px solid #ffc107;
}

/* -----------------------------------
   BUTTONS & COMMON
----------------------------------- */

.btn {
  border-radius: 8px !important;
}

.btn-success {
  background-color: #198754 !important;
}

.btn-primary {
  background-color: #0d6efd !important;
}

.btn-outline-danger:hover {
  background-color: #ffe6e6 !important;
}

.btn-outline-secondary:hover {
  background-color: #eef2f7 !important;
}

/* -----------------------------------
   MODALS
----------------------------------- */

.modal-content {
  border-radius: 14px !important;
}

.btn-close {
  outline: none !important;
  box-shadow: none !important;
}

/* -----------------------------------
   MOBILE RESPONSIVE FIXES
----------------------------------- */

@media (max-width: 768px) {
  
  body {
    padding: 10px;
  }

  .nav-tabs .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }

  #customers-table th, 
  #customers-table td {
    font-size: 0.82rem;
  }

  #delivery-list table {
    font-size: 0.78rem;
  }

  .sub-item-row {
    flex-direction: column;
  }

  .sub-item-row > * {
    width: 100%;
  }
}