* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* ── Auth Page ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 40px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 24px;
  color: #1a1a2e;
  margin-bottom: 6px;
}

.auth-header p {
  font-size: 14px;
  color: #666;
}

.message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.message.success {
  background: #e6f7ee;
  color: #0d7d40;
  border: 1px solid #b7ebd0;
}

.message.error {
  background: #fde8e8;
  color: #c41e3a;
  border: 1px solid #f5c6cb;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0f3460;
  box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #0f3460;
  color: #fff;
}

.btn-primary:hover {
  background: #1a4a7a;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-outline {
  background: transparent;
  color: #0f3460;
  border: 2px solid #0f3460;
}

.btn-outline:hover {
  background: #0f3460;
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-danger {
  background: #c41e3a;
  color: #fff;
}

.btn-danger:hover {
  background: #a01830;
}

.btn-full {
  width: 100%;
}

.btn + .btn {
  margin-left: 8px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #666;
}

.auth-switch a {
  color: #0f3460;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* ── Dashboard Layout ── */
.dashboard-page {
  display: flex;
  flex-direction: column;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.dashboard {
  display: flex;
  flex: 1;
}

.sidebar {
  width: 220px;
  background: #16213e;
  padding: 20px 0;
  min-height: calc(100vh - 56px);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: block;
  padding: 12px 24px;
  color: #a0aec0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: #4299e1;
}

.main-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ── Sections ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 22px;
  color: #1a1a2e;
}

.section-header h3 {
  font-size: 17px;
  color: #1a1a2e;
}

/* ── Form Panel ── */
.form-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.form-panel h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #1a1a2e;
}

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 180px;
}

.form-actions {
  margin-top: 12px;
}

.filter-bar {
  margin-bottom: 20px;
}

/* ── Table ── */
.table-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: #f8fafc;
}

.table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
  letter-spacing: 0.5px;
}

.table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #334155;
  border-top: 1px solid #f1f5f9;
}

.table tbody tr:hover {
  background: #f8fafc;
}

.text-center {
  text-align: center;
  color: #94a3b8;
}

/* ── Inline Actions ── */
.actions-cell {
  display: flex;
  gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .nav-item {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .nav-item.active {
    border-left-color: transparent;
    border-bottom-color: #4299e1;
  }

  .form-row {
    flex-direction: column;
  }

  .main-content {
    padding: 16px;
  }
}