:root {
  /* ==========================================================================
     Design tokens
     --------------------------------------------------------------------------
     Centralized values for color, spacing, radius, shadow, sizing, and motion.
     Keep this section as the single source of truth for the visual system.
     ========================================================================== */

  /* Brand-inspired palette */
  --color-bg: #0b1220;
  --color-bg-alt: #111a2b;

  --color-surface: #ffffff;
  --color-surface-soft: #f7f8fa;
  --color-surface-muted: #eef2f6;

  --color-border: #d8e0e8;
  --color-border-strong: #c4ced8;

  --color-text: #13202b;
  --color-text-soft: #52606d;
  --color-text-inverse: #ffffff;

  --color-primary: #c8a96b;
  --color-primary-dark: #ad8d52;
  --color-primary-soft: #f4ebdb;

  --color-secondary: #344154;
  --color-secondary-dark: #253041;

  --color-success-bg: #dcfce7;
  --color-success-text: #166534;
  --color-error-bg: #fee2e2;
  --color-error-text: #991b1b;

  /* Shadows */
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Layout + motion */
  --container-max: 1280px;
  --input-height: 48px;
  --transition: 160ms ease;
}

/* ==========================================================================
   Global reset / base
   --------------------------------------------------------------------------
   Keep base rules predictable and minimal.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  color: var(--color-text);
  background:
    linear-gradient(180deg, rgba(11, 18, 32, 0.95), rgba(17, 26, 43, 0.92)),
    radial-gradient(circle at top, rgba(200, 169, 107, 0.14), transparent 30%);
  background-color: var(--color-bg);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ==========================================================================
   Page shell / layout
   --------------------------------------------------------------------------
   Mobile-first page wrapper. Login page gets special vertical centering.
   ========================================================================== */

