html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 80px;
  background: #f0f4f8;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== Navbar ===== */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: #fff !important;
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: #ffeaa7 !important;
  transform: translateY(-1px);
  transition: all 0.2s;
}

/* ===== Header ===== */
header {
  margin-bottom: 1.5rem;
}

/* ===== Card / Container ===== */
main .container, main > .container {
  max-width: 1200px;
}

/* ===== Page Title ===== */
h2 {
  color: #2d3436;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #667eea;
  display: inline-block;
}

/* ===== Buttons ===== */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd6 0%, #6a4192 100%);
}

.btn-success {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
  border: none;
}

.btn-info {
  background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
  border: none;
}

.btn-warning {
  background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
  border: none;
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
  border: none;
}

.btn-secondary {
  background: #b2bec3;
  border: none;
  color: #fff;
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}

/* ===== Table ===== */
.table {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.table thead th {
  position: relative;
  background: #667eea;
  color: #fff;
  font-weight: 600;
  border: none !important;
  padding: 12px 16px;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-align: center;
  vertical-align: middle;
}

.table thead th::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 2px;
  background: rgba(255,255,255,0.5);
}

.table thead th:last-child::after {
  display: none;
}

.table tbody td {
  padding: 10px 16px;
  vertical-align: middle;
  color: #2d3436;
  border-bottom: 1px solid #f1f2f6;
}

.table tbody tr:hover {
  background-color: #f8f9ff;
  transition: background 0.2s;
}

/* ===== Modal ===== */
.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 12px 12px 0 0;
  border: none;
  padding: 1rem 1.5rem;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 1.5rem;
  background: #fafbfc;
}

.modal-footer {
  border-top: 1px solid #eee;
  padding: 1rem 1.5rem;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

/* ===== Forms ===== */
.form-label {
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-control, .form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s;
  background: #fff;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* ===== Footer ===== */
.footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 1rem 0;
  color: #636e72;
}

/* ===== Description List (Details/Delete) ===== */
dl.row dt {
  font-weight: 600;
  color: #667eea;
}

dl.row dd {
  color: #2d3436;
}

/* ===== Alert / Validation ===== */
.text-danger {
  font-size: 0.85rem;
}

/* ===== Active nav link ===== */
.navbar .nav-link.active {
  color: #ffeaa7 !important;
  font-weight: 700;
}

/* ===== Card ===== */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: #fff;
}

/* ===== Dropdown menu ===== */
.dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.dropdown-item {
  padding: 0.5rem 1.2rem;
  font-weight: 500;
  color: #2d3436;
  transition: all 0.15s;
}

.dropdown-item:hover {
  background: #667eea;
  color: #fff;
}

/* ===== Pagination ===== */
.pagination {
  gap: 2px;
}

.pagination .page-link {
  border-radius: 6px;
  border: none;
  color: #667eea;
  background: #fff;
  padding: 0.4rem 0.85rem;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.2s;
}

.pagination .page-link:hover {
  background: #667eea;
  color: #fff;
}

.pagination .page-item.active .page-link {
  background: #667eea;
  color: #fff;
  box-shadow: 0 2px 6px rgba(102,126,234,0.4);
}

.pagination .page-item.disabled .page-link {
  background: #f1f2f6;
  color: #b2bec3;
}
