/* =========================================================
   LIT CRM - Appointment Setter Dashboard
   Theme-aligned styling
   ========================================================= */

body[data-page="appointmentsetter.php"] {
  background: #f8fafc;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------ PAGE HEAD ------------------ */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.as-header-help {
  margin-top: 6px;
  font-size: 13px;
  color: #64748b;
}

.page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
}

.page-head .muted {
  margin-top: 6px;
  font-size: 15px;
  color: #64748b;
}

/* ------------------ SUMMARY CARDS ------------------ */
.as-summary-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.as-summary-card {
  min-width: 110px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.as-summary-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  margin-bottom: 6px;
}

.as-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* ------------------ MAIN CARDS ------------------ */
.as-card {
  margin-bottom: 22px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
  background: #fff;
  overflow: hidden;
}

.as-card .card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.as-card .card-body {
  padding: 18px 20px 20px;
}

/* ------------------ HEADER ACTIONS ------------------ */
.as-card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.as-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------ MAIN GRID ------------------ */
.as-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ------------------ FORMS ------------------ */
.as-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.as-span-2 {
  grid-column: 1 / -1;
}

.as-form-grid .input,
.as-form-grid textarea.input,
.as-form-grid select.input {
  width: 100%;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.as-form-grid .input:focus,
.as-form-grid textarea.input:focus,
.as-form-grid select.input:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.as-form-grid textarea.input {
  resize: vertical;
  min-height: 110px;
}

/* ------------------ ASSIGN TO ------------------ */
.as-assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.as-assign-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  cursor: pointer;
}

.as-assign-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.as-assign-card input[type="radio"] {
  margin-top: 3px;
}

.as-assign-card strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.as-assign-card .small {
  font-size: 12px;
  color: #64748b;
}

/* ------------------ LEAD QUEUE ------------------ */
.as-queue-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.as-current-lead {
  margin-bottom: 14px;
  color: #64748b;
  font-size: 14px;
}

.as-lead-card {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.5;
}

.as-lead-card strong {
  font-size: 16px;
  font-weight: 800;
}

/* ------------------ TABLE POLISH ------------------ */
.as-card .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.as-card .table th {
  text-align: left;
  padding: 12px 14px;
  background: #f9fafb;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.as-card .table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #0f172a;
}

.as-card .table tr:last-child td {
  border-bottom: none;
}

.as-card .table tr:hover {
  background: #f9fafb;
}

/* ------------------ SPACING HELPERS ------------------ */
.as-mt-16 {
  margin-top: 16px;
}

/* ------------------ BUTTON TWEAKS ------------------ */
.as-card .btn {
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.as-card .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ------------------ RESPONSIVE ------------------ */
@media (max-width: 1100px) {
  .page-head {
    align-items: stretch;
  }

  .as-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .as-form-grid,
  .as-assign-grid {
    grid-template-columns: 1fr;
  }

  .as-summary-grid {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .as-card .card-header,
  .as-card .card-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .as-summary-card {
    flex: 1 1 100%;
    min-width: 0;
  }

  .as-actions-inline,
  .as-queue-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .as-actions-inline .btn,
  .as-queue-actions .btn {
    width: 100%;
  }

  .as-card-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .as-card .table {
    font-size: 13px;
  }

  .as-card .table th,
  .as-card .table td {
    padding: 10px 10px;
  }
}