:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --text: #17202a;
  --muted: #667085;
  --line: #d9e1ea;
  --primary: #126c81;
  --primary-strong: #0d5263;
  --accent: #b65f2a;
  --good: #277a46;
  --danger: #b42318;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(238, 243, 248, 0.92), rgba(228, 235, 242, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23c9d5df' stroke-width='1'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3Ccircle cx='80' cy='80' r='34'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 32px;
}

.auth-view {
  display: grid;
  gap: 28px;
  width: min(440px, 100%);
  margin: 9vh auto 0;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.brand.compact h1 {
  font-size: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 108, 129, 0.16);
}

.primary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

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

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

.ghost-button {
  padding: 0 14px;
  color: var(--primary);
  background: #e7f2f5;
}

.icon-button {
  width: 40px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

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

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-view {
  width: min(1180px, 100%);
  margin: 0 auto;
}

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

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

.user-chip {
  padding: 10px 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

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

.status-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
}

.status-card p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.status-card strong {
  font-size: 34px;
  line-height: 1;
}

.status-card span {
  color: var(--muted);
  font-size: 13px;
}

.status-card.accent {
  border-color: rgba(39, 122, 70, 0.3);
}

.status-card.accent strong {
  color: var(--good);
  font-size: 24px;
}

.work-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  min-height: 280px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
}

.empty-state strong {
  font-size: 17px;
}

.empty-state span {
  color: var(--muted);
}

@media (max-width: 850px) {
  .shell {
    padding: 18px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-grid,
  .work-area {
    grid-template-columns: 1fr;
  }

  .auth-view {
    margin-top: 24px;
    padding: 22px;
  }
}
