:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #69756e;
  --line: #d7ddd8;
  --panel: #ffffff;
  --wash: #f4f6f3;
  --accent: #176b58;
  --accent-dark: #0d4d3e;
  --warn: #9c3d2e;
  --blue: #315f8d;
  --gold: #ad7a20;
  --shadow: 0 18px 40px rgba(18, 31, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wash);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.locked .app-shell {
  display: none;
}

body:not(.locked) .login-screen {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
}

button {
  min-height: 42px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  border-color: #9fa9a2;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.primary:hover {
  background: var(--accent-dark);
}

button.danger {
  color: var(--warn);
  border-color: #d7b9b2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: #354038;
  font-size: 0.9rem;
  font-weight: 700;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 38px;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login-panel {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  font-size: 2.25rem;
}

.login-mark,
.logo-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e9eee9;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-weight: 900;
}

.login-mark {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  font-size: 1.4rem;
}

.login-error {
  min-height: 20px;
  color: var(--warn);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-help {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 15px;
}

.logo-frame {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  font-size: 1.25rem;
}

.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
  background: #fff;
}

.eyebrow,
.panel-head p,
.toolbar p,
.manual-entry h3,
.squarespace-note li {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.clock-panel {
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 14px 16px;
  background: #e9eee9;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: right;
}

.clock-panel span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.clock-panel strong {
  font-size: 1.35rem;
}

.clock-panel button {
  min-height: 34px;
  margin-top: 5px;
  padding: 0 10px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.entry-panel,
.records-panel,
.squarespace-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.entry-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 14px;
}

.panel-head,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #bad2c8;
  border-radius: 999px;
  background: #edf7f2;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill.on-break {
  border-color: #ead4a4;
  background: #fff6df;
  color: var(--gold);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.manual-entry {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.manual-entry h3 {
  font-size: 0.95rem;
}

.records-panel {
  min-width: 0;
  padding: 18px;
}

.toolbar {
  margin-bottom: 14px;
}

.toolbar-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.toolbar-actions select {
  width: 150px;
}

.employee-manager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 9px;
  margin-bottom: 14px;
}

.brand-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 9px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-settings input {
  min-height: 42px;
  padding: 8px;
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.total-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.total-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.total-card strong {
  display: block;
  margin-top: 5px;
  font-size: 1.45rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  background: #edf1ee;
  color: #3c4740;
  font-size: 0.78rem;
  text-transform: uppercase;
}

td small {
  display: block;
  color: var(--muted);
  max-width: 180px;
}

tr:last-child td {
  border-bottom: 0;
}

.delete-row {
  min-height: 32px;
  padding: 0 9px;
  color: var(--warn);
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.squarespace-note {
  margin-top: 18px;
  padding: 18px;
  box-shadow: none;
}

.squarespace-note ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

.squarespace-note li {
  margin: 6px 0;
}

@media (max-width: 880px) {
  .topbar,
  .panel-head,
  .toolbar {
    display: grid;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .clock-panel {
    width: 100%;
    text-align: left;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .entry-panel {
    position: static;
  }

  .totals-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .split-fields,
  .action-grid,
  .toolbar-actions,
  .totals-grid,
  .brand-settings {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    display: grid;
  }

  .toolbar-actions select {
    width: 100%;
  }
}
