.portal-shell {
  min-height: 100vh;
  padding-top: 110px;
  padding-bottom: 60px;
}

.admin-portal-shell {
  padding-top: 32px;
}

.admin-site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid rgba(232, 198, 106, 0.2);
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(12px);
}

.admin-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-nav-brand {
  flex: 0 0 auto;
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: none;
}

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #e8dcc0;
  text-decoration: none;
  white-space: nowrap;
}

.admin-nav-link:hover,
.admin-nav-link[aria-current="page"] {
  border-color: rgba(232, 198, 106, 0.45);
  background: rgba(232, 198, 106, 0.12);
  color: var(--gold-light);
}

.admin-nav-logout {
  border-color: var(--border);
}

[hidden] {
  display: none !important;
}

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

.auth-wrap-wide {
  max-width: 900px;
}

.auth-panel {
  width: min(100%, 720px);
  box-shadow: var(--shadow);
}

.portal-grid {
  display: grid;
  gap: 20px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #0d0d0d;
  padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.panel:has(.data-table) {
  overflow-x: auto;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.kpi-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.kpi-label {
  color: var(--text-gray);
  font-size: 0.86rem;
}

.kpi-value {
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-top: 6px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 10px 8px;
}

.data-table th {
  color: var(--gold-light);
  font-weight: 600;
}

.data-table td {
  color: #ececec;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  background: rgba(232, 198, 106, 0.15);
  border: 1px solid rgba(232, 198, 106, 0.35);
  color: var(--gold-light);
}

.meet-link {
  color: var(--gold-light);
  word-break: break-all;
}

.portal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status {
  margin-top: 10px;
  font-size: 0.92rem;
  min-height: 1.2em;
}

.status.success {
  color: #91ffb3;
}

.status.error {
  color: #ff9898;
}

.section-stack {
  display: grid;
  gap: 16px;
}

.class-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.class-meta {
  color: var(--text-gray);
  font-size: 0.92rem;
}

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

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

.btn-sm {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.access-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.access-active {
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #91ffb3;
  background: rgba(52, 211, 153, 0.15);
}

.access-inactive {
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #ffb4b4;
  background: rgba(248, 113, 113, 0.12);
}

#assign-class-select {
  min-height: 180px;
}

@media (max-width: 840px) {
  .data-table {
    font-size: 0.9rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }
}

.dashboard-page {
  background: linear-gradient(180deg, #09090b 0%, #111111 40%, #050505 100%);
  color: #f5f0e6;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid rgba(232, 198, 106, 0.18);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
}

.dashboard-header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
}

.dashboard-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8e8b6;
}

.dashboard-sub {
  font-size: 0.82rem;
  color: #b7a88b;
}

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

.dash-tab {
  border: 1px solid rgba(232, 198, 106, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: #e7d6aa;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 180ms ease;
}

.dash-tab:hover,
.dash-tab.active {
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
  color: #121212;
  border-color: #f1d27b;
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #111111;
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 1.2rem;
}

.dashboard-shell {
  padding: 22px 0 44px;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
}

.dash-section {
  display: none;
}

.dash-section.active {
  display: grid;
  gap: 16px;
}

.dash-card {
  background: rgba(10, 10, 10, 0.94);
  border: 1px solid rgba(232, 198, 106, 0.16);
  border-radius: 12px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
  padding: 18px;
}

.dash-card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.dash-title {
  margin: 0;
  font-size: 1.24rem;
  color: #f8e8b6;
}

.dash-desc {
  margin: 6px 0 0;
  color: #b7a88b;
}

.table-tools input {
  border: 1px solid rgba(232, 198, 106, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 240px;
  background: #111111;
  color: #f5f0e6;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}

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

.dash-table th,
.dash-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(232, 198, 106, 0.12);
  text-align: left;
  color: #e8dcc0;
}

.dash-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #c7b07a;
  letter-spacing: 0.04em;
}

.table-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #b7a88b;
}

.pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-pending {
  display: inline-block;
  border: 1px dashed rgba(232, 198, 106, 0.35);
  background: rgba(232, 198, 106, 0.08);
  color: #e8dcc0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.feedback-ready {
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
  color: #111111;
  border: 1px solid #f1d27b;
}

.empty-state {
  text-align: center;
  border: 1px dashed rgba(232, 198, 106, 0.22);
  border-radius: 12px;
  padding: 24px 14px;
  margin-top: 14px;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0;
  color: #b7a88b;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

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

.details-grid .label {
  display: block;
  color: #c7b07a;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.form-field-inline {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.subscription-card {
  border: 1px solid rgba(232, 198, 106, 0.22);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(26, 20, 6, 0.96));
}

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

.subscription-head h3 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.78rem;
  border: 1px solid rgba(232, 198, 106, 0.28);
  color: #111111;
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
}