.container {
  min-height: 100vh;
  width: 100%;
  padding: var(--space-4);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.page-login .container {
  align-items: center;
}

/* ==========================================================================
   Cards
   --------------------------------------------------------------------------
   Shared card surface for login, employee, and admin pages.
   ========================================================================== */

.card {
  width: 100%;
  max-width: var(--container-max);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(216, 224, 232, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 28px 20px;
}

.employee-card,
.admin-card {
  max-width: var(--container-max);
}
.card { min-width: 0; }
.admin-card { max-width: 1800px; }
.timesheet-attribution { display: block; white-space: normal; max-width: 240px; margin-top: 6px; color: var(--color-text-soft); }
.development-notice, body > .message { margin: 0; padding: 12px 24px; background: #fff3cd; color: #513d00; font-weight: 600; }
.admin-row-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 112px;
  background: var(--color-surface);
  box-shadow: -5px 0 8px rgba(15, 23, 42, .08);
}
.admin-row-actions button { display: block; width: 100%; margin: 4px 0; }
#timesheets-table th:last-child { position: sticky; right: 0; z-index: 2; background: var(--color-surface-muted); min-width: 112px; }
#timesheets-table td:nth-child(13) { min-width: 180px; max-width: 300px; overflow-wrap: anywhere; white-space: normal; }
.audit-dialog { width: min(900px, calc(100% - 32px)); max-height: 85vh; margin: auto; padding: 24px; border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); }
.audit-dialog::backdrop { background: rgba(11, 18, 32, .65); }
.audit-entry { margin-top: 24px; }
.audit-entry td { white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-dialog td { white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-dialog .button-row { margin-top: 20px; }
#admin-entry-panel { margin-bottom: 24px; }
#admin-entry-panel .form-field { margin-top: 16px; }
.page-header {
  text-align: center;
}


/* ==========================================================================
   Branding / logo
   --------------------------------------------------------------------------
   Login logo kept modest so it supports the page rather than dominating it.
   ========================================================================== */

.auth-logo {
  display: block;
  width: 140px;
  max-width: 60%;
  height: auto;
  margin: 0 auto 20px;
}

/* ==========================================================================
   Typography
   --------------------------------------------------------------------------
   Clear hierarchy with restrained sizing for a professional internal tool.
   ========================================================================== */

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  line-height: 1.15;
  color: var(--color-text);
}

h1 {
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.05rem;
}

.subtext {
  margin: 0 0 var(--space-5);
  color: var(--color-text-soft);
  line-height: 1.5;
}

.page-header,
.employee-header {
  margin-bottom: var(--space-5);
}

.employee-header {
  text-align: center;
}

.field-label,
label,
legend {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 700;
  color: var(--color-text);
}

/* ==========================================================================
   Forms / inputs
   --------------------------------------------------------------------------
   One consistent input system for all pages.
   ========================================================================== */

form {
  display: grid;
  gap: var(--space-4);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.form-field {
  display: grid;
  gap: var(--space-2);
}

.full-width {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background-color var(--transition);
}

input,
select {
  min-height: var(--input-height);
  padding: 0 var(--space-4);
}

textarea {
  min-height: 120px;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7b8794;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(200, 169, 107, 0.18);
}

input[readonly] {
  background: var(--color-surface-muted);
  color: var(--color-text-soft);
}

/* ==========================================================================
   Buttons
   --------------------------------------------------------------------------
   Button rules:
   - Default button style = brand gold background with white text
   - Primary submit-style actions = black background with gold text
   - Hover state inverts colors and adds a stronger shadow
   ========================================================================== */

button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

button:hover {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(200, 169, 107, 0.22),
    0 12px 28px rgba(15, 23, 42, 0.18);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------------
   Primary action buttons
   --------------------------------------------------------------------------
   Used for:
   - login submit
   - timesheet submit/update
   - admin export
   -------------------------------------------------------------------------- */
button[type="submit"],
#submit-btn,
#export-btn {
  background: #111111;
  color: var(--color-primary);
  border-color: #111111;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}

button[type="submit"]:hover,
#submit-btn:hover,
#export-btn:hover {
  background: var(--color-primary);
  color: #111111;
  border-color: var(--color-primary);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

/* --------------------------------------------------------------------------
   Secondary buttons
   --------------------------------------------------------------------------
   User requested gold treatment across the app, so secondary buttons remain
   in the same gold family as default buttons.
   -------------------------------------------------------------------------- */
.secondary-btn {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: transparent;
}

.secondary-btn:hover {
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

/* --------------------------------------------------------------------------
   Small table/action buttons
   -------------------------------------------------------------------------- */
.action-btn {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.86rem;
}
/* --------------------------------------------------------------------------
   Destructive actions
   --------------------------------------------------------------------------
   Delete buttons stay in the shared button system by default, but switch to a
   destructive red treatment on hover so the action reads clearly as dangerous.
   -------------------------------------------------------------------------- */
.delete-entry-btn:hover {
  background: #b91c1c;
  color: #ffffff;
  border-color: #b91c1c;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.28);
}

.delete-entry-btn:focus-visible {
  box-shadow:
    0 0 0 4px rgba(185, 28, 28, 0.2),
    0 12px 28px rgba(127, 29, 29, 0.28);
}

/* ==========================================================================
   Button rows / top bars
   --------------------------------------------------------------------------
   Mobile-first stacked buttons, then row layout on wider screens.
   ========================================================================== */

.button-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.button-row + .button-row {
  margin-top: 10px;
}

.button-row button {
  flex: 1;
}

.top-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: var(--space-4);
}

.top-bar .button-row {
  width: 100%;
}

/* Admin-specific top bar behavior */
.admin-card .top-bar {
  align-items: stretch;
}

.admin-card .top-bar .button-row {
  display: flex;
  width: 100%;
  gap: 12px;
}

.admin-card .top-bar .button-row button {
  flex: 1;
}

.admin-card .top-bar h1,
.admin-card .top-bar h2 {
  margin-bottom: 0;
  flex-shrink: 0;
}

.history-bar {
  margin-top: var(--space-2);
}

/* ==========================================================================
   Section spacing / dividers
   --------------------------------------------------------------------------
   Used between major content areas to create breathing room.
   ========================================================================== */

.section-divider {
  height: 1px;
  border: 0;
  background: var(--color-border);
  margin: var(--space-7) 0 var(--space-5);
}

/* ==========================================================================
   Surface cards / panels
   --------------------------------------------------------------------------
   Shared visual treatment for grouped UI sections.
   ========================================================================== */

.hours-card,
.receipt-info-card,
.summary-card,
.rules-text-box,
.sustenance-card {
  margin-top: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
}

/* ==========================================================================
   Hours card
   ========================================================================== */

.hours-card {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hours-value {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-weight: 700;
  font-size: 1.15rem;
}

/* ==========================================================================
   Sustenance section
   --------------------------------------------------------------------------
   Styled to feel like a clear calculation panel rather than a spreadsheet.
   ========================================================================== */

.sustenance-card {
  padding: var(--space-4);
}

.rules-text-box {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  background: linear-gradient(180deg, #fffdf8, #f8f4eb);
  border-color: rgba(200, 169, 107, 0.35);
}

.rules-text-box p {
  margin: 0 0 var(--space-2);
}

.rules-text-box p:last-child {
  margin-bottom: 0;
}

.sustenance-options {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.sustenance-options label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-weight: 600;
}

.sustenance-options input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 0;
  accent-color: var(--color-primary-dark);
}

.entry-section {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--color-primary);
  border-left: 4px solid var(--color-primary-dark);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fffdf8, var(--color-primary-soft));
}
.entry-section h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  color: var(--color-text);
}
.entry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: end; }
.entry-fields-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-fields > * { min-width: 0; }
.entry-fields .hours-card { margin: 0; padding: 0; border: 0; background: transparent; }
@media (max-width: 600px) {
  .entry-section { padding: 14px; }
  .entry-fields { grid-template-columns: minmax(0, 1fr); }
}

.sustenance-value-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px solid rgba(200, 169, 107, 0.38);
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
}

