:root { --bg: #0f172a; --card: #1e293b; --accent: #3b82f6; --green: #22c55e; --red: #ef4444;
          --text: #e2e8f0; --muted: #94a3b8; --border: #334155; }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
         background: var(--bg); color: var(--text); min-height: 100vh; }
  .login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
  .login-box { background: var(--card); padding: 2rem; border-radius: 12px; width: 340px; }
  .login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; }
  .form-group { margin-bottom: 1rem; }
  .form-group label { display: block; margin-bottom: 0.25rem; color: var(--muted); font-size: 0.875rem; }
  .form-group input[type="text"], .form-group input[type="password"] {
    width: 100%; padding: 0.6rem 0.75rem; background: var(--bg); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); font-size: 1rem; }
  .remember-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
  .remember-row label { color: var(--muted); font-size: 0.875rem; cursor: pointer; }
  .btn { padding: 0.6rem 1.2rem; border: none; border-radius: 6px; cursor: pointer;
         font-size: 0.95rem; font-weight: 500; transition: opacity 0.15s; }
  .btn:hover { opacity: 0.85; }
  .btn-primary { background: var(--accent); color: #fff; width: 100%; }
  .btn-green { background: var(--green); color: #fff; }
  .btn-red { background: var(--red); color: #fff; }
  .btn-small { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
  .error { color: var(--red); font-size: 0.85rem; margin-top: 0.5rem; text-align: center; }

  /* App layout */
  .app { display: none; }
  .topbar { background: var(--card); padding: 0.75rem 1.5rem; display: flex;
            justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
  .topbar-left { display: flex; align-items: center; gap: 1rem; }
  .topbar h2 { font-size: 1.1rem; }
  .topbar .user-info { color: var(--muted); font-size: 0.9rem; }
  .nav-tabs { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
  .nav-tab { padding: 0.4rem 0.8rem; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
             background: transparent; color: var(--muted); border: 1px solid transparent; white-space: nowrap; }
  .nav-tab:hover { color: var(--text); }
  .nav-tab.active { background: var(--accent); color: #fff; }
  .nav-dropdown { position: relative; }
  .nav-dropdown .nav-tab { display: flex; align-items: center; gap: 0.3rem; }
  .nav-dropdown .nav-tab::after { content: '\25BE'; font-size: 0.7rem; }
  .nav-dropdown .nav-tab.has-active { background: rgba(59,130,246,0.2); color: var(--accent); border-color: var(--accent); }
  .nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; margin-top: 0.25rem;
    background: var(--card); border: 1px solid var(--border); border-radius: 8px; min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3); z-index: 50; overflow: hidden; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu .nav-dd-item { padding: 0.5rem 0.85rem; cursor: pointer; font-size: 0.85rem;
    color: var(--muted); white-space: nowrap; }
  .nav-dropdown-menu .nav-dd-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
  .nav-dropdown-menu .nav-dd-item.active { color: var(--accent); font-weight: 600; }
  .main { max-width: 900px; margin: 1.5rem auto; padding: 0 1rem; }

  /* Clock panel */
  .clock-panel { text-align: center; padding: 2rem; }
  .clock-btn { width: 200px; height: 200px; border-radius: 50%; font-size: 1.3rem; font-weight: 700;
               border: none; cursor: pointer; transition: all 0.2s; display: inline-flex;
               align-items: center; justify-content: center; flex-direction: column; }
  .clock-btn.in { background: var(--green); color: #fff; }
  .clock-btn.out { background: var(--red); color: #fff; }
  .clock-btn:hover { transform: scale(1.05); }
  .timer { font-size: 2.5rem; font-weight: 700; margin-top: 1rem; font-variant-numeric: tabular-nums; }
  .clock-status { color: var(--muted); margin-top: 0.5rem; font-size: 0.9rem; }

  /* Notes modal */
  .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
                   z-index: 100; align-items: center; justify-content: center; }
  .modal-overlay.show { display: flex; }
  .modal { background: var(--card); border-radius: 12px; padding: 1.5rem; width: 400px; max-width: 90vw; }
  .modal h3 { margin-bottom: 1rem; }
  .modal textarea { width: 100%; height: 100px; background: var(--bg); border: 1px solid var(--border);
                    border-radius: 6px; color: var(--text); padding: 0.5rem; font-size: 0.95rem;
                    font-family: inherit; resize: vertical; }
  .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

  /* Table */
  .entries-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
  .entries-table th, .entries-table td { padding: 0.6rem 0.75rem; text-align: left;
    border-bottom: 1px solid var(--border); font-size: 0.9rem; }
  .entries-table th { color: var(--muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; }
  .entries-table tr:hover { background: rgba(255,255,255,0.03); }
  .actions { display: flex; gap: 0.25rem; }

  /* Admin */
  .filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
  .filters .form-group { margin-bottom: 0; }
  .filters input, .filters select { padding: 0.4rem 0.6rem; background: var(--bg); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); font-size: 0.9rem; }
  .stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
  .stat-card { background: var(--card); border-radius: 8px; padding: 1rem; }
  .stat-card .label { color: var(--muted); font-size: 0.8rem; }
  .stat-card .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }
  .stat-card .sub { font-size: 0.8rem; color: var(--muted); }
  .status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.4rem; }
  .status-dot.on { background: var(--green); }
  .status-dot.off { background: var(--muted); }
  .section-title { font-size: 1.1rem; margin-bottom: 0.75rem; font-weight: 600; }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* Break buttons */
  .break-panel { margin-top: 1.5rem; }
  .break-buttons { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }
  .btn-break { background: #f59e0b; color: #000; font-weight: 600; }
  .btn-break:hover { opacity: 0.85; }
  .break-active { margin-top: 1rem; padding: 1rem; background: rgba(245,158,11,0.15);
    border: 1px solid #f59e0b; border-radius: 8px; text-align: center; }
  .break-active .break-type { color: #f59e0b; font-weight: 600; font-size: 1rem; }
  .break-active .break-timer { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0;
    font-variant-numeric: tabular-nums; color: #f59e0b; }

  /* Edit modal */
  .modal input[type="datetime-local"] { width: 100%; padding: 0.5rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.95rem;
    margin-bottom: 0.5rem; }
  .breaks-list { margin-top: 0.75rem; }
  .breaks-list .break-item { display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
  .breaks-list .break-item:last-child { border-bottom: none; }

  /* Report */
  .report-section { margin-bottom: 1.5rem; }
  .report-section h4 { font-size: 0.95rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
  .report-table { width: 100%; border-collapse: collapse; }
  .report-table th, .report-table td { padding: 0.5rem 0.75rem; text-align: left;
    border-bottom: 1px solid var(--border); font-size: 0.9rem; }
  .report-table th { color: var(--muted); font-weight: 500; font-size: 0.8rem; text-transform: uppercase;
    background: var(--card); }
  .report-table tr:hover { background: rgba(255,255,255,0.03); }
  .report-table .total-row { font-weight: 700; border-top: 2px solid var(--accent); background: rgba(59,130,246,0.08); }
  .report-table .total-row td { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .report-table .section-header td { font-weight: 600; padding-top: 1rem; color: var(--accent);
    border-bottom: 2px solid var(--accent); font-size: 0.95rem; }
  .report-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .report-table th.num { text-align: right; }
  .report-table td.desc { max-width: 300px; }
  .report-grand { margin-top: 1rem; padding: 1rem; background: var(--card); border-radius: 8px;
    border: 1px solid var(--accent); display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
  .report-grand .rg-item { text-align: center; }
  .report-grand .rg-label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
  .report-grand .rg-value { font-size: 1.5rem; font-weight: 700; margin-top: 0.15rem; }
  .report-grand .rg-sub { font-size: 0.8rem; color: var(--muted); }
  .report-header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 2px solid var(--accent); }
  .report-header h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
  .report-header .report-period { color: var(--muted); font-size: 0.95rem; }
  .report-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-bottom: 1rem; }

  /* Paystub */
  .paystub { font-size: 0.9rem; max-width: 650px; margin: 0 auto; }
  .paystub-border { border: 2px solid var(--accent); border-radius: 8px; padding: 2rem; }
  .paystub-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
    border-bottom: 3px solid var(--accent); padding-bottom: 1rem; margin-bottom: 1.25rem; }
  .paystub-header .company-block { }
  .paystub-header .company-name { font-size: 1.4rem; font-weight: 700; }
  .paystub-header .company-detail { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
  .paystub-header .receipt-block { text-align: right; }
  .paystub-header .receipt-title { font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent); }
  .paystub-header .receipt-num { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
  .paystub-parties { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
    margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
  .paystub-parties .party-block { flex: 1; min-width: 200px; }
  .paystub-parties .party-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--accent); font-weight: 600; margin-bottom: 0.35rem; }
  .paystub-parties .party-name { font-weight: 600; font-size: 1rem; }
  .paystub-parties .party-detail { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
  .paystub-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem;
    margin-bottom: 1.25rem; padding: 0.75rem; background: rgba(59,130,246,0.06); border-radius: 6px; border: 1px solid var(--border); }
  .paystub-meta .meta-item { }
  .paystub-meta .meta-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
  .paystub-meta .meta-value { font-weight: 600; font-size: 0.95rem; }
  .paystub-section { margin-bottom: 1.25rem; }
  .paystub-section h5 { font-size: 0.75rem; text-transform: uppercase; color: var(--accent); letter-spacing: 0.06em;
    font-weight: 600; border-bottom: 2px solid var(--border); padding-bottom: 0.3rem; margin-bottom: 0.5rem; }
  .paystub-table { width: 100%; border-collapse: collapse; }
  .paystub-table th { font-size: 0.7rem; text-transform: uppercase; color: var(--muted); text-align: left;
    padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); font-weight: 500; }
  .paystub-table th.r { text-align: right; }
  .paystub-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.9rem; }
  .paystub-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
  .paystub-table tr.subtotal td { font-weight: 600; border-top: 1px solid var(--border); }
  .paystub-total { display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; background: rgba(34,197,94,0.08); border: 2px solid var(--green);
    border-radius: 8px; margin-bottom: 1.25rem; }
  .paystub-total .pt-label { font-size: 1rem; font-weight: 600; }
  .paystub-total .pt-value { font-size: 1.5rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
  .paystub-ytd { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
  .paystub-ytd .ytd-box { padding: 0.6rem 0.75rem; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); }
  .paystub-ytd .ytd-label { font-size: 0.65rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
  .paystub-ytd .ytd-value { font-size: 1.1rem; font-weight: 700; margin-top: 0.15rem; }
  .paystub-footer { text-align: center; border-top: 2px solid var(--border); padding-top: 0.75rem; margin-top: 0.5rem; }
  .paystub-footer .legal { color: var(--muted); font-size: 0.7rem; line-height: 1.5; }
  .paystub-footer .gen-date { color: var(--muted); font-size: 0.65rem; margin-top: 0.5rem; }
  .pay-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem;
    margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    flex-wrap: wrap; gap: 0.5rem; }
  .pay-card:hover { border-color: var(--accent); }
  .pay-card .pc-period { font-weight: 600; }
  .pay-card .pc-detail { color: var(--muted); font-size: 0.85rem; }
  .pay-card .pc-amount { font-size: 1.2rem; font-weight: 700; color: var(--green); }
  .pay-card .pc-status { font-size: 0.75rem; text-transform: uppercase; padding: 0.15rem 0.4rem; border-radius: 4px; }
  .pay-card .pc-status.paid { background: rgba(34,197,94,0.15); color: var(--green); }
  .pay-card .pc-status.draft { background: rgba(245,158,11,0.15); color: #f59e0b; }

  /* Print styles */
  @media print {
    body { background: #fff !important; color: #000 !important; font-size: 11pt; }
    .topbar, .login-wrap, .nav-tabs, .filters, #logoutBtn, .report-actions button,
    .tab-content:not(.active), .modal-overlay:not(.printing) { display: none !important; }
    .modal-overlay.printing { position: static; background: none; display: block !important; }
    .modal-overlay.printing .modal { width: 100%; max-width: 100%; max-height: none !important; overflow: visible !important; box-shadow: none; padding: 0; border-radius: 0; }
    .modal-overlay.printing .paystub-modal { overflow: visible !important; max-height: none !important; }
    .modal-overlay.printing .modal-actions { display: none !important; }
    .modal-overlay.printing .paystub { font-size: 9pt; }
    .modal-overlay.printing .paystub-border { padding: 1rem; }
    .modal-overlay.printing .paystub-header .company-name { font-size: 1.2rem; }
    .modal-overlay.printing .paystub-parties { margin-bottom: 0.5rem; padding-bottom: 0.5rem; }
    .modal-overlay.printing .paystub-meta { margin-bottom: 0.5rem; gap: 0.4rem; }
    .modal-overlay.printing .paystub-section { margin-bottom: 0.5rem; }
    .modal-overlay.printing .paystub-total { padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; }
    .modal-overlay.printing .paystub-ytd { margin-bottom: 0.5rem; gap: 0.4rem; }
    .modal-overlay.printing .paystub-footer { padding-top: 0.4rem; margin-top: 0.25rem; }
    .app { display: block !important; }
    .main { max-width: 100%; margin: 0; padding: 0; }
    .tab-content.active { display: block !important; }
    body.printing-paystub .tab-content.active { display: none !important; }
    body.printing-paystub .app { display: none !important; }
    .report-header { border-bottom-color: #000; }
    .report-header h3 { color: #000; }
    .report-header .report-period { color: #555; }
    .report-grand { border-color: #333; background: #f5f5f5; }
    .report-grand .rg-label { color: #555; }
    .report-grand .rg-value { color: #000; }
    .report-section h4 { color: #555; border-bottom-color: #ccc; }
    .report-table th { background: #eee; color: #333; }
    .report-table th, .report-table td { border-bottom-color: #ddd; color: #000; }
    .report-table .total-row { background: #e8f0fe; border-top-color: #333; }
    .report-table .section-header td { color: #000; border-bottom-color: #333; }
    :root { --muted: #555; --border: #ddd; --accent: #333; --green: #16a34a; --bg: #fff; --card: #fff; --text: #000; }
    .paystub { color: #000; }
    .paystub-border { border-color: #333; }
    .paystub-header .company-name { color: #000; }
    .paystub-header .company-detail, .paystub-header .receipt-num { color: #555; }
    .paystub-header .receipt-title { color: #000; border-bottom-color: #333; }
    .paystub-parties .party-title { color: #555; }
    .paystub-parties .party-name { color: #000; }
    .paystub-parties .party-detail { color: #555; }
    .paystub-meta .meta-label { color: #555; }
    .paystub-meta .meta-value { color: #000; }
    .paystub-section h5 { color: #333; border-bottom-color: #ccc; }
    .paystub-table th { color: #555; border-bottom-color: #ccc; }
    .paystub-table td { color: #000; border-bottom-color: #eee; }
    .paystub-table tr.subtotal td { border-top-color: #333; }
    .paystub-total { background: #f0fdf4; border-color: #16a34a; }
    .paystub-total .pt-label { color: #000; }
    .paystub-total .pt-value { color: #16a34a; }
    .paystub-ytd .ytd-box { background: #f8f9fa; border-color: #ddd; }
    .paystub-ytd .ytd-label { color: #555; }
    .paystub-ytd .ytd-value { color: #000; }
    .paystub-footer { border-top-color: #333; }
    .paystub-footer .legal { color: #555; }
    .paystub-footer .gen-date { color: #777; }
  }

  /* ── Mobile Responsive ─────────────────────────────────────────────── */
  @media (max-width: 640px) {
    .topbar { flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.75rem; }
    .topbar-left { width: 100%; justify-content: space-between; }
    .topbar > div:last-child { width: 100%; justify-content: space-between; }
    .nav-tabs { flex-wrap: wrap; gap: 0.3rem; }
    .nav-tab { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
    .main { padding: 0 0.5rem; margin: 0.75rem auto; }
    .clock-panel { padding: 1rem 0.5rem; }
    .clock-btn { width: 160px; height: 160px; font-size: 1.1rem; }
    .timer { font-size: 2rem; }

    /* Card-based entries on mobile */
    .entries-table thead { display: none; }
    .entries-table, .entries-table tbody, .entries-table tr, .entries-table td {
      display: block; width: 100%; }
    .entries-table tr { background: var(--card); border-radius: 8px; padding: 0.75rem;
      margin-bottom: 0.5rem; border: 1px solid var(--border); position: relative; }
    .entries-table tr:hover { background: var(--card); }
    .entries-table td { border-bottom: none; padding: 0.15rem 0; font-size: 0.85rem; }
    .entries-table td:before { content: attr(data-label); color: var(--muted); font-size: 0.75rem;
      text-transform: uppercase; display: inline-block; width: 80px; font-weight: 500; }
    .entries-table td.actions-cell { display: flex; gap: 0.4rem; margin-top: 0.4rem; padding-top: 0.4rem;
      border-top: 1px solid var(--border); }
    .entries-table td.actions-cell:before { display: none; }

    .filters { gap: 0.5rem; }
    .filters .form-group { flex: 1 1 45%; min-width: 0; }
    .filters input, .filters select { width: 100%; }
    .stat-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
    .modal { padding: 1rem; width: 95vw; }
    .break-active { padding: 0.75rem; }
    .section-title { font-size: 1rem; }

    /* Report on mobile */
    .report-grand { gap: 1rem; }
    .report-grand .rg-value { font-size: 1.2rem; }
    .report-table th, .report-table td { padding: 0.4rem 0.5rem; font-size: 0.8rem; }

    /* Touch-friendly buttons */
    .btn-small { padding: 0.45rem 0.75rem; font-size: 0.85rem; min-height: 36px; }
    .btn-break { padding: 0.5rem 1rem; font-size: 0.9rem; min-height: 40px; }
  }

  /* ── Expense & Invoice Styles ──────────────────────────────────── */
  .expense-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem;
    margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    flex-wrap: wrap; gap: 0.5rem; }
  .expense-card:hover { border-color: var(--accent); }
  .expense-card .ec-info { flex: 1; min-width: 200px; }
  .expense-card .ec-category { font-weight: 600; }
  .expense-card .ec-detail { color: var(--muted); font-size: 0.85rem; }
  .expense-card .ec-amount { font-size: 1.2rem; font-weight: 700; }
  .expense-card .ec-right { display: flex; align-items: center; gap: 0.75rem; }
  .status-badge { font-size: 0.75rem; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 600; }
  .status-badge.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
  .status-badge.approved { background: rgba(34,197,94,0.15); color: var(--green); }
  .status-badge.rejected { background: rgba(239,68,68,0.15); color: var(--red); }
  .status-badge.reimbursed { background: rgba(59,130,246,0.15); color: var(--accent); }
  .status-badge.draft { background: rgba(245,158,11,0.15); color: #f59e0b; }
  .status-badge.sent { background: rgba(168,85,247,0.15); color: #a855f7; }
  .status-badge.paid { background: rgba(34,197,94,0.15); color: var(--green); }

  .inv-editable { cursor: pointer; border-bottom: 1px dashed var(--accent); padding: 1px 3px; border-radius: 2px; }
  .inv-editable:hover { background: rgba(59,130,246,0.1); }
  .inv-line-del { cursor: pointer; color: #ef4444; font-size: 1.1rem; font-weight: 700; opacity: 0.5; }
  .inv-line-del:hover { opacity: 1; }

  .drop-zone { border: 2px dashed var(--border); border-radius: 8px; padding: 1.5rem; text-align: center;
    cursor: pointer; transition: border-color 0.2s, background 0.2s; color: var(--muted); }
  .drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: rgba(59,130,246,0.05); }
  .drop-zone input[type="file"] { display: none; }

  .file-preview { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
  .file-preview-item { position: relative; width: 80px; height: 80px; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--border); }
  .file-preview-item img { width: 100%; height: 100%; object-fit: cover; }
  .file-preview-item .fp-pdf { width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; background: var(--bg); font-size: 0.7rem; color: var(--muted); }
  .file-preview-item .fp-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
    background: var(--red); color: #fff; border: none; border-radius: 50%; cursor: pointer;
    font-size: 0.7rem; display: flex; align-items: center; justify-content: center; }

  .receipt-thumb { width: 60px; height: 60px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border);
    cursor: pointer; display: inline-block; }
  .receipt-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .receipt-thumb .rt-pdf { width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; background: var(--bg); font-size: 0.6rem; color: var(--muted); }

  .invoice-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem;
    margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
    flex-wrap: wrap; gap: 0.5rem; }
  .invoice-card:hover { border-color: var(--accent); }

  @media print {
    .modal-overlay.printing-invoice { position: static; background: none; display: block !important; }
    .modal-overlay.printing-invoice .modal { width: 100%; max-width: 100%; max-height: none !important;
      overflow: visible !important; box-shadow: none; padding: 0; border-radius: 0; }
    .modal-overlay.printing-invoice .modal-actions { display: none !important; }
    body.printing-invoice .tab-content.active { display: none !important; }
    body.printing-invoice .app { display: none !important; }
    body.printing-invoice .topbar { display: none !important; }
  }