.status-pill.expired {
  border-color: rgba(248, 113, 113, 0.4);
  color: #ffe3e3;
  background: rgba(127, 29, 29, 0.85);
}

.feedback-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  z-index: 2000;
  padding: 14px;
}

.feedback-modal.open {
  display: grid;
}

.feedback-modal-card {
  width: min(620px, 100%);
  max-height: min(80vh, 700px);
  overflow-y: auto;
  background: #0b0b0b;
  border-radius: 14px;
  border: 1px solid rgba(232, 198, 106, 0.18);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 18px;
  position: relative;
}

.feedback-content {
  display: grid;
  gap: 12px;
}

.feedback-block {
  border: 1px solid rgba(232, 198, 106, 0.16);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.feedback-block h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #e8c66a;
}

.feedback-block p {
  margin: 0;
  color: #f5f0e6;
  white-space: pre-line;
}

.skeleton {
  display: inline-block;
  width: 100%;
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 45%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.dashboard-page.dark {
  background: radial-gradient(circle at 10% 10%, rgba(200, 155, 60, 0.18), transparent 30%), linear-gradient(180deg, #09090b 0%, #111111 42%, #050505 100%);
}

.dashboard-page.dark .dashboard-header {
  background: rgba(5, 5, 5, 0.95);
  border-color: rgba(232, 198, 106, 0.18);
}

.dashboard-page.dark .dashboard-date,
.dashboard-page.dark .dash-title,
.dashboard-page.dark .feedback-block p,
.dashboard-page.dark .details-grid span {
  color: #f5f0e6;
}

.dashboard-page.dark .dashboard-sub,
.dashboard-page.dark .dash-desc,
.dashboard-page.dark .label,
.dashboard-page.dark .table-footer,
.dashboard-page.dark .dash-table th,
.dashboard-page.dark .dash-table td,
.dashboard-page.dark .empty-state p {
  color: #b7a88b;
}

.dashboard-page.dark .dash-card,
.dashboard-page.dark .feedback-modal-card,
.dashboard-page.dark .feedback-block,
.dashboard-page.dark .empty-state {
  background: #0b0b0b;
  border-color: rgba(232, 198, 106, 0.16);
}

.dashboard-page.dark .table-tools input,
.dashboard-page.dark input,
.dashboard-page.dark select,
.dashboard-page.dark textarea {
  background: #111111;
  border-color: rgba(232, 198, 106, 0.2);
  color: #f5f0e6;
}

.dashboard-page.dark .status-pill {
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
  border-color: rgba(241, 210, 123, 0.4);
  color: #111111;
}

.dashboard-page.dark .btn-outline {
  border-color: rgba(232, 198, 106, 0.28);
  color: #f5f0e6;
  background: rgba(255, 255, 255, 0.02);
}

.dashboard-page.dark .btn-dark {
  border-color: rgba(232, 198, 106, 0.42);
  color: #f1d27b;
  background: rgba(200, 155, 60, 0.08);
}

.dashboard-page.dark .btn-primary {
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
  color: #111111;
  box-shadow: 0 12px 24px rgba(202, 138, 4, 0.32);
}

.dashboard-page.dark .dash-tab {
  background: rgba(255, 255, 255, 0.03);
  color: #e8dcc0;
  border-color: rgba(232, 198, 106, 0.18);
}

.dashboard-page.dark .dash-tab:hover,
.dashboard-page.dark .dash-tab.active {
  background: linear-gradient(135deg, #c89b3c, #f1d27b);
  color: #111111;
  border-color: #f1d27b;
}

@media (max-width: 980px) {
  .dashboard-header-inner {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .dashboard-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .dashboard-header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .table-tools,
  .table-tools input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .admin-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .admin-nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .admin-nav-link {
    min-height: 38px;
  }

  .portal-shell {
    padding-top: 92px;
    padding-bottom: 32px;
  }

  .admin-portal-shell {
    padding-top: 24px;
  }

  .panel {
    padding: 14px;
  }

  .portal-actions {
    gap: 10px;
  }

  .portal-actions .btn,
  .dashboard-header-actions .btn {
    width: 100%;
  }

  .form-field.two-col,
  .two-col {
    grid-template-columns: 1fr;
  }

  .dash-card-head {
    align-items: stretch;
  }

  .table-footer {
    align-items: stretch;
  }

  .pager {
    width: 100%;
    justify-content: space-between;
  }
}
