:root {
  --navy: #081c4a;
  --blue: #0f4cff;
  --blue-soft: #2e8bff;
  --pale: #eef5ff;
  --bg: #f7f9fc;
  --line: rgba(8, 28, 74, 0.1);
  --text: #10223d;
  --muted: #5c6b82;
  --white: #ffffff;
  --danger: #c33434;
  --ok: #168755;
  --warn: #ad7300;
}

* {
  box-sizing: border-box;
}

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

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

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(15, 76, 255, 0.08), transparent 45%),
    var(--white);
}

.login-shell {
  width: min(440px, 100%);
}

.login-panel,
.section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.login-panel {
  padding: 36px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  font-weight: 700;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  color: var(--navy);
}

.muted,
.section-head span {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  color: var(--text);
  background: var(--white);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 76, 255, 0.12);
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-soft));
}

.secondary {
  color: var(--blue);
  background: var(--white);
  border: 1px solid rgba(15, 76, 255, 0.3);
}

.compact {
  min-height: 38px;
}

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

.app-view {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: var(--white);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.sidebar-brand span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

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

.nav-item,
.logout {
  text-align: left;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.logout {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.content {
  padding: 28px;
  overflow: auto;
}

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

.user-pill {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid,
.view {
  display: grid;
  gap: 18px;
}

.section {
  padding: 22px;
}

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

.section-head h2 {
  font-size: 18px;
}

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

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-two {
  grid-column: span 2;
}

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

.addon {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--pale);
}

.addon input {
  width: 18px;
  min-height: 18px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.actions .form-message {
  margin-right: auto;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--pale);
  color: var(--blue);
  font-weight: 700;
  font-size: 12px;
}

.status.Erro {
  background: #fff0f0;
  color: var(--danger);
}

.status.Concluído {
  background: #eaf9f1;
  color: var(--ok);
}

.status.Pendente,
.status.Aguardando {
  background: #fff7e6;
  color: var(--warn);
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    flex-direction: row;
    align-items: center;
    overflow: auto;
  }

  .sidebar nav {
    display: flex;
  }

  .logout {
    margin-left: auto;
    margin-top: 0;
  }

  .grid.two,
  .grid.three,
  .addons {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

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