/* ═══════════════════════════════════════════════════════════════════
   ETN Wallet v2 — styles.css
   EvolveERP Field Technician — dark glassmorphism design system
═══════════════════════════════════════════════════════════════════ */

/* CRITICAL: must be first rule */
[hidden] { display: none !important; }

/* ── CSS Custom Properties ────────────────────────────────────────── */
:root {
  --bg: #090d12;
  --surface: #10161d;
  --surface-2: #151d26;
  --surface-3: #1a2535;
  --line: #1e2c3a;
  --text: #edf4f7;
  --muted: #8997a6;
  --cyan: #40e0d0;
  --lime: #b7f36b;
  --amber: #ffbd59;
  --red: #ff6b76;
  --purple: #c084fc;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --sidebar-w: 224px;
  --bnav-h: 68px;
  --transition: 180ms cubic-bezier(0.4,0,0.2,1);
  --glow-cyan: 0 0 20px rgba(64,224,208,0.25);
  --glow-lime: 0 0 20px rgba(183,243,107,0.25);
  --glow-amber: 0 0 20px rgba(255,189,89,0.25);
  --glow-red: 0 0 20px rgba(255,107,118,0.25);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', ui-monospace, monospace;
}

/* ── Reset & Base ─────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 0.9375rem; line-height: 1.6; min-height: 100dvh;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ════════════════════════════════════════════════════════════════════
   UNLOCK SCREEN
════════════════════════════════════════════════════════════════════ */
.unlock-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 1.5rem;
}
.unlock-bg-particles {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(64,224,208,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(183,243,107,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 60% 10%, rgba(255,189,89,0.04) 0%, transparent 70%);
}
.unlock-inner {
  position: relative; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}
.unlock-logo {
  filter: drop-shadow(0 0 16px rgba(64,224,208,0.4));
  animation: logo-pulse 3s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%,100% { filter: drop-shadow(0 0 12px rgba(64,224,208,0.3)); }
  50% { filter: drop-shadow(0 0 24px rgba(64,224,208,0.6)) drop-shadow(0 0 48px rgba(183,243,107,0.2)); }
}
.unlock-title {
  font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.unlock-subtitle { color: var(--muted); font-size: 0.875rem; text-align: center; margin-top: -0.75rem; }
.unlock-card {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.unlock-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  font-family: var(--mono); font-size: 0.875rem; color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.unlock-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(64,224,208,0.12); }
.unlock-hint { font-size: 0.78rem; color: var(--muted); margin-top: -0.5rem; }
.unlock-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.unlock-divider::before,.unlock-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.unlock-error {
  background: rgba(255,107,118,0.1); border: 1px solid rgba(255,107,118,0.3);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  font-size: 0.875rem; color: var(--red);
}
.unlock-footer { font-size: 0.75rem; color: var(--muted); text-align: center; }
.unlock-footer strong { color: var(--text); }

/* ════════════════════════════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════════════════════════════ */
.app { display: flex; height: 100dvh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--surface);
  border-right: 1px solid var(--line); display: flex;
  flex-direction: column; flex-shrink: 0; height: 100dvh; overflow: hidden;
}
.sidebar-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--line);
}
.sidebar-brand-group { display: flex; flex-direction: column; gap: 0; }
.sidebar-brand { font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.sidebar-erp-tag { font-size: 0.62rem; color: var(--cyan); font-weight: 600; letter-spacing: 0.05em; }
.nav-list {
  list-style: none; padding: 0.75rem; display: flex;
  flex-direction: column; gap: 2px; flex: 1; overflow-y: auto;
}
.nav-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.65rem 0.875rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; color: var(--muted); text-align: left;
  transition: background var(--transition), color var(--transition); position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: rgba(64,224,208,0.1); color: var(--cyan); }
.nav-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  background: var(--amber); color: #090d12; font-size: 0.65rem; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}
.nav-badge-notif { background: var(--red); }
.sidebar-footer {
  padding: 1rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.625rem;
}
.network-pill-sidebar {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.3rem 0.75rem;
  font-size: 0.75rem; color: var(--muted);
}
.btn-logout {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--muted); padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition);
}
.btn-logout:hover { color: var(--red); background: rgba(255,107,118,0.08); }

/* ── Main Content ────────────────────────────────────────────────── */
.main-content {
  flex: 1; overflow-y: auto;
  padding: 1.75rem 2rem 2rem; max-width: 960px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; flex-wrap: wrap; gap: 0.75rem;
}
.tab-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; }
.erp-link-tag {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--cyan); background: rgba(64,224,208,0.08);
  border: 1px solid rgba(64,224,208,0.2); border-radius: 100px;
  padding: 0.2rem 0.625rem;
}

