:root {
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --line: #dbe5ea;
  --text: #172033;
  --muted: #64748b;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --blue: #2563eb;
  --red: #dc2626;
  --gold: #ca8a04;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  max-width: 100%;
  min-width: 0;
  min-height: 100dvh;
  width: 100%;
}

.sidebar {
  background: #102a33;
  color: #e8f3f2;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(94, 234, 212, 0.72) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  z-index: 10;
}

.sidebar::-webkit-scrollbar {
  width: 9px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(94, 234, 212, 0.72);
  border: 2px solid #132833;
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #5eead4;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  font-size: 13px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.side-nav {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.side-nav a {
  align-items: center;
  border-radius: 8px;
  color: #b9c9cc;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.sidebar-user {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  margin-top: 0;
  padding: 14px;
  flex-shrink: 0;
}

.sidebar-user span,
.eyebrow,
.section-head span,
.welcome-panel span,
.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-user span {
  color: #9fd7cf;
}

.sidebar-user small {
  color: #a9bdc0;
  overflow-wrap: anywhere;
}

.workspace {
  min-width: 0;
  width: 100%;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar > div:first-child {
  min-width: 0;
}

.topbar h1 {
  font-size: 24px;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

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

.top-actions form,
.table-actions form {
  display: block;
}

.icon-button {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  display: flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.container {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 28px 52px;
}

.flash {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.panel,
.hero,
.content-item,
.date-card,
.subject-card,
.welcome-panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  margin-bottom: 20px;
  padding: 22px;
}

.hero,
.welcome-panel {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 24px;
}

.welcome-panel {
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.welcome-panel::before {
  background: var(--brand);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 6px;
}

.welcome-panel p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 620px;
}

h1,
h2 {
  margin: 0 0 16px;
}

p {
  line-height: 1.5;
}

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

.metric-card {
  border-left: 5px solid var(--brand);
  padding: 18px;
}

.metric-card strong {
  display: block;
  font-size: 32px;
  margin-top: 8px;
}

.metric-card.accent-blue {
  border-left-color: var(--blue);
}

.metric-card.accent-red {
  border-left-color: var(--red);
}

.metric-card.accent-gold {
  border-left-color: var(--gold);
}

.admin-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-welcome {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.09), rgba(255, 255, 255, 0) 54%),
    #ffffff;
}

.admin-create {
  border-color: rgba(15, 118, 110, 0.25);
}

.admin-user-form {
  align-items: end;
}

.admin-active {
  min-height: 46px;
}

.admin-section-card .section-head strong {
  align-items: center;
  background: #ecfdf5;
  border-radius: 8px;
  color: var(--brand);
  display: flex;
  font-size: 22px;
  height: 46px;
  justify-content: center;
  min-width: 46px;
  padding: 0 12px;
}

.choice-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
}

.section-head.compact {
  margin-bottom: 10px;
}

.section-head.compact h2 {
  font-size: 16px;
  margin-bottom: 0;
}

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

.choice-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe5ea;
  border-radius: 8px;
  display: flex;
  font-weight: 700;
  gap: 8px;
  padding: 11px;
}

.choice-item input {
  width: auto;
}

.empty-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  margin: 0;
  padding: 12px;
}

.empty-note a {
  color: #7c2d12;
  font-weight: 800;
  text-decoration: underline;
}

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

.management-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  padding: 20px;
}

.management-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.management-card p {
  color: var(--muted);
  margin: 0;
}

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

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

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

.inline-form {
  align-items: end;
  grid-template-columns: 1fr 140px auto;
}

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

