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

body {
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  background: #f0f4fb;
  color: #1e2433;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Login-kort ─────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  padding: 44px 48px;
  width: 100%;
  max-width: 420px;
}

.card h1 { font-size: 1.55rem; margin-bottom: 6px; color: #1a1a2e; }
.card .subtitle { color: #718096; margin-bottom: 28px; font-size: 0.93rem; }

/* ─── Formular-elementer ─────────────────────────── */
.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

input, select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafbfc;
  color: #1e2433;
  font-family: inherit;
}

input:focus, select:focus {
  outline: none;
  border-color: #4361ee;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(67,97,238,0.12);
}

/* ─── Knapper ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 18px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

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

.btn-primary  { background: #4361ee; color: #fff; border-color: #4361ee; }
.btn-primary:hover  { background: #3451d1; box-shadow: 0 2px 10px rgba(67,97,238,0.28); }

.btn-success  { background: #38a169; color: #fff; border-color: #38a169; }
.btn-success:hover  { background: #2f855a; }

.btn-danger   { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-danger:hover   { background: #c53030; }

.btn-secondary { background: #f0f4f8; color: #4a5568; border-color: #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }

.btn-sm {
  padding: 6px 13px;
  font-size: 0.82rem;
  width: auto;
  border-radius: 7px;
}

/* Ikonknapper (eksport) */
.btn-icon {
  width: 36px; height: 36px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.05rem;
  color: #718096;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.btn-icon:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.btn-icon.excel:hover:not(:disabled) {
  background: #f0fff4; border-color: #38a169; color: #38a169;
}

.btn-icon.pdf:hover:not(:disabled) {
  background: #fdf0ff; border-color: #8e44ad; color: #8e44ad;
}

.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── Alerts ─────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error   { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.hidden { display: none; }

/* ─── Dashboard layout ───────────────────────────── */
body.dashboard { align-items: flex-start; }

.page-wrapper {
  display: flex; flex-direction: column;
  min-height: 100vh; width: 100%;
}

/* ─── Topbar ─────────────────────────────────────── */
.topbar {
  background: #1a1a2e;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.topbar h2 { font-size: 0.97rem; font-weight: 600; color: #e8edf5; letter-spacing: 0.1px; }

.topbar .user-info {
  font-size: 0.83rem; color: #94a3b8;
  display: flex; align-items: center; gap: 6px;
}

.topbar .logout-btn {
  background: none;
  border: 1.5px solid #334155;
  color: #94a3b8;
  padding: 5px 13px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.82rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.topbar .logout-btn:hover { border-color: #e53e3e; color: #fc8181; }

/* ─── Indholdområde ──────────────────────────────── */
.main-content {
  margin: 28px auto;
  padding: 0 40px;
  width: 100%;
}

/* ─── Sektion-header (titel + handlinger) ────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title i { color: #4361ee; font-size: 1.1rem; }

.section-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Faner ──────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 24px;
  gap: 0;
}

.tab-btn {
  padding: 10px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  font-size: 0.88rem; font-weight: 600;
  color: #718096;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn:hover { color: #4361ee; }

.tab-btn.active {
  color: #4361ee;
  border-bottom-color: #4361ee;
}

.tab-content  { display: none; }
.tab-content.active { display: block; }

/* ─── Kort (cards) ───────────────────────────────── */
.data-card, .form-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8edf5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  padding: 26px 30px;
  margin-bottom: 24px;
}

/* ─── Tabel ──────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }

th {
  text-align: left;
  padding: 9px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
  white-space: nowrap;
  color: #2d3748;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f7fbff; }

/* ─── Badges ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.74rem; font-weight: 700;
}

.badge-active   { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.badge-inactive { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.badge-manager  { background: #ebf4ff; color: #3451d1; border: 1px solid #c3dafe; }

/* ─── Formular-layout ────────────────────────────── */
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

/* ─── Filterrække ────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-row .form-group { margin-bottom: 0; }

/* ─── Kiosk / Employee-visning ───────────────────── */
.clock-widget {
  background: #fff; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  padding: 36px; text-align: center; margin-bottom: 28px;
}

.clock-widget .employee-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.clock-widget .current-time {
  font-size: 2.8rem; font-weight: 300;
  color: #4361ee; margin: 16px 0; letter-spacing: 2px;
}

.clock-widget .status-badge {
  display: inline-block; padding: 5px 16px;
  border-radius: 20px; font-size: 0.88rem; font-weight: 600; margin-bottom: 24px;
}

.badge-idle    { background: #f0f4f8; color: #718096; }
.badge-working { background: #f0fff4; color: #276749; }
.clock-widget .btn { max-width: 260px; margin: 0 auto; font-size: 1.1rem; padding: 14px; }
.started-info { font-size: 0.93rem; color: #888; margin-top: 14px; }

/* ─── Responsiv ──────────────────────────────────── */
@media (max-width: 768px) {
  .card        { padding: 28px 20px; }
  .topbar      { padding: 12px 16px; }
  .main-content { margin: 16px auto; padding: 0 14px; }
  .data-card, .form-card { padding: 18px 16px; }
  .form-row    { flex-direction: column; gap: 0; }
  .filter-row  { flex-direction: column; align-items: stretch; }
  .tabs        { overflow-x: auto; }
}
