/* ─── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --primary:       #1d4ed8;
  --primary-dark:  #1e40af;
  --primary-light: #dbeafe;
  --secondary:     #64748b;
  --success:       #16a34a;
  --success-light: #dcfce7;
  --warning:       #d97706;
  --warning-light: #fef3c7;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;
  --bg:            #f1f5f9;
  --card:          #ffffff;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 1px 4px rgba(0,0,0,.10);
  --shadow-md:     0 4px 12px rgba(0,0,0,.12);
  --radius-sm:     0.375rem;
  --radius:        0.75rem;
  --radius-lg:     1rem;
  --sidebar-w:     240px;
  --topbar-h:      56px;
  --bottomnav-h:   64px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

/* ─── Typography helpers ─────────────────────────────────────────────────── */
.text-sm     { font-size: 0.8125rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.125rem; }
.text-muted  { color: var(--text-muted); }
.text-nowrap { white-space: nowrap; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.ml-1 { margin-left: 0.4rem; }
.mb-1 { margin-bottom: 0.5rem; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1rem; z-index: 200;
  box-shadow: var(--shadow);
}
.top-bar-title { font-weight: 600; font-size: 1rem; flex: 1; }
.top-bar-user  { font-size: 0.8125rem; opacity: 0.85; white-space: nowrap; }

.hamburger {
  background: none; border: none; cursor: pointer;
  color: #fff; padding: 0.25rem; display: flex; align-items: center;
}
.hamburger svg { width: 26px; height: 26px; fill: currentColor; }

/* ─── Sidebar (admin) ────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: calc(-1 * var(--sidebar-w));
  width: var(--sidebar-w); height: 100%;
  background: #fff; z-index: 300;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
  transition: left 0.25s ease;
  overflow-y: auto;
}
.sidebar.open { left: 0; }

.sidebar-header {
  background: var(--primary); color: #fff;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 0.75rem; height: var(--topbar-h);
  flex-shrink: 0;
}
.sidebar-logo  { font-size: 1.4rem; }
.sidebar-title { font-weight: 700; flex: 1; font-size: 0.95rem; }
.sidebar-close {
  background: none; border: none; color: rgba(255,255,255,.8);
  cursor: pointer; font-size: 1rem; padding: 0.25rem; margin-left: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text); text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.9rem;
}
.nav-item:hover, .nav-item.active {
  background: var(--primary-light); color: var(--primary);
  border-left-color: var(--primary); text-decoration: none;
}
.nav-icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--border); }
.nav-logout:hover { background: var(--danger-light); color: var(--danger); border-left-color: var(--danger); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 250;
}
.sidebar-overlay.show { display: block; }

/* Desktop: always-visible sidebar */
@media (min-width: 768px) {
  .sidebar { left: 0; }
  .sidebar-close, .hamburger, .sidebar-overlay { display: none !important; }
  .main-content { margin-left: var(--sidebar-w); }
  .top-bar { left: var(--sidebar-w); }
}

/* ─── Bottom nav (employee) ──────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  background: #fff; border-top: 1px solid var(--border);
  display: flex; z-index: 200;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.65rem; font-weight: 500; position: relative;
  transition: color 0.15s;
}
.bottom-nav-item svg { width: 22px; height: 22px; fill: currentColor; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item:hover { text-decoration: none; color: var(--primary); }
.bottom-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  background: var(--danger); color: #fff;
  border-radius: 999px; font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Main content ───────────────────────────────────────────────────────── */
.main-content {
  padding-top: calc(var(--topbar-h) + 1rem);
  padding-bottom: 1.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  min-height: 100vh;
}
.main-content.with-bottom-nav { padding-bottom: calc(var(--bottomnav-h) + 1rem); }

@media (min-width: 600px) {
  .main-content { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 768px) {
  .main-content { max-width: 900px; }
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem;
  margin-bottom: 1rem;
}
.card-title { font-size: 0.9rem; font-weight: 600; margin: 0 0 0.75rem; }

/* ─── Page header ────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.page-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; flex: 1; }
.btn-back {
  color: var(--text-muted); font-size: 0.875rem; display: flex; align-items: center;
}
.btn-back:hover { color: var(--text); text-decoration: none; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; padding: 0.5rem 1rem;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
  min-height: 40px;
}
.btn:active { opacity: 0.85; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; text-decoration: none; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; text-decoration: none; color: #fff; }
.btn-outline   { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); text-decoration: none; }
.btn-danger-outline { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger-outline:hover { background: var(--danger-light); }
.btn-block { width: 100%; }
.btn-lg    { padding: 0.75rem 1.25rem; font-size: 1rem; min-height: 50px; }
.btn-sm    { padding: 0.35rem 0.75rem; font-size: 0.8125rem; min-height: 34px; }
.btn-xs    { padding: 0.2rem 0.5rem; font-size: 0.75rem; min-height: 28px; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-group-xs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.inline form { display: inline; }
.inline-form  { display: inline-flex; gap: 0.5rem; align-items: center; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; }
.form-control {
  display: block; width: 100%; padding: 0.6rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text);
  font-size: 0.9375rem;
  -webkit-appearance: none;
  transition: border-color 0.15s;
  min-height: 44px;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.form-control-sm { padding: 0.4rem 0.6rem; font-size: 0.875rem; min-height: 36px; }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-inline { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.form-row     { display: flex; gap: 0.5rem; align-items: flex-end; flex-wrap: wrap; }
.form-row .form-control { flex: 1; min-width: 120px; }
.form-row-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.required { color: var(--danger); }

.input-reveal { position: relative; }
.input-reveal input { padding-right: 2.5rem; }
.reveal-btn {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 0.25rem; display: flex;
}
.reveal-btn svg { width: 20px; height: 20px; fill: currentColor; }

.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; margin-bottom: 1rem; font-size: 0.875rem; }
.checkbox-label input { width: 16px; height: 16px; accent-color: var(--primary); }

.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; font-size: 0.9rem; }
.radio-label input { accent-color: var(--primary); width: 16px; height: 16px; }

/* Property checkboxes (multi-select pills) */
.property-checkboxes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checkbox-pill { display: inline-flex; }
.checkbox-pill input { display: none; }
.checkbox-pill span {
  display: block; padding: 0.35rem 0.75rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 0.8125rem;
  transition: all 0.15s;
}
.checkbox-pill input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert-success { background: var(--success-light); color: #15803d; }
.alert-danger  { background: var(--danger-light);  color: #b91c1c; }
.alert-warning { background: var(--warning-light); color: #92400e; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.badge-success   { background: var(--success-light); color: var(--success); }
.badge-warning   { background: var(--warning-light); color: #92400e; }
.badge-danger    { background: var(--danger-light);  color: var(--danger); }
.badge-secondary { background: #f1f5f9; color: var(--secondary); }
.badge-primary   { background: var(--primary-light); color: var(--primary); }
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; border-radius: 999px;
  min-width: 18px; height: 18px; padding: 0 4px;
  font-size: 0.7rem; font-weight: 700; margin-left: 4px;
}

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table-hover tr:hover td { background: #f8fafc; }
.table-footer td { background: #f8fafc; font-weight: 600; border-top: 2px solid var(--border); }
.table-sm th, .table-sm td { padding: 0.4rem 0.6rem; }
.row-inactive { opacity: 0.5; }

/* ─── Tab bar ────────────────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tab {
  padding: 0.6rem 1rem; font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Stats grid ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0.85rem;
  text-align: center; text-decoration: none; color: var(--text);
  transition: box-shadow 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.stat-warning { border-top: 3px solid var(--warning); }
.stat-number { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label  { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ─── Property grid ──────────────────────────────────────────────────────── */
.property-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
@media (min-width: 600px) { .property-grid { grid-template-columns: repeat(3, 1fr); } }

.property-card { cursor: default; }
.property-name { font-weight: 600; margin-bottom: 0.4rem; }
.property-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.property-meta .meta-item { display: block; }
.property-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* ─── Section titles ─────────────────────────────────────────────────────── */
.section-title {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  margin: 1.25rem 0 0.6rem; padding-top: 0;
}
.subsection-title {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  margin: 0.75rem 0 0.4rem;
}

/* ─── Login page ─────────────────────────────────────────────────────────── */
.login-page { background: var(--primary); min-height: 100vh; }
.login-container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1.5rem;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-md);
}
.login-logo    { font-size: 2.5rem; text-align: center; margin-bottom: 0.5rem; }
.login-title   { font-size: 1.4rem; font-weight: 700; text-align: center; margin: 0 0 0.25rem; }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1.5rem; }
.login-form { margin-top: 0.5rem; }

/* ─── Pay period card ────────────────────────────────────────────────────── */
.period-status { border-left: 4px solid var(--secondary); }
.period-submitted { border-left-color: var(--warning); }
.period-approved  { border-left-color: var(--success); }
.period-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.period-hours { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.5rem; }
.hours-big { font-size: 2rem; font-weight: 700; color: var(--primary); }
.period-footer { display: flex; align-items: center; gap: 0.75rem; }
.period-card { border-left: 4px solid var(--primary); }

/* ─── Quick actions ──────────────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.quick-action {
  background: var(--card); border-radius: var(--radius);
  padding: 0.85rem 0.5rem; text-align: center;
  box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text);
  transition: box-shadow 0.15s;
}
.quick-action:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.qa-icon { font-size: 1.4rem; margin-bottom: 0.25rem; }
.qa-label { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }

/* ─── Entry rows ─────────────────────────────────────────────────────────── */
.entry-row {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border);
}
.entry-row:last-child { border-bottom: none; }
.entry-date  { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; min-width: 60px; }
.entry-detail { flex: 1; }
.entry-hours { font-weight: 600; white-space: nowrap; }

.entry-card { margin-bottom: 0.5rem; }
.entry-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.35rem; }
.entry-date-label { font-weight: 600; font-size: 0.9rem; }
.entry-hours-big  { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.entry-notes { margin-top: 0.25rem; }

/* ─── Checklist items ────────────────────────────────────────────────────── */
.checklist-item {
  display: flex; gap: 0.75rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.completed .item-label { text-decoration: line-through; color: var(--text-muted); }

.check-btn {
  background: none; border: none; cursor: pointer; padding: 0; flex-shrink: 0;
  margin-top: 2px;
}
.check-circle {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}
.check-circle.checked { background: var(--success); border-color: var(--success); color: #fff; }

.item-content { flex: 1; }
.item-label   { font-size: 0.9rem; }
.item-meta    { margin-top: 0.2rem; }

.photo-thumb  { width: 80px; height: 60px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 0.4rem; }
.photo-upload-btn { margin-top: 0.4rem; }

/* Progress bar */
.progress-bar  { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; flex: 1; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s; }
.progress-row  { display: flex; align-items: center; gap: 0.5rem; }

/* Checklist cards */
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (min-width: 600px) { .checklist-grid { grid-template-columns: repeat(3, 1fr); } }
.checklist-list { display: flex; flex-direction: column; gap: 0.5rem; }
.checklist-card { display: block; text-decoration: none; color: var(--text); cursor: pointer; transition: box-shadow 0.15s; }
.checklist-card:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.checklist-title { font-weight: 600; margin-bottom: 0.35rem; }
.checklist-progress { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }

/* ─── Receipt upload ─────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 2rem 1rem; text-align: center; cursor: pointer;
  transition: border-color 0.15s; margin-bottom: 0.5rem;
}
.upload-zone:hover { border-color: var(--primary); }
.upload-icon { font-size: 2rem; margin-bottom: 0.35rem; }
.receipt-preview { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--radius); margin-bottom: 0.5rem; }
.receipt-card { margin-bottom: 0.5rem; }
.receipt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.receipt-thumb  { width: 100px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 0.5rem; }
.receipt-img-link:hover { opacity: 0.85; }

/* ─── Chat / Messages ────────────────────────────────────────────────────── */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 180px); }
.chat-messages  { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-bubble    { max-width: 80%; padding: 0.6rem 0.85rem; border-radius: var(--radius); }
.chat-bubble.mine   { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble.theirs { background: var(--card); color: var(--text); align-self: flex-start; box-shadow: var(--shadow-sm); border-bottom-left-radius: 4px; }
.bubble-text { font-size: 0.9rem; }
.bubble-time { font-size: 0.7rem; opacity: 0.7; margin-top: 0.2rem; }
.chat-form { border-top: 1px solid var(--border); padding: 0.75rem; background: #fff; }
.chat-input-row { display: flex; gap: 0.5rem; align-items: flex-end; }
.chat-input { flex: 1; min-height: 44px; resize: none; }
.chat-send  { align-self: flex-end; flex-shrink: 0; }

.thread-list { display: flex; flex-direction: column; }
.thread-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: background 0.1s;
}
.thread-item:hover { background: #f8fafc; text-decoration: none; }
.thread-item.unread { background: var(--primary-light); }
.thread-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.thread-body  { flex: 1; min-width: 0; }
.thread-name  { font-weight: 600; display: flex; align-items: center; gap: 0.35rem; }
.thread-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-time  { flex-shrink: 0; }

/* ─── Invoice cards ──────────────────────────────────────────────────────── */
.invoice-card.unassigned { border-left: 3px solid var(--warning); }
.invoice-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.35rem; }
.invoice-subject { font-size: 0.875rem; margin-bottom: 0.5rem; }
.assign-form { margin-top: 0.75rem; }
.assign-form .form-row { flex-wrap: wrap; }

/* ─── Time off cards ─────────────────────────────────────────────────────── */
.time-off-card { margin-bottom: 0.75rem; }
.time-off-header { display: flex; justify-content: space-between; margin-bottom: 0.35rem; }
.time-off-dates { font-weight: 600; margin-bottom: 0.25rem; }
.time-off-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* ─── Submit zone ────────────────────────────────────────────────────────── */
.submit-zone {
  background: var(--primary-light); border-radius: var(--radius);
  padding: 1rem; margin-top: 1.25rem;
}

/* ─── Action panel ───────────────────────────────────────────────────────── */
.action-panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; margin-top: 1rem;
}
.action-panel h3 { font-size: 0.95rem; margin: 0 0 0.75rem; }

/* ─── Detail meta ────────────────────────────────────────────────────────── */
.detail-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
  font-size: 0.875rem;
}
@media (min-width: 480px) { .detail-meta { grid-template-columns: repeat(4, 1fr); } }

/* ─── Collapsible ────────────────────────────────────────────────────────── */
.collapsible { cursor: pointer; }
.collapsible summary { font-size: 0.875rem; font-weight: 500; padding: 0.2rem 0; }
.collapsible[open] { padding: 1rem; }

/* ─── Calendar (boss view) ───────────────────────────────────────────────── */
.calendar-grid { display: flex; flex-direction: column; gap: 0; padding: 0; }
.cal-day { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.cal-day:last-child { border-bottom: none; }
.cal-day.has-time-off { background: var(--warning-light); }
.cal-date-label { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.2rem; }
.cal-event { font-size: 0.75rem; color: var(--text-muted); }
.cal-event-vacation { color: var(--primary); }
.cal-event-sick     { color: var(--secondary); }

/* ─── Misc ───────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; color: var(--text-muted); padding: 2.5rem 1rem; font-size: 0.9rem; }
.property-section { margin-bottom: 1.5rem; }