/* Network Pills */
.network-pill {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.3rem 0.875rem;
  font-size: 0.78rem; color: var(--muted);
}
.net-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 6px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}
.small-dot { width: 5px; height: 5px; }
@keyframes pulse-dot {
  0%,100% { opacity: 1; box-shadow: 0 0 6px var(--cyan); }
  50% { opacity: 0.6; box-shadow: 0 0 12px var(--cyan); }
}

/* ════════════════════════════════════════════════════════════════════
   HOLOGRAPHIC CREDENTIAL CARD
════════════════════════════════════════════════════════════════════ */
.card-stage { perspective: 1200px; margin-bottom: 1.5rem; }
.holo-card {
  position: relative; width: 100%; max-width: 440px;
  aspect-ratio: 85.6 / 54; border-radius: 16px; overflow: hidden;
  transform-style: preserve-3d; cursor: default;
  animation: card-float 6s ease-in-out infinite;
}
@keyframes card-float {
  0%,100% { transform: translateY(0) rotateX(1deg); }
  50% { transform: translateY(-6px) rotateX(-1deg); }
}
.holo-card::before {
  content: ''; position: absolute; inset: -2px; border-radius: 18px;
  background: linear-gradient(var(--holo-angle,135deg), #40e0d0,#b7f36b,#ffbd59,#c084fc,#ff6b76,#40e0d0,#b7f36b);
  background-size: 300% 300%; animation: holo-border 4s linear infinite; z-index: 0;
}
@keyframes holo-border {
  0% { background-position: 0% 50%; }
  33% { background-position: 100% 50%; }
  66% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}
.holo-shimmer {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: 16px;
  background: linear-gradient(105deg,transparent 30%,rgba(255,255,255,0.04) 45%,rgba(255,255,255,0.07) 50%,rgba(255,255,255,0.04) 55%,transparent 70%);
  animation: shimmer-sweep 3s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0% { background-position: -200% 0; opacity: 0.3; }
  50% { background-position: 200% 0; opacity: 1; }
  100% { background-position: -200% 0; opacity: 0.3; }
}
.holo-inner {
  position: absolute; z-index: 1; inset: 2px; border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(64,224,208,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(183,243,107,0.05) 0%, transparent 60%),
    linear-gradient(145deg, #0f1923 0%, #0a1118 50%, #0d1520 100%);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), inset 0 -1px 0 rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.5);
}
.card-watermark {
  position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 5rem; font-weight: 900; letter-spacing: -0.04em;
  color: rgba(64,224,208,0.06); pointer-events: none; user-select: none; line-height: 1; z-index: 0;
}
.card-header-row { display: flex; align-items: flex-start; gap: 0.625rem; position: relative; z-index: 1; }
.card-logo-mark { flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(64,224,208,0.4)); }
.card-brand-text { flex: 1; display: flex; flex-direction: column; }
.card-brand { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.12em; color: rgba(64,224,208,0.85); line-height: 1.2; }
.card-chain { font-size: 0.45rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.3); font-family: var(--mono); }
.card-status-badge { font-size: 0.5rem; font-weight: 800; letter-spacing: 0.12em; padding: 0.15rem 0.5rem; border-radius: 100px; flex-shrink: 0; }
.badge-active { background: rgba(64,224,208,0.15); border: 1px solid rgba(64,224,208,0.4); color: var(--cyan); box-shadow: 0 0 8px rgba(64,224,208,0.2); }
.badge-revoked { background: rgba(255,107,118,0.15); border: 1px solid rgba(255,107,118,0.4); color: var(--red); }
.badge-pending { background: rgba(255,189,89,0.15); border: 1px solid rgba(255,189,89,0.4); color: var(--amber); }
.card-name-section { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.card-name-label { font-size: 0.42rem; letter-spacing: 0.14em; color: rgba(255,255,255,0.35); font-weight: 600; margin-bottom: 0.2rem; }
.card-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: #fff; text-shadow: 0 0 20px rgba(64,224,208,0.3); line-height: 1.2; }
.card-role { font-size: 0.55rem; letter-spacing: 0.08em; color: rgba(183,243,107,0.75); font-weight: 600; margin-top: 0.1rem; }
.card-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.75rem; position: relative; z-index: 1; }
.card-detail { display: flex; flex-direction: column; }
.card-detail-full { grid-column: 1 / -1; }
.card-detail-label { font-size: 0.4rem; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); font-weight: 600; }
.card-detail-value { font-size: 0.5rem; color: rgba(255,255,255,0.75); letter-spacing: 0.03em; }
.card-detail-value.mono { font-family: var(--mono); font-size: 0.45rem; }
.card-footer-stripe { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; padding-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0.06); }
.card-verification-level { font-size: 0.45rem; letter-spacing: 0.1em; color: rgba(183,243,107,0.7); font-weight: 700; text-transform: uppercase; }

