/* ── Utility ──────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f2f5;
  color: #212529;
  min-height: 100vh;
}

a { color: #0d6efd; text-decoration: none; }
a:hover { text-decoration: underline; }

code { background: #e9ecef; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.break-all { word-break: break-all; }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}
.navbar .brand { font-weight: 700; font-size: 1.1rem; letter-spacing: .5px; }
.navbar .nav-links a {
  color: #cdd3e0;
  margin-left: 20px;
  font-size: .9rem;
  transition: color .2s;
}
.navbar .nav-links a:hover { color: #fff; text-decoration: none; }

/* ── Container ───────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 20px;
}

/* ── Auth card ───────────────────────────────────────────────────────────── */
.auth-card {
  max-width: 420px;
  margin: 80px auto;
  background: #fff;
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.auth-card h1 { margin-bottom: 24px; font-size: 1.5rem; }

/* ── Form helpers ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.form-group small  { display: block; margin-top: 4px; color: #6c757d; font-size: .8rem; }
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea,
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: .95rem;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, select:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: auto; }
.req { color: #dc3545; }

.form-card {
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  max-width: 560px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s;
  background: #e9ecef;
  color: #212529;
  text-decoration: none;
}
.btn:hover { background: #dee2e6; text-decoration: none; }
.btn-primary { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.btn-primary:hover { background: #0b5ed7; }
.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #bb2d3b; }
.btn-success { background: #198754; color: #fff; border-color: #198754; }
.btn-success:hover { background: #157347; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: .9rem;
}
.alert-danger  { background: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.alert-success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.alert-warning { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }
.key-display { width:100%; margin-top:8px; font-family:monospace; font-size:.85rem; resize:none; }

/* ── Stats grid ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  /* border-top: 4px solid #6c757d; */
}
/* .stat-card.success { border-top-color: #198754; }
.stat-card.warning { border-top-color: #ffc107; }
.stat-card.danger  { border-top-color: #dc3545; }
.stat-card.info    { border-top-color: #0dcaf0; } */
.stat-number { font-size: 2rem; font-weight: 700; }
.stat-label  { font-size: .8rem; color: #6c757d; margin-top: 4px; }
.admin-page-title {
	margin-bottom: 40px;
} 
/* ── Section header ──────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  font-size: .88rem;
}
.table th, .table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}
.table th { background: #f8f9fa; font-weight: 700; color: #495057; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8f9fa; }
.actions { white-space: nowrap; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge { padding: 3px 8px; border-radius: 12px; font-size: .75rem; font-weight: 700; }
.badge-success { background: #d1e7dd; color: #0f5132; }
.badge-warning { background: #fff3cd; color: #664d03; }
.badge-danger  { background: #f8d7da; color: #842029; }
.badge-info    { background: #cff4fc; color: #055160; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.filter-bar input, .filter-bar select {
  width: auto;
  padding: 7px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: .9rem;
}

/* ── Detail card ─────────────────────────────────────────────────────────── */
.detail-card {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.detail-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.detail-table th, .detail-table td { padding: 8px 12px; border-bottom: 1px solid #e9ecef; text-align: left; }
.detail-table th { width: 150px; color: #6c757d; font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 24px;
  color: #6c757d;
  font-size: .85rem;
  margin-top: 48px;
}