.sustenance-label {
  font-weight: 700;
  color: var(--color-text);
}

/* ==========================================================================
   Receipt section
   ========================================================================== */

.receipt-info-card {
  padding: var(--space-4);
  background: linear-gradient(180deg, #f9fbfd, #f3f6f9);
}

.receipt-reference-box {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-weight: 700;
  letter-spacing: 0.06em;
  word-break: break-word;
  font-family: monospace;
}

.receipt-help-text {
  margin-top: var(--space-3);
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ==========================================================================
   Admin filters / summary
   ========================================================================== */

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.admin-filters {
  margin-top: var(--space-2);
}

.admin-actions {
  margin-bottom: var(--space-4);
}

.admin-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.summary-card {
  padding: var(--space-4);
  background: linear-gradient(180deg, #ffffff, #f7f9fb);
}

.summary-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.78rem;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Payroll controls use the same inset surface as the admin summary. */
.payroll-panel {
  margin: var(--space-5) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
}

.payroll-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.payroll-panel > summary::-webkit-details-marker { display: none; }
.payroll-panel > summary:hover { background: var(--color-primary-soft); }
.payroll-panel > summary:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 3px;
}

.payroll-chevron {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary-dark);
  transform: rotate(45deg);
}

.payroll-panel[open] > summary {
  border-bottom: 1px solid var(--color-border);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.payroll-panel[open] .payroll-chevron { transform: rotate(225deg); }
.payroll-panel-body { padding: var(--space-5); }
.payroll-panel .form-field { min-width: 0; }
.payroll-panel .form-field label { margin-bottom: 0; }
.payroll-panel #period-save { justify-self: start; }
.payroll-panel #period-status {
  margin: var(--space-5) 0 0;
  color: var(--color-text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}
.payroll-panel #period-list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  margin: var(--space-3) 0 0;
  list-style: none;
}
.payroll-panel #period-list:empty { display: none; }
.payroll-panel #period-list li {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) {
  .payroll-panel #period-save { width: auto; min-width: 220px; }
}

/* ==========================================================================
   Tables
   --------------------------------------------------------------------------
   Responsive via horizontal scrolling on smaller screens.
   ========================================================================== */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-top: var(--space-3);
  padding-bottom: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: 0.92rem;
}

th,
td {
  padding: 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: #f3f6f9;
  color: var(--color-text);
  white-space: nowrap;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

/* Sortable admin table headers */
#timesheets-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

#timesheets-table th[data-sort]:hover {
  background: #e7edf3;
}

#timesheets-table {
  table-layout: auto;
}

#timesheets-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf2f7;
}

#timesheets-table th,
#timesheets-table td {
  padding: 10px;
  font-size: 0.84rem;
}