/* ════════════════════════════════════════════════════════════════════
   HOME TAB
════════════════════════════════════════════════════════════════════ */

/* ERP Profile Card */
.erp-profile-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: 1rem;
}
.erp-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800; color: #090d12;
}
.erp-info { flex: 1; min-width: 0; }
.erp-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.1rem; }
.erp-title { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.375rem; }
.erp-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.5rem; }
.erp-rating { color: var(--amber); font-weight: 600; }
.erp-dot-sep { color: var(--line); }
.erp-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.erp-chip {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem; border-radius: 100px;
  background: rgba(64,224,208,0.08); border: 1px solid rgba(64,224,208,0.2);
  color: var(--cyan);
}

/* Today's Snapshot */
.today-snapshot {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.snapshot-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 0.875rem;
}
.snapshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.snapshot-item { text-align: center; }
.snapshot-num { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.snap-green { color: var(--lime); }
.snapshot-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.125rem; }

/* Quick Actions */
.quick-actions-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem; margin-bottom: 1rem;
}
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.375rem; padding: 0.875rem 0.5rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); transition: all var(--transition);
  min-height: 72px;
}
.quick-action-btn:hover { background: var(--surface-2); border-color: var(--cyan); box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.qa-icon { font-size: 1.375rem; line-height: 1; }
.qa-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.quick-action-btn:hover .qa-label { color: var(--text); }

/* Credential Status Row */
.cred-status-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-top: 0.5rem;
}
.cred-status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(183,243,107,0.06); border: 1px solid rgba(183,243,107,0.2);
  border-radius: 100px; padding: 0.35rem 0.875rem;
  font-size: 0.75rem; color: var(--lime); font-weight: 600; font-family: var(--mono);
}
.cred-refresh-btn {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--muted); transition: all var(--transition);
}
.cred-refresh-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* ════════════════════════════════════════════════════════════════════
   JOBS TAB
════════════════════════════════════════════════════════════════════ */
.jobs-count-pill {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.3rem 0.875rem;
  font-size: 0.78rem; color: var(--muted);
}

/* Filter Chips */
.filter-chips {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.filter-chip {
  padding: 0.4rem 1rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all var(--transition); cursor: pointer; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--muted); color: var(--text); }
.filter-chip.active { background: rgba(64,224,208,0.1); border-color: rgba(64,224,208,0.4); color: var(--cyan); }

/* Job List */
.job-list-container { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 5rem; }
.job-list-loading { text-align: center; padding: 2rem; color: var(--muted); font-size: 0.875rem; }
.job-list-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.job-list-empty .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }

