/* ==========================================================================
   GREAT KEZINO SCHOOLS — PORTAL & DASHBOARD SIMULATION STYLES
   ========================================================================== */

.portal-section {
  background: #081224;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

.portal-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 82, 168, 0.15) 0%, rgba(8, 18, 36, 0) 70%);
  pointer-events: none;
}

.portal-wrapper {
  background: #0d1b33;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Portal Window Header */
.portal-window-bar {
  background: #091326;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.portal-window-dots {
  display: flex;
  gap: 0.45rem;
}

.portal-window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.portal-window-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-400);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-window-title .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Portal Role Switcher */
.portal-role-bar {
  background: #112340;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.role-switcher-group {
  display: flex;
  gap: 0.5rem;
}

.role-btn {
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--slate-300);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.role-btn:hover, .role-btn.active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-950);
}

.user-badge-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.user-sub {
  font-size: 0.6875rem;
  color: var(--gold-300);
}

/* Portal Main App Layout */
.portal-app-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 520px;
}

/* Portal Sidebar */
.portal-sidebar {
  background: #0b182e;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.portal-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-400);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.portal-nav-btn svg {
  width: 18px;
  height: 18px;
  color: var(--slate-400);
}

.portal-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

.portal-nav-btn:hover svg {
  color: var(--gold-400);
}

.portal-nav-btn.active {
  background: rgba(217, 146, 22, 0.15);
  color: var(--gold-300);
  border: 1px solid rgba(217, 146, 22, 0.3);
}

.portal-nav-btn.active svg {
  color: var(--gold-400);
}

/* Portal Content Area */
.portal-screen {
  padding: 2rem;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.portal-screen.active {
  display: block;
}

.portal-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-screen-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
}

.portal-screen-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Overview Metric Cards */
.portal-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.portal-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.portal-stat-label {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.portal-stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
}

.portal-stat-trend {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #34d399;
  margin-top: 0.25rem;
}

/* Grades Table */
.portal-table-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.portal-table th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--slate-300);
  font-weight: 700;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-table td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--slate-200);
}

.grade-badge-a1 {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.grade-badge-b2 {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Fee Invoice Cards */
.fee-invoice-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.fee-info-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.2rem;
}

.fee-info-sub {
  font-size: 0.8125rem;
  color: var(--slate-400);
}

.fee-status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

/* Responsive Portal */
@media (max-width: 900px) {
  .portal-app-body {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .portal-nav-btn {
    white-space: nowrap;
  }

  .portal-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portal-metrics-row {
    grid-template-columns: 1fr;
  }
}
