/* Cube Espresso Bar — Staff Scheduler */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #F7F2EC;
  --surface:     #FFFFFF;
  --border:      #E4D8CC;
  --espresso:    #2C1A0E;
  --coffee:      #5C3520;
  --latte:       #9B6B4E;
  --cream:       #EDD9C0;
  --text:        #1A0F08;
  --text-muted:  #7A6558;
  --accent:      #C47840;
  --accent-hover:#A86030;
  --success:     #2D7A4F;
  --warning:     #C48040;
  --danger:      #B83030;
  --info:        #2D5F8A;
  --radius:      10px;
  --shadow:      0 2px 12px rgba(44,26,14,0.10);
  --shadow-lg:   0 8px 32px rgba(44,26,14,0.16);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
}

/* ── Auth screen ─────────────────────────────────────────────────────────── */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #2C1A0E 0%, #5C3520 60%, #9B6B4E 100%);
}

.auth-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .store-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--espresso);
  letter-spacing: -0.3px;
}
.auth-logo .tagline {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color .2s;
  outline: none;
}
input:not([type="radio"]):not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--cream); color: var(--espresso); }
.btn-secondary:hover { background: var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-ghost     { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-full      { width: 100%; }
.btn-sm        { padding: 6px 12px; font-size: 12px; }
.btn:disabled  { opacity: .5; cursor: not-allowed; }

/* ── App shell ───────────────────────────────────────────────────────────── */
#app-screen { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: var(--espresso);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.topbar-brand { font-size: 16px; font-weight: 700; letter-spacing: -.2px; flex: 1; }
.topbar-brand span { color: var(--cream); opacity: .7; font-weight: 400; font-size: 13px; margin-left: 8px; }
.topbar-nav { display: flex; gap: 4px; }
.topbar-nav button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.65);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.topbar-nav button:hover, .topbar-nav button.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.topbar-user {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Views ───────────────────────────────────────────────────────────────── */
.view { display: none; flex: 1; overflow: hidden; flex-direction: column; padding: 20px 24px; }
.view.active { display: flex; }

.view-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.view-title { font-size: 20px; font-weight: 700; color: var(--espresso); }

/* ── Schedule view ───────────────────────────────────────────────────────── */
.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.period-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
}
.period-label { font-size: 14px; font-weight: 600; color: var(--espresso); min-width: 220px; text-align: center; }
.nav-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  border-radius: 6px;
  transition: all .15s;
}
.nav-btn:hover { background: var(--bg); color: var(--espresso); }

.schedule-wrap {
  flex: 1;
  overflow: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

/* ── Schedule grid: dates as rows, employees as columns ─────────────────── */
.schedule-grid {
  display: flex;
  flex-direction: column;
  min-width: max-content;
}

/* Sticky top header row: corner + employee columns */
.schedule-header-row {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 2px solid rgba(255,255,255,.15);
}

.schedule-corner {
  width: 110px;
  flex-shrink: 0;
  background: var(--espresso);
  border-right: 1px solid rgba(255,255,255,.1);
  padding: 0 12px;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.4);
  position: sticky;
  left: 0;
  z-index: 14;
}

.schedule-emp-header {
  min-width: 130px;
  background: var(--espresso);
  border-right: 1px solid rgba(255,255,255,.1);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  user-select: none;
  transition: background .15s;
}
.schedule-emp-header:hover { background: rgba(44,26,14,.8); }
.schedule-emp-header:active { cursor: grabbing; }
.schedule-emp-header.dragging { opacity: .45; }