/* Job Card */
.job-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  display: flex; gap: 0.875rem; align-items: flex-start;
  cursor: pointer; transition: all var(--transition); position: relative;
  text-align: left; width: 100%;
}
.job-card:hover { border-color: rgba(64,224,208,0.25); background: var(--surface-2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.job-card:active { transform: translateY(0); }

.job-priority-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 0.375rem;
}
.priority-urgent { background: var(--red); box-shadow: 0 0 6px var(--red); }
.priority-high { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.priority-normal { background: var(--lime); }

.job-type-icon { font-size: 1.375rem; line-height: 1; flex-shrink: 0; margin-top: 0.1rem; }

.job-card-main { flex: 1; min-width: 0; }
.job-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.job-customer { font-weight: 700; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card-badges { display: flex; gap: 0.375rem; flex-shrink: 0; flex-wrap: wrap; }

.job-status-badge {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem; border-radius: 100px; white-space: nowrap;
}
.status-dispatched { background: rgba(255,189,89,0.12); border: 1px solid rgba(255,189,89,0.3); color: var(--amber); }
.status-enroute { background: rgba(192,132,252,0.12); border: 1px solid rgba(192,132,252,0.3); color: var(--purple); }
.status-onsite { background: rgba(64,224,208,0.12); border: 1px solid rgba(64,224,208,0.3); color: var(--cyan); }
.status-complete { background: rgba(183,243,107,0.12); border: 1px solid rgba(183,243,107,0.3); color: var(--lime); }
.status-cancelled { background: rgba(137,151,166,0.12); border: 1px solid rgba(137,151,166,0.3); color: var(--muted); }

.job-etn-badge {
  font-size: 0.58rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 100px;
  background: rgba(192,132,252,0.1); border: 1px solid rgba(192,132,252,0.3); color: var(--purple);
}
.job-address { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.25rem; }
.job-desc { font-size: 0.8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.375rem; }
.job-window { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); }
.job-card-arrow { color: var(--muted); font-size: 0.875rem; align-self: center; flex-shrink: 0; }

/* Floating Action Button */
.fab {
  position: fixed; bottom: calc(var(--bnav-h) + 1rem); right: 1.25rem; z-index: 100;
  background: var(--red); color: #fff; font-weight: 700; font-size: 0.875rem;
  padding: 0.75rem 1.25rem; border-radius: 100px;
  box-shadow: 0 4px 20px rgba(255,107,118,0.4);
  display: flex; align-items: center; gap: 0.375rem;
  transition: all var(--transition);
}
.fab:hover { background: #ff4757; box-shadow: 0 6px 24px rgba(255,107,118,0.5); transform: translateY(-2px); }
@media (min-width: 769px) { .fab { bottom: 1.5rem; right: 2rem; } }

/* ════════════════════════════════════════════════════════════════════
   SCHEDULE TAB
════════════════════════════════════════════════════════════════════ */
.schedule-section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 0.625rem;
}
.schedule-meta { display: flex; align-items: center; gap: 0.75rem; }
.pto-badge {
  font-size: 0.78rem; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.25rem 0.75rem;
}
.pto-badge strong { color: var(--lime); }

/* Week Strip */
.week-strip {
  display: flex; gap: 0.375rem; margin-bottom: 1.5rem;
  overflow-x: auto; padding-bottom: 0.25rem;
}
.week-day-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line);
  min-width: 52px; flex-shrink: 0; cursor: pointer;
  transition: all var(--transition); color: var(--muted);
}
.week-day-btn:hover { border-color: var(--muted); color: var(--text); }
.week-day-btn.selected { background: rgba(64,224,208,0.1); border-color: rgba(64,224,208,0.4); color: var(--cyan); }
.week-day-btn.today .wdb-num { color: var(--cyan); font-weight: 800; }
.week-day-btn.today { border-color: rgba(64,224,208,0.2); }
.wdb-name { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.wdb-num { font-size: 1.1rem; font-weight: 700; line-height: 1; }
.wdb-dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.week-day-btn.has-jobs .wdb-dot { background: var(--amber); }

/* Schedule Timeline */
.schedule-timeline {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  min-height: 80px;
}
.timeline-empty {
  padding: 2rem; text-align: center; color: var(--muted); font-size: 0.875rem;
}
.timeline-item {
  display: flex; gap: 0.875rem; padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--line); align-items: flex-start;
  border-left: 4px solid var(--line); cursor: pointer;
  transition: background var(--transition);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item:hover { background: var(--surface-2); }
.tl-type-hvac { border-left-color: var(--cyan); }
.tl-type-plumbing { border-left-color: #60a5fa; }
.tl-type-electrical { border-left-color: var(--amber); }
.tl-type-heating { border-left-color: var(--red); }
.tl-type-refrigeration { border-left-color: var(--purple); }
.tl-time { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); min-width: 70px; flex-shrink: 0; padding-top: 0.125rem; }
.tl-main { flex: 1; min-width: 0; }
.tl-customer { font-weight: 600; font-size: 0.875rem; }
.tl-duration { font-size: 0.72rem; color: var(--muted); margin-top: 0.125rem; }

/* 7-day chart */
.seven-day-chart {
  display: flex; gap: 0.375rem; align-items: flex-end;
  height: 80px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 1.25rem;
}
.chart-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; flex: 1; height: 100%; justify-content: flex-end; }
.chart-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.chart-bar {
  width: 100%; background: rgba(64,224,208,0.2);
  border-radius: 3px 3px 0 0; min-height: 4px;
  transition: background var(--transition);
}
.chart-col.selected .chart-bar { background: var(--cyan); }
.chart-col.today .chart-bar { background: rgba(64,224,208,0.5); }
.chart-day-label { font-size: 0.6rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.chart-count { font-size: 0.6rem; color: var(--muted); }

/* On-call + PTO */
.schedule-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.oncall-row { display: flex; align-items: center; gap: 0.875rem; }
.oncall-label { font-size: 0.875rem; font-weight: 600; }
.oncall-sub { font-size: 0.75rem; color: var(--muted); }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 12px; transition: all var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute; height: 16px; width: 16px;
  left: 3px; bottom: 3px; background: var(--muted); border-radius: 50%;
  transition: all var(--transition);
}
.toggle-switch input:checked + .toggle-slider { background: rgba(64,224,208,0.2); border-color: rgba(64,224,208,0.4); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--cyan); }

