html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Enhanced Form Styling ──────────────────────────────────── */
/* Fix distorted input controls */
.form-control, .form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Ensure proper spacing for form labels and controls */
.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Fix small form controls */
.form-control-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

/* Ensure proper spacing in form groups */
.form-group, .mb-3 {
  margin-bottom: 1rem;
}

/* Fix checkbox and radio button styling */
.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.125em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid #ced4da;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
}

/* Improve card body spacing for forms */
.card-body {
  padding: 1.5rem;
}

/* Fix inline form issues */
.row.g-3 > .col-md-* {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

/* Ensure proper button spacing */
.btn {
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border: 1px solid transparent;
}

/* Fix text alignment in forms */
.text-danger {
  font-size: 0.875rem;
}

/* Improve validation message styling */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

/* Ensure proper table styling in forms */
.table {
  margin-bottom: 0;
}

.table th, .table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

/* Fix any potential overflow issues */
.card {
  overflow: visible;
}

/* Ensure proper responsive behavior */
@media (max-width: 767.98px) {
  .form-control-sm {
    font-size: 1rem;
    padding: 0.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* Calendar card styles */
.calendar-card {
  border-radius: 0.6rem;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.calendar-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(17,24,39,0.10); }
.calendar-card .card-body { padding: 1rem; display: flex; align-items: flex-start; }
.calendar-date { width:72px; min-width:72px; background: linear-gradient(180deg,#ffffff,#f7fbff); border-radius: 0.4rem; padding:6px 8px; border:1px solid rgba(0,0,0,0.04); }
.cd-day { font-size:1.25rem; font-weight:700; line-height:1; color:#0d6efd; }
.cd-month { font-size:0.85rem; text-transform:uppercase; color:#6c757d; }
.cd-time { margin-top:6px; display:block; }
.calendar-card .card-title { font-weight:700; font-size:1.05rem; }
.calendar-card .card-footer { padding:0.6rem 0.9rem; border-top:1px solid rgba(0,0,0,0.04); }
.calendar-card .card-footer .btn { padding:0.35rem 0.55rem; font-size:0.9rem; }
.calendar-card .card-footer .btn { display:inline-flex; align-items:center; gap:0.45rem; }
.calendar-card .text-truncate { max-width:100%; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Small helpers */
.badge.bg-light { background-color:#f1f3f5 !important; }

/* ── Action Button Styling ──────────────────────────────────── */
/* Ensure action buttons in tables are visible and properly styled */
.table td.text-end .btn {
  margin-left: 0.25rem;
}

.table td.text-end .btn:first-child {
  margin-left: 0;
}

/* Ensure FontAwesome icons in buttons are visible */
.btn i.fas,
.btn i.far,
.btn i.fal,
.btn i.fab {
  color: inherit;
}

/* Make sure solid button icons are white */
.btn-primary i,
.btn-secondary i,
.btn-success i,
.btn-danger i,
.btn-warning i,
.btn-info i,
.btn-dark i {
  color: #fff;
}
