:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111;
  --panel-2: #181818;
  --line: #2a2a2a;
  --text: #f7f7f7;
  --muted: #a7a7a7;
  --accent: #f2c94c;
  --danger: #ff6b6b;
  --focus: #78a6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.login-view {
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
  max-width: 420px;
  margin: 0 auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.brand-lockup h1,
.top-bar h1,
.sheet-header h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-lockup h1 {
  font-size: 2.35rem;
}

.brand-lockup p,
.eyebrow,
.count-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label,
.search-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(120, 166, 255, 0.18);
}

.primary-button,
.icon-text-button,
.icon-button,
.section-tile {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  min-height: 50px;
  background: var(--text);
  color: #050505;
  border-color: var(--text);
  font-weight: 700;
}

.primary-button:disabled {
  opacity: 0.62;
  cursor: progress;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.main-view {
  max-width: 820px;
  margin: 0 auto;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0 18px;
  background: var(--bg);
}

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

.top-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.top-bar h1 {
  font-size: 1.55rem;
}

.icon-text-button,
.icon-button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--text);
}

.icon-button {
  width: 40px;
  padding: 0;
}

.content-panel {
  padding-bottom: 24px;
}

.section-grid {
  display: grid;
  gap: 12px;
}

.section-tile {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: left;
  padding: 18px;
}

.section-tile span {
  font-size: 1.18rem;
  font-weight: 700;
}

.section-tile small {
  color: var(--muted);
  font-size: 0.88rem;
}

.section-tile:not(.disabled):active,
.employee-row:active,
.icon-text-button:active {
  transform: translateY(1px);
}

.disabled {
  opacity: 0.5;
}

.toolbar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 12px;
}

.employee-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.employee-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  text-align: left;
}

.employee-row strong {
  display: block;
  font-size: 1rem;
}

.employee-row span,
.employee-row small {
  color: var(--muted);
}

.employee-shift {
  min-width: 72px;
  color: var(--accent);
  text-align: right;
  font-weight: 700;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
}

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
}

.sheet-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(92px, 34%) 1fr;
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.detail-list dt,
.detail-list dd {
  min-height: 42px;
  margin: 0;
  padding: 12px;
  background: #0d0d0d;
}

.detail-list dt {
  color: var(--muted);
}

@media (min-width: 680px) {
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-panel {
    left: 50%;
    right: auto;
    width: min(520px, calc(100% - 32px));
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }
}
