:root {
  --ink: #14211d;
  --muted: #6b7873;
  --line: #d8dfda;
  --panel: #ffffff;
  --paper: #f4f6f1;
  --green: #1d5b4c;
  --green-2: #2f8a63;
  --gold: #c28b2c;
  --red: #b64b4b;
  --shadow: 0 24px 70px rgba(11, 28, 23, 0.2);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.clock-app {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(320px, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 28px;
}

.clock-app.clock-only {
  grid-template-columns: minmax(360px, 560px);
  justify-content: center;
}

.terminal {
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.terminal {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  padding: 24px;
}

.terminal-head,
.brand {
  display: flex;
  align-items: center;
}

.terminal-head {
  justify-content: space-between;
  gap: 16px;
}

.brand {
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #f2c46f;
  color: #173b34;
  font-weight: 900;
}

.brand-logo {
  display: block;
  object-fit: contain;
  padding: 0;
}

.brand-logo-wide {
  display: block;
  width: 286px;
  max-width: 100%;
  height: auto;
  max-height: 112px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.pin-status {
  color: var(--muted);
}

.connection-state {
  padding: 8px 10px;
  border-radius: 999px;
  background: #e8f4ed;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 900;
}

.clock-face {
  display: grid;
  place-items: center;
  min-height: 280px;
  margin: 28px 0;
  border-radius: 8px;
  background: #173b34;
  color: #ffffff;
}

.clock-face span {
  font-size: 5.4rem;
  font-weight: 900;
  letter-spacing: 0;
}

.clock-face small {
  color: rgba(255, 255, 255, 0.76);
}

.pin-pad {
  margin-top: auto;
}

.pin-pad label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.pin-pad input {
  width: 100%;
  min-height: 64px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.session-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px auto;
  gap: 10px;
  margin-top: 10px;
}

.login-button,
.info-button,
.logout-button,
.dialog-close {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.login-button {
  background: #f2c46f;
  color: #173b34;
}

.info-button {
  background: #2c7886;
  color: #ffffff;
  font-size: 1.35rem;
  font-family: ui-serif, Georgia, serif;
  font-style: italic;
}

.logout-button {
  padding: 0 16px;
  background: #edf3ef;
  color: var(--green);
}

.employee-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  min-height: 78px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #eef6f1;
}

.employee-session strong,
.employee-session span {
  display: block;
}

.employee-session span {
  color: var(--muted);
  font-weight: 800;
}

.employee-session em {
  grid-row: span 2;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.pin-status {
  min-height: 24px;
  margin: 12px 0 14px;
  font-weight: 800;
}

.pin-status.error {
  color: var(--red);
}

.pin-status.success {
  color: var(--green);
}

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

.clock-button {
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 900;
}

.clock-button.start {
  background: var(--green-2);
}

.clock-button.break {
  background: var(--gold);
}

.clock-button.stop {
  background: var(--red);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 20px;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: 0;
}

.overview-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f4f6f1;
  box-shadow: var(--shadow);
}

.overview-dialog::backdrop {
  background: rgba(12, 24, 20, 0.58);
}

.overview-dialog form {
  padding: 22px;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.overview-head h1 {
  margin-bottom: 8px;
}

.overview-head span {
  color: var(--muted);
  font-weight: 800;
}

.dialog-close {
  width: 54px;
  flex: 0 0 auto;
  background: #ffffff;
  color: var(--ink);
  font-size: 2rem;
}

.overview-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.overview-section h2 {
  margin: 0;
}

.overview-list {
  display: grid;
  gap: 8px;
}

.overview-list article {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.overview-list span,
.overview-list em {
  color: var(--muted);
}

.overview-list em {
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 860px) {
  .clock-app {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .terminal {
    min-height: auto;
  }

  .clock-face span {
    font-size: 4rem;
  }

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

  .session-actions,
  .employee-session,
  .overview-list article {
    grid-template-columns: 1fr;
  }

  .employee-session em {
    grid-row: auto;
    text-align: left;
  }
}
