/* ── Zero Hours — Brand Design System ────────────────────────────────────────── */

:root {
  --bg:          #FAF6F0;
  --surface:     #F0E9DF;
  --surface2:    #E5D9CB;
  --border:      #D5C5B0;
  --accent:      #E84B2A;
  --accent-dark: #B8391F;
  --accent-light:#FF7A5C;
  --text:        #1A0E08;
  --muted:       rgba(26,14,8,0.45);
  --success:     #2E7D32;
  --warning:     #B45309;
  --info:        #1565C0;
  --radius-btn:  8px;
  --radius-card: 14px;
  --radius-lg:   20px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height%3D'100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.main-content { position: relative; z-index: 1; }

/* ── Typography ───────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ── Nav ──────────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,246,240,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

.nav-link {
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: background 0.15s;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  margin-left: 4px;
}

.nav-user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.nav-logout {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.nav-logout:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Buttons ──────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,75,42,0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
}

.btn-lg {
  font-size: 17px;
  padding: 16px 32px;
  border-radius: 10px;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Cards ────────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.card-lg {
  border-radius: var(--radius-lg);
  padding: 40px;
}

/* ── Form elements ────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-label .required {
  color: var(--accent);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,75,42,0.12);
  background: #fff;
}

.form-input::placeholder { color: var(--muted); }

.form-input.error { border-color: var(--accent); }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .form-input { padding-right: 44px; }

.input-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.input-toggle:hover { color: var(--text); }

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Flash messages ───────────────────────────────────────────────────────────── */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.flash-error {
  background: rgba(232,75,42,0.08);
  border: 1px solid rgba(232,75,42,0.25);
  color: #c23a1a;
}

.flash-success {
  background: rgba(46,125,50,0.08);
  border: 1px solid rgba(46,125,50,0.25);
  color: var(--success);
}

.flash-info {
  background: rgba(21,101,192,0.08);
  border: 1px solid rgba(21,101,192,0.25);
  color: var(--info);
}

/* ── Auth layout ──────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-container {
  width: 100%;
  max-width: 520px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 4px 32px rgba(26,14,8,0.07);
}

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

.auth-header h1 {
  font-size: 1.875rem;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--muted);
  font-size: 15px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a { color: var(--accent); font-weight: 600; }

/* ── Role selector cards ──────────────────────────────────────────────────────── */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.role-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  background: var(--bg);
  user-select: none;
}

.role-card:hover {
  border-color: var(--accent-light);
  background: rgba(232,75,42,0.04);
}

.role-card.selected {
  border-color: var(--accent);
  background: rgba(232,75,42,0.06);
  box-shadow: 0 0 0 3px rgba(232,75,42,0.12);
}

.role-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
}

.role-card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.role-card-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Divider ──────────────────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Checkbox ─────────────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
}

.checkbox-group label {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-group label a { color: var(--accent); font-weight: 600; }

/* ── Verify email page ────────────────────────────────────────────────────────── */
.verify-icon {
  width: 72px;
  height: 72px;
  background: rgba(232,75,42,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.verify-email-display {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  margin: 16px 0 24px;
  word-break: break-all;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.steps-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.step-num {
  width: 24px;
  height: 24px;
  background: var(--surface2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

/* ── Utilities ────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-sm { font-size: 13px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Page header ─────────────────────────────────────────────────────────────── */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 28px;
  margin-bottom: 32px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}
.page-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ── Tabs ────────────────────────────────────────────────────────────────────── */
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Shift cards ─────────────────────────────────────────────────────────────── */
.shift-list { display: grid; gap: 12px; }
.shift-card { padding: 18px 20px; }
.shift-card-link { text-decoration: none; color: inherit; display: block; transition: transform 0.15s, box-shadow 0.15s; }
.shift-card-link:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(26,14,8,0.10); }
.shift-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.shift-role { font-family: var(--font-display); font-weight: 700; font-size: 16px; text-transform: capitalize; }
.shift-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.shift-pay { color: var(--accent); font-weight: 700; }
.shift-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.applicant-count { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }

/* ── Shift status badges ─────────────────────────────────────────────────────── */
.shift-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 20px; }
.status-open { background: #E8F5E9; color: #2E7D32; }
.status-filled { background: #E3F2FD; color: #1565C0; }
.status-in_progress { background: #FFF3E0; color: #E65100; }
.status-completed { background: #F3E5F5; color: #6A1B9A; }
.status-cancelled { background: #FAFAFA; color: rgba(26,14,8,0.4); }
.status-confirmed { background: #E3F2FD; color: #1565C0; }
.status-checked_in { background: #FFF3E0; color: #E65100; }
.status-checked_out { background: #E8F5E9; color: #2E7D32; }
.status-no_show { background: #FFEBEE; color: #C62828; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--border); color: var(--muted); }
.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-pending { background: #FFF3E0; color: #E65100; }
.badge-error { background: #FFEBEE; color: #C62828; }
.badge-role { background: var(--accent); color: #fff; }
.badge-area { background: #1A0E08; color: #FAF6F0; }

/* ── Stats ───────────────────────────────────────────────────────────────────── */
.stat-card { padding: 20px 24px; }
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 800; }

/* ── Data table ──────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-family: var(--font-display); font-size: 20px; margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }

/* ── Button sizes ────────────────────────────────────────────────────────────── */
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .profile-layout { grid-template-columns: 1fr !important; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}
@media (max-width: 560px) {
  .auth-card { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .role-selector { grid-template-columns: 1fr; }
  .nav-link { display: none; }
  .page-title { font-size: 22px; }
  .shift-meta { gap: 8px; }
}
