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;
}

/* ===== Modern UI theme ===== */
:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --surface: #ffffff;
  --page-bg: #f4f6fb;
  --text-muted-2: #6b7280;
}

body {
  background: var(--page-bg);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, #4f46e5, #7c3aed) !important;
  border-bottom: 0 !important;
  box-shadow: 0 2px 12px rgba(79, 70, 229, .25);
}
.navbar .navbar-brand { color: #fff; font-weight: 700; letter-spacing: .3px; }
.navbar .nav-link { color: rgba(255, 255, 255, .85) !important; font-weight: 500; }
.navbar .nav-link:hover { color: #fff !important; }
.navbar-toggler { background: rgba(255, 255, 255, .85); }

/* Page header */
.page-header h2 { font-weight: 700; margin: 0; }
.page-header small { color: var(--text-muted-2); }

/* Card */
.card-surface {
  background: var(--surface);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(17, 24, 39, .06);
  overflow: hidden;
}
.card-surface .card-toolbar { padding: 1rem 1.25rem; border-bottom: 1px solid #eef0f5; }

/* Search */
.search-box { position: relative; max-width: 420px; }
.search-box .form-control {
  border-radius: 999px;
  padding-left: 2.6rem;
  background: #f4f6fb;
  border: 1px solid transparent;
}
.search-box .form-control:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }
.search-box::before {
  content: "\1F50D";
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  font-size: .85rem; opacity: .55; z-index: 5;
}

/* Table */
.table-modern { margin: 0; }
.table-modern thead th {
  background: #f9fafb;
  color: var(--text-muted-2);
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid #eef0f5; padding: .85rem 1.25rem;
}
.table-modern tbody td { padding: .85rem 1.25rem; border-color: #f0f2f7; vertical-align: middle; }
.table-modern tbody tr:hover { background: #f8f9ff; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  color: #fff; font-weight: 600; margin-right: .75rem;
}
.id-badge { color: var(--text-muted-2); font-variant-numeric: tabular-nums; }

/* Buttons */
.btn-primary { background: var(--brand); border-color: var(--brand); border-radius: 10px; font-weight: 500; }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-soft-edit, .btn-soft-delete { border: 0; border-radius: 8px; font-weight: 500; }
.btn-soft-edit { background: #eef2ff; color: #4338ca; }
.btn-soft-edit:hover { background: #e0e7ff; color: #3730a3; }
.btn-soft-delete { background: #fef2f2; color: #b91c1c; }
.btn-soft-delete:hover { background: #fee2e2; color: #991b1b; }

/* Modal */
.modal-content { border: 0; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.modal-header, .modal-footer { border-color: #eef0f5; }
.form-control { border-radius: 10px; padding: .6rem .85rem; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .15); }

/* Alerts */
.alert { border: 0; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }

/* Footer */
.footer { background: transparent; border-top: 0 !important; }