/* ════════════════════════════════════════════════════════════════════
   EARN TAB
════════════════════════════════════════════════════════════════════ */
.pay-hero {
  background: linear-gradient(135deg, rgba(183,243,107,0.08) 0%, rgba(64,224,208,0.06) 100%);
  border: 1px solid rgba(183,243,107,0.2); border-radius: var(--radius-lg);
  padding: 1.75rem; margin-bottom: 1.25rem; position: relative; overflow: hidden;
}
.pay-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(183,243,107,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.pay-period-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.375rem; }
.pay-amount { font-size: 3rem; font-weight: 900; letter-spacing: -0.04em; color: var(--lime); line-height: 1; }
.pay-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; margin-bottom: 1.25rem; }
.pay-progress-wrap { display: flex; flex-direction: column; gap: 0.375rem; }
.pay-progress-bar { background: rgba(255,255,255,0.06); border-radius: 100px; height: 6px; overflow: hidden; }
.pay-progress-fill { height: 100%; background: linear-gradient(90deg, var(--lime), var(--cyan)); border-radius: 100px; transition: width 0.6s ease; }
.pay-progress-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted); }

/* Stats Grid 2×3 */
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; text-align: center;
}
.stat-card-good { border-color: rgba(183,243,107,0.2); background: rgba(183,243,107,0.04); }
.stat-value { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); margin-bottom: 0.2rem; }
.stat-card-good .stat-value { color: var(--lime); }
.stat-label { font-size: 0.68rem; color: var(--muted); font-weight: 600; margin-bottom: 0.125rem; }
.stat-sub { font-size: 0.62rem; color: var(--muted); }

/* Earn Card */
.earn-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem;
}
.earn-card-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; margin-bottom: 1rem; }

/* Breakdown */
.earn-breakdown-list { display: flex; flex-direction: column; gap: 0; }
.earn-row {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 0.5rem 1rem; align-items: center;
  padding: 0.625rem 0; border-bottom: 1px solid rgba(30,44,58,0.6);
}
.earn-row:last-child { border-bottom: none; }
.earn-row-total { border-top: 1px solid rgba(64,224,208,0.2); margin-top: 0.25rem; padding-top: 0.75rem; }
.earn-row-total .earn-row-val { color: var(--lime); font-size: 1.1rem; font-weight: 800; }
.earn-row-label { font-size: 0.875rem; font-weight: 500; }
.earn-row-sub { font-size: 0.72rem; color: var(--muted); text-align: right; }
.earn-row-val { font-size: 0.9rem; font-weight: 700; text-align: right; color: var(--text); }

/* Pay History Chart */
.pay-history-chart { display: flex; flex-direction: column; gap: 0.625rem; }
.pay-hist-row { display: flex; align-items: center; gap: 0.75rem; }
.pay-hist-label { font-size: 0.72rem; color: var(--muted); min-width: 72px; font-family: var(--mono); }
.pay-hist-bar-wrap { flex: 1; background: rgba(255,255,255,0.04); border-radius: 100px; height: 12px; overflow: hidden; }
.pay-hist-bar { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); border-radius: 100px; }
.pay-hist-amount { font-size: 0.78rem; font-weight: 700; color: var(--text); min-width: 48px; text-align: right; font-family: var(--mono); }

/* Truck & Equipment */
.truck-row { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.875rem; }
.truck-icon { font-size: 1.5rem; line-height: 1; }
.truck-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.125rem; }
.truck-sub { font-size: 0.72rem; color: var(--muted); }
.equipment-list { display: flex; flex-direction: column; gap: 0.375rem; }
.equip-item { font-size: 0.8rem; color: var(--muted); padding: 0.375rem 0; border-top: 1px solid rgba(30,44,58,0.6); }

/* Certs */
.cert-list { display: flex; flex-direction: column; gap: 0; }
.cert-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid rgba(30,44,58,0.6);
}
.cert-item:last-child { border-bottom: none; }
.cert-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.active-dot { background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.cert-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; }
.cert-name { font-size: 0.875rem; font-weight: 600; }
.cert-exp { font-size: 0.72rem; color: var(--muted); }
.cert-badge {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem; border-radius: 100px; flex-shrink: 0;
}
.badge-lime { background: rgba(183,243,107,0.1); border: 1px solid rgba(183,243,107,0.3); color: var(--lime); }
.badge-cyan { background: rgba(64,224,208,0.1); border: 1px solid rgba(64,224,208,0.3); color: var(--cyan); cursor: pointer; }
.cert-link-btn { cursor: pointer; transition: all var(--transition); }
.cert-link-btn:hover { background: rgba(64,224,208,0.2); }

