@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #f9f9f9;
  --card: #ffffff;
  --text-dark: #141414;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-light: #8a8a8a;
  --accent: #FFD700;
  --accent-dark: #e6c200;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.10);
  --font: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text-dark); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ── HEADER ─────────────────────────────────────────────────────── */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 9px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  position: sticky; top: 0; z-index: 100;
}
.header-left  { display: flex; align-items: center; gap: 16px; min-width: 0; }
.header-title {
  font-size: 11px; color: #999999;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-left: 1px solid #e0e0e0; padding-left: 16px;
}
.header-auth  { display: flex; align-items: center; justify-content: flex-end; }

.btn-header {
  background: transparent; color: #111111;
  border: 1px solid #e0e0e0; border-radius: var(--radius-sm);
  padding: 6px 14px; font-size: 12px; font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, background 0.2s; white-space: nowrap;
}
.btn-header:hover { border-color: #111111; background: #f5f5f5; }
.btn-header-primary { background: #111111; color: #ffffff; border-color: #111111; }
.btn-header-primary:hover { background: #333333; border-color: #333333; }
.header-user { font-size: 11px; color: #666666; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── USER MENU ──────────────────────────────────────────────────── */
.user-menu { position: relative; display: inline-block; }
.user-menu-btn {
  background: transparent; border: none; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  border: 2px solid #e0e0e0;
  transition: border-color 0.2s;
}
.user-menu-btn:hover .user-avatar { border-color: var(--accent); }

.user-menu-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: #ffffff; border: 1px solid #e0e0e0; border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1); min-width: 200px;
  display: none; flex-direction: column; z-index: 1000;
}
.user-menu-dropdown.open { display: flex; }

.menu-user-info {
  padding: 12px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; flex-direction: column; gap: 6px;
}
.menu-email {
  font-size: 12px; font-weight: 500; color: var(--text-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu-role {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em;
}

.menu-admin-btn, .menu-logout-btn {
  background: transparent; border: none; padding: 10px 16px;
  font-size: 13px; font-family: var(--font); font-weight: 500;
  color: var(--text-dark); cursor: pointer; text-align: left;
  transition: background 0.15s;
}
.menu-admin-btn:hover, .menu-logout-btn:hover { background: #f9f9f9; }
.menu-logout-btn { color: #c50f2d; }

.role-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 8px; border-radius: 4px;
  border: 1px solid; white-space: nowrap; display: inline-block;
}
.role-badge.requester { background: #f5f5f5; color: #666666; border-color: #e0e0e0; }
.role-badge.approver  { background: #e8f0fe; color: #1565c0; border-color: #b3c8f8; }
.role-badge.admin     { background: #fff8e1; color: #92610a; border-color: #f5d96a; }

.menu-role.role-badge { padding: 2px 6px; font-size: 9px; }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 24px 16px 60px; }
.main-app.hidden { display: none !important; }

/* ── AUTH GATE ──────────────────────────────────────────────────── */
.app-gate { min-height: 40vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.gate-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 28px 24px; max-width: 420px; text-align: center; }
.gate-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.gate-text  { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; }

/* ── STATS ──────────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.stat-card { border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-card.s0 { background: #232d36; color: #fff; }
.stat-card.s1 { background: var(--accent); color: var(--text-dark); }
.stat-card.s2 { background: #d27354; color: #fff; }
.stat-card.s3 { background: #0097a7; color: #fff; }
.stat-label { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.stat-value { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; word-break: break-all; }

/* ── FILTER BAR ─────────────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-search {
  flex: 1; min-width: 180px; padding: 9px 12px;
  border: 1.5px solid #e8e8e8; border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font);
  background: var(--card); color: var(--text-dark);
  outline: none; transition: border-color 0.15s;
}
.filter-search:focus { border-color: var(--accent); }
.filter-search::placeholder { color: var(--text-muted); }
.filter-select, .filter-date {
  padding: 9px 12px;
  border: 1.5px solid #e8e8e8; border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font);
  background: var(--card); color: var(--text-dark);
  outline: none; cursor: pointer; transition: border-color 0.15s;
}
.filter-select:focus, .filter-date:focus { border-color: var(--accent); }
.filter-date { max-width: 145px; }

/* ── BUTTONS ────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent); color: var(--text-dark); border: none;
  border-radius: var(--radius-sm); padding: 10px 18px;
  font-size: 13px; font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: var(--card); color: var(--text-secondary);
  border: 1.5px solid #e8e8e8; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 13px; font-family: var(--font); font-weight: 500;
  cursor: pointer; transition: border-color 0.15s, color 0.15s; white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text-dark); }

/* ── TABLE CARD ─────────────────────────────────────────────────── */
.table-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll {
  overflow-y: auto; overflow-x: auto;
  height: calc(100vh - 330px); min-height: 400px;
}
.req-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; min-width: 760px;
}
.req-table thead th {
  position: sticky; top: 0; background: var(--card); z-index: 2;
  padding: 10px 12px; text-align: left;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  border-bottom: 2px solid #f0f0f0; white-space: nowrap; user-select: none;
}
.req-table thead th.sortable { cursor: pointer; }
.req-table thead th.sortable:hover { color: var(--text-dark); }
.req-table thead th.sort-asc::after  { content: ' ↑'; color: var(--text-dark); }
.req-table thead th.sort-desc::after { content: ' ↓'; color: var(--text-dark); }
.req-table tbody tr { height: 56px; cursor: pointer; }
.req-table tbody tr:hover td { background: #fafafa; }
.req-table tbody tr.spacer-row { height: 0 !important; cursor: default; font-size: 0; line-height: 0; }
.req-table td {
  padding: 0 12px; border-bottom: 1px solid #f5f5f5;
  height: 56px; vertical-align: middle; overflow: hidden;
}
.req-table td.spacer { padding: 0; border: none; background: transparent !important; }
.td-num   { font-size: 11px; color: var(--text-muted); font-weight: 600; white-space: nowrap; width: 75px; flex-shrink: 0; }
.td-title { min-width: 90px; max-width: 255px; width: 100%; }
.td-title-inner { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.td-amount { font-weight: 600; white-space: nowrap; width: 85px; flex-shrink: 0; }
.td-cat    { width: 87px; white-space: nowrap; color: var(--text-secondary); flex-shrink: 0; }
.td-status { width: 116px; white-space: nowrap; flex-shrink: 0; }
.td-person { min-width: 90px; max-width: 255px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: var(--text-secondary); }
.td-date   { width: 94px; white-space: nowrap; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.td-target { width: 95px; white-space: nowrap; font-size: 12px; color: var(--text-dark); font-weight: 500; flex-shrink: 0; }
.td-actions{ width: 80px; white-space: nowrap; }

/* column visibility by role */
.req-table.hide-requester .col-requester { display: none; }
.req-table.hide-approver  .col-approver  { display: none; }
.col-hidden { display: none !important; }

/* filter visibility by role */
.filter-bar.hide-requester .filter-date,
.filter-bar.hide-approver .filter-date { display: none; }

.table-empty { display: none; padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ── STATUS BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; padding: 3px 8px;
  border-radius: 20px; white-space: nowrap;
}
.badge-pending  { background: #fffbea; color: #92610a; border: 1px solid #f5d96a; }
.badge-approved { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.badge-rejected { background: #fde8eb; color: #c50f2d; border: 1px solid #f0a0ac; }
.badge-paid     { background: #e8f0fe; color: #1565c0; border: 1px solid #b3c8f8; }

/* ── ROW ACTIONS ────────────────────────────────────────────────── */
.btn-action {
  border: none; border-radius: 6px; padding: 5px 10px;
  font-size: 11px; font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: opacity 0.15s; margin-right: 4px;
}
.btn-action:last-child { margin-right: 0; }
.btn-action:hover { opacity: 0.75; }
.btn-view    { background: #ffffff; color: #666666; border: 1px solid #e8e8e8; }
.btn-approve { background: #1b5e20; color: #fff; }
.btn-reject  { background: #c50f2d; color: #fff; }
.btn-paid    { background: #0097a7; color: #fff; }

/* ── MODAL BASE ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 200; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
}
.modal.modal-lg { max-width: 680px; }
.modal-header {
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-shrink: 0;
}
.modal-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.modal-header-right { display: flex; align-items: center; gap: 8px; }
.btn-icon { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text-muted); padding: 0 4px; line-height: 1; transition: color 0.15s; }
.btn-icon:hover { color: var(--text-dark); }
.modal-body { padding: 16px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 16px; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}
.btn-modal { border-radius: var(--radius-sm); padding: 10px 16px; font-size: 13px; font-family: var(--font); font-weight: 600; cursor: pointer; border: none; }
.btn-modal-cancel { background: #f0f0f0; color: var(--text-dark); }
.btn-modal-cancel:hover { background: #e4e4e4; }
.btn-modal-ok     { background: var(--accent); color: var(--text-dark); }
.btn-modal-ok:hover { background: var(--accent-dark); }
.btn-modal-duplicate { background: var(--accent); color: var(--text-dark); }
.btn-modal-duplicate:hover { background: var(--accent-dark); }
.btn-modal-danger { background: #c50f2d; color: #fff; }
.btn-modal-danger:hover { background: #a50d26; }
.btn-modal-paid  { background: #0097a7; color: #fff; }
.btn-modal-paid:hover  { background: #007a8f; }

/* ── FORM ───────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: 1 / -1; }
.form-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.form-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #e8e8e8; border-radius: var(--radius-sm);
  font-size: 14px; font-family: var(--font); color: var(--text-dark);
  background: #fff; outline: none; transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-input:disabled { background: #f5f5f5; color: var(--text-muted); cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 72px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px; cursor: pointer;
}
.amount-row { display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── DETAIL VIEW ────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-bottom: 16px; }
.detail-field { display: flex; flex-direction: column; gap: 3px; }
.detail-field.span-2 { grid-column: 1 / -1; }
.detail-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.detail-value { font-size: 14px; font-weight: 500; color: var(--text-dark); word-break: break-word; line-height: 1.45; }

/* ── APPROVE SECTION ────────────────────────────────────────────── */
.approve-section { border-top: 1px solid #f0f0f0; padding-top: 14px; margin-bottom: 16px; }
.approve-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 10px; }
.approve-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-approve-lg, .btn-reject-lg {
  flex: 1; border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 13px; font-family: var(--font); font-weight: 600;
  cursor: pointer; transition: opacity 0.15s;
}
.btn-approve-lg { background: #1a7a3f; color: #fff; }
.btn-approve-lg:hover { opacity: 0.85; }
.btn-reject-lg  { background: #c50f2d; color: #fff; }
.btn-reject-lg:hover  { background: #a50d26; opacity: 1; }

/* ── HISTORY TIMELINE ───────────────────────────────────────────── */
.section-divider {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  padding: 14px 0 8px; border-top: 1px solid #f0f0f0; margin-top: 4px;
}
.history-timeline { display: flex; flex-direction: column; }
.history-entry {
  display: flex; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid #f7f7f7; align-items: flex-start;
}
.history-entry:last-child { border-bottom: none; }
.history-icon {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.ev-created           { background: #e8f5e9; color: #1b5e20; }
.ev-edited            { background: #fff8e1; color: #92610a; }
.ev-approver_changed  { background: #e8f0fe; color: #1565c0; }
.ev-approved          { background: #e8f5e9; color: #1b5e20; }
.ev-rejected          { background: #fde8eb; color: #c50f2d; }
.ev-deleted           { background: #fde8eb; color: #c50f2d; }
.ev-creatio_synced    { background: #f3e5f5; color: #6a1b9a; }
.ev-creatio_sync_failed { background: #fde8eb; color: #c50f2d; }
.history-body { flex: 1; min-width: 0; }
.history-note { font-size: 13px; color: var(--text-dark); font-weight: 500; }
.history-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.history-diff { margin-top: 6px; background: #f9f9f9; border-radius: var(--radius-sm); padding: 6px 10px; }
.diff-row { display: flex; align-items: baseline; gap: 6px; padding: 2px 0; font-size: 12px; flex-wrap: wrap; }
.diff-field { font-weight: 600; color: var(--text-secondary); min-width: 68px; }
.diff-from  { text-decoration: line-through; color: var(--text-muted); }
.diff-arrow { color: var(--text-muted); }
.diff-to    { color: var(--text-dark); font-weight: 500; }
.history-msg { font-size: 13px; color: var(--text-muted); padding: 12px 0; }

/* ── ADMIN PANEL ────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 2px solid #f0f0f0; }
.tab {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 8px 16px; font-size: 13px; font-family: var(--font); font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text-dark); }
.tab.active { color: var(--text-dark); border-bottom-color: var(--accent); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.admin-intro { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.admin-add-row { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-add-row input {
  flex: 1; padding: 9px 12px; border: 1.5px solid #e8e8e8;
  border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font);
  outline: none; transition: border-color 0.15s;
}
.admin-add-row input:focus { border-color: var(--accent); }
.admin-list { border: 1px solid #f0f0f0; border-radius: var(--radius-sm); overflow: hidden; font-size: 13px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 12px; border-bottom: 1px solid #f7f7f7;
}
.admin-row:last-child { border-bottom: none; }
.admin-row:hover { background: #fafafa; }
.admin-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-row-email { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-meta  { font-size: 11px; color: var(--text-muted); }
.admin-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.role-select {
  padding: 4px 8px; border: 1px solid #e8e8e8; border-radius: 6px;
  font-size: 12px; font-family: var(--font); background: #fff; cursor: pointer; outline: none;
}
.role-select:focus { border-color: var(--accent); }
.btn-del { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 2px 6px; border-radius: 4px; transition: color 0.15s; line-height: 1; }
.btn-del:hover { color: #e05050; }
.admin-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ── CREATIO BADGE ──────────────────────────────────────────────── */
.sync-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 20px; }
.sync-ok  { background: #f3e5f5; color: #6a1b9a; }
.sync-no  { background: #f5f5f5; color: var(--text-muted); }
.sync-err { background: #fde8eb; color: #c50f2d; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .container { padding: 6px 4px 20px; }

  /* Ultra-compact header - minimal spacing */
  .header { padding: 6px 8px; gap: 8px; }
  .header-left { gap: 6px; min-width: 0; }
  .header-left svg { width: 90px; height: 27px; }
  .header-title { font-size: 10px; padding-left: 8px; border-left: 1px solid #e0e0e0; }
  .header-auth { }
  .user-menu-btn { width: 36px; height: 36px; }
  .user-avatar { width: 32px; height: 32px; font-size: 13px; border: 2px solid #e0e0e0; }
  .user-menu-dropdown { min-width: 160px; }
  .menu-user-info { padding: 10px 12px; }
  .menu-email { font-size: 11px; }
  .menu-admin-btn, .menu-logout-btn { padding: 8px 12px; font-size: 12px; }

  /* Stats cards - single line on mobile */
  .stats-row { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 3px; margin-bottom: 6px; }
  .stat-card { padding: 5px 6px; gap: 0; }
  .stat-label { font-size: 6px; line-height: 1; margin-bottom: 0; }
  .stat-value { font-size: 12px; line-height: 1.1; }

  /* Filter layout - single line flex */
  .filter-bar {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
    align-items: center;
  }
  .filter-search { flex: 1.5; padding: 5px 6px; font-size: 11px; min-width: 0; }
  .filter-select { flex: 1; padding: 5px 4px; font-size: 9px; min-width: 0; }
  .filter-date { display: none !important; }
  #btnNewRequest { flex: 0.8; padding: 5px 6px; font-size: 10px; white-space: nowrap; }

  /* Table - maximize visible space, no horizontal scroll */
  .table-scroll { height: calc(100vh - 150px); min-height: 200px; overflow-x: hidden; }
  .req-table { font-size: 11px; min-width: 0; width: 100%; }
  .req-table thead th { padding: 8px 4px; }
  .req-table td { padding: 0 4px; }
  .req-table tbody tr { height: 44px; }
  .td-num { width: 40px !important; }
  .td-amount { width: 52px !important; }
  .td-target { width: 58px !important; }
  .td-status { width: 68px !important; }
  .td-cat { width: 45px !important; }
  .td-person { width: 60px !important; min-width: 0 !important; max-width: none !important; }
  .td-date { width: 50px !important; }
  .td-actions { width: 36px !important; }
  .td-title { width: auto !important; min-width: 0 !important; max-width: none !important; overflow: hidden; }
  .table-card { border-radius: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: 1; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-field.span-2 { grid-column: 1; }
  .approve-actions { flex-direction: column; }
  .col-hide-mobile { display: none !important; }
}
