/* ==========================================================================
   Driving School - Project overrides on top of Sneat Bootstrap Admin
   ========================================================================== */

/* ---------- Panels (legacy bootstrap-3 markup) -> Sneat card look ---------- */
.panel {
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff;
  box-shadow: 0 0.25rem 1.125rem rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.panel-heading {
  background: #fff !important;
  border-bottom: 1px solid rgba(105, 110, 133, 0.16) !important;
  border-radius: 0 !important;
  color: #344054 !important;
  padding: 1.25rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.panel-heading .panel-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #344054;
  margin: 0;
}
.panel-controls {
  float: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.panel-controls .btn {
  margin-left: 0;
  font-size: 0.8125rem;
  padding: 0.375rem 0.75rem;
}
.panel-body { padding: 1.5rem; background: #fff; }
.panel .table-responsive { overflow-x: auto; }
.panel .table-responsive > table { min-width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  transition: all 0.15s ease-in-out;
}
.btn-sm { padding: 0.3125rem 0.75rem !important; font-size: 0.8125rem !important; }
.btn-xs { padding: 0.25rem 0.5rem !important; font-size: 0.75rem !important; border-radius: 5px !important; }
.btn-primary { background: #696cff !important; border-color: #696cff !important; color: #fff !important; box-shadow: 0 0.125rem 0.25rem rgba(105, 108, 255, 0.4); }
.btn-primary:hover, .btn-primary:focus { background: #585af0 !important; border-color: #585af0 !important; }
.btn-success { background: #66e6b4 !important; border-color: #66e6b4 !important; color: #0f5132 !important; }
.btn-danger  { background: #ff3e67 !important; border-color: #ff3e67 !important; color: #fff !important; }
.btn-warning { background: #ffb84d !important; border-color: #ffb84d !important; color: #7a4b00 !important; }
.btn-info    { background: #00c9ff !important; border-color: #00c9ff !important; color: #003e4f !important; }
.btn-default { background: #fff !important; border-color: rgba(105, 110, 133, 0.3) !important; color: #475467 !important; }
.btn-default:hover { background: #f9fafb !important; border-color: rgba(105, 110, 133, 0.5) !important; }

/* ---------- Forms (Sneat style) ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label,
.form-horizontal .control-label {
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  color: #475467 !important;
  margin-bottom: 0.5rem !important;
  display: block;
}
.form-control {
  border-radius: 6px !important;
  border: 1px solid rgba(105, 110, 133, 0.32) !important;
  padding: 0.6rem 0.9rem !important;
  font-size: 0.875rem !important;
  color: #344054 !important;
  min-height: 40px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  border-color: #696cff !important;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.12) !important;
  outline: none !important;
}
select.form-control { min-height: 40px; }
textarea.form-control { min-height: 88px; resize: vertical; }
input[type="file"].form-control { padding: 0.45rem 0.6rem !important; min-height: 0; }
.form-control[readonly] { background: #f9fafb !important; color: #667085 !important; }
.checkbox, .radio { margin-bottom: 0.75rem; }
.checkbox label, .radio label { font-weight: 400 !important; font-size: 0.8125rem !important; color: #475467 !important; margin-bottom: 0 !important; display: inline; }
input[type="checkbox"], input[type="radio"] { margin-right: 0.4rem; }

/* ---------- Tables ---------- */
.table {
  font-size: 0.8125rem !important;
  border: 0 !important;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.table > thead > tr > th {
  background: #f9fafb !important;
  color: #475467 !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid rgba(105, 110, 133, 0.16) !important;
  border-top: 0 !important;
  padding: 0.75rem 1rem !important;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: 0.75rem 1rem !important;
  vertical-align: middle;
  color: #344054;
  border-bottom: 1px solid rgba(105, 110, 133, 0.1) !important;
  border-top: 0 !important;
}
.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfcfd !important; }
.table-hover > tbody > tr:hover { background: #f9fafb !important; }
.table-bordered { border: 0 !important; }
.table-bordered > tbody > tr > td,
.table-bordered > thead > tr > th { border-right: 0 !important; }
.table > tfoot > tr > td,
.table > tfoot > tr > th {
  background: #f9fafb !important;
  font-weight: 600;
  border-top: 1px solid rgba(105, 110, 133, 0.16) !important;
}
.table td { white-space: nowrap; }

/* ---------- DataTables integration ---------- */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border-radius: 6px !important;
  border: 1px solid rgba(105, 110, 133, 0.32) !important;
  padding: 0.4rem 0.7rem !important;
  font-size: 0.8125rem !important;
  margin-left: 0.5rem;
  min-height: 0;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter { font-size: 0.8125rem !important; color: #667085 !important; }
.page-link { border-radius: 6px !important; font-size: 0.8125rem !important; color: #475467 !important; }
.page-item.active .page-link { background: #696cff !important; border-color: #696cff !important; }

/* ---------- Table action buttons ---------- */
.table-actions { display: inline-flex; gap: 0.25rem; flex-wrap: nowrap; }
.table-actions .btn-xs { border-radius: 5px !important; }

/* ---------- Alerts / flash ---------- */
.alert {
  border-radius: 8px !important;
  border: 1px solid rgba(105, 110, 133, 0.16) !important;
  font-size: 0.875rem !important;
  padding: 1rem 1.25rem;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.05);
}
.alert-success { background: #f0fdf8 !important; border-color: #a7f3d0 !important; color: #0f5132 !important; }
.alert-danger  { background: #fff1f3 !important; border-color: #fecdd6 !important; color: #9f1239 !important; }
.alert-warning { background: #fffbeb !important; border-color: #fde68a !important; color: #92400e !important; }
.alert-info    { background: #ecfeff !important; border-color: #a5f3fc !important; color: #155e75 !important; }

/* ---------- Dashboard stat panels ---------- */
.panel-warning > .panel-body { background: #fff; border-radius: 0; }
.panel-success > .panel-body { background: #fff; border-radius: 0; }
.panel-danger  > .panel-body { background: #fff; border-radius: 0; }
.panel-info    > .panel-body { background: #fff; border-radius: 0; }
.widget-int {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #344054 !important;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.widget-title {
  font-size: 0.8125rem !important;
  color: #667085 !important;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ---------- Chosen override ---------- */
.chosen-container { width: 100% !important; font-size: 0.875rem; }
.chosen-container-single .chosen-single { height: 40px; line-height: 38px; border-color: rgba(105,110,133,0.32); border-radius: 6px; }

/* ---------- Modal ---------- */
.modal-content { border: 0 !important; border-radius: 12px !important; box-shadow: 0 1.5rem 4rem rgba(0,0,0,0.18) !important; }
.modal-header { border-bottom-color: rgba(105,110,133,0.16) !important; padding: 1.25rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top-color: rgba(105,110,133,0.16) !important; padding: 1rem 1.5rem; }

/* ---------- Login page ---------- */
.login-box { max-width: 420px; margin: 8% auto; }
.login-box .panel { border-radius: 12px !important; box-shadow: 0 1.5rem 3rem rgba(0,0,0,0.12) !important; overflow: hidden; }
.login-box .panel-heading {
  background: #fff !important;
  color: #344054 !important;
  text-align: center;
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(105,110,133,0.16) !important;
}
.login-box .panel-title { font-size: 1.375rem !important; font-weight: 700 !important; color: #344054 !important; }