/* ════════════════════════════════════════════════════════════════════
   TOOLS TAB v2
════════════════════════════════════════════════════════════════════ */
.tools-v2-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}
.tool-v2-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tool-v2-card:hover { border-color: rgba(64,224,208,0.2); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.tool-v2-icon { font-size: 1.75rem; line-height: 1; }
.tool-v2-name { font-weight: 800; font-size: 0.9375rem; letter-spacing: -0.01em; }
.tool-v2-desc { font-size: 0.75rem; color: var(--muted); margin-top: -0.375rem; }
.tool-v2-action {
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition); border: 1px solid;
  align-self: flex-start; white-space: nowrap;
}
.btn-cyan-sm {
  background: rgba(64,224,208,0.1); color: var(--cyan);
  border-color: rgba(64,224,208,0.3);
}
.btn-cyan-sm:hover { background: rgba(64,224,208,0.18); box-shadow: var(--glow-cyan); }

/* Timer tool */
.timer-active-job { background: rgba(64,224,208,0.05); border: 1px solid rgba(64,224,208,0.15); border-radius: var(--radius-sm); padding: 0.75rem; text-align: center; }
.timer-display { font-family: var(--mono); font-size: 1.5rem; font-weight: 800; color: var(--cyan); }
.timer-job-name { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; }
.timer-no-job { font-size: 0.8rem; color: var(--muted); }

/* Photos */
.photo-count-row { font-size: 0.78rem; color: var(--muted); }

/* Verify */
.verify-input-row { display: flex; gap: 0.5rem; align-items: center; }
.tool-input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem;
  font-size: 0.8rem; color: var(--text); outline: none;
  transition: border-color var(--transition);
}
.tool-input:focus { border-color: var(--cyan); }
.verify-result {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.75rem;
  font-size: 0.8rem;
}
.verify-ok { border-color: rgba(183,243,107,0.3); }
.verify-fail { border-color: rgba(255,107,118,0.3); }

/* Parts */
.parts-pending-list { display: flex; flex-direction: column; gap: 0.375rem; max-height: 100px; overflow-y: auto; }
.parts-pending-item { font-size: 0.72rem; color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: 0.3rem 0.5rem; }

/* Badge mini */
.badge-mini-wrap { display: flex; justify-content: center; }
.badge-mini-wrap svg { max-width: 80px; height: auto; }

/* Notifications */
.notif-unread-row { font-size: 0.78rem; }
.notif-unread-count { color: var(--red); font-weight: 700; }

/* ════════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; transition: all var(--transition);
  white-space: nowrap; border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-primary { background: var(--cyan); color: #090d12; border-color: var(--cyan); }
.btn-primary:hover { background: #5ae8d9; box-shadow: var(--glow-cyan); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-cyan { background: rgba(64,224,208,0.12); color: var(--cyan); border-color: rgba(64,224,208,0.3); }
.btn-cyan:hover { background: rgba(64,224,208,0.2); box-shadow: var(--glow-cyan); }
.btn-lime { background: var(--lime); color: #090d12; border-color: var(--lime); font-weight: 700; }
.btn-lime:hover { background: #c9f87f; box-shadow: var(--glow-lime); }
.btn-amber { background: rgba(255,189,89,0.12); color: var(--amber); border-color: rgba(255,189,89,0.3); }
.btn-amber:hover { background: rgba(255,189,89,0.2); box-shadow: var(--glow-amber); }
.btn-red { background: rgba(255,107,118,0.12); color: var(--red); border-color: rgba(255,107,118,0.3); }
.btn-red:hover { background: rgba(255,107,118,0.2); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 0.875rem; font-size: 0.8rem; }
.btn-icon { font-size: 1rem; line-height: 1; }

/* Form elements */
.field-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; display: block; margin-bottom: 0.35rem; }
.form-input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.625rem 0.875rem;
  font-size: 0.875rem; color: var(--text); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(64,224,208,0.1); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238997a6' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; cursor: pointer; }

/* Copy button */
.copy-btn {
  flex-shrink: 0; background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 4px; padding: 0.2rem 0.4rem; font-size: 0.8rem; color: var(--muted);
  transition: all var(--transition); cursor: pointer;
}
.copy-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* Check label */
.check-label { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; cursor: pointer; }
.check-label input { width: 16px; height: 16px; accent-color: var(--cyan); }

/* ════════════════════════════════════════════════════════════════════
   JOB DETAIL DRAWER/MODAL
════════════════════════════════════════════════════════════════════ */
.job-detail-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(9,13,18,0.85); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 769px) { .job-detail-overlay { align-items: center; } }
.job-detail-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-height: 92dvh; display: flex; flex-direction: column;
  box-shadow: 0 -16px 48px rgba(0,0,0,0.5);
  animation: drawer-up 0.3s cubic-bezier(0.34,1.2,0.64,1);
}
@media (min-width: 769px) {
  .job-detail-panel {
    border-radius: var(--radius-lg); max-width: 640px; max-height: 88dvh;
    animation: modal-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
  }
}
@keyframes drawer-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.job-detail-handle {
  width: 40px; height: 4px; background: var(--line);
  border-radius: 2px; margin: 0.75rem auto 0; flex-shrink: 0;
}
@media (min-width: 769px) { .job-detail-handle { display: none; } }
.job-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.job-detail-title-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.jd-type-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; margin-top: 0.125rem; }
.jd-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.1rem; }
.jd-subtitle { font-size: 0.78rem; color: var(--muted); }
.job-detail-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem 2rem; display: flex; flex-direction: column; gap: 1.25rem; }

