:root {
  --bg: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #0f172a;
  --card: #ffffff;
  --border: #e2e8f0;
  --soft: #eef2f7;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--card);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
}

.brand-mark:hover .brand-title {
  color: var(--primary);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

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

.brand-title {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.brand-tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 10px;
  transition: color var(--transition), background var(--transition);
}

nav a:hover {
  color: var(--primary);
  background: var(--soft);
}

nav a[aria-current="page"] {
  color: var(--primary);
  background: var(--soft);
}

.hero {
  background: linear-gradient(165deg, #f1f5f9 0%, #ffffff 45%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
}

.tag {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow);
}

.hero h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 20px 0 20px;
  color: var(--primary);
}

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 16px 24px;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow var(--transition), opacity var(--transition);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.btn-primary:hover {
  opacity: 0.95;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.btn-secondary:hover { background: var(--soft); }

.btn-danger-soft {
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-danger-soft:hover {
  background: #fef2f2;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card h3, .card h4 {
  margin-top: 0;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

section {
  padding: 80px 0;
}

.section-soft {
  background: var(--bg);
}

.page-intro {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(165deg, #f1f5f9 0%, #ffffff 100%);
}

.page-intro h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--primary);
}

.section-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--primary);
}

.section-text {
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.section-text a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-text a:hover {
  opacity: 0.85;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

ul.clean {
  padding-left: 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.highlight {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.04) 0%, transparent 100%);
  border-left: 4px solid var(--primary);
  padding: 18px 20px;
  border-radius: 12px;
  color: var(--text);
  margin-top: 20px;
  font-size: 0.95rem;
}

.notice-box {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-top: 24px;
}

.notice-box p {
  margin: 0;
  color: var(--text);
  max-width: none;
}

.notice-box p + p {
  margin-top: 12px;
}

.notice-success {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.notice-error {
  background: #fef2f2;
  border-color: #fecaca;
}

.course-list {
  display: grid;
  gap: 28px;
}

.course-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.course-compact-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.course-compact-card .course-image {
  aspect-ratio: 16 / 9;
}

.course-compact-content {
  display: grid;
  gap: 18px;
}

.course-compact-content h2 {
  margin: 0 0 8px;
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--primary);
}

.course-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.course-card-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
}

.course-card-body > div:only-child {
  grid-column: 1 / -1;
}

.course-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--soft);
}

.course-detail-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--soft);
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.status-pill--open {
  background: color-mix(in srgb, var(--primary) 12%, #fff);
  color: var(--primary);
}

.status-pill--pre {
  background: #fff7ed;
  color: #9a3412;
}

.status-pill--closed {
  background: #f1f5f9;
  color: #475569;
  margin-bottom: 0;
}

.page-intro .status-pill {
  margin-top: 8px;
}

.class-row .status-pill {
  margin-bottom: 0;
  white-space: nowrap;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.activity-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.activity-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--soft);
  border-bottom: 1px solid var(--border);
}

.activity-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activity-card-content {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.activity-card-content time,
.activity-date {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-card-content h2 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--primary);
}

.activity-card-content h2 a {
  color: inherit;
  text-decoration: none;
}

.activity-card-content h2 a:hover {
  text-decoration: underline;
}

.activity-detail {
  max-width: 820px;
}

.activity-article {
  padding: 28px;
}

.activity-detail-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--soft);
  margin-bottom: 24px;
}

.activity-body {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.activity-body > *:first-child {
  margin-top: 0;
}

.activity-body > *:last-child {
  margin-bottom: 0;
}

.activity-body p,
.activity-body ul,
.activity-body ol {
  margin: 0 0 1.1em;
}

.activity-body h2,
.activity-body h3 {
  font-family: 'Sora', sans-serif;
  color: var(--primary);
  margin: 1.4em 0 0.55em;
}

.activity-body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.projects-grid,
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-card,
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
}

.partner-logo {
  width: auto;
  max-width: 160px;
  max-height: 72px;
  object-fit: contain;
  margin-bottom: 4px;
}

.details-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.details-list div {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.details-list dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.details-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

.classes-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.classes-list h3 {
  margin: 0;
  font-size: 1rem;
}

.class-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--bg);
}

.class-row span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-small {
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
}

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

.form-stack label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 23, 42, 0.12);
  border-color: var(--primary);
}

button.btn {
  border: 0;
  cursor: pointer;
}

.activity-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.activity-cover-box {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: start;
}

.activity-cover-preview {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--soft);
  display: grid;
  place-items: center;
}

.activity-cover-preview.is-empty {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
  padding: 16px;
}

.activity-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activity-cover-actions {
  display: grid;
  gap: 12px;
  align-content: start;
}

