/* ============================================================
   Vacation Manager - Custom Styles
   ============================================================ */

:root {
  --primary: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text-muted: #64748b;
  --sidebar-width: 260px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: #1e293b;
}

/* ── Login ─────────────────────────────────────────────────── */
.login-bg {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
  min-height: 100vh;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  margin: 1rem;
}

.login-icon {
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 2rem;
  color: var(--primary);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: -0.3px;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}

.avatar-circle-sm {
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
  border-radius: 12px;
  padding: 1.25rem;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.stat-card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-card-blue  { background: #eff6ff; }
.stat-card-blue .stat-icon { background: #dbeafe; color: #1d4ed8; }

.stat-card-green { background: #f0fdf4; }
.stat-card-green .stat-icon { background: #dcfce7; color: #16a34a; }

.stat-card-orange { background: #fffbeb; }
.stat-card-orange .stat-icon { background: #fef3c7; color: #d97706; }

.stat-card-purple { background: #faf5ff; }
.stat-card-purple .stat-icon { background: #ede9fe; color: #7c3aed; }
.text-purple { color: #7c3aed !important; }

/* ── Quick action buttons ───────────────────────────────────── */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border: 2px solid;
  border-radius: 12px;
  text-decoration: none;
  background: #fff;
  transition: all 0.15s ease;
  min-height: 120px;
  text-align: center;
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  background: #f8fafc;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  font-weight: 600;
  border-radius: 12px 12px 0 0 !important;
}

/* ── Tables ─────────────────────────────────────────────────── */
.table th {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  border-radius: 8px;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: #1e40af;
  border-color: #1e40af;
}

/* ── FullCalendar overrides ──────────────────────────────────── */
.fc {
  font-family: inherit !important;
}

.fc-toolbar-title {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
}

.fc-button {
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  padding: 5px 12px !important;
}

.fc-button-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.fc-button-primary:hover {
  background-color: #1e40af !important;
  border-color: #1e40af !important;
}

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
  background-color: #1e40af !important;
  border-color: #1e40af !important;
}

.fc-daygrid-event {
  border-radius: 4px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 2px 5px !important;
  border: none !important;
}

.fc-event-title {
  font-weight: 600 !important;
}

.fc-day-today {
  background: var(--primary-light) !important;
}

.fc-daygrid-day-number {
  font-size: 0.85rem;
  padding: 4px 8px !important;
}

.fc-col-header-cell-cushion {
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Event Tooltip ──────────────────────────────────────────── */
.event-tooltip {
  position: fixed;
  z-index: 9999;
  background: #1e293b;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  max-width: 220px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.event-tooltip .fw-bold {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  border-radius: 10px;
  border: none;
}

.alert-success { background: #dcfce7; color: #15803d; }
.alert-danger  { background: #fee2e2; color: #b91c1c; }
.alert-warning { background: #fef9c3; color: #a16207; }
.alert-info    { background: #e0f2fe; color: #0369a1; }

/* ── Dropdown ──────────────────────────────────────────────── */
.dropdown-menu {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
}

.dropdown-item {
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

.dropdown-item:hover { background: var(--surface); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stat-value { font-size: 1.6rem; }
  .fc-toolbar { flex-direction: column; gap: 8px; }
  .fc-toolbar-chunk { display: flex; justify-content: center; }
}

/* ── List group ─────────────────────────────────────────────── */
.list-group-item {
  border-color: var(--border);
  transition: background 0.1s;
}

/* ── Min width utilities ─────────────────────────────────────── */
.min-w-0 { min-width: 0; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* ── Spinner ────────────────────────────────────────────────── */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}