.jd-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.jd-priority-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.jd-status-badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; padding: 0.2rem 0.625rem; border-radius: 100px; }
.jd-etn-badge { font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.625rem; border-radius: 100px; background: rgba(192,132,252,0.1); border: 1px solid rgba(192,132,252,0.3); color: var(--purple); }
.jd-window { font-size: 0.78rem; color: var(--muted); font-family: var(--mono); margin-left: auto; }

.jd-timer-section { background: rgba(64,224,208,0.05); border: 1px solid rgba(64,224,208,0.15); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.jd-timer-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.15em; color: var(--muted); margin-bottom: 0.25rem; }
.jd-timer-value { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--cyan); }

.jd-section { display: flex; flex-direction: column; gap: 0.375rem; }
.jd-section-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.jd-customer-name { font-weight: 700; font-size: 1rem; }
.jd-customer-phone,.jd-customer-email { font-size: 0.875rem; color: var(--cyan); }
.jd-customer-address { font-size: 0.875rem; color: var(--muted); display: flex; align-items: center; gap: 0.375rem; }
.jd-description { font-size: 0.9rem; color: var(--text); line-height: 1.5; }
.jd-notes { background: rgba(255,189,89,0.05); border: 1px solid rgba(255,189,89,0.15); border-radius: var(--radius-sm); padding: 0.625rem 0.875rem; font-size: 0.8rem; color: var(--amber); }

