:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f7f7;
  --ink: #242424;
  --muted: #898989;
  --line: rgba(34, 42, 53, 0.1);
  --ring: rgba(34, 42, 53, 0.08);
  --focus: rgba(59, 130, 246, 0.45);
  --danger: #b42318;
  --warning: #9a6700;
  --info: #175cd3;
  --ok: #067647;
  --shadow: rgba(19, 19, 22, 0.7) 0 1px 5px -4px, rgba(34, 42, 53, 0.08) 0 0 0 1px, rgba(34, 42, 53, 0.05) 0 4px 8px 0;
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
}

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

.page {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 28px;
  flex: 1;
}

.login-page {
  width: min(980px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr 390px;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.1;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 17px;
}

.lead {
  max-width: 620px;
  margin: 18px 0 0;
  color: #555;
  font-size: 17px;
  line-height: 1.6;
}

.panel,
.card,
.metric {
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 12px;
}

.panel {
  padding: 22px;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: #444;
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font: inherit;
  outline: none;
}

input:focus,
select:focus,
button:focus-visible {
  box-shadow: 0 0 0 4px var(--focus);
  border-color: #98a2b3;
}

button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.btn-primary {
  color: #fff;
  background: var(--ink);
  box-shadow: rgba(255, 255, 255, 0.15) 0 2px 0 inset;
}

.btn-ghost {
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
}

.btn-link {
  padding: 0;
  height: auto;
  color: var(--ink);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: var(--panel-soft);
}

.tab {
  background: transparent;
  color: #555;
}

.tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: rgba(34, 42, 53, 0.1) 0 0 0 1px;
}

.message {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: #444;
  font-size: 13px;
  line-height: 1.45;
}

.message.show {
  display: block;
}

.message.error {
  color: var(--danger);
  background: #fff3f2;
}

.message.success {
  color: var(--ok);
  background: #ecfdf3;
}

.tool-grid {
  display: grid;
  gap: 18px;
}

.task-form {
  display: grid;
  grid-template-columns: 130px 190px 1fr auto;
  gap: 12px;
  align-items: end;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.muted {
  color: var(--muted);
}

.table-shell {
  overflow: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #fff;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  color: #555;
  background: #f8f8f8;
  font-size: 12px;
  font-weight: 750;
}

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

.status,
.priority {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 9999px;
  background: #f3f4f6;
  color: #444;
  font-size: 12px;
  font-weight: 700;
}

.status::before,
.priority::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: currentColor;
}

.status.done,
.priority.p1 {
  color: var(--ok);
  background: #ecfdf3;
}

.status.running,
.priority.p2 {
  color: var(--info);
  background: #eff8ff;
}

.status.failed,
.priority.p0 {
  color: var(--danger);
  background: #fff3f2;
}

.priority.p3 {
  color: #667085;
  background: #f2f4f7;
}

.priority.p1 {
  color: var(--warning);
  background: #fffaeb;
}

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

.report-frame {
  width: 100%;
  height: calc(100vh - 144px);
  min-height: 620px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: #fff;
}

.footer {
  padding: 18px 28px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 16px;
  }

  .login-page {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .task-form {
    grid-template-columns: 1fr;
  }

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

  .nav-actions {
    gap: 6px;
  }
}
