/* SBR Air — Worker App rules from index.html 492–947, scoped to body.mode-worker (V0 step 3). V2: .topbar is Worker-only again (E1 resolved; it keeps the Dashboard declarations it used to inherit, so its appearance is unchanged). */

  

  body.mode-worker .ci-screen {
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }
  body.mode-worker .ci-screen.ci-active { display: flex; }

  /* ── SPLASH ── */
  body.mode-worker #screen-splash {
    justify-content: center;
    align-items: center;
    background: var(--navy);
    gap: 20px;
  }
  body.mode-worker .splash-logo {
    width: 88px; height: 88px;
    border-radius: 24px;
    background: var(--green);
    display: flex; align-items: center; justify-content: center;
  }
  body.mode-worker .splash-logo svg { width: 52px; height: 52px; }
  body.mode-worker .splash-name { font-size: 32px; font-weight: 700; letter-spacing: -1px; color: var(--text); }
  body.mode-worker .splash-sub { font-size: 14px; color: var(--text-muted); letter-spacing: 0.5px; }
  body.mode-worker .splash-bar {
    width: 48px; height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 32px;
    overflow: hidden;
  }
  body.mode-worker .splash-bar-fill {
    height: 100%; width: 0%;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.05s linear;
  }

  /* ── TOP BAR ── */
  body.mode-worker .topbar {
    /* V2: the former Dashboard .topbar declarations this bar inherited (E1, resolved), then its own */
    height: var(--topbar-h);
    background: var(--navy-mid);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 52px 24px 16px;
  }
  body.mode-worker .topbar-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--green);
    display: flex; align-items: center; justify-content: center;
  }
  body.mode-worker .topbar-logo svg { width: 20px; height: 20px; }
  body.mode-worker .topbar-title { font-size: 17px; font-weight: 600; color: var(--text); }
  body.mode-worker .topbar-right { font-size: 12px; color: var(--text-muted); background: rgba(255,255,255,0.06); padding: 4px 10px; border-radius: 20px; }

  /* ── PIN LOGIN ── */
  body.mode-worker #screen-login { background: var(--navy); }
  body.mode-worker .login-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    gap: 0;
  }
  body.mode-worker .login-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--navy-card);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 700;
    color: var(--green);
    margin-bottom: 14px;
  }
  body.mode-worker .login-name { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
  body.mode-worker .login-role { font-size: 13px; color: var(--text-muted); margin-bottom: 36px; }
  body.mode-worker .pin-dots {
    display: flex; gap: 14px;
    margin-bottom: 36px;
  }
  body.mode-worker .pin-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid var(--text-dim);
    transition: all 0.15s;
  }
  body.mode-worker .pin-dot.filled { background: var(--green); border-color: var(--green); }
  body.mode-worker .pin-dot.error { background: var(--red); border-color: var(--red); }
  body.mode-worker .pin-label { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
  body.mode-worker .keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 280px;
  }
  body.mode-worker .key {
    height: 64px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 22px;
    font-weight: 500;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.1s;
    user-select: none;
  }
  body.mode-worker .key:active { background: rgba(0,200,150,0.15); border-color: var(--green); transform: scale(0.95); }
  body.mode-worker .key.del { font-size: 16px; color: var(--text-muted); }
  body.mode-worker .key.empty { background: transparent; border-color: transparent; cursor: default; }
  body.mode-worker .login-switch { margin-top: 28px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
  body.mode-worker .login-switch span { color: var(--green); }

  /* ── WORKER SELECTOR ── */
  body.mode-worker #screen-select { background: var(--navy); }
  body.mode-worker .select-body { flex: 1; padding: 16px 20px; overflow-y: auto; }
  body.mode-worker .select-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
  body.mode-worker .select-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
  body.mode-worker .search-bar {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
  }
  body.mode-worker .search-bar::placeholder { color: var(--text-dim); }
  body.mode-worker .search-bar:focus { border-color: var(--border-active); }
  body.mode-worker .worker-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
  }
  body.mode-worker .worker-card:active { background: var(--green-dim); border-color: var(--border-active); }
  body.mode-worker .wc-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    flex-shrink: 0;
  }
  body.mode-worker .wc-info { flex: 1; }
  body.mode-worker .wc-name { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
  body.mode-worker .wc-meta { font-size: 12px; color: var(--text-muted); }
  body.mode-worker .wc-arr { color: var(--text-dim); font-size: 18px; }
  body.mode-worker .group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    padding: 8px 4px 6px;
  }

  /* ── HOME ── */
  body.mode-worker #screen-home { background: var(--navy); }
  body.mode-worker .home-body { flex: 1; padding: 12px 20px 32px; overflow-y: auto; }
  body.mode-worker .greeting { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
  body.mode-worker .worker-name-big { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 20px; }

  body.mode-worker .clock-card {
    background: var(--navy-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    text-align: center;
  }
  body.mode-worker .clock-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
  }
  body.mode-worker .pill-out { background: rgba(255,255,255,0.06); color: var(--text-muted); }
  body.mode-worker .pill-in { background: rgba(0,200,150,0.15); color: var(--green); }
  body.mode-worker .pill-dot { width: 6px; height: 6px; border-radius: 50%; }
  body.mode-worker .pill-out .pill-dot { background: var(--text-dim); }
  body.mode-worker .pill-in .pill-dot { background: var(--green); }

  body.mode-worker .clock-time-display {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
  }
  body.mode-worker .clock-date-display { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }

  body.mode-worker .clock-btn {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
  }
  body.mode-worker .clock-btn-in { background: var(--green); color: #0a1628; }
  body.mode-worker .clock-btn-out { background: rgba(229,68,68,0.15); color: var(--red); border: 1px solid rgba(229,68,68,0.3); }
  body.mode-worker .clock-btn:active { transform: scale(0.97); }
  body.mode-worker .clock-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

  body.mode-worker .elapsed-display {
    display: none;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
  }
  body.mode-worker .elapsed-display.visible { display: block; }
  body.mode-worker .elapsed-time { color: var(--green); font-weight: 600; }

  body.mode-worker .section-title { font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }

  body.mode-worker .job-card {
    background: var(--navy-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
  }
  body.mode-worker .job-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
  body.mode-worker .job-card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
  body.mode-worker .job-card-sub { font-size: 12px; color: var(--text-muted); }
  body.mode-worker .job-badge {
    font-size: 10px; font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
  }
  body.mode-worker .badge-active { background: rgba(0,200,150,0.15); color: var(--green); }
  body.mode-worker .badge-upcoming { background: rgba(255,255,255,0.06); color: var(--text-muted); }
  body.mode-worker .badge-inactive { background: rgba(255,255,255,0.04); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.08); }
  body.mode-worker .job-detail-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
  body.mode-worker .job-detail-row svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-dim); }
  body.mode-worker .dir-link { color: var(--green); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; text-decoration: none; }

  body.mode-worker .my-hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  body.mode-worker .hours-tile {
    background: var(--navy-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
  }
  body.mode-worker .hours-tile-val { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
  body.mode-worker .hours-tile-val.ot { color: var(--amber); }
  body.mode-worker .hours-tile-lbl { font-size: 11px; color: var(--text-muted); }

  body.mode-worker .punch-history { }
  body.mode-worker .punch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }
  body.mode-worker .punch-row:last-child { border-bottom: none; }
  body.mode-worker .punch-date { color: var(--text-muted); width: 80px; flex-shrink: 0; }
  body.mode-worker .punch-times { color: var(--text); flex: 1; }
  body.mode-worker .punch-hrs { color: var(--text-muted); font-size: 12px; }
  body.mode-worker .punch-gps { font-size: 10px; color: var(--green); margin-top: 1px; }

  /* ── CLOCKING ANIMATION ── */
  body.mode-worker #screen-clocking {
    background: var(--navy);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px;
  }
  body.mode-worker .clock-ring {
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    margin: 0 auto 28px;
    animation: spin 1s linear infinite;
  }
  body.mode-worker .clocking-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
  body.mode-worker .clocking-sub { font-size: 14px; color: var(--text-muted); }
  body.mode-worker .gps-steps { margin-top: 28px; text-align: left; max-width: 260px; }
  body.mode-worker .gps-step {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-dim);
    transition: color 0.3s;
  }
  body.mode-worker .gps-step.done { color: var(--text-muted); }
  body.mode-worker .gps-step.active { color: var(--text); }
  body.mode-worker .step-icon {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--text-dim);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
  }
  body.mode-worker .gps-step.done .step-icon { background: var(--green); border-color: var(--green); }
  body.mode-worker .gps-step.active .step-icon { border-color: var(--green); }

  /* ── CONFIRMED ── */
  body.mode-worker #screen-confirmed {
    background: var(--navy);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 32px;
  }
  body.mode-worker .confirmed-ring {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(0,200,150,0.12);
    border: 2px solid var(--green);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
  }
  body.mode-worker .confirmed-ring svg { width: 48px; height: 48px; }
  body.mode-worker .confirmed-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
  body.mode-worker .confirmed-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
  body.mode-worker .confirmed-card {
    background: var(--navy-mid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: left;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 32px;
  }
  body.mode-worker .cc-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
  body.mode-worker .cc-row:last-child { border-bottom: none; }
  body.mode-worker .cc-label { color: var(--text-muted); }
  body.mode-worker .cc-val { color: var(--text); font-weight: 500; text-align: right; max-width: 180px; }
  body.mode-worker .cc-val.green { color: var(--green); }
  body.mode-worker .done-btn {
    background: var(--green);
    color: #0a1628;
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
  }
  body.mode-worker .done-btn:active { transform: scale(0.97); }

  /* ── BOTTOM NAV ── */
  body.mode-worker .bottom-nav {
    display: flex;
    background: var(--navy-mid);
    border-top: 1px solid var(--border);
    padding: 8px 0 28px;
  }
  body.mode-worker .bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 10px;
    transition: color 0.15s;
  }
  body.mode-worker .bn-item.active { color: var(--green); }
  body.mode-worker .bn-item svg { width: 22px; height: 22px; }
  body.mode-worker .worker-tab { display:none; }
  body.mode-worker .worker-tab.active { display:block; }
  body.mode-worker #sbr-worker-app .bottom-nav { position:fixed;bottom:0;left:0;right:0;max-width:420px;margin:0 auto;z-index:100; }
  body.mode-worker #ci-screen-home { padding-bottom:0; }
  body.mode-worker .bn-badge {
    position: absolute;
    top: -2px; right: -4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--amber);
    border: 1.5px solid var(--navy-mid);
  }
  body.mode-worker .bn-icon-wrap { position: relative; }

  /* ── MISC ── */
  body.mode-worker .section-spacer { height: 20px; }
  body.mode-worker .tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px; }
  body.mode-worker .tag-g1 { background: rgba(0,200,150,0.1); color: var(--green); }
  body.mode-worker .tag-g2 { background: rgba(100,130,255,0.12); color: #8899ff; }