/* Parts checklist */
.jd-parts-list { display: flex; flex-direction: column; gap: 0.375rem; }
.jd-part-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; background: var(--surface-2); border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition); }
.jd-part-item:hover { background: var(--surface-3); }
.jd-part-check { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; transition: all var(--transition); }
.jd-part-check.checked { background: var(--cyan); border-color: var(--cyan); color: #090d12; }
.jd-part-name { font-size: 0.8rem; }

/* ETN section */
.jd-etn-full { background: rgba(192,132,252,0.04); border: 1px solid rgba(192,132,252,0.15); border-radius: var(--radius-sm); padding: 1rem; }
.jd-etn-qr-row { display: flex; gap: 1rem; align-items: flex-start; margin-top: 0.5rem; }
.jd-etn-qr { width: 80px; height: 80px; background: white; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.jd-etn-qr img { width: 100%; height: 100%; object-fit: contain; }
.jd-etn-info { flex: 1; }
.jd-etn-cred-id { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 0.25rem; word-break: break-all; }
.jd-etn-sub { font-size: 0.68rem; color: var(--muted); margin-bottom: 0.625rem; }

/* Action buttons in job detail */
.jd-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
.jd-action-btn { padding: 0.75rem; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 700; border: 1px solid; transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.375rem; }
.jd-action-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.jd-action-primary { background: var(--cyan); color: #090d12; border-color: var(--cyan); }
.jd-action-primary:hover { background: #5ae8d9; }
.jd-action-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.jd-action-secondary:hover { border-color: var(--muted); }
.jd-action-danger { background: rgba(255,107,118,0.1); color: var(--red); border-color: rgba(255,107,118,0.3); }
.jd-action-lime { background: var(--lime); color: #090d12; border-color: var(--lime); }
.jd-action-full { grid-column: 1 / -1; }

/* Timeline in job detail */
.jd-timeline { display: flex; flex-direction: column; gap: 0; }
.jd-tl-entry { display: flex; gap: 0.75rem; padding: 0.625rem 0; border-left: 2px solid var(--line); padding-left: 0.875rem; position: relative; }
.jd-tl-entry::before { content: ''; position: absolute; left: -4.5px; top: 1rem; width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.jd-tl-entry:last-child::before { background: var(--cyan); }
.jd-tl-time { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); min-width: 80px; flex-shrink: 0; }
.jd-tl-event { font-size: 0.8rem; color: var(--text); }

/* ════════════════════════════════════════════════════════════════════
   MODALS (generic)
════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(9,13,18,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); width: 100%; max-width: 480px;
  max-height: 90dvh; overflow-y: auto; display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modal-in 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-panel-sm { max-width: 360px; }
.modal-panel-lg { max-width: 640px; }
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 0.875rem; color: var(--muted); transition: all var(--transition); }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; flex: 1; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
.modal-notice { display: flex; gap: 0.625rem; background: rgba(64,224,208,0.06); border: 1px solid rgba(64,224,208,0.15); border-radius: var(--radius-sm); padding: 0.75rem 1rem; font-size: 0.8rem; color: var(--muted); }
.modal-success { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1.5rem; background: rgba(183,243,107,0.08); border-top: 1px solid rgba(183,243,107,0.2); color: var(--lime); font-weight: 600; font-size: 0.875rem; }
.completion-job-name { font-weight: 700; font-size: 1rem; color: var(--cyan); }
.completion-options { display: flex; flex-direction: column; gap: 0.75rem; }

/* Signature canvas */
.signoff-canvas-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.signoff-canvas-wrap { position: relative; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.signoff-canvas { display: block; width: 100%; max-height: 160px; cursor: crosshair; touch-action: none; }
.canvas-clear-btn { position: absolute; top: 0.5rem; right: 0.5rem; background: rgba(9,13,18,0.6); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; padding: 0.2rem 0.5rem; font-size: 0.72rem; cursor: pointer; }
.signoff-notice { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }

/* Completion proof */
.proof-qr-wrap { background: white; border-radius: var(--radius-sm); padding: 1rem; display: flex; align-items: center; justify-content: center; min-height: 180px; }
.proof-payload-wrap { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.proof-payload-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; color: var(--muted); padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); }
.proof-payload { font-family: var(--mono); font-size: 0.72rem; color: var(--lime); padding: 0.75rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

/* Notifications list */
.notifications-list { display: flex; flex-direction: column; }
.notif-item { display: flex; gap: 0.875rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); align-items: flex-start; transition: background var(--transition); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(64,224,208,0.03); }
.notif-icon { font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.2rem; }
.notif-item.unread .notif-title::before { content: '● '; color: var(--cyan); font-size: 0.6rem; vertical-align: middle; }
.notif-text { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.notif-time { font-size: 0.68rem; color: var(--muted); flex-shrink: 0; }

/* Photo camera */
.camera-controls { display: flex; align-items: center; justify-content: space-between; }
.photo-gallery-count { font-size: 0.78rem; color: var(--muted); }
.camera-video { width: 100%; border-radius: var(--radius-sm); background: #000; }
.photo-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.photo-thumb { position: relative; aspect-ratio: 1; background: var(--surface-2); border-radius: var(--radius-sm); overflow: hidden; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-time { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); font-size: 0.6rem; color: #fff; padding: 0.2rem 0.4rem; }

/* ════════════════════════════════════════════════════════════════════
   BOTTOM NAV
════════════════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bnav-h); background: var(--surface); border-top: 1px solid var(--line);
  z-index: 200; padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.25rem; flex: 1; height: 100%; padding: 0.5rem 0.25rem;
  color: var(--muted); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.02em;
  transition: color var(--transition); border: none; background: none;
  cursor: pointer; position: relative;
}
.bnav-item.active { color: var(--cyan); }
.bnav-item:hover { color: var(--text); }
.bnav-icon { font-size: 1.25rem; line-height: 1; }
.bnav-badge {
  position: absolute; top: 6px; right: calc(50% - 20px);
  background: var(--amber); color: #090d12; font-size: 0.6rem; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
}
.bnav-badge-notif { background: var(--red); color: #fff; }

/* ════════════════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--bnav-h) + 1rem); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.625rem 1.25rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  pointer-events: none; opacity: 0; transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); white-space: nowrap; z-index: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; align-items: stretch; }
  .app { flex-direction: column; }
  .main-content { padding: 1.25rem 1rem calc(var(--bnav-h) + 1.25rem); max-width: 100%; }
  .toast { bottom: calc(var(--bnav-h) + 1rem); }
  .holo-card { max-width: 100%; }
  .card-name { font-size: 0.9rem; }
  .card-watermark { font-size: 3.5rem; }
  .quick-actions-row { grid-template-columns: repeat(4,1fr); gap: 0.5rem; }
  .qa-icon { font-size: 1.125rem; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .tools-v2-grid { grid-template-columns: 1fr; }
  .jd-actions-grid { grid-template-columns: 1fr; }
  .earn-row { grid-template-columns: 1fr auto; }
  .earn-row-sub { display: none; }
  .photo-gallery { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content { padding: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 769px) {
  .tools-v2-grid { grid-template-columns: repeat(2,1fr); }
  .quick-actions-row { max-width: 440px; }
}

/* Focus rings */
.nav-item:focus-visible,.bnav-item:focus-visible,.btn:focus-visible,
.copy-btn:focus-visible,.modal-close:focus-visible,.filter-chip:focus-visible,
.quick-action-btn:focus-visible,.week-day-btn:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