/* Weekly admin grouping rows */
.week-group-row td {
  background: linear-gradient(90deg, #182235, #24314a);
  color: #ffffff;
  font-weight: 700;
}

.week-total-row td {
  background: #f8fafc;
  font-weight: 700;
}

/* ==========================================================================
   Messages / utility classes
   ========================================================================== */

.message {
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
}

.message.success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.message.error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.hidden {
  display: none !important;
}

.employee-history .history-bar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.employee-history .history-bar h2 { margin: 0; }
.employee-history button { width: auto; flex: none; min-height: 38px; padding: 8px 14px; box-shadow: none; background: white; color: var(--color-text); border: 1px solid var(--color-primary); }
.employee-history button:hover { background: var(--color-primary-soft); }
.history-bar #refresh-my-entries-btn { margin-left: auto; }
.history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0 12px; }
.history-filters .form-field { max-width: 210px; }
#history-summary { margin: 0 0 10px auto; color: var(--color-text-soft); }
#my-timesheets-table { font-size: .88rem; }
#my-timesheets-table td { vertical-align: middle; padding: 14px 12px; }
#my-timesheets-table tbody tr:nth-child(even) { background: #f8fafc; }
#my-timesheets-table .history-date, #my-timesheets-table .history-shift { white-space: nowrap; }
#my-timesheets-table .history-number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
#my-timesheets-table th:nth-child(4), #my-timesheets-table th:nth-child(6), #my-timesheets-table th:nth-child(7), #my-timesheets-table th:nth-child(8) { text-align: right; }
.history-hours { font-weight: 700; }
.history-location { min-width: 160px; }
.history-travel span { display: block; white-space: nowrap; }
.overnight-badge { display: block; color: var(--color-text-soft); font-size: .75rem; margin-top: 4px; }
.history-actions { min-width: 140px; }
.employee-hour-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.employee-hour-totals strong { font-size: 1.7rem; }
.employee-hour-totals small { display: block; color: var(--color-text-soft); margin-top: 6px; }
@media (max-width: 480px) { .employee-hour-totals { grid-template-columns: 1fr; } }
@media (min-width: 768px) {
  #my-timesheets-table .history-actions { position: sticky; right: 0; background: var(--color-surface); box-shadow: -5px 0 8px rgba(15,23,42,.08); }
  #my-timesheets-table th:last-child { position: sticky; right: 0; background: var(--color-surface-muted); }
}
.history-actions details { display: inline-block; vertical-align: middle; margin-right: 10px; }
.history-actions summary { cursor: pointer; padding: 8px 0; color: var(--color-secondary); font-weight: 600; }
.history-details { max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.history-details p { white-space: pre-wrap; }
@media (max-width: 767px) {
  .employee-history .table-wrap { border: 0; background: transparent; overflow: visible; }
  #my-timesheets-table, #my-timesheets-table tbody { display: block; }
  #my-timesheets-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #my-timesheets-table .submission-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid var(--color-border); border-top: 3px solid var(--color-primary); border-radius: var(--radius-md); background: white; }
  #my-timesheets-table .submission-row td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  #my-timesheets-table .submission-row td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--color-text-soft); margin-bottom: 4px; }
  #my-timesheets-table .history-location, #my-timesheets-table .history-actions { grid-column: 1 / -1; }
  #my-timesheets-table .history-location { font-weight: 600; }
  #history-summary { flex-basis: 100%; margin: 0; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Breakpoints
   --------------------------------------------------------------------------
   Keep breakpoint count small and intentional:
   - 640px: larger phones / small tablets
   - 768px: tablet
   - 1024px: desktop
   - 1280px: large desktop
   ========================================================================== */

@media (min-width: 640px) {
  .container {
    padding: var(--space-5);
  }

  .card {
    padding: var(--space-6);
  }

  .auth-card {
    padding: 32px 28px;
  }

  .button-row {
    flex-direction: row;
    align-items: stretch;
  }

  .top-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .admin-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: var(--space-7);
  }

  .card {
    padding: var(--space-7);
  }

  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .card {
    padding: var(--space-8);
  }
}

.admin-filter-actions { display: flex; justify-content: flex-end; margin: -8px 0 16px; }

/* Admin expense entry mode */
#expenses-only-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
#expenses-only-option.hidden { display: none; }
#expenses_only { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; flex: 0 0 20px; }
#expenses-only-option small { display: block; font-weight: 400; color: var(--color-text-soft); margin-top: 4px; }