.emp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.emp-name-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Date rows */
.schedule-date-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}
.schedule-date-row:last-child { border-bottom: none; }
.schedule-date-row.weekend { background: #fdfaf7; }

/* Sticky left date label */
.schedule-date-label {
  width: 110px;
  flex-shrink: 0;
  background: var(--espresso);
  border-right: 1px solid rgba(255,255,255,.1);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: sticky;
  left: 0;
  z-index: 8;
}
.schedule-date-row.weekend .schedule-date-label { background: var(--coffee); }
.schedule-date-row.today   .schedule-date-label { background: var(--accent); }
.date-day-name { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.55); }
.date-num      { font-size: 20px; font-weight: 700; line-height: 1; color: #fff; }
.date-month    { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 1px; }

/* Shift cells (employee × date intersection) */
.schedule-shift-cell {
  min-width: 130px;
  border-right: 1px solid var(--border);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
  transition: background .15s;
}
.schedule-shift-cell.weekend    { background: #fdfaf7; }
.schedule-shift-cell.drag-over  { background: #FFF3E0; outline: 2px dashed var(--accent); outline-offset: -2px; }
.schedule-shift-cell.has-leave  { background: #fff5f5; }
.schedule-shift-cell.has-unavail{ background: #f5f0ff; }

.day-cell-add {
  position: absolute;
  bottom: 3px; right: 4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--latte);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.schedule-shift-cell:hover .day-cell-add { opacity: 1; }

.shift-block {
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  transition: filter .15s;
}
.shift-block:hover { filter: brightness(1.1); }
.shift-block .shift-time { font-size: 10px; font-weight: 400; opacity: .85; white-space: nowrap; }
.shift-del {
  background: rgba(0,0,0,.2);
  border: none;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  padding: 1px 4px;
  line-height: 1;
  opacity: 0;
  transition: opacity .15s;
}
.shift-block:hover .shift-del { opacity: 1; }

.conflict-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
}
.conflict-leave   { background: #FFE0E0; color: var(--danger); }
.conflict-unavail { background: #EDE0FF; color: #6B21A8; }

/* ── Employees view ──────────────────────────────────────────────────────── */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  overflow-y: auto;
}

.employee-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: box-shadow .2s;
}
.employee-card:hover { box-shadow: var(--shadow-lg); }

.emp-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.emp-info { flex: 1; min-width: 0; }
.emp-info-name  { font-size: 15px; font-weight: 600; color: var(--espresso); }
.emp-info-role  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-top: 2px; }
.emp-info-meta  { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }

/* ── Leave view ──────────────────────────────────────────────────────────── */
.leave-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.leave-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.leave-info { flex: 1; }
.leave-name  { font-weight: 600; font-size: 14px; color: var(--espresso); }
.leave-dates { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.leave-reason{ font-size: 12px; color: var(--text-muted); margin-top: 2px; font-style: italic; }
.leave-actions { display: flex; gap: 8px; flex-shrink: 0; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-pending  { background: #FFF3CD; color: #856404; }
.badge-approved { background: #D1FAE5; color: #065F46; }
.badge-rejected { background: #FEE2E2; color: #991B1B; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title  { font-size: 18px; font-weight: 700; color: var(--espresso); }
.modal-close  { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); border-radius: 6px; padding: 4px 8px; transition: background .15s; }
.modal-close:hover { background: var(--bg); }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--espresso);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
  max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Employee my-schedule view ───────────────────────────────────────────── */
.my-shifts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.my-shift-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
}
.my-shift-date {
  min-width: 56px;
  text-align: center;
}
.my-shift-date .day-abbr { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.my-shift-date .day-n    { font-size: 24px; font-weight: 700; line-height: 1; color: var(--espresso); }
.my-shift-sep { width: 3px; height: 40px; border-radius: 2px; }
.my-shift-info { flex: 1; }
.my-shift-time { font-size: 15px; font-weight: 600; color: var(--espresso); }
.my-shift-pos  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Availability day chips ──────────────────────────────────────────────── */
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.day-chip {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  user-select: none;
}
.day-chip.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Conflict warning ────────────────────────────────────────────────────── */
.conflict-warning {
  background: #FFF3CD;
  border: 1.5px solid #FBBF24;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #7C5200;
  margin-bottom: 14px;
  display: none;
}
.conflict-warning.visible { display: block; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex-gap { display: flex; gap: 8px; }
.text-muted { color: var(--text-muted); font-size: 12px; }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state h3 { font-size: 16px; margin-bottom: 8px; }

hr.divider { border: none; border-top: 1.5px solid var(--border); margin: 16px 0; }

.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s;
}
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { border-color: var(--espresso); transform: scale(1.1); }

/* ── Closing shift indicators ────────────────────────────────────────────── */
.date-closing {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .3px; padding: 1px 4px; border-radius: 3px;
  margin-top: 3px; white-space: nowrap; display: inline-block;
}
.closing-under { background: rgba(184,48,48,.85); color: #fff; }
.closing-over  { background: rgba(196,128,64,.85); color: #fff; }
.closing-ok    { background: rgba(45,122,79,.7);   color: #fff; }

.shift-block.is-closing { border-left: 3px solid rgba(255,255,255,.6); }
.shift-closing-tag {
  font-size: 9px; opacity: .85; letter-spacing: .2px;
}

.slist-closing-tag {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.slist-day-header .closing-warn-badge {
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 4px; flex-shrink: 0;
}
.slist-day-header .closing-warn-badge.closing-under { background: #FEE2E2; color: #991B1B; }
.slist-day-header .closing-warn-badge.closing-over  { background: #FFF3CD; color: #856404; }

/* ── View mode toggle ────────────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}
.view-toggle-btn {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  transition: all .2s;
  white-space: nowrap;
}
.view-toggle-btn.active {
  background: var(--espresso);
  color: #fff;
}

/* ── Schedule list view (mobile-friendly card layout) ────────────────────── */
.schedule-list { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.schedule-wrap:has(.schedule-list) { overflow-x: hidden; }

.slist-day-group { margin-bottom: 10px; }
.slist-day-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
  padding: 8px 4px 6px; border-bottom: 1.5px solid var(--border);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
  background: var(--bg); position: sticky; top: 0; z-index: 5;
}
.slist-today-label {
  font-size: 9px; background: var(--accent); color: #fff;
  border-radius: 4px; padding: 1px 5px; font-weight: 700;
}
.slist-day-body { display: flex; flex-direction: column; gap: 5px; }
.slist-shift-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--surface);
  border-radius: var(--radius); box-shadow: var(--shadow);
  cursor: pointer; transition: filter .15s;
}
.slist-shift-row:active { filter: brightness(.97); }
.slist-emp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.slist-emp-name { font-size: 13px; font-weight: 600; color: var(--espresso); flex: 1; }
.slist-pos { font-size: 11px; color: var(--text-muted); }
.slist-time { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.slist-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; background: transparent; border-radius: var(--radius);
  border: 1.5px dashed var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 500; cursor: pointer; width: 100%;
  font-family: inherit;
}
.slist-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Time logs (employee) ────────────────────────────────────────────────── */
.my-timelogs-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.tl-total-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 12px; flex-shrink: 0;
}
.tl-total-value { font-size: 28px; font-weight: 700; line-height: 1; color: var(--success); }
.tl-total-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.tl-total-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.tl-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.tl-date-col { min-width: 52px; text-align: center; flex-shrink: 0; }
.tl-date-col .day-abbr { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
.tl-date-col .day-n    { font-size: 22px; font-weight: 700; line-height: 1; color: var(--espresso); }
.tl-sep { width: 3px; height: 38px; border-radius: 2px; background: var(--accent); flex-shrink: 0; }
.tl-info { flex: 1; min-width: 0; }
.tl-time  { font-size: 15px; font-weight: 600; color: var(--espresso); }
.tl-break { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tl-net   { font-size: 15px; font-weight: 700; color: var(--success); min-width: 72px; text-align: right; flex-shrink: 0; }
.tl-actions { display: flex; gap: 6px; flex-shrink: 0; }

.break-options { display: flex; gap: 20px; padding: 4px 0; }
.break-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
}
.break-opt input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
  -webkit-appearance: radio;
  appearance: auto;
}
.tl-net-display {
  background: var(--bg); border-radius: var(--radius);
  padding: 10px 14px; font-size: 18px; font-weight: 700;
  color: var(--success); text-align: center; margin-bottom: 16px;
}

/* ── Hours summary (manager) ─────────────────────────────────────────────── */
.hours-summary { overflow: auto; flex: 1; }
.hours-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); min-width: 560px;
}
.hours-table th {
  background: var(--espresso); color: rgba(255,255,255,.85);
  padding: 10px 14px; text-align: left; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap;
}
.hours-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.hours-table tr:last-child td { border-bottom: none; }
.hours-table tbody tr:hover td { background: var(--bg); }
.hours-emp-name { font-weight: 600; color: var(--espresso); }
.hours-emp-pos  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.hours-val      { font-weight: 600; color: var(--text); }
.hours-diff-neg { color: var(--danger); font-weight: 700; }
.hours-diff-pos { color: var(--success); font-weight: 700; }
.hours-total-row td { font-weight: 700; background: var(--bg) !important; border-top: 2px solid var(--border); }

.xero-note {
  font-size: 11px; color: var(--text-muted); margin-top: 10px; padding: 8px 12px;
  background: var(--bg); border-radius: 8px; border-left: 3px solid var(--border);
}

/* ── Mobile bottom nav ───────────────────────────────────────────────────── */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--espresso);
  border-top: 1px solid rgba(255,255,255,.1);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-items { display: flex; justify-content: space-around; }
.mobile-nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 10px 4px 8px; background: none; border: none;
  color: rgba(255,255,255,.45); font-family: inherit;
  font-size: 9px; font-weight: 700; cursor: pointer;
  text-transform: uppercase; letter-spacing: .4px; transition: color .2s;
}
.mobile-nav-btn.active { color: var(--cream); }
.mobile-nav-icon { font-size: 20px; line-height: 1.2; }

/* ── Responsive: mobile (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
  /* topbar: hide desktop nav, compact */
  .topbar-nav { display: none; }
  .topbar-user span, .topbar-brand span { display: none; }
  .topbar { padding: 0 14px; height: 50px; }
  .topbar-brand { font-size: 14px; }

  /* show mobile bottom nav */
  #mobile-nav { display: block; }

  /* push content above nav bar */
  .app-content { padding-bottom: 64px; }

  /* views */
  .view { padding: 12px 12px 0; }
  .view-header { flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
  .view-title { font-size: 17px; }

  /* schedule toolbar */
  .schedule-toolbar { gap: 6px; }
  .period-label { min-width: 140px; font-size: 12px; }
  #mgr-schedule-btns .btn { font-size: 11px; padding: 5px 8px; }

  /* modals slide up from bottom */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 90vh; padding: 20px 20px 28px; }

  /* toast above nav */
  #toast-container { bottom: 72px; right: 12px; left: 12px; }
  .toast { max-width: 100%; }

  /* leave cards stack vertically */
  .leave-card { flex-direction: column; align-items: flex-start; gap: 8px; }
  .leave-actions { width: 100%; justify-content: flex-end; }

  /* employees single column */
  .employees-grid { grid-template-columns: 1fr; }

  /* auth */
  .auth-card { padding: 28px 20px; }
}

/* ── Desktop ≥769px: always show topbar nav ──────────────────────────────── */
@media (min-width: 769px) {
  #mobile-nav { display: none !important; }
}

/* ── Draft / publish banner ──────────────────────────────────────────────── */
.draft-banner {
  background: #FFF3CD;
  border: 1.5px solid #FBBF24;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #7C5200;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.btn-published {
  background: #D1FAE5;
  color: #065F46;
  border: 1.5px solid #6EE7B7;
}
.btn-published:hover { background: #A7F3D0; }

/* ── Leave calendar picker ───────────────────────────────────────────────── */
.leave-modal { max-width: 520px; }

.leave-cal-wrap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.leave-cal { flex: 1; min-width: 200px; }

.leave-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.leave-cal-nav-month {
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
}

.leave-cal-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--espresso);
  text-align: center;
  margin-bottom: 6px;
}
.leave-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.leave-cal-day-name {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 3px 0;
  text-transform: uppercase;
}
.leave-cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s;
  user-select: none;
}
.leave-cal-cell:hover:not(.past) { background: var(--cream); }
.leave-cal-cell.selected { background: var(--accent); color: #fff; font-weight: 700; }
.leave-cal-cell.today { border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; }
.leave-cal-cell.today.selected { border-color: transparent; color: #fff; }
.leave-cal-cell.past { color: var(--border); cursor: default; }

.leave-selected-count {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 0 2px;
}

/* ── Hours table ─────────────────────────────────────────────────────────── */
.hours-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.hours-table th {
  background: var(--espresso);
  color: rgba(255,255,255,.8);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 700;
  white-space: nowrap;
}
.hours-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.hours-table tr:last-child td { border-bottom: none; }
.hours-table tbody tr:hover td { background: var(--bg); }
.hours-table tfoot td {
  border-top: 2px solid var(--border);
  background: var(--cream);
  font-weight: 700;
  border-bottom: none;
}

/* ── Print styles ────────────────────────────────────────────────────────── */
@media print {
  .topbar-nav, #mobile-nav, #mgr-schedule-btns,
  .modal-overlay, #toast-container,
  .day-cell-add, .shift-del, .draft-banner { display: none !important; }

  .topbar { box-shadow: none; }
  body { background: #fff; }
  .view { padding: 0; }
  .view:not(.active) { display: none !important; }
  .app-content { padding-bottom: 0; }
  .schedule-wrap { box-shadow: none; overflow: visible; max-height: none; }
  .schedule-grid, .schedule-list { min-width: 0; }
  .schedule-emp-header, .schedule-date-label, .schedule-corner {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .shift-block { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
