:root {
  color-scheme: light;
  --ink: #162033;
  --muted: #667085;
  --line: #d8e0ea;
  --panel: #ffffff;
  --bg: #f4f7fb;
  --navy: #0f2f57;
  --teal: #18a999;
  --amber: #b7791f;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button {
  border: 0;
  background: var(--navy);
  color: #fff;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.04);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: .88rem;
  font-weight: 650;
}

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

.login-panel {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 18px 50px rgba(15, 47, 87, .08);
  display: grid;
  gap: 15px;
}

.login-panel h1 {
  margin: 0;
  font-size: 1.8rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  background: var(--teal);
  color: #052e2a;
  font-weight: 900;
}

.error-text {
  min-height: 20px;
  color: var(--red);
  margin: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #0d2441;
  color: #e6eef8;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
  font-weight: 850;
}

.tenant-switcher label {
  color: #bdd0e7;
  margin-bottom: 8px;
}

.tenant-switcher select {
  background: #132f52;
  border-color: #2d4f77;
  color: #fff;
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.sidebar a {
  color: #dbeafe;
  text-decoration: none;
  padding: 11px 10px;
  border-radius: 6px;
}

.sidebar a:hover {
  background: #173a64;
}

.ghost-button {
  margin-top: auto;
  background: transparent;
  border: 1px solid #2d4f77;
  color: #e6eef8;
}

.workspace {
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 22px;
}

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

.topbar h1 {
  margin: 3px 0 0;
  font-size: 1.65rem;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 900;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: #e9f8f5;
  color: #087568;
  font-size: .82rem;
  font-weight: 800;
}

.status-pill.warning {
  background: #fff7ed;
  color: var(--amber);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-head h3,
.activity-grid h3 {
  margin: 0 0 10px;
  font-size: .92rem;
}

.muted {
  color: var(--muted);
  font-size: .88rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.toggle-line input {
  width: 18px;
  height: 18px;
}

.hours-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.day-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fbfcfe;
}

.day-row strong {
  font-size: .9rem;
}

.day-row label {
  font-size: .76rem;
}

.secondary-button {
  background: #e6eef8;
  color: var(--navy);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f6f8fb;
  color: #475467;
  font-size: .78rem;
  text-transform: uppercase;
}

td input,
td select {
  min-width: 104px;
}

.icon-button {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #fee4e2;
  color: var(--red);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.activity-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 96px;
  overflow: hidden;
}

.activity-item {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-item strong {
  font-size: .88rem;
}

.activity-item span {
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .form-grid,
  .message-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
