:root {
  --ink: #f7fbff;
  --muted: #a9c6d0;
  --line: rgba(32, 225, 212, 0.22);
  --paper: #06162c;
  --panel: #0b2440;
  --white: #ffffff;
  --teal: #08c9c4;
  --teal-bright: #20e1d4;
  --green: #1fd2b5;
  --amber: #f2b35d;
  --red: #ff806f;
  --deep: #020b1d;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(8, 201, 196, 0.2), transparent 30%),
    linear-gradient(180deg, #020b1d 0%, #06162c 52%, #0a213b 100%);
}

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

button {
  cursor: pointer;
}

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

.shell.logged-out {
  grid-template-columns: 1fr;
}

.shell.logged-out .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  border-right: 1px solid rgba(32, 225, 212, 0.18);
  background: linear-gradient(180deg, rgba(2, 11, 29, 0.98), rgba(6, 22, 44, 0.98));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: url("./assets/app-icon.png") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: 0 0 28px rgba(8, 201, 196, 0.26);
}

.lang-select {
  min-height: 38px;
  border: 1px solid rgba(32, 225, 212, 0.32);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(2, 11, 29, 0.58);
  color: var(--white);
  font-weight: 800;
}

.lang-select.compact {
  min-height: 34px;
  padding: 6px 8px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b7d3dc;
  text-align: left;
  font-weight: 720;
  padding: 10px 12px;
}

.nav-item.active {
  background: rgba(8, 201, 196, 0.15);
  color: var(--teal-bright);
  box-shadow: inset 3px 0 0 var(--teal);
}

.logout {
  margin-top: auto;
  color: var(--red);
}

.main {
  min-width: 0;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(2, 11, 29, 0.92), rgba(2, 11, 29, 0.48)),
    linear-gradient(0deg, rgba(2, 11, 29, 0.8), rgba(2, 11, 29, 0.18)),
    url("./assets/brand-hero.png") center / cover no-repeat;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(32, 225, 212, 0.28);
  border-radius: 8px;
  background: rgba(4, 21, 43, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

h1,
h2,
p {
  margin-top: 0;
}

.auth-panel h1,
.panel-header h1 {
  margin-bottom: 24px;
  font-size: 34px;
}

.eyebrow {
  color: var(--teal-bright);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--teal-bright);
}

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

label {
  display: grid;
  gap: 7px;
  color: #bfd7df;
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(32, 225, 212, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #07182d;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(14, 118, 109, 0.18);
  border-color: var(--teal);
}

.primary,
.secondary {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary {
  border: 0;
  background: linear-gradient(135deg, #08c9c4, #008b95);
  color: #001428;
  box-shadow: 0 14px 34px rgba(8, 201, 196, 0.22);
}

.secondary {
  border: 1px solid rgba(32, 225, 212, 0.26);
  background: rgba(4, 21, 43, 0.66);
  color: var(--white);
}

.error,
.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

.form-message.success {
  color: var(--green);
}

.panel-view {
  padding: 32px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 26px;
}

.user-pill {
  display: grid;
  justify-items: end;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(32, 225, 212, 0.22);
  border-radius: 8px;
  background: rgba(4, 21, 43, 0.72);
}

.user-pill span {
  color: #a9c6d0;
  font-size: 12px;
  font-weight: 760;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.metric {
  padding: 20px;
  border: 1px solid rgba(32, 225, 212, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 44, 70, 0.86), rgba(4, 18, 38, 0.92));
  box-shadow: var(--shadow);
}

.metric span {
  display: block;
  color: #a9c6d0;
  font-size: 13px;
  font-weight: 760;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--teal-bright);
  font-size: 38px;
}

.metric.green strong {
  color: var(--green);
}

.metric.amber strong {
  color: var(--amber);
}

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

.grid-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(32, 225, 212, 0.18);
  border-radius: 8px;
  background: rgba(4, 21, 43, 0.72);
}

.wide {
  grid-column: 1 / -1;
}

.invite-form {
  grid-template-columns: minmax(180px, 1fr) 180px auto;
  align-items: end;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(32, 225, 212, 0.18);
  border-radius: 8px;
  background: rgba(4, 21, 43, 0.72);
}

.task-list,
.people-list {
  display: grid;
  gap: 12px;
}

.task-row,
.person-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(32, 225, 212, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(12, 44, 70, 0.8), rgba(4, 18, 38, 0.9));
}

.task-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 160px;
  align-items: center;
}

.task-route {
  font-weight: 850;
}

.task-meta,
.person-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(8, 201, 196, 0.14);
  color: var(--teal-bright);
  border: 1px solid rgba(32, 225, 212, 0.28);
  font-size: 12px;
  font-weight: 850;
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(4, 21, 43, 0.48);
}

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

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-item {
    text-align: center;
  }

  .panel-view {
    padding: 20px;
  }

  .metrics,
  .grid-form,
  .invite-form,
  .task-row {
    grid-template-columns: 1fr;
  }

  .status {
    justify-self: start;
  }
}
