/* OceanChiefs Portal — Mobile-first, auto light/dark */
:root {
  --bg: #0A0A0A;
  --bg-card: #161616;
  --bg-input: #1a1a1a;
  --border: #2a2a2a;
  --text: #e5e5e5;
  --text-muted: #888;
  --text-dim: #555;
  --accent: #FFD000;
  --accent-dark: #b39300;
  --green: #4ade80;
  --blue: #60a5fa;
  --orange: #fb923c;
  --red: #f87171;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Aliases for inline styles */
  --card-bg: var(--bg-card);
  --text-primary: var(--text);
  --bg-primary: var(--bg);
  /* Overlay colors for transparency effects */
  --overlay-subtle: rgba(255,255,255,0.05);
  --overlay-light: rgba(255,255,255,0.08);
  --overlay-medium: rgba(255,255,255,0.1);
  --overlay-hover: rgba(255,255,255,0.15);
  --shadow-card: none;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f5;
    --bg-card: #ffffff;
    --bg-input: #f0f0f0;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --text-muted: #666;
    --text-dim: #999;
    --accent: #d4a800;
    --accent-dark: #b39300;
    --green: #16a34a;
    --blue: #2563eb;
    --orange: #ea580c;
    --red: #dc2626;
    --card-bg: var(--bg-card);
    --text-primary: var(--text);
    --bg-primary: var(--bg);
    --overlay-subtle: rgba(0,0,0,0.03);
    --overlay-light: rgba(0,0,0,0.05);
    --overlay-medium: rgba(0,0,0,0.08);
    --overlay-hover: rgba(0,0,0,0.12);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
a { color: inherit; text-decoration: underline; }

body {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Screens */
.screen {
  display: none;
  min-height: 100dvh;
  padding-bottom: calc(70px + var(--safe-bottom));
}
.screen.active { display: flex; flex-direction: column; }

/* Screen Header */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.screen-header h2 {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}
.btn-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}

/* Screen Content */
.screen-content {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
}

/* Login Screen */
.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
  text-align: center;
}
.login-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 16px;
}
.login-wrapper h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.login-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
#login-form {
  width: 100%;
  max-width: 340px;
}
#loginEmail {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
  -webkit-appearance: none;
}
#loginEmail:focus {
  border-color: var(--accent);
}
.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 48px;
  transition: background 0.2s;
}
.btn-primary:active { background: var(--accent-dark); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 16px;
}
.error-msg {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(248,113,113,0.1);
  border-radius: 6px;
}
.success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.success-msg {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.success-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* Loader */
.loader {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--radius);
  color: #fca5a5;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 4px;
}
.alert-banner:hover { background: rgba(220, 38, 38, 0.25); }
.alert-icon { font-size: 1.2rem; }
.alert-arrow { margin-left: auto; opacity: 0.6; }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.stat-card:active { border-color: var(--accent); }
.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Recent Section */
.recent-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.card:active { border-color: var(--accent); }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
}
.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Status Badges */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-draft { background: #333; color: #999; }
.badge-final { background: #1e3a5f; color: #93c5fd; }
.badge-sent { background: #78350f; color: #fbbf24; }
.badge-paid { background: #064e3b; color: #6ee7b7; }
.badge-concept { background: #333; color: #999; }
.badge-actief { background: #064e3b; color: #6ee7b7; }
.badge-afgerond { background: #1e3a5f; color: #93c5fd; }
.badge-afgelopen { background: #1e3a5f; color: #93c5fd; }
.badge-geannuleerd { background: #450a0a; color: #fca5a5; }
.badge-generated { background: #333; color: #999; }
.badge-completed { background: #064e3b; color: #6ee7b7; }
.badge-signed { background: #064e3b; color: #6ee7b7; }

/* Detail View */
.detail-section {
  margin-bottom: 20px;
}
.detail-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 500; text-align: right; }

.shift-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Buttons in cards */
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-small {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-small svg, .btn-pdf svg, .btn-signed svg, .btn-calendar svg, .btn-back svg, .btn-icon svg, .success-icon svg {
  width: 16px; height: 16px;
}
.btn-back svg { width: 20px; height: 20px; }
.btn-calendar svg { width: 18px; height: 18px; }
.success-icon svg { width: 48px; height: 48px; stroke-width: 1; }
.btn-pdf {
  background: #1e3a5f;
  color: #93c5fd;
}
.btn-pdf:active { background: #1e4d8f; }
.btn-signed {
  background: #064e3b;
  color: #6ee7b7;
}
.btn-signed:active { background: #065f46; }
.btn-calendar {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  background: #1e3a5f;
  color: #93c5fd;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.btn-calendar:active { background: #1e4d8f; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state .empty-icon svg { width: 48px; height: 48px; stroke-width: 1; color: var(--text-dim); }
.empty-state p {
  font-size: 14px;
}

/* Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  min-height: 56px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s;
  gap: 2px;
}
.tab.active { color: var(--accent); }
.tab-icon { font-size: 20px; }
.tab-icon svg { width: 22px; height: 22px; }
.tab-label { font-size: 10px; font-weight: 500; }

/* Mobile/desktop visibility for grouped navigation */
.mobile-only { display: none; }

@media (max-width: 767px) {
  .mobile-only { display: flex; }
  .desktop-only { display: none !important; }
}

/* Group popup menu */
.group-menu {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 0;
  z-index: 200;
  min-width: 180px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
}
.group-menu.hidden { display: none; }
.group-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.group-menu-item svg { width: 18px; height: 18px; stroke-width: 1.75; }
.group-menu-item.active { color: var(--accent); }
.group-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
}
.group-menu-backdrop.hidden { display: none; }

/* Sidebar branding — hidden on mobile */
.sidebar-brand {
  display: none;
}

/* Pull to refresh indicator */
.ptr-indicator {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  display: none;
}

/* Certificate Upload */
.cert-upload-area {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 20px;
}
.cert-upload-area:active { border-color: var(--accent); }
.cert-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(255,208,0,0.05);
}
.cert-upload-icon { margin-bottom: 8px; }
.cert-upload-icon svg { width: 36px; height: 36px; color: var(--text-dim); }
.cert-upload-text { font-size: 15px; font-weight: 600; margin: 0; }
.cert-upload-hint { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.cert-upload-drop-hint { display: none; font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }

/* Upload Progress */
.upload-progress-header { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-progress-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.upload-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
}
.upload-item-icon { width: 24px; flex-shrink: 0; display: flex; align-items: center; }
.upload-item-icon svg { width: 20px; height: 20px; }
.upload-item-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-status { font-size: 12px; color: var(--text-muted); flex-shrink: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-status.success { color: #6ee7b7; }
.upload-item-status.error { color: #fca5a5; }
.upload-error { color: #fca5a5; font-size: 14px; text-align: center; padding: 20px; }
.loader-small {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Certificate List */
.cert-list-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.cert-card { cursor: default; }
.cert-card:active { border-color: var(--border); }

/* Expiry & review badges */
.badge-expired { background: #450a0a; color: #fca5a5; }
.badge-expiring { background: #78350f; color: #fbbf24; }
.badge-review { background: #78350f; color: #fbbf24; }

/* In review hint */
.cert-review-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 2px;
}

/* Upload summary */
.upload-summary {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.upload-summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
}
.upload-summary-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.summary-success { color: #6ee7b7; }
.summary-review { color: #fbbf24; }
.summary-error { color: #fca5a5; }

/* Upload item review status */
.upload-item-status.review { color: #fbbf24; }

/* Stats grid 4 columns */
.stats-grid { grid-template-columns: 1fr 1fr; }

/* Tablet+ */
@media (min-width: 480px) {
  .screen-content, .login-wrapper {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* Desktop — sidebar nav + wider content */
@media (min-width: 768px) {
  /* Tab bar becomes a left sidebar */
  .tab-bar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    flex-direction: column;
    width: 200px;
    border-top: none;
    border-right: 1px solid var(--border);
    padding: 20px 0;
    padding-bottom: 0;
    background: var(--bg-card);
  }
  .tab {
    flex: 0;
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px 20px;
    min-height: 44px;
    gap: 10px;
    border-radius: 8px;
    margin: 2px 8px;
  }
  .tab.active {
    background: rgba(255,208,0,0.1);
  }
  .tab:hover {
    background: var(--overlay-subtle);
  }
  .tab.active:hover {
    background: rgba(255,208,0,0.1);
  }
  .tab-icon svg { width: 20px; height: 20px; }
  .tab-label { font-size: 13px; font-weight: 500; }

  /* Sidebar branding */
  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 20px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }
  .sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
  }

  /* Screens offset to the right of sidebar */
  .screen {
    padding-left: 200px;
    padding-bottom: 0;
  }

  /* Content wider on desktop */
  .screen-content, .login-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 32px;
  }

  /* Login doesn't need sidebar offset */
  #screen-login {
    padding-left: 0;
  }

  /* Wider login form */
  #login-form {
    max-width: 380px;
  }
  .login-logo {
    width: 200px;
    height: 200px;
  }
  .login-wrapper h1 {
    font-size: 28px;
  }

  /* Stats grid 4 columns on desktop */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .stat-card {
    padding: 20px 16px;
    transition: border-color 0.2s, transform 0.15s;
  }
  .stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }
  .stat-number { font-size: 32px; }

  /* Cards hover effect */
  .card {
    transition: border-color 0.2s, transform 0.15s;
  }
  .card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
  }

  /* Screen header */
  .screen-header {
    padding: 16px 32px;
    max-width: 700px;
    margin: 0 auto;
  }

  /* Upload area — drag & drop on desktop */
  .cert-upload-area {
    padding: 40px 24px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
  }
  .cert-upload-area:hover {
    border-color: var(--accent);
  }
  .cert-upload-drop-hint {
    display: block;
  }

  /* Button hover states instead of :active */
  .btn-primary:hover { background: var(--accent-dark); }
  .btn-pdf:hover { background: #1e4d8f; }
  .btn-signed:hover { background: #065f46; }
  .btn-calendar:hover { background: #1e4d8f; }
  .btn-secondary:hover { background: rgba(255,208,0,0.1); }
}

/* Large desktop — even wider */
@media (min-width: 1024px) {
  .tab-bar {
    width: 220px;
  }
  .screen {
    padding-left: 220px;
  }
  .screen-header {
    max-width: 800px;
  }
  .screen-content, .login-wrapper {
    max-width: 800px;
    padding: 28px 40px;
  }
}

/* ============================================================
   Unavailability (Beschikbaarheid)
   ============================================================ */
.unavail-add-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.unavail-add-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.unavail-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.unavail-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.unavail-form-row label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.unavail-date-input,
.unavail-select,
.unavail-notes-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 9px 12px;
  width: 100%;
  outline: none;
  -webkit-appearance: none;
}
.unavail-date-input:focus,
.unavail-select:focus,
.unavail-notes-input:focus {
  border-color: var(--accent);
}
.unavail-select {
  cursor: pointer;
}
.unavail-add-btn {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.unavail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.unavail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.unavail-reason {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.unavail-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.unavail-delete-btn:hover {
  color: var(--red);
}
.unavail-dates {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.unavail-notes {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
  font-style: italic;
}

/* Hours Entry (Uren invullen) */
.uren-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
}
.uren-week-label {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}
.uren-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.uren-nav-btn:active { background: var(--overlay-medium); }

.uren-day-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
}
.uren-day-block:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.uren-day-block:last-of-type { border-bottom: 1px solid var(--border); }
.uren-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 4px;
  font-size: 13px;
  font-weight: 600;
}
.uren-day-date {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}
.uren-add-line-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.uren-add-line-btn svg { width: 16px; height: 16px; }
.uren-add-line-btn:active { background: var(--overlay-light); }
.uren-line-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 14px 6px;
}
.uren-hour-input {
  width: 58px;
  padding: 7px 6px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
  -moz-appearance: textfield;
}
.uren-remark-input {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
}
.uren-remark-input::placeholder { color: var(--text-dim); }
.uren-remark-input:focus { border-color: var(--accent); outline: none; }
.uren-remove-line-btn {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.6;
}
.uren-remove-line-btn:active { opacity: 1; }
.uren-remove-line-btn svg { width: 16px; height: 16px; }
.uren-hour-input::-webkit-outer-spin-button,
.uren-hour-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.uren-hour-input:focus {
  border-color: var(--accent);
  outline: none;
}
.uren-hrs-label {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 22px;
}

.uren-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 2px solid var(--accent);
}
.uren-total-label {
  font-size: 14px;
  font-weight: 700;
  min-width: 110px;
}
.uren-total-value {
  width: 64px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.uren-entries-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.uren-entry-chip {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--overlay-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}

.btn-small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-small svg { width: 14px; height: 14px; }
.btn-secondary-small {
  background: var(--overlay-light);
  color: var(--text-muted);
}
.btn-secondary-small:active { background: var(--overlay-hover); }
.btn-danger-small {
  background: rgba(248,113,113,0.12);
  color: #f87171;
}
.btn-danger-small:active { background: rgba(248,113,113,0.25); }

.success-msg {
  color: #6ee7b7;
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(110,231,183,0.1);
  border-radius: 6px;
}

/* Vantage sub-tabs */
.vantage-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.vantage-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.vantage-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Vantage form — 2-column grid on desktop */
@media (min-width: 768px) {
  .vantage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
  }
  .vantage-grid .vantage-full {
    grid-column: 1 / -1;
  }
  #screen-vantage .unavail-add-card {
    padding: 20px 24px;
  }
  #screen-vantage .unavail-add-btn {
    max-width: 200px;
  }
}

/* Invoice multi-select */
.invoice-select {
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.invoice-select.selected { color: var(--accent); }

.select-all-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.select-all-row .invoice-select { min-width: 28px; min-height: 28px; }

.invoice-card-row {
  display: flex;
  align-items: flex-start;
}
.invoice-card-row .card {
  flex: 1;
  min-width: 0;
}

.invoice-action-bar {
  position: fixed;
  bottom: calc(56px + var(--safe-bottom));
  left: 0; right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 99;
  animation: slideUpBar 0.2s ease;
}
@keyframes slideUpBar {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.action-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.action-bar-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.action-bar-deselect {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.action-bar-buttons {
  display: flex;
  gap: 8px;
}