.activity-file-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  width: fit-content;
}

.activity-file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.activity-remove-cover {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.activity-remove-cover input {
  width: auto;
}

.tox-tinymce {
  border-radius: 12px !important;
  border-color: var(--border) !important;
}

button.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.admin-shell {
  background: var(--bg);
  font-size: 0.92rem;
}

.admin-shell .section-title {
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.admin-shell .section-text {
  font-size: 0.9rem;
  margin: 0;
}

.admin-shell h1.section-title {
  font-size: 1.45rem;
}

.admin-shell h2.section-title {
  font-size: 1.1rem !important;
}

.admin-shell .container {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 28px !important;
  box-sizing: border-box;
}

.admin-shell .admin-table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse;
}

.admin-shell .admin-table tbody tr {
  display: table-row !important;
}

.admin-shell .admin-table tbody td {
  display: table-cell !important;
}

.admin-shell .card {
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: none;
}

.admin-shell .card.compact {
  padding: 10px 14px;
}

.admin-shell .btn {
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 0.85rem;
}

.admin-shell .btn-small {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.81rem;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea {
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.88rem;
}

.admin-shell textarea {
  min-height: 80px;
}

.admin-shell .form-stack {
  gap: 10px;
}

.admin-shell .form-grid {
  gap: 10px;
}

.admin-shell .notice-box {
  padding: 10px 13px;
  border-radius: 8px;
  margin-top: 10px;
}

.admin-shell .admin-table th,
.admin-shell .admin-table td {
  padding: 6px 10px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.admin-shell .admin-table th {
  padding-top: 8px;
  padding-bottom: 8px;
}

.admin-shell .admin-table.compact th,
.admin-shell .admin-table.compact td {
  padding: 4px 8px;
  font-size: 0.82rem;
}

.admin-shell .admin-card-metric {
  padding: 10px 14px;
}

.admin-shell .admin-card-metric strong {
  font-size: 1.35rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  padding: 14px 12px;
  background: #fff;
  border-right: 1px solid var(--border);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--primary);
}

.admin-brand span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.admin-brand strong {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
}

.admin-brand small,
.admin-sidebar-footer small {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-brand .brand-logo {
  width: 36px;
  height: 36px;
}

.admin-module-switcher {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.admin-module-switcher label {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-module-switcher select {
  width: 100%;
  padding: 7px 8px;
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-nav {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-nav-group {
  display: grid;
  gap: 2px;
}

.admin-nav-group p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-nav-group a,
.admin-nav-disabled {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}

.admin-nav-group a:hover {
  background: var(--soft);
  color: var(--primary);
}

.admin-nav-group a[aria-current="page"] {
  background: var(--primary);
  color: #fff;
}

.admin-nav-disabled {
  color: #94a3b8;
  cursor: default;
}

.admin-sidebar-footer {
  display: grid;
  gap: 1px;
  margin-top: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.admin-sidebar-footer span {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-sidebar-footer a {
  width: fit-content;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-main {
  min-width: 0;
  padding: 20px 0 40px;
}

.admin-content {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.admin-login-main {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 24px 0;
}

.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 4px;
}

.admin-eyebrow {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

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

.module-card {
  display: grid;
  gap: 6px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  transition: border-color var(--transition);
}

.module-card:hover {
  border-color: #cbd5e1;
  box-shadow: none;
  transform: none;
}

.module-card span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.module-card strong {
  font-family: 'Sora', sans-serif;
  color: var(--primary);
  font-size: 1rem;
}

.module-card small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.module-card-disabled {
  opacity: 0.72;
  background: var(--soft);
}

.module-card-disabled:hover {
  transform: none;
  box-shadow: none;
}

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

.module-mosaic-card {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  text-align: left;
}

.module-mosaic-eyebrow {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.module-mosaic-card strong {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  color: var(--primary);
}

.module-mosaic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.module-mosaic-card .btn {
  justify-self: start;
  margin-top: 4px;
}

.admin-hub-shell {
  min-height: 100vh;
  background: var(--bg, #f8fafc);
}

.admin-hub-topbar {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.admin-hub-topbar-inner {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-hub-user {
  display: grid;
  justify-items: end;
  gap: 0;
  font-size: 0.84rem;
}

.admin-hub-user small {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-hub-main {
  padding: 20px 0 40px;
}

.preview-banner {
  background: #0f172a;
  color: #fff;
  padding: 10px 0;
}

.preview-banner-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.preview-banner strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
}

.preview-banner span {
  opacity: 0.85;
  font-size: 0.84rem;
}

.permission-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 4px;
}

.permission-check-grid label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
}

.permission-check-grid input {
  width: auto;
  margin: 0;
}

.users-form {
  margin-top: 16px;
  display: grid;
  gap: 16px;
}

.users-form-head,
.users-list-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.users-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.users-form-grid label {
  display: grid;
  gap: 6px;
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.users-modules {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.users-modules-head {
  display: grid;
  gap: 2px;
}

.users-modules-head strong {
  font-size: 0.9rem;
  color: var(--primary);
}

.users-modules-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.users-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.users-list-card {
  margin-top: 16px;
}

.users-table td {
  vertical-align: top;
}

.users-table .is-editing {
  background: #f8fafc;
}

.users-email,
.users-modules-summary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.users-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.users-status.is-active {
  background: #ecfdf5;
  color: #047857;
}

.users-status.is-inactive {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-shell .activity-cover-box {
  gap: 12px;
}

.admin-shell .activity-cover-preview {
  border-radius: 10px;
}

.admin-shell .tox-tinymce {
  border-radius: 8px !important;
}

.oficio-editor-page .oficio-form-card {
  margin-top: 8px;
  padding: 22px;
}

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

.oficio-meta-grid--wide {
  grid-template-columns: 1fr;
}

.oficio-meta-grid label,
.oficio-meta-grid--wide label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.oficio-meta-grid input,
.oficio-meta-grid select,
.oficio-meta-grid textarea,
.oficio-meta-grid--wide input,
.oficio-meta-grid--wide textarea {
  width: 100%;
}

.oficio-body-panel {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.oficio-body-panel-head {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.oficio-body-panel-head strong {
  color: var(--primary);
  font-family: 'Sora', sans-serif;
}

.oficio-body-panel-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.oficio-body-panel .tox-tinymce {
  border: 0 !important;
  border-radius: 0 !important;
}

.oficio-form-actions {
  margin-top: 18px;
}

.oficio-bulk-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px 18px;
}

.oficio-bulk-bar .section-text {
  margin: 4px 0 0;
}

.oficio-bulk-actions {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.oficio-bulk-password {
  display: grid;
  gap: 6px;
  min-width: 220px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

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

  .oficio-bulk-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

.admin-filter-card {
  margin-top: 24px;
}

.email-body {
  white-space: normal;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 18px;
  margin-top: 18px;
}

.email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.email-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.email-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.email-chat-card {
  padding: 0;
  overflow: hidden;
}

.email-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.email-chat-header div {
  display: grid;
  gap: 4px;
}

.email-chat-header span,
.email-bubble-meta span,
.email-details dt {
  color: var(--muted);
  font-size: 0.84rem;
}

.email-thread {
  display: grid;
  gap: 16px;
  max-height: 560px;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg);
}

.email-bubble {
  width: min(78%, 720px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.email-bubble-sent {
  justify-self: end;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.email-bubble-received {
  justify-self: start;
}

.email-bubble-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.email-bubble-subject {
  margin: 0 0 8px;
  font-weight: 800;
  color: var(--primary);
}

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

.email-reply-box {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.email-reply-box label,
.email-reply-toolbar label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.email-reply-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
}

.email-side-card {
  position: sticky;
  top: 24px;
}

.email-details {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.email-details div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.email-details dd {
  margin: 4px 0 0;
  word-break: break-word;
  font-weight: 700;
}

.admin-card-metric strong {
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--primary);
}

.admin-card-metric span {
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-row-unread {
  background: #f8fbff;
}

.ticket-row-unread td:first-child {
  border-left: 4px solid var(--primary);
}

.ticket-code {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-meta {
  margin-bottom: 12px;
}

.list-meta .section-text {
  margin: 0;
}

.list-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.per-page-switch label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.per-page-switch select {
  min-width: 160px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.86rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination-ellipsis {
  color: var(--muted);
  font-weight: 700;
  padding: 0 2px;
}

.pagination-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

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

.footer-link-instagram {
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link-instagram:hover {
  color: #fff;
}

footer {
  background: var(--primary);
  color: #fff;
  padding: 64px 0;
  margin-top: auto;
}

footer h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
}

footer p, footer li {
  color: #cbd5e1;
  margin: 0 0 8px;
}

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

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

  .admin-nav {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-nav-group {
    min-width: 160px;
  }

  .admin-sidebar-footer {
    display: none;
  }

  .admin-content {
    width: min(100% - 32px, 1180px);
  }

  .hero-grid,
  .grid-2,
  .grid-3,
  .footer-grid,
  .email-chat-layout,
  .email-reply-toolbar,
  .course-compact-grid,
  .activity-grid,
  .course-card-body,
  .admin-grid,
  .module-grid,
  .module-mosaic,
  .form-grid,
  .users-form-grid,
  .permission-check-grid,
  .activity-cover-box {
    grid-template-columns: 1fr;
  }

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

  .hero-grid { padding: 56px 0; }

  .hero h2 {
    font-size: 2rem;
  }

  nav {
    gap: 6px;
  }

  .details-list {
    grid-template-columns: 1fr;
  }

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

  .admin-page-head {
    flex-direction: column;
  }

  .email-side-card {
    position: static;
  }

  .email-bubble {
    width: 100%;
  }
}

.candidate-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.candidate-metrics .admin-card-metric {
  margin: 0;
}

.candidate-card {
  margin-top: 18px;
}

.candidate-flag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.candidate-flag-warn {
  background: #fff4e5;
  color: #9a3412;
}

.candidate-flag-ok {
  background: #ecfdf3;
  color: #166534;
}

.candidate-table {
  min-width: 720px;
}

.candidate-row-conflict {
  background: #fff7ed;
}

.candidate-actions,
.candidate-docs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.candidate-inline-label,
.candidate-check {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.candidate-check {
  flex-direction: row;
  align-items: center;
  color: var(--text);
}

.candidate-doc-row,
.candidate-permanent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
}

.candidate-doc-row input[type="text"] {
  min-width: 160px;
}

.action-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

/* Academic Pipeline Stepper */
.academic-stepper {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.academic-stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.academic-stepper-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.academic-stepper-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 860px) {
  .academic-stepper-steps {
    grid-template-columns: 1fr;
  }
}

.academic-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.academic-step-item:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

.academic-step-item.is-active {
  background: #eef2ff;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

.academic-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.academic-step-item.is-active .academic-step-num {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
}

.academic-step-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.academic-step-text strong {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.2;
}

.academic-step-text small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
}

.academic-stepper-info {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Tabs */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 12px;
  padding-bottom: 0;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px 8px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-tab:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.02);
}

.admin-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
}

.admin-tab-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.admin-tab.is-active .admin-tab-badge {
  background: #e0e7ff;
  color: #4338ca;
}

/* Admin Modals */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.admin-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.admin-modal-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.admin-modal-backdrop.is-open .admin-modal-dialog {
  transform: translateY(0) scale(1);
}

.admin-modal-dialog.large {
  max-width: 820px;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}

.admin-modal-close:hover {
  color: var(--text);
  background: #e2e8f0;
}

.admin-modal-body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

/* Status Badges for Turmas */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status-planejada { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-status-inscricoes_abertas { background: #ecfdf5; color: #047857; }
.badge-status-em_andamento { background: #eff6ff; color: #1d4ed8; }
.badge-status-concluida { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }
.badge-status-cancelada { background: #fef2f2; color: #b91c1c; }

.badge-docs {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 5px;
  line-height: 1.35;
  white-space: normal;
}
.badge-docs-pendentes {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.badge-docs-parcial {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-docs-confirm-sent {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* ========================================================
   ACADÊMICO 2.0: SLIDE-OVER DRAWER, KEBAB & HIGH-DENSITY UI
   ======================================================== */

.table-hover-row tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.table-hover-row tbody tr:hover {
  background-color: #f1f5f9;
}
.table-hover-row tbody tr.is-selected {
  background-color: #e0e7ff;
}

.avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
}

.table-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.table-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  vertical-align: middle;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-action-icon:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-action-icon.btn-whatsapp-icon:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.kebab-dropdown {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.kebab-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.kebab-trigger:hover,
.kebab-dropdown.is-open .kebab-trigger {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
  min-width: 185px;
  z-index: 1050;
  display: none !important;
  flex-direction: column;
  padding: 5px 0;
  white-space: nowrap;
}

.kebab-dropdown.is-open > .kebab-menu {
  display: flex !important;
}

.kebab-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  color: #334155;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.12s ease, color 0.12s ease;
}

.kebab-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a;
}

.kebab-item.text-danger {
  color: #b91c1c;
}

.kebab-item.text-danger:hover {
  background: #fef2f2 !important;
}

.kebab-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Slide-over Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(1.5px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 580px;
  background: #fff;
  box-shadow: -8px 0 25px -5px rgba(0, 0, 0, 0.18);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.drawer-header-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.drawer-header-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.drawer-header-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.drawer-close:hover {
  background: #e2e8f0;
  color: var(--text);
}

.drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  overflow-x: auto;
}

.drawer-tab {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.drawer-tab:hover {
  color: var(--primary);
}

.drawer-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-tab-content {
  display: none;
}

.drawer-tab-content.is-active {
  display: block;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.progress-bar-sm {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-bar-fill.fill-warn {
  background: #f59e0b;
}

.progress-bar-fill.fill-danger {
  background: #ef4444;
}

@media (max-width: 500px) {
  section { padding: 56px 0; }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 1.05rem;
  }
}
