/*
 * Copyright © 2026 Seth Heffner. All Rights Reserved.
 * This software and associated documentation are proprietary and confidential.
 * Unauthorized copying, modification, distribution, or use is prohibited.
 */

:root {
  color-scheme: dark;
  --bg: #080a0d;
  --panel: #11151a;
  --panel-raised: #171c22;
  --line: #272e36;
  --text: #f5f7f9;
  --muted: #929da9;
  --accent: #f4f5f6;
  --blue: #62a8ff;
  --green: #4dd6a2;
  --red: #ff7777;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
.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; }

.kiosk-page {
  background:
    radial-gradient(circle at 50% 14%, rgba(87, 102, 120, .14), transparent 30rem),
    linear-gradient(155deg, #0d1116 0%, #07090b 62%);
}

.kiosk-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 34px clamp(20px, 5vw, 72px) 24px; }
.brand-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand-logo { display: block; width: min(300px, 50vw); height: 72px; object-fit: contain; object-position: left center; }
.live-date, .header-date { color: var(--muted); font-size: .9rem; letter-spacing: .03em; text-align: right; }
.live-date strong { display: block; color: var(--text); font-size: 1.45rem; margin-bottom: 3px; font-weight: 550; }

.kiosk-card {
  align-self: center;
  justify-self: center;
  width: min(610px, 100%);
  min-height: 500px;
  padding: clamp(34px, 6vw, 64px);
  background: linear-gradient(150deg, rgba(25, 30, 37, .96), rgba(14, 18, 22, .98));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 30px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow { margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: -.05em; line-height: 1; margin-bottom: 18px; }
h2 { font-size: 1.45rem; letter-spacing: -.025em; margin-bottom: 8px; }
.subtle { color: var(--muted); line-height: 1.55; }

.code-form { margin-top: 36px; }
.code-input {
  width: 100%;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #090c0f;
  color: white;
  text-align: center;
  font-size: 3rem;
  letter-spacing: .62em;
  text-indent: .62em;
  outline: none;
  caret-color: var(--blue);
  transition: border-color .2s, box-shadow .2s;
}
.code-input:focus { border-color: #708090; box-shadow: 0 0 0 4px rgba(98, 168, 255, .09); }
.digit-guides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0 42px; margin-top: -16px; position: relative; pointer-events: none; }
.digit-guides span { height: 1px; background: #3b444e; }
.input-hint { color: var(--muted); font-size: .82rem; margin: 16px 0 0; }
.optional-label { color: var(--muted); font-size: .76rem; font-weight: 400; }
.table-subline { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.muted-cell { color: var(--muted); }
.submit-code { margin-top: 24px; width: 100%; }

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 650;
  transition: transform .16s, background .16s, border-color .16s;
}
.button-icon { width: 16px; height: 16px; margin-right: 7px; vertical-align: -3px; fill: currentColor; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--accent); color: #080a0d; }
.button-primary:hover { background: #dce1e5; }
.button-secondary { background: #1b2128; border-color: var(--line); }
.button-secondary:hover { border-color: #46515d; }

.action-panel { position: relative; }
.back-button { position: absolute; left: 0; top: -26px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--text); }
.employee-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border: 1px solid #38424d;
  background: #202730;
  border-radius: 22px;
  font-weight: 700;
  color: #dce4eb;
}
.status-line { color: var(--muted); margin-bottom: 30px; }
.status-line strong { color: var(--text); }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.punch-button {
  min-height: 136px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #101419;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform .2s, border-color .2s, background .2s, opacity .2s;
}
.punch-button:hover:not(:disabled) { transform: translateY(-3px); }
.punch-in:hover:not(:disabled) { border-color: rgba(77, 214, 162, .65); background: rgba(77, 214, 162, .08); }
.punch-out:hover:not(:disabled) { border-color: rgba(255, 119, 119, .65); background: rgba(255, 119, 119, .08); }
.punch-button:disabled { cursor: not-allowed; opacity: .28; }
.punch-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid currentColor; font-size: .64rem; letter-spacing: .08em; }
.punch-in .punch-icon { color: var(--green); }
.punch-out .punch-icon { color: var(--red); }
.success-check { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; margin: 0 auto 28px; color: var(--green); border: 1px solid rgba(77, 214, 162, .5); background: rgba(77, 214, 162, .08); font-size: .82rem; font-weight: 800; }
.form-message { min-height: 22px; color: var(--red); font-size: .9rem; margin: 18px 0 0; }
.form-message.success { color: var(--green); }
.kiosk-footer { display: flex; justify-content: space-between; color: #67717c; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.kiosk-footer a, .back-link { color: #87929d; text-decoration: none; }
.kiosk-footer a:hover, .back-link:hover { color: white; }
.account-top-header {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 40;
  color: #7e8994;
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}
.account-corner-logo {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 45;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(8,10,13,.78);
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.trackstar-copyright {
  position: fixed;
  left: 16px;
  bottom: 14px;
  z-index: 38;
  color: #626d78;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 20%, #171d24, #080a0d 55%); }
.login-card { width: min(450px, 100%); padding: 44px; border: 1px solid var(--line); background: rgba(17, 21, 26, .97); border-radius: 24px; box-shadow: var(--shadow); }
.login-logo { width: 220px; height: 65px; object-fit: contain; object-position: left; margin-bottom: 30px; }
.login-card h1 { font-size: 2.4rem; }
.stack-form { display: grid; gap: 10px; margin-top: 28px; }
.stack-form label, .dialog-card label { color: #c2c9d0; font-size: .85rem; font-weight: 600; margin-top: 8px; }
input:not(.code-input), select { height: 46px; border: 1px solid var(--line); border-radius: 10px; background: #0c0f13; color: white; padding: 0 14px; outline: none; }
input:not(.code-input):focus, select:focus { border-color: #667788; box-shadow: 0 0 0 3px rgba(98, 168, 255, .08); }
.stack-form .button { margin-top: 12px; }
.back-link { display: inline-block; margin-top: 14px; font-size: .85rem; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 18px 22px; border-right: 1px solid var(--line); background: #0b0e12; display: flex; flex-direction: column; }
.sidebar-brand { display: block; padding: 0 10px 32px; }
.sidebar-brand img { width: 165px; height: 52px; object-fit: contain; object-position: left; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font-weight: 600; text-decoration: none; display: flex; align-items: center; }
.nav-item:hover, .nav-item.active { color: white; background: #171c22; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 5px; border-top: 1px solid var(--line); padding-top: 16px; }
.admin-main { min-width: 0; padding: 36px clamp(24px, 4vw, 60px) 60px; background: #0d1014; }
.admin-header { display: flex; justify-content: space-between; align-items: end; margin-bottom: 34px; }
.admin-header h1 { font-size: 2.25rem; margin: 0; }
.section-tabs { display: flex; gap: 8px; margin: -14px 0 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.section-tabs button { min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 650; }
.section-tabs button:hover, .section-tabs button.active { color: var(--text); background: #171c22; border-color: var(--line); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card, .panel { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; }
.stat-card { padding: 22px; display: grid; gap: 6px; }
.stat-label, .stat-note { color: var(--muted); font-size: .8rem; }
.stat-card strong { font-size: 2rem; line-height: 1.2; }
.panel { overflow: hidden; }
.panel-header { min-height: 92px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; }
.panel-header .eyebrow { margin-bottom: 6px; }
.report-period { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.report-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #0b0e12; }
.segmented button { min-width: 58px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 650; }
.segmented button.active { background: #242b33; color: white; }
.date-input { color-scheme: dark; }
.custom-date-fields { display: flex; align-items: center; gap: 10px; }
.custom-date-fields label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; }
.minutes-heading { font-weight: 900; color: var(--text); }
.minutes-value { font-weight: 850; color: var(--text); font-size: 1rem; }
.activity-log-panel { margin-top: 22px; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { color: #7f8a96; font-size: .69rem; text-transform: uppercase; letter-spacing: .1em; text-align: left; font-weight: 700; background: #0f1317; }
th, td { padding: 15px 24px; border-bottom: 1px solid #20262d; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .018); }
.action-badge { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 650; }
.action-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.action-in { color: var(--green); }
.action-out { color: var(--red); }
.empty-state { padding: 60px 24px; text-align: center; color: var(--muted); }
.actions-cell { text-align: right; }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.small-button { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #171c22; color: #c6cdd4; cursor: pointer; }
.small-button:hover { border-color: #4b5763; color: white; }
.small-button.danger:hover { border-color: rgba(255, 119, 119, .65); color: var(--red); }
.pencil-button { width: 34px; padding: 0; display: inline-grid; place-items: center; }
.pencil-button svg { width: 15px; height: 15px; fill: currentColor; }
.settings-panel { padding: 30px; max-width: 620px; }
.compact-form { max-width: 410px; }

.client-list { display: grid; gap: 1px; background: var(--line); }
.client-card { background: var(--panel); }
.client-card-header { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.client-card-header h3 { margin: 0; font-size: 1.2rem; }
.client-collapse-toggle { border: 0; padding: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 13px; text-align: left; cursor: pointer; }
.client-collapse-toggle small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }
.collapse-icon { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); font-weight: 850; }
.client-card.is-expanded > .client-card-header .collapse-icon,
.client-subsection.is-expanded > .client-card-header .collapse-icon { color: white; border-color: #4b5763; }
.client-card.is-expanded > .client-card-header .collapse-icon::before,
.client-subsection.is-expanded > .client-card-header .collapse-icon::before { content: "-"; }
.client-card.is-expanded > .client-card-header .collapse-icon,
.client-subsection.is-expanded > .client-card-header .collapse-icon { font-size: 0; }
.client-card.is-expanded > .client-card-header .collapse-icon::before,
.client-subsection.is-expanded > .client-card-header .collapse-icon::before { font-size: .95rem; }
.client-card.is-collapsed > .client-card-body,
.client-subsection.is-collapsed > .client-card-body { display: none; }
.client-subsection-list { border-top: 1px solid var(--line); background: #0d1115; padding-left: 28px; }
.client-subsection { border-left: 2px solid #384554; }
.client-subsection .client-card-header { padding-top: 17px; padding-bottom: 17px; }
.client-subsection .formula-list { background: #0b0f12; }
.client-parent-notice { margin: 0 0 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #0c0f13; }
.formula-list { border-top: 1px solid #20262d; background: #0f1317; }
.formula-row { min-height: 66px; padding: 13px 24px 13px 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #20262d; }
.formula-row:last-child { border-bottom: 0; }
.formula-row > div:first-child { display: grid; gap: 4px; }
.formula-row span, .formula-empty { color: var(--muted); font-size: .82rem; }
.formula-empty { padding: 22px 40px; }
.variable-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; }
.variable-badge { padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: #b9c2cb; font-size: .72rem; }
.variable-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.checkbox-control { min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #0c0f13; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.checkbox-control input { width: 17px; height: 17px; accent-color: var(--blue); }
#productionRateField, #invoiceRateField { display: grid; gap: 9px; }
.invoice-total { padding: 26px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.invoice-total span { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.invoice-total strong { font-size: 2rem; }
.invoice-client-list { display: grid; gap: 1px; background: var(--line); }
.invoice-client { background: var(--panel); }
.invoice-client-header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.invoice-client-header h3 { margin: 0; font-size: 1.15rem; }
.invoice-client-header strong { font-size: 1.25rem; }
.money-value { font-weight: 750; color: var(--green); }
.invoice-alert-stats { margin-bottom: 22px; }
.invoice-workspace { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(520px, 1.6fr); gap: 22px; align-items: start; }
.invoice-queue-panel, .invoice-editor-panel { min-width: 0; }
.invoice-queue { display: grid; gap: 1px; background: var(--line); }
.invoice-queue-item { width: 100%; padding: 16px 20px; border: 0; background: var(--panel); text-align: left; cursor: pointer; display: grid; gap: 7px; }
.invoice-queue-item:hover, .invoice-queue-item.active { background: #1a2027; }
.invoice-queue-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.invoice-queue-item small { color: var(--muted); }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.pill-overdue { color: #ffaaaa; background: rgba(255,119,119,.12); }
.pill-due { color: #9bcaff; background: rgba(98,168,255,.12); }
.pill-submitted { color: #83e5bd; background: rgba(77,214,162,.12); }
.pill-upcoming { color: #b7c0ca; background: rgba(146,157,169,.12); }
.invoice-editor-total { font-size: 1.8rem; white-space: nowrap; }
.invoice-details { border-bottom: 1px solid var(--line); }
.invoice-details summary { padding: 17px 24px; cursor: pointer; font-weight: 750; background: #0f1317; }
.invoice-details summary:hover { background: #151a20; }
.invoice-line-input { min-width: 110px; width: 100%; }
.invoice-line-description { min-width: 210px; }
.invoice-editor-actions, .invoice-submit-actions { padding: 18px 24px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.invoice-submit-actions { border-top: 1px solid var(--line); }
.calendar-controls, .calendar-legend { display: flex; gap: 9px; flex-wrap: wrap; }
.calendar-add-button { width: 46px; padding: 0; font-size: 1.35rem; }
.calendar-legend { padding: 16px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.status-dot.status-overdue { background: var(--red); }
.status-dot.status-due { background: var(--blue); }
.status-dot.status-submitted { background: var(--green); }
.status-dot.status-upcoming { background: #7d8995; }
.invoice-calendar { padding: 18px; display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 1px; background: var(--line); overflow-x: auto; }
.calendar-weekday, .calendar-day { background: var(--panel); }
.calendar-weekday { padding: 10px; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 800; }
.calendar-day { min-height: 125px; padding: 10px; }
.calendar-day.outside { opacity: .42; }
.calendar-date-number { color: var(--muted); font-size: .75rem; margin-bottom: 8px; }
.calendar-event { width: 100%; margin-top: 5px; padding: 7px 8px; border: 0; border-left: 3px solid; border-radius: 6px; background: #171c22; color: white; text-align: left; cursor: pointer; font-size: .72rem; }
.calendar-event.status-overdue { border-color: var(--red); }
.calendar-event.status-due { border-color: var(--blue); }
.calendar-event.status-submitted { border-color: var(--green); }
.calendar-event.status-upcoming { border-color: #7d8995; }
.calendar-event.status-labor { border-color: var(--blue); }
.settings-block + .settings-block { margin-top: 22px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.settings-grid label { display: grid; gap: 8px; color: #c2c9d0; font-size: .82rem; font-weight: 600; }
.settings-wide { grid-column: 1 / -1; }
.dialog-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.production-entry-form { padding: 24px; display: grid; grid-template-columns: minmax(150px, .75fr) minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(110px, .55fr); gap: 16px; align-items: end; }
.production-entry-form label { display: grid; gap: 8px; color: #c2c9d0; font-size: .82rem; font-weight: 600; }
.calculation-preview { min-height: 70px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #0c0f13; display: grid; align-content: center; gap: 4px; }
.calculation-preview span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.calculation-preview strong { font-size: 1.05rem; }
.entry-form-actions { display: flex; gap: 10px; align-items: center; }
.form-message-inline { margin: 0; padding: 0 24px 18px; }

.production-stat-grid { padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-bottom: 1px solid var(--line); }
.chart-shell { min-height: 390px; padding: 34px 30px; display: grid; align-content: center; }
.bar-chart { display: grid; gap: 26px; }
.bar-row { display: grid; gap: 9px; }
.bar-label { display: flex; justify-content: space-between; gap: 20px; font-size: .86rem; }
.bar-label span { color: #c5ccd3; }
.bar-track { height: 28px; border: 1px solid #283039; border-radius: 7px; background: #0b0e12; overflow: hidden; }
.bar-track span { display: block; height: 100%; min-width: 5px; border-radius: 6px; }
.pie-chart-layout { display: grid; grid-template-columns: minmax(220px, 330px) minmax(260px, 430px); gap: clamp(35px, 7vw, 90px); align-items: center; justify-content: center; }
.pie-chart { width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.pie-chart::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.chart-legend { display: grid; gap: 4px; }
.legend-row { min-height: 48px; display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid #20262d; font-size: .86rem; }
.legend-row:last-child { border-bottom: 0; }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.allocation-warning { margin: 26px 0 0; padding: 13px 15px; border: 1px solid rgba(255, 182, 92, .35); border-radius: 9px; background: rgba(255, 182, 92, .07); color: #ffc77f; font-size: .85rem; }
.client-filter-menu { padding: 14px 24px; display: flex; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #0f1317; }
.client-filter-menu .checkbox-control { min-height: 38px; }
.contact-list { display: grid; }
.contact-row { min-height: 68px; padding: 14px 24px; border: 0; border-bottom: 1px solid #20262d; background: transparent; color: var(--text); display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1fr) minmax(130px, .7fr); gap: 20px; align-items: center; text-align: left; cursor: pointer; }
.contact-row:hover { background: rgba(255,255,255,.025); }
.contact-row span:first-child { display: grid; gap: 4px; }
.contact-row small { color: var(--muted); }
.contact-subscription-heading { margin-top: 16px; }
.contact-subscriptions { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.contact-subscription-row { min-height: 50px; padding: 9px 12px; display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.contact-subscription-row:last-child { border-bottom: 0; }
.contact-subscription-row label { display: flex; gap: 7px; align-items: center; margin: 0; }
.contact-subscription-row input { width: 16px; height: 16px; }
.device-cell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
#variableMultiplierField { display: grid; gap: 9px; }
.recurring-variable-fields { display: grid; gap: 9px; }
#employeeTitleField { display: grid; gap: 9px; }

dialog { padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-raised); color: white; box-shadow: var(--shadow); width: min(500px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.dialog-card { padding: 28px; display: grid; gap: 9px; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.dialog-header h2 { margin: 0; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #101419; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

.owner-account-list { display: grid; gap: 1px; background: var(--line); }
.owner-account-card { background: var(--panel); }
.owner-account-card.is-inactive { opacity: .62; }
.owner-account-main { padding: 20px 24px; display: grid; grid-template-columns: 62px 1fr auto; gap: 18px; align-items: center; border-bottom: 1px solid #20262d; }
.owner-account-main h3 { margin: 0; font-size: 1.2rem; }
.owner-account-logo { width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 14px; background: #0c0f13; display: grid; place-items: center; overflow: hidden; color: #9ba7b4; font-weight: 850; }
.owner-account-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.owner-admin-list { display: grid; background: #0f1317; }
.owner-admin-row { min-height: 58px; padding: 12px 24px 12px 86px; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 90px 90px auto; gap: 16px; align-items: center; border-bottom: 1px solid #20262d; }
.owner-admin-row:last-child { border-bottom: 0; }
.owner-admin-row.is-inactive { opacity: .55; }
.owner-admin-row span:first-child { display: grid; gap: 3px; }
.owner-admin-row small { color: var(--muted); }
.owner-security-panel { margin-top: 22px; }
.owner-link-button { display: inline-flex; align-items: center; text-decoration: none; }
.owner-logo-preview { min-height: 54px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0c0f13; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.owner-logo-preview img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: #07090b; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 18px; flex-direction: row; align-items: center; gap: 18px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar-brand { padding: 0; flex: 0 0 auto; }
  .sidebar-brand img { width: 130px; height: 40px; }
  .sidebar-nav, .sidebar-bottom { display: flex; gap: 5px; margin: 0; padding: 0; border: 0; }
  .sidebar-bottom { margin-left: auto; }
  .nav-item { width: auto; white-space: nowrap; padding: 0 12px; }
  .stat-grid { grid-template-columns: 1fr; }
  .production-entry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-workspace { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .kiosk-shell { padding: 20px 16px 18px; }
  .brand-header { align-items: flex-start; }
  .brand-logo { width: 190px; height: 54px; }
  .live-date { font-size: .72rem; }
  .live-date strong { font-size: 1.05rem; }
  .kiosk-card { min-height: 470px; padding: 34px 22px; border-radius: 22px; }
  .action-grid { grid-template-columns: 1fr; }
  .punch-button { min-height: 105px; }
  .code-input { font-size: 2.5rem; height: 80px; }
  .digit-guides { padding: 0 22px; }
  .kiosk-footer span { display: none; }
  .kiosk-footer { justify-content: center; }
  .admin-main { padding: 26px 16px 50px; }
  .admin-header { align-items: flex-start; }
  .header-date { display: none; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .report-controls { justify-content: flex-start; }
  .sidebar-brand { display: none; }
  .sidebar { padding: 10px; gap: 4px; }
  .sidebar-bottom .nav-link { display: none; }
  th, td { padding-left: 16px; padding-right: 16px; }
  .login-card { padding: 32px 24px; }
  .client-card-header, .formula-row { align-items: flex-start; flex-direction: column; }
  .formula-row { padding-left: 24px; }
  .variable-switches { grid-template-columns: 1fr; }
  .invoice-client-header { align-items: flex-start; }
  .production-entry-form { grid-template-columns: 1fr; }
  .entry-form-actions .button { flex: 1; }
  .production-stat-grid { grid-template-columns: 1fr; }
  .pie-chart-layout { grid-template-columns: 1fr; justify-items: center; }
  .chart-legend { width: 100%; }
  .settings-grid, .dialog-two-column { grid-template-columns: 1fr; }
  .settings-wide { grid-column: auto; }
  .invoice-calendar { grid-template-columns: repeat(7, minmax(82px, 1fr)); }
  .contact-row { grid-template-columns: 1fr; gap: 6px; }
  .contact-subscription-row { grid-template-columns: 1fr; }
  .account-top-header { left: 14px; right: auto; max-width: calc(100vw - 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trackstar-copyright { display: none; }
  .account-corner-logo { width: 40px; height: 40px; }
  .owner-account-main { grid-template-columns: 1fr; }
  .owner-admin-row { padding-left: 24px; grid-template-columns: 1fr; }
}
