@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --app-bg: #eef3f8;
  --app-bg-strong: #f7f9fc;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-soft: rgba(245, 249, 252, 0.95);
  --surface-dark: #0f2231;
  --border: rgba(21, 40, 61, 0.10);
  --border-strong: rgba(21, 40, 61, 0.16);
  --text: #163041;
  --muted: #637180;
  --primary: #177e76;
  --primary-strong: #0f5f58;
  --primary-soft: rgba(23, 126, 118, 0.12);
  --accent: #2f74d0;
  --accent-soft: rgba(47, 116, 208, 0.12);
  --danger: #dc4c64;
  --warning: #d18b15;
  --shadow: 0 24px 55px rgba(15, 30, 48, 0.10);
  --shadow-soft: 0 12px 30px rgba(15, 30, 48, 0.06);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(23, 126, 118, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(47, 116, 208, 0.12), transparent 24%),
    linear-gradient(180deg, var(--app-bg-strong) 0%, var(--app-bg) 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 65%);
  opacity: 0.45;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
}

img {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -120px;
  z-index: 2000;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: 290px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(180deg, rgba(11, 25, 36, 0.98), rgba(17, 38, 54, 0.98)),
    linear-gradient(180deg, #0f2231 0%, #132b3c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 20px 0 45px rgba(8, 18, 29, 0.18);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 190px;
  background: linear-gradient(180deg, rgba(23, 126, 118, 0.24), transparent);
  pointer-events: none;
}

.sidebar-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo-link,
.mobile-brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.brand-logo-link {
  width: min(100%, 218px);
}

.brand-logo,
.mobile-brand-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mobile-brand-logo-link {
  min-width: 0;
  max-width: 128px;
}

.mobile-brand-logo {
  max-height: 40px;
}

.sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.sidebar-close:hover {
  transform: translateY(-1px);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.sidebar-toggle,
.icon-button,
.mobile-header .btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.surface-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.surface-icon-button:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: #fff;
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.sidebar-toggle:hover,
.icon-button:hover,
.mobile-header .btn-light:hover {
  transform: translateY(-1px);
  color: var(--primary);
  background: #fff;
  border-color: var(--border-strong);
}

.sidebar nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.25rem;
  overflow: auto;
  padding-right: 0.1rem;
}

.nav-section-label {
  margin: 1rem 0.75rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar nav a:hover {
  color: #fff;
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar nav a.active,
.sidebar nav a[aria-current='page'] {
  color: #fff;
  background: linear-gradient(135deg, rgba(23, 126, 118, 0.34), rgba(47, 116, 208, 0.22));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.sidebar nav a i {
  width: 1.1rem;
  font-size: 1.05rem;
  text-align: center;
}

.sidebar nav .badge {
  margin-left: auto;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar,
.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(15, 30, 48, 0.22);
}

.sidebar-user-copy strong,
.topbar-user-copy strong {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-user-copy small,
.topbar-user-copy small {
  display: block;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.8rem;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  color: #e8eff5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-logout:hover {
  color: #fff;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.14);
}

.content {
  min-width: 0;
  margin-left: 290px;
  padding: 1.35rem 1.35rem 2rem;
}

.mobile-header {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.3rem;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.topbar-copy {
  min-width: 0;
}

.topbar-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.topbar-copy h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.topbar-copy p {
  margin: 0.35rem 0 0;
  max-width: 52rem;
  color: var(--muted);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.78rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 253, 0.92));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.topbar-user-copy small {
  color: var(--muted);
}

.text-prewrap {
  white-space: pre-wrap;
}

.scrollbox {
  max-height: 340px;
  overflow: auto;
}

.summary-toggle {
  cursor: pointer;
}

.cell-min-260 {
  min-width: 260px;
}

.cell-min-300 {
  min-width: 300px;
}

.cell-min-230 {
  min-width: 230px;
}

.cell-min-210 {
  min-width: 210px;
}

.card,
.card-soft {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.card-body {
  color: var(--text);
}

.card-soft .card-body {
  padding: 1.35rem;
}

.card-header {
  background: rgba(255, 255, 255, 0.42);
  border-bottom-color: rgba(21, 40, 61, 0.08);
}

.stat {
  position: relative;
  height: 100%;
  padding: 1.25rem;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.stat .icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

.stat .text-muted {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.stat .fs-2 {
  letter-spacing: -0.04em;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid rgba(23, 126, 118, 0.12);
  font-weight: 700;
}

.btn {
  border-radius: 14px;
  font-weight: 700;
  box-shadow: none !important;
}

.btn-main {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(23, 126, 118, 0.22);
}

.btn-main:hover,
.btn-main:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-strong), #2565b8);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(23, 126, 118, 0.22);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.btn-outline-secondary {
  border-color: rgba(99, 113, 128, 0.26);
}

.btn-light {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
  color: var(--text);
}

.btn-light:hover {
  background: #fff;
  border-color: var(--border-strong);
}

.form-control,
.form-select {
  min-height: 46px;
  border-radius: 14px;
  border-color: rgba(21, 40, 61, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: none;
}

.form-control::placeholder {
  color: rgba(99, 113, 128, 0.64);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(23, 126, 118, 0.42);
  box-shadow: 0 0 0 0.22rem rgba(23, 126, 118, 0.12);
}

.input-group-text {
  border-radius: 14px;
  border-color: rgba(21, 40, 61, 0.14);
  background: rgba(242, 246, 250, 0.96);
  color: var(--muted);
}

.form-label {
  margin-bottom: 0.45rem;
  font-weight: 700;
  color: #274051;
}

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

.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table-responsive {
  border-radius: 20px;
}

.table > :not(caption) > * > * {
  padding: 1rem 0.9rem;
  vertical-align: middle;
  border-color: rgba(21, 40, 61, 0.08);
}

.table thead th {
  background: rgba(246, 250, 253, 0.96);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.64);
}

.table tbody tr:hover {
  background: rgba(245, 249, 252, 0.96);
}

.app-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.app-alert .bi {
  margin-top: 0.15rem;
  font-size: 1.1rem;
}

.alert {
  border-radius: 18px;
  border-color: rgba(21, 40, 61, 0.08);
}

.empty-state {
  border: 1px dashed rgba(21, 40, 61, 0.16);
  background: rgba(255, 255, 255, 0.68);
}

.empty-state .card-body {
  padding: 2rem;
}

.quick-actions {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  z-index: 1050;
}

.quick-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(21, 40, 61, 0.10);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.quick-action-button:hover {
  transform: translateY(-2px);
}

.quick-action-primary {
  gap: 0.65rem;
  padding: 0 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: 0;
}

.quick-action-primary:hover {
  color: #fff;
}

.quick-action-secondary {
  width: 56px;
  color: var(--primary);
}

.quick-action-label {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-content.quick-observation-modal {
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  border-color: rgba(21, 40, 61, 0.08);
}

.quick-observation-modal .modal-header {
  background: rgba(247, 250, 252, 0.92);
}

.quick-observation-modal .modal-body {
  background: rgba(255, 255, 255, 0.96);
}

.login-wrap,
.auth-shell {
  width: min(1180px, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: grid;
  align-items: stretch;
  gap: 1.5rem;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page .login-wrap {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 430px);
}

.login-logo,
.auth-hero {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.login-logo {
  min-height: 240px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.20), transparent 32%),
    linear-gradient(160deg, #102736 0%, #15414e 56%, #1f6d91 100%);
}

.login-logo::after,
.auth-hero::after {
  content: '';
  position: absolute;
  inset: auto -8% -18% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.login-logo img {
  width: min(320px, 82%);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.24));
}

.auth-hero {
  padding: 2.25rem;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(160deg, #102736 0%, #15414e 55%, #1f6d91 100%);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 2rem;
}

.auth-brand img {
  width: min(290px, 100%);
  height: auto;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.70);
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.auth-copy p {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
}

.auth-feature-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.auth-feature {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-feature i {
  color: #b8f2ea;
  margin-top: 0.1rem;
}

.auth-feature strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #fff;
}

.auth-feature span {
  color: rgba(255, 255, 255, 0.72);
}

.auth-card,
.login-wrap .card-soft {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.auth-card .card-body,
.login-wrap .card-body {
  padding: 2rem;
}

.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-card-subtitle {
  margin: 0;
  color: var(--muted);
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
}

.auth-footer a {
  font-weight: 700;
}

.search-inline {
  max-width: 360px;
  min-width: 220px;
}

.avatar-xl {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.avatar-lg {
  width: 48px;
  height: 48px;
  font-size: 0.95rem;
}

.min-width-0 {
  min-width: 0;
}

.turma-report-card {
  border-radius: 22px;
}

.turma-report-card .card-body {
  padding: 1.35rem;
}

.details-card,
details {
  border-color: var(--border);
}

summary {
  cursor: pointer;
}

pre,
code {
  color: var(--text);
}

::selection {
  background: rgba(23, 126, 118, 0.18);
  color: var(--text);
}

@media (max-width: 1100px) {
  .sidebar {
    width: min(86vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1020;
    background: rgba(10, 18, 28, 0.48);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }

  .mobile-header {
    display: flex;
  }

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

  .topbar-user {
    width: 100%;
  }

  .quick-actions {
    right: 0.9rem;
    bottom: 0.9rem;
  }
}

@media (max-width: 900px) {
  .auth-page .login-wrap,
  .login-wrap,
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 1rem));
  }

  .auth-hero,
  .login-logo {
    min-height: 0;
  }

  .auth-page {
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 0.9rem;
  }

  .topbar-copy h1 {
    font-size: 1.55rem;
  }

  .card-soft .card-body,
  .auth-card .card-body,
  .login-wrap .card-body {
    padding: 1.15rem;
  }

  .quick-actions {
    left: 0.9rem;
    right: 0.9rem;
  }

  .quick-action-primary {
    flex: 1;
    justify-content: center;
  }
}

/* Clean interface system */
:root {
  --app-bg: #fcfbfd;
  --app-bg-strong: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-soft: #f8f6fb;
  --surface-dark: #241b35;
  --border: #e9e5ed;
  --border-strong: #dcd5e4;
  --text: #17131f;
  --muted: #746d7d;
  --primary: #7c3aed;
  --primary-strong: #6424d1;
  --primary-soft: #f2eafe;
  --accent: #9b5de5;
  --accent-soft: #f7f0ff;
  --danger: #d73754;
  --warning: #d38a0a;
  --shadow: 0 18px 48px rgba(37, 24, 52, 0.12);
  --shadow-soft: 0 2px 10px rgba(37, 24, 52, 0.045);
  --radius-xl: 18px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
}

body {
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  background: var(--app-bg);
}

body::before {
  display: none;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-strong);
}

.sidebar {
  width: 272px;
  padding: 0;
  color: #4b3d5f;
  background: #faf8fc;
  border-right: 1px solid var(--border);
  box-shadow: none;
}

.sidebar::before {
  display: none;
}

.sidebar-header {
  min-height: 92px;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.brand-logo-link {
  width: 205px;
  justify-content: flex-start;
}

.brand-logo {
  max-height: 54px;
  object-position: left center;
}

.sidebar-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border-color: var(--border);
  color: var(--muted);
  background: #fff;
}

.sidebar-close:hover {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #dfd0f8;
}

.sidebar nav {
  gap: 0.2rem;
  margin-top: 0;
  padding: 1.1rem 1rem 1rem;
  scrollbar-width: thin;
}

.nav-section-label {
  margin: 0.3rem 0.75rem 0.65rem;
  color: #a29aa9;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.sidebar nav a {
  gap: 0.8rem;
  min-height: 46px;
  padding: 0.74rem 0.85rem;
  border-radius: 10px;
  color: #554662;
  font-size: 0.9rem;
  font-weight: 600;
}

.sidebar nav a:hover {
  color: var(--primary-strong);
  transform: none;
  background: #f3edf9;
  border-color: transparent;
}

.sidebar nav a.active,
.sidebar nav a[aria-current='page'] {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-color: transparent;
  box-shadow: 0 7px 18px rgba(124, 58, 237, 0.18);
}

.sidebar nav a i {
  width: 1.15rem;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.48);
}

.sidebar-user {
  gap: 0.7rem;
  padding: 0.7rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.sidebar-user-avatar,
.topbar-avatar {
  width: 40px;
  height: 40px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid #e3d4fb;
  box-shadow: none;
}

.sidebar-user-copy {
  min-width: 0;
}

.sidebar-user-copy strong {
  overflow: hidden;
  color: #2a2034;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy small,
.topbar-user-copy small {
  color: var(--muted);
  font-size: 0.73rem;
}

.sidebar-logout {
  margin-top: 0.3rem;
  padding: 0.68rem 0.75rem;
  border: 0;
  border-radius: 10px;
  color: #746a7c;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
}

.sidebar-logout:hover {
  color: var(--danger);
  transform: none;
  background: #fff0f3;
  border-color: transparent;
}

.sidebar-install {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.65rem;
  margin-top: 0.55rem;
  padding: 0.68rem 0.75rem;
  border: 0;
  border-radius: 10px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
}

.sidebar-install:hover {
  color: #fff;
  background: var(--primary);
}

.sidebar-install[hidden] {
  display: none;
}

.content {
  margin-left: 272px;
  padding: 1.8rem clamp(1.25rem, 3vw, 3.25rem) 3rem;
}

.topbar {
  align-items: center;
  margin-bottom: 1.75rem;
  padding: 0.4rem 0 1.3rem;
  border: 0;
  border-bottom: 1px solid #f0edf2;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-copy h1 {
  color: #100d16;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.topbar-copy p {
  margin-top: 0.38rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.topbar-eyebrow {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.surface-icon-button,
.sidebar-toggle,
.icon-button,
.mobile-header .btn-light {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border-color: var(--border);
  color: #5e5368;
  background: #fff;
  box-shadow: none;
}

.surface-icon-button:hover,
.sidebar-toggle:hover,
.icon-button:hover,
.mobile-header .btn-light:hover {
  color: var(--primary);
  transform: none;
  border-color: #d9c9f2;
  background: var(--primary-soft);
  box-shadow: none;
}

.mobile-header {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.card,
.card-soft {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.card-soft .card-body {
  padding: 1.35rem;
}

.card-header {
  padding: 1rem 1.25rem;
  background: #fdfcfe;
  border-bottom-color: var(--border);
}

.stat {
  min-height: 132px;
  padding: 1.35rem;
}

.stat::before {
  display: none;
}

.stat .icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: var(--primary);
  font-size: 1.05rem;
  background: var(--primary-soft);
}

.stat .text-muted {
  color: #706878 !important;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.stat .fs-2 {
  margin-top: 0.35rem;
  color: #131019;
  font-size: 1.9rem !important;
  line-height: 1.05;
}

.stat small {
  display: block;
  margin-top: 0.45rem;
  color: #938b9a;
  font-size: 0.74rem;
}

.welcome-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.65rem 1.75rem;
  border: 1px solid #e4d6fa;
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 15%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(110deg, #fbf8ff 0%, #f3eafe 100%);
}

.welcome-kicker {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.welcome-panel h2 {
  max-width: 720px;
  margin: 0;
  color: #20142e;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.welcome-panel p {
  margin: 0.5rem 0 0;
  color: #71647d;
  font-size: 0.9rem;
}

.admin-welcome {
  border-color: #ddd8f7;
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 255, 255, 0.8), transparent 25%),
    linear-gradient(110deg, #f8f7ff 0%, #eeeafe 100%);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-list {
  display: grid;
  gap: 0.55rem;
}

.action-list-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.action-list-item:hover {
  color: var(--text);
  border-color: var(--border);
  background: #faf8fc;
}

.action-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}

.action-list-item strong,
.action-list-item small {
  display: block;
}

.action-list-item strong {
  font-size: 0.88rem;
}

.action-list-item small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.action-list-item > .bi-arrow-right {
  color: #a49cab;
}

.plan-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-link-grid > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.quick-link-grid > a:hover {
  color: var(--text);
  transform: translateY(-1px);
  border-color: #d8c5f5;
  background: #fbf9fe;
}

.quick-link-grid > a > i {
  color: var(--primary);
  font-size: 1.1rem;
}

.quick-link-grid strong,
.quick-link-grid small {
  display: block;
}

.quick-link-grid strong {
  font-size: 0.84rem;
}

.quick-link-grid small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.badge-soft {
  padding: 0.42rem 0.68rem;
  border: 1px solid #e1d3f8;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge {
  font-weight: 700;
}

.btn {
  min-height: 42px;
  padding: 0.58rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn-sm {
  min-height: 34px;
  padding: 0.38rem 0.68rem;
  border-radius: 8px;
  font-size: 0.76rem;
}

.btn-main {
  color: #fff;
  border: 1px solid var(--primary);
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.17) !important;
}

.btn-main:hover,
.btn-main:focus {
  color: #fff;
  transform: translateY(-1px);
  border-color: var(--primary-strong);
  background: var(--primary-strong);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: #d9c7f5;
  background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--primary-strong);
  border-color: #bea2eb;
  background: var(--primary-soft);
}

.btn-outline-secondary {
  color: #655b6e;
  border-color: var(--border-strong);
  background: #fff;
}

.btn-outline-secondary:hover {
  color: #302637;
  border-color: #cfc6d5;
  background: #f7f5f8;
}

.btn-light {
  background: #fff;
  border-color: var(--border);
}

.form-control,
.form-select {
  min-height: 44px;
  border-radius: 10px;
  border-color: var(--border-strong);
  color: var(--text);
  background-color: #fff;
  font-size: 0.86rem;
}

textarea.form-control {
  min-height: 96px;
}

.form-control::placeholder {
  color: #a69faa;
}

.form-control:focus,
.form-select:focus {
  border-color: #ae8be5;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.09);
}

.input-group-text {
  border-radius: 10px;
  border-color: var(--border-strong);
  color: #8c8492;
  background: #faf9fb;
}

.form-label {
  color: #3b3243;
  font-size: 0.78rem;
  font-weight: 700;
}

.form-text {
  font-size: 0.73rem;
}

.form-check-input:checked {
  border-color: var(--primary);
  background-color: var(--primary);
}

.table-responsive {
  border: 1px solid var(--border);
  border-radius: 12px;
}

.table > :not(caption) > * > * {
  padding: 0.9rem 0.85rem;
  border-color: #efecf1;
  font-size: 0.81rem;
}

.table thead th {
  color: #817886;
  background: #faf9fb;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.table tbody tr {
  background: #fff;
}

.table tbody tr:hover {
  background: #fdfbff;
}

.alert,
.app-alert {
  border-radius: 12px;
  box-shadow: none;
  font-size: 0.84rem;
}

.empty-state {
  border-color: #dcd3e3;
  background: #fff;
}

details,
.details-card {
  border-color: var(--border) !important;
  background: #faf9fb !important;
}

.quick-actions {
  right: 1.5rem;
  bottom: 1.5rem;
  flex-direction: column;
  align-items: flex-end;
}

.quick-action-button {
  min-height: 50px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(65, 35, 93, 0.16);
}

.quick-action-button:hover {
  transform: translateY(-2px);
}

.quick-action-primary {
  min-width: 50px;
  padding: 0 1rem;
  background: var(--primary);
}

.quick-action-secondary {
  width: 50px;
  color: var(--primary);
}

.modal-backdrop.show {
  opacity: 0.62;
}

.modal-content,
.modal-content.quick-observation-modal {
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(27, 17, 36, 0.22);
}

.modal-header,
.modal-footer,
.quick-observation-modal .modal-header {
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-color: var(--border);
}

.modal-body,
.quick-observation-modal .modal-body {
  padding: 1.25rem;
  background: #fff;
}

.turma-tabs .btn {
  white-space: nowrap;
}

.aluno-card .card {
  height: 100%;
}

.aluno-card h5 {
  font-size: 0.98rem;
}

.aluno-card .card-body > .d-flex:first-child::before {
  content: '\\F4DA';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-right: 0.7rem;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-family: 'bootstrap-icons';
  font-size: 1.1rem;
}

.report-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
}

.storage-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #77707d;
  font-size: 0.76rem;
}

.auth-page {
  background: #f7f4fa;
}

.auth-page .login-wrap,
.auth-shell {
  width: min(1080px, calc(100% - 2rem));
  gap: 0;
  padding: 2rem 0;
}

.auth-page .login-wrap,
.auth-shell {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
}

.login-logo,
.auth-hero {
  border-radius: 20px 0 0 20px;
  box-shadow: none;
}

.login-logo,
.auth-hero {
  background:
    radial-gradient(circle at 75% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #332044 0%, #5b2b86 100%);
}

.auth-card,
.login-wrap .card-soft {
  border-radius: 0 20px 20px 0;
  border-left: 0;
  box-shadow: none;
}

.auth-card {
  display: grid;
  align-items: center;
}

.auth-card .card-body,
.login-wrap .card-body {
  padding: 2.2rem;
}

::selection {
  color: var(--text);
  background: #e3d1ff;
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 248, 249, 0.9));
  box-shadow: var(--shadow-soft);
}

.collection-kicker {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.collection-toolbar h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.collection-toolbar p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.period-switcher,
.collection-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.period-switcher .form-select {
  min-width: 180px;
}

.period-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.class-filter {
  width: min(100%, 360px);
}

.class-filter .form-label {
  margin-bottom: 0.35rem;
}

.class-grid,
.student-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.class-card,
.student-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.class-card:hover,
.student-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 126, 118, 0.25);
  box-shadow: var(--shadow);
}

.class-card {
  padding: 1.25rem;
}

.class-card-header,
.student-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.class-card-header {
  justify-content: space-between;
}

.class-card-icon,
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.1rem;
}

.class-card-copy {
  margin: 1rem 0;
}

.class-card-copy h3,
.student-card-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.class-card-copy p,
.student-card-title p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.class-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.class-card-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.class-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 800;
}

.class-card-link.disabled {
  color: var(--muted);
  pointer-events: none;
}

.class-card.is-inactive {
  opacity: 0.68;
}

.student-card {
  padding: 1rem;
}

.student-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: var(--primary-strong);
  background: linear-gradient(135deg, rgba(23, 126, 118, 0.16), rgba(47, 116, 208, 0.13));
  border: 1px solid rgba(23, 126, 118, 0.12);
  font-weight: 800;
}

.student-card-title {
  min-width: 0;
  flex: 1;
}

.student-card-title h3,
.student-card-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
}

.student-edit-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.student-edit-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.student-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

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

.dashboard-stat-value {
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.student-card-actions a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  min-height: 42px;
  padding: 0.6rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 750;
  background: #fff;
}

.student-card-actions a:hover {
  color: var(--primary);
  border-color: rgba(23, 126, 118, 0.25);
  background: var(--primary-soft);
}

.student-card-actions small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.3rem;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.68rem;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 260px;
  padding: 2rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.empty-state.compact {
  min-height: 220px;
}

.empty-state h2 {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
}

.empty-state p {
  max-width: 31rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.clean-modal {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 35px 90px rgba(9, 22, 35, 0.25);
}

.clean-modal .modal-header,
.clean-modal .modal-footer {
  padding: 1.1rem 1.25rem;
  border-color: var(--border);
}

.clean-modal .modal-body {
  padding: 1.25rem;
}

.student-detail-modal {
  min-height: min(760px, calc(100vh - 3rem));
}

.student-modal-tabs {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.student-modal-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-radius: 11px 11px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.student-modal-tabs a.active {
  color: var(--primary-strong);
  background: #fff;
  box-shadow: 0 -1px 0 var(--border), 1px 0 0 var(--border), -1px 0 0 var(--border);
}

.student-modal-tabs span {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-size: 0.66rem;
}

.observation-composer {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.observation-list {
  display: grid;
  gap: 0.75rem;
}

.observation-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.observation-item p {
  margin: 0 0 0.85rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
}

.observation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.73rem;
}

.observation-meta > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.link-danger-button {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  font: inherit;
}

.data-panel-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-panel-intro h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.data-panel-intro p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

@media (max-width: 640px) {
  .collection-toolbar,
  .collection-toolbar-actions,
  .period-switcher,
  .data-panel-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .class-filter,
  .period-switcher .form-select,
  .collection-toolbar-actions .btn {
    width: 100%;
  }

  .student-card-actions {
    grid-template-columns: 1fr;
  }

  .student-card-actions a {
    justify-content: flex-start;
    padding-inline: 0.8rem;
  }

  .student-card-actions small {
    margin-left: auto;
  }

  .student-edit-form {
    flex-wrap: wrap;
  }

  .student-edit-form .form-control {
    flex-basis: 100%;
  }

  .student-modal-tabs {
    overflow-x: auto;
  }

  .student-modal-tabs a {
    white-space: nowrap;
  }

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

@media (max-width: 1200px) {
  .quick-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .sidebar {
    width: min(86vw, 300px);
    box-shadow: 18px 0 45px rgba(36, 25, 45, 0.14);
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
  }

  .topbar-actions {
    width: auto;
  }

  .sidebar-overlay {
    background: rgba(27, 20, 34, 0.48);
  }
}

@media (max-width: 900px) {
  .auth-page .login-wrap,
  .login-wrap,
  .auth-shell {
    width: min(720px, calc(100% - 1rem));
    grid-template-columns: minmax(0, 1fr);
  }

  .login-logo,
  .auth-hero {
    border-radius: 18px 18px 0 0;
  }

  .auth-card,
  .login-wrap .card-soft {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 18px 18px;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 0.75rem 0.75rem 5.5rem;
  }

  .topbar {
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding: 0.15rem 0 1rem;
  }

  .topbar-copy h1 {
    font-size: 1.55rem;
  }

  .topbar-copy p {
    font-size: 0.82rem;
  }

  .topbar-actions {
    gap: 0.35rem;
  }

  .topbar-actions .surface-icon-button {
    width: 38px;
    height: 38px;
  }

  .welcome-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.3rem;
  }

  .welcome-panel .btn {
    width: 100%;
  }

  .stat {
    min-height: 118px;
  }

  .quick-link-grid {
    grid-template-columns: 1fr;
  }

  .search-inline {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .quick-actions {
    left: auto;
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .quick-action-primary {
    flex: 0 0 auto;
  }

  .quick-action-label {
    display: none;
  }

  .auth-card .card-body,
  .login-wrap .card-body {
    padding: 1.35rem;
  }

  .auth-hero {
    min-height: 118px;
    padding: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-hero .auth-brand {
    margin: 0;
  }

  .auth-hero .auth-brand img {
    width: min(210px, 75vw);
  }

  .auth-hero .auth-eyebrow,
  .auth-hero .auth-copy,
  .auth-hero .auth-feature-list {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .topbar,
  .welcome-panel,
  .dashboard-stats > * {
    animation: clean-reveal 0.42s ease both;
  }

  .dashboard-stats > *:nth-child(2) {
    animation-delay: 0.06s;
  }

  .dashboard-stats > *:nth-child(3) {
    animation-delay: 0.12s;
  }
}

@keyframes clean-reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