label {
  color: #334155;
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.check {
  align-items: center;
  display: flex;
  font-weight: 400;
  gap: 10px;
}

.check input {
  width: auto;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  font: inherit;
  padding: 12px;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(15, 118, 110, 0.14);
}

button,
.button {
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 800;
  padding: 12px 16px;
  text-align: center;
}

button:hover,
.button:hover {
  background: var(--brand-dark);
}

.button.small {
  padding: 8px 11px;
}

.button.secondary {
  background: #e2e8f0;
  color: #334155;
}

.button.secondary:hover {
  background: #cbd5e1;
}

.form-actions,
.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions {
  align-self: end;
}

.smtp-test-form {
  margin-top: 16px;
}

.email-log-head {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
}

.email-log-head span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.email-log-head h3 {
  font-size: 18px;
  margin: 0;
}

.admin-grid,
.card-grid {
  display: grid;
  gap: 16px;
}

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

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

.subject-card {
  display: grid;
  gap: 9px;
  min-height: 132px;
  padding: 18px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.subject-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  transform: translateY(-2px);
}

.subject-card strong {
  font-size: 18px;
  padding-right: 34px;
}

.subject-card small,
.date-card span,
.content-item small {
  color: var(--muted);
}

.badge {
  align-items: center;
  background: var(--red);
  border: 3px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
  position: absolute;
  right: 14px;
  top: 14px;
}

.pill {
  background: #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.timeline,
.calendar-list,
.compact-list {
  display: grid;
  gap: 12px;
}

.content-item {
  padding: 20px;
}

.content-item h2 {
  margin-top: 10px;
}

.content-item:target {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14), var(--shadow);
}

.date-card {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: 120px 1fr;
  padding: 16px;
}

.date-card time {
  color: var(--brand);
  font-weight: 800;
}

.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-legend {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.calendar-legend span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
  padding: 8px 11px;
}

.calendar-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.calendar-board {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.calendar-weekday {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  padding: 12px;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  min-height: 138px;
  padding: 9px;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.day-number {
  align-items: center;
  border-radius: 999px;
  color: #334155;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  margin-bottom: 8px;
  width: 28px;
}

.calendar-day.today .day-number {
  background: var(--brand);
  color: #ffffff;
}

.calendar-day.muted-day {
  background: #f8fafc;
}

.calendar-day.muted-day .day-number {
  color: #94a3b8;
}

.day-events {
  display: grid;
  gap: 6px;
}

.calendar-event {
  background: color-mix(in srgb, var(--event-color) 12%, white);
  border-left: 4px solid var(--event-color);
  border-radius: 7px;
  color: #172033;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
}

.calendar-event strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event span,
.calendar-event small {
  color: #475569;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list {
  margin-top: 14px;
}

.compact-list span {
  background: var(--surface-soft);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.table-wrap {
  max-width: 100%;
  overscroll-behavior-inline: contain;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

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

th,
td {
  border-bottom: 1px solid #e2e8f0;
  padding: 12px;
  text-align: left;
}

th {
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #f8fafc;
}

td small,
.row-title + small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

.content-admin-table th,
.email-log-table th {
  white-space: nowrap;
}

.content-admin-table td,
.email-log-table td {
  vertical-align: top;
}

.discipline-pill {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.email-summary {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 190px;
}

.email-summary small {
  flex-basis: 100%;
}

.email-error-row td {
  background: #fff7ed;
  border-bottom-color: #fed7aa;
  padding: 0;
}

.email-error-details {
  padding: 12px 14px;
}

.email-error-details summary {
  color: #9a3412;
  cursor: pointer;
  font-weight: 800;
}

.email-error-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.email-error-list article {
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.email-error-list article div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: space-between;
}

.email-error-list article span,
.email-error-list article small {
  color: #78716c;
}

.email-error-list article p,
.help-note {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.help-note {
  margin-top: 14px;
}

.email-log-table .log-error td {
  background: #fff7f7;
}

.error-message {
  color: #64748b;
  font-size: 13px;
  max-width: 360px;
  overflow-wrap: anywhere;
}

.status-chip {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  text-transform: capitalize;
}

.status-chip.ok {
  background: #dcfce7;
  color: #166534;
}

.status-chip.off {
  background: #fee2e2;
  color: #991b1b;
}

.status-chip.wait {
  background: #fef3c7;
  color: #92400e;
}

.status-chip.role-admin {
  background: #e0f2fe;
  color: #075985;
}

.status-chip.role-professor {
  background: #ede9fe;
  color: #5b21b6;
}

.status-chip.role-aluno {
  background: #ecfdf5;
  color: #047857;
}

.auth-body {
  background: #e9f2f1;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100vh;
}

.auth-intro {
  background: #102a33;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.auth-intro .brand {
  margin-bottom: 40px;
}

.auth-intro h1 {
  font-size: 40px;
  line-height: 1.08;
  max-width: 560px;
}

.auth-intro p {
  color: #c4d7d9;
  max-width: 520px;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.auth-highlights span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 12px;
}

.auth-card-wrap {
  align-content: center;
  display: grid;
  justify-items: center;
  padding: 28px;
}

.auth-switch {
  background: #dce8e8;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
  max-width: 720px;
  padding: 4px;
  width: 100%;
}

.auth-switch a {
  border-radius: 6px;
  color: #475569;
  font-weight: 800;
  padding: 11px;
  text-align: center;
}

.auth-switch a.active {
  background: #ffffff;
  color: var(--brand);
}

.auth {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 440px;
  padding: 24px;
  width: 100%;
}

.auth.wide {
  max-width: 720px;
}

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

  .sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: auto;
    max-height: none;
    min-width: 0;
    overflow: visible;
    position: static;
    width: 100%;
  }

  .side-nav {
    display: flex;
    flex: 0 0 auto;
    max-width: 100vw;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
    scrollbar-gutter: auto;
    scroll-snap-type: x proximity;
  }

  .side-nav a {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .sidebar-user {
    display: none;
  }

  .auth-intro {
    min-height: auto;
    padding: 32px;
  }

  .auth-intro h1 {
    font-size: 32px;
  }
}

@media (max-width: 800px) {
  .topbar,
  .hero,
  .welcome-panel {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .container {
    padding: 20px 16px 36px;
  }

  .topbar {
    padding: 18px 16px;
  }

  .top-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .grid-form,
  .inline-form,
  .admin-grid,
  .card-grid,
  .choice-grid,
  .management-grid,
  .date-card,
  .metric-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .auth-card-wrap {
    padding: 20px 16px 32px;
  }

  .calendar-board {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .calendar-weekday {
    display: none;
  }

  .calendar-day {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: auto;
  }

  .calendar-day.muted-day:not(:has(.calendar-event)) {
    display: none;
  }

  .calendar-event strong,
  .calendar-event span,
  .calendar-event small {
    white-space: normal;
  }

  .calendar-nav .button {
    flex: 1 1 120px;
  }
}

/* Visual polish */
body {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 32rem),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 100%);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.sidebar {
  background:
    linear-gradient(180deg, #0f2d36 0%, #132833 52%, #10212b 100%);
  box-shadow: 16px 0 40px rgba(15, 23, 42, 0.08);
}

.brand-mark {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.22);
}

.side-nav {
  gap: 10px;
}

.side-nav a {
  border: 1px solid transparent;
  min-height: 48px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.side-nav a.active {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 4px 0 0 #5eead4;
}

.side-nav a:hover {
  transform: translateX(2px);
}

.topbar {
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.container {
  max-width: 1240px;
}

.panel,
.hero,
.content-item,
.date-card,
.subject-card,
.welcome-panel,
.metric-card,
.management-card,
.auth {
  border-color: rgba(148, 163, 184, 0.24);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.welcome-panel {
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.1), transparent 46%),
    #ffffff;
}

.welcome-panel::before {
  width: 7px;
}

.metric-card,
.management-card,
.subject-card,
.date-card,
.content-item {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-card:hover,
.management-card:hover,
.subject-card:hover,
.date-card:hover,
.content-item:hover {
  border-color: rgba(15, 118, 110, 0.3);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.metric-card strong {
  color: #0f172a;
  font-size: 36px;
}

.management-card h2,
.subject-card strong {
  margin-bottom: 0;
}

input,
select,
textarea {
  min-height: 46px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

button,
.button {
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover,
.button:hover {
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.24);
  transform: translateY(-1px);
}

.button.secondary {
  box-shadow: none;
}

table {
  background: #ffffff;
  border-spacing: 0;
}

th {
  background: #f8fafc;
  color: #475569;
}

td {
  color: #1e293b;
}

.status-chip {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.choice-item {
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.choice-item:hover {
  background: #f0fdfa;
  border-color: rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}

.auth-layout {
  background:
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.16), transparent 28rem),
    #e9f2f1;
}

.auth-intro {
  background:
    linear-gradient(180deg, rgba(15, 45, 54, 0.94), rgba(16, 33, 43, 0.98)),
    #102a33;
}

.auth-intro h1 {
  margin-bottom: 16px;
}

@media (max-width: 980px) {
  .sidebar {
    gap: 16px;
    padding: 18px;
  }

  .side-nav {
    scrollbar-width: thin;
  }

  .side-nav a {
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 14px 12px;
  }

  .sidebar .brand {
    padding-inline: 4px;
  }

  .side-nav {
    margin-inline: -12px;
    padding: 0 12px 8px;
  }

  .side-nav a {
    min-height: 42px;
    padding: 9px 11px;
  }

  .nav-icon {
    height: 25px;
    width: 25px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .container {
    padding: 16px 12px 28px;
  }

  .panel,
  .hero,
  .welcome-panel,
  .auth {
    padding: 18px;
  }

  .metric-card strong {
    font-size: 30px;
  }

  .table-actions .button,
  .table-actions button,
  .table-actions form,
  .form-actions .button,
  .form-actions button {
    width: 100%;
  }

  .top-actions .button,
  .top-actions button {
    width: auto;
  }

  table {
    min-width: 680px;
  }

  .auth-intro {
    padding: 26px 20px;
  }

  .auth-intro h1 {
    font-size: 28px;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .sidebar {
    gap: 14px;
    padding-block: 16px;
  }

  .side-nav {
    gap: 5px;
  }

  .side-nav a {
    min-height: 42px;
    padding-block: 8px;
  }

  .nav-icon {
    height: 25px;
    width: 25px;
  }

  .sidebar-user {
    padding: 11px;
  }
}

@media (max-height: 620px) and (min-width: 981px) {
  .sidebar {
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-mark {
    height: 34px;
    width: 34px;
  }

  .side-nav a {
    min-height: 38px;
    padding: 6px 9px;
  }

  .sidebar-user {
    display: none;
  }
}

/* Mantem a navegacao lateral alinhada em desktop, notebook e tablet. */
@media (min-width: 701px) and (max-width: 980px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .sidebar {
    border-bottom: 0;
    gap: 18px;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 14px;
    position: sticky;
    top: 0;
    width: 250px;
  }

  .side-nav {
    display: grid;
    flex: 0 0 auto;
    gap: 6px;
    margin: 0;
    max-width: 100%;
    overflow: visible;
    padding: 0;
  }

  .side-nav a {
    min-height: 42px;
    padding: 8px 10px;
    white-space: normal;
  }

  .sidebar-user {
    display: grid;
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .sidebar {
    overflow: visible;
  }
}
