/*---------------------------------------------------
  MSVM School App — Mobile theme (mParivahan-inspired)
----------------------------------------------------*/
:root {
  --sg-blue: #0b6ec7;
  --sg-blue-dark: #085a9f;
  --sg-blue-light: #3da3e8;
  --sg-hero-start: #e8f4fc;
  --sg-hero-mid: #b8dff9;
  --sg-hero-end: #7ec0f0;
  --sg-bg: #eef4fb;
  --sg-card: #ffffff;
  --sg-text: #1a2b42;
  --sg-muted: #5c6f86;
  --sg-border: #d8e6f5;
  --sg-radius: 16px;
  --sg-radius-lg: 22px;
  --sg-shadow: 0 8px 28px rgba(11, 110, 199, 0.12);
  --sg-toolbar-h: 68px;
  --sg-bottom-nav-h: 72px;
  --sg-font: "Poppins", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sg-font);
  background: var(--sg-bg);
  color: var(--sg-text);
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

body.sg-student-app {
  padding-bottom: calc(var(--sg-bottom-nav-h) + 28px + env(safe-area-inset-bottom, 0px));
}

/* Sub-pages: toolbar only, no large hero */
body.sg-subpage .sg-hero {
  display: none;
}

body.sg-subpage .sg-page-body,
body.sg-subpage .sg-content-wrap {
  margin-top: 0;
  padding-top: calc(var(--sg-toolbar-h) + env(safe-area-inset-top, 0px) + 14px);
  padding-bottom: calc(var(--sg-bottom-nav-h) + 16px);
  position: relative;
  z-index: 1;
}

body.sg-subpage .blog-details-area,
body.sg-subpage .blog-area,
body.sg-subpage .signin-area {
  padding-top: 0;
  padding-bottom: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
}

/* ---- Preloader (disabled) ---- */
.preloader {
  display: none !important;
}

/* ---- Overlay ---- */
.body-overlay {
  background: rgba(10, 40, 70, 0.45);
  z-index: 205;
}

/* ---- Student app header (toolbar + hero) ---- */
.sg-app-header {
  position: relative;
  z-index: 200;
  margin-bottom: 0;
  pointer-events: none;
}

.sg-app-header .sg-toolbar {
  pointer-events: auto;
}

.sg-app-header .header-area {
  display: none;
}

.sg-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background-color: #ffffff;
  box-shadow: 0 2px 12px rgba(11, 110, 199, 0.1);
  padding-top: env(safe-area-inset-top, 0px);
  isolation: isolate;
}

.sg-toolbar .container {
  padding-left: 10px;
  padding-right: 10px;
}

.sg-toolbar-inner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  column-gap: 6px;
  min-height: var(--sg-toolbar-h);
  padding: 6px 0;
}

.sg-toolbar-inner .menu-bar {
  grid-column: 1;
  justify-self: start;
}

.sg-toolbar-inner .sg-brand {
  grid-column: 2;
  justify-self: stretch;
}

.sg-toolbar-inner .sg-toolbar-actions {
  grid-column: 3;
  justify-self: end;
}

.sg-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--sg-blue);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.sg-icon-btn:active {
  background: #e8f3fc;
}

.sg-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
}

.sg-brand img {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.sg-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex: 1;
  line-height: 1.25;
  text-align: center;
}

.sg-brand-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sg-blue-dark);
  width: 100%;
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}

.sg-brand-sub {
  font-size: 9px;
  font-weight: 600;
  color: var(--sg-blue);
  margin-top: 2px;
  width: 100%;
  line-height: 1.2;
  word-break: break-word;
}

.sg-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.sg-notify-btn .sg-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  padding: 0 4px;
}

/* Hero welcome band — mParivahan-style light gradient + curved bottom */
.sg-hero {
  margin-top: calc(var(--sg-toolbar-h) + env(safe-area-inset-top, 0px));
  padding: 18px 0 58px;
  position: relative;
  z-index: 1;
  background: linear-gradient(
    180deg,
    var(--sg-hero-start) 0%,
    var(--sg-hero-mid) 42%,
    var(--sg-hero-end) 100%
  );
  border-radius: 0 0 52% 52% / 0 0 32px 32px;
}

.sg-hero .container {
  position: relative;
  z-index: 1;
}

.sg-hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sg-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(11, 110, 199, 0.15);
  flex-shrink: 0;
}

.sg-hero-info {
  flex: 1;
  min-width: 0;
}

.sg-hero-label {
  font-size: 13px;
  font-weight: 500;
  color: #1a2b42;
  display: block;
  opacity: 1;
}

.sg-hero-name {
  margin: 2px 0 4px;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  word-break: break-word;
  text-shadow: 0 1px 3px rgba(8, 90, 159, 0.2);
}

.sg-hero-meta {
  margin: 0;
  font-size: 12px;
  color: rgba(26, 43, 66, 0.65);
  opacity: 1;
}

.sg-status-online {
  width: 26px;
  height: 12px;
  border-radius: 3px;
  background: #39d353;
  border: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(57, 211, 83, 0.45);
  align-self: center;
}

/* ---- Main content area ---- */
.sg-page-body {
  margin-top: -32px;
  position: relative;
  z-index: 2;
  padding-bottom: calc(var(--sg-bottom-nav-h) + 12px);
}

body.sg-student-app .sg-page-body {
  padding-bottom: calc(var(--sg-bottom-nav-h) + 20px);
}

.sg-container,
.sg-app-header .container,
.sg-page-body .container {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 14px;
  padding-right: 14px;
}

/* Floating student ID card */
.sg-id-float {
  background: var(--sg-card);
  border-radius: var(--sg-radius-lg);
  box-shadow: 0 12px 32px rgba(11, 110, 199, 0.18);
  padding: 0;
  margin-bottom: 16px;
  border: 1px solid var(--sg-border);
  overflow: hidden;
  position: relative;
}

.sg-id-float.open {
  margin-bottom: 24px;
}

.sg-id-float:not(.open) .sg-id-float-header {
  border-bottom: 0;
}

.sg-id-float-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f8ff, #fff);
  border-bottom: 1px solid var(--sg-border);
}

.sg-id-float-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--sg-blue-dark);
}

.sg-id-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.25s ease, background 0.2s ease;
}

.sg-id-float.open .sg-id-toggle {
  transform: rotate(180deg);
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
}

.sg-id-panel {
  display: none;
  padding: 16px;
  background: #fff;
}

.sg-id-float.open .sg-id-panel {
  display: block;
}

.sg-id-float.open .sg-id-float-header {
  border-bottom: 1px solid var(--sg-border);
}

.sg-id-card-inner {
  text-align: center;
}

.sg-id-card-top {
  margin-bottom: 12px;
}

.sg-school-name {
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--sg-blue-dark);
  margin: 0 0 4px;
  line-height: 1.3;
}

.sg-school-place {
  text-align: center;
  color: var(--sg-blue);
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.sg-id-photo-wrap {
  margin: 12px auto 10px;
  width: 110px;
  height: 130px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--sg-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f5f8fc;
}

.sg-id-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-id-card-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: #ffebee;
  color: #c62828;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sg-id-details {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  border-top: 1px solid var(--sg-border);
}

.sg-id-details li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #eef4fb;
  font-size: 14px;
  line-height: 1.4;
}

.sg-id-details li:last-child {
  border-bottom: 0;
}

.sg-id-details li span {
  color: var(--sg-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 72px;
}

.sg-id-details li strong {
  color: var(--sg-text);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.sg-profile-table {
  width: 100%;
  border-collapse: collapse;
}

.sg-profile-table td {
  padding: 6px 4px;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
}

.sg-profile-table .sg-profile-photo {
  text-align: center;
  padding-bottom: 12px;
}

.sg-profile-table .sg-profile-photo img {
  width: 90px;
  height: auto;
  border-radius: 12px;
  border: 2px solid var(--sg-border);
}

.sg-school-name {
  text-align: center;
  font-weight: 700;
  color: var(--sg-blue-dark);
  margin: 0 0 4px;
}

.sg-school-place {
  text-align: center;
  color: var(--sg-blue);
  font-weight: 600;
  margin: 0 0 10px;
}

/* Quick ID chip */
.sg-id-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #e8f4fd, #d4ebfa);
  border-radius: var(--sg-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--sg-border);
}

.sg-id-chip-label {
  font-size: 13px;
  color: var(--sg-muted);
  margin: 0 0 2px;
}

.sg-id-chip-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--sg-blue-dark);
  margin: 0;
}

/* Section titles */
.sg-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sg-section-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--sg-text);
}

/* Service shortcuts row (like mParivahan icons) */
.sg-services-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.sg-service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-width: 58px;
  text-decoration: none;
  color: inherit;
}

.sg-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid var(--sg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sg-blue);
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(11, 110, 199, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sg-service-item:active .sg-service-icon {
  transform: scale(0.96);
}

.sg-service-item span {
  font-size: 10px;
  font-weight: 600;
  color: var(--sg-muted);
  line-height: 1.2;
}

/* Fee action cards grid */
.sg-fee-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.sg-fee-grid .sg-fee-full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: auto;
  padding: 10px 12px;
}

.sg-fee-grid .sg-fee-full .sg-fee-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.sg-fee-grid .sg-fee-full h6 {
  margin: 0;
}

.sg-fee-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 78px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid var(--sg-border);
  background-color: #fff;
  background-image:
    linear-gradient(125deg, rgba(11, 110, 199, 0.07) 1px, transparent 1px),
    linear-gradient(55deg, rgba(11, 110, 199, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(11, 110, 199, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 110, 199, 0.04) 1px, transparent 1px);
  background-size: 18px 18px, 22px 22px, 14px 14px, 14px 14px;
  background-position: 0 0, 4px 4px, 0 0, 0 0;
  box-shadow: 0 2px 10px rgba(11, 110, 199, 0.06);
  color: var(--sg-text) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sg-fee-card::before {
  content: "";
  position: absolute;
  top: -18px;
  right: -18px;
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(11, 110, 199, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.sg-fee-card::after {
  content: "";
  position: absolute;
  left: -12px;
  bottom: -8px;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11, 110, 199, 0.12), transparent);
  transform: rotate(-8deg);
  pointer-events: none;
}

.sg-fee-card:active {
  transform: scale(0.98);
}

.sg-fee-card .sg-fee-icon {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sg-blue-light), var(--sg-blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(11, 110, 199, 0.2);
}

.sg-fee-card h6 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--sg-text);
  line-height: 1.2;
}

.sg-fee-card p {
  display: none;
}

.sg-fee-card.sg-fee-highlight {
  border-color: var(--sg-blue);
  background-color: #f5faff;
  background-image:
    linear-gradient(125deg, rgba(11, 110, 199, 0.09) 1px, transparent 1px),
    linear-gradient(55deg, rgba(245, 124, 0, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(11, 110, 199, 0.05) 1px, transparent 1px);
  background-size: 16px 16px, 20px 20px, 12px 12px;
}

.sg-fee-card.sg-fee-highlight::before {
  border-color: rgba(245, 124, 0, 0.15);
}

.sg-fee-card.sg-fee-highlight .sg-fee-icon {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.25);
}

/* Fee payment charts — two separate panels */
.sg-chart-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.sg-fee-chart-panel {
  background: #fff;
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  padding: 12px 12px 10px;
}

.sg-fee-chart-head {
  margin-bottom: 2px;
}

.sg-fee-chart-head h3 {
  margin: 0;
  font-size: 15px;
}

.sg-fee-chart-total {
  font-size: 13px;
  font-weight: 700;
  color: var(--sg-blue-dark);
  white-space: nowrap;
}

.sg-fee-chart-sub {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--sg-muted);
}

.sg-fee-chart-wrap {
  position: relative;
  width: 100%;
  height: 150px;
}

.sg-fee-chart-wrap.sg-fee-chart-bar {
  height: 150px;
}

.sg-fee-chart-wrap.sg-fee-chart-donut {
  height: 160px;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
}

.sg-fee-chart-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sg-fee-chart-legend li {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--sg-muted);
  background: #f7fbff;
  border-radius: 8px;
  padding: 5px 6px;
}

.sg-fee-chart-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sg-fee-chart-label {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.sg-fee-chart-legend strong {
  font-size: 9px;
  color: var(--sg-text);
  white-space: nowrap;
}

@media (max-width: 380px) {
  .sg-fee-chart-wrap,
  .sg-fee-chart-wrap.sg-fee-chart-bar {
    height: 130px;
  }

  .sg-fee-chart-wrap.sg-fee-chart-donut {
    height: 140px;
    max-width: 200px;
  }

  .sg-fee-chart-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Payment summary cards */
.sg-payment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sg-payment-card {
  background: #fff;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
  box-shadow: 0 4px 14px rgba(11, 110, 199, 0.07);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sg-payment-card .sg-pay-info h6 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.sg-payment-card .sg-pay-info p {
  margin: 0;
  font-size: 12px;
  color: var(--sg-muted);
}

.sg-payment-card .sg-pay-amount {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--sg-blue-dark);
  line-height: 1.3;
}

.sg-payment-card .sg-pay-amount small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--sg-muted);
}

/* Alert / notice style cards */
.sg-alert-card {
  background: #f0f8ff;
  border-radius: var(--sg-radius);
  border: 1px solid #c5dff5;
  padding: 14px;
  margin-bottom: 16px;
}

.sg-alert-card h5 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--sg-blue-dark);
}

.sg-alert-card p {
  margin: 0;
  font-size: 13px;
  color: var(--sg-muted);
}

/* ---- Sidebar (left menu) ---- */
.ba-navbar.sg-sidebar {
  position: fixed;
  width: min(88vw, 320px);
  left: calc(-1 * min(88vw, 320px) - 12px);
  top: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 210;
  background: #fff;
  box-shadow: 4px 0 28px rgba(11, 110, 199, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: left 0.28s ease;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ba-navbar-show {
  left: 0 !important;
}

.sg-sidebar-header {
  position: relative;
  padding: 20px 16px 16px;
  background: linear-gradient(
    180deg,
    var(--sg-hero-start) 0%,
    var(--sg-hero-mid) 55%,
    var(--sg-hero-end) 100%
  );
  border-radius: 0 0 28px 28px;
}

.sg-sidebar-close {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sg-blue-dark);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.sg-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 36px;
  margin-bottom: 14px;
}

.sg-sidebar-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(11, 110, 199, 0.2);
  flex-shrink: 0;
}

.sg-sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-sidebar-user {
  min-width: 0;
}

.sg-sidebar-welcome {
  display: block;
  font-size: 12px;
  color: #1a2b42;
  margin-bottom: 2px;
}

.sg-sidebar-user h5 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(8, 90, 159, 0.2);
}

.sg-sidebar-user p {
  margin: 0;
  font-size: 11px;
  color: rgba(26, 43, 66, 0.75);
  line-height: 1.35;
}

.sg-sidebar-school {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.sg-sidebar-school strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--sg-blue-dark);
  line-height: 1.3;
}

.sg-sidebar-school span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--sg-blue);
  font-weight: 600;
}

.sg-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 12px 8px;
}

.sg-sidebar-nav-title {
  margin: 0 0 10px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--sg-muted);
}

.sg-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sg-sidebar-nav ul li {
  margin-bottom: 6px;
}

.sg-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--sg-text) !important;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sg-sidebar-link::before,
.sg-sidebar-link::after {
  display: none !important;
}

.sg-sidebar-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef6fd;
  color: var(--sg-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sg-sidebar-label {
  flex: 1;
  min-width: 0;
}

.sg-sidebar-arrow {
  font-size: 16px;
  color: #b0c4d8;
  flex-shrink: 0;
}

.sg-sidebar-link:hover,
.sg-sidebar-link:focus {
  background: #f3f9ff;
  border-color: var(--sg-border);
}

.sg-sidebar-link.active {
  background: linear-gradient(135deg, #e8f4fd, #f4f9ff);
  border-color: #c5dff5;
  color: var(--sg-blue-dark) !important;
}

.sg-sidebar-link.active .sg-sidebar-icon {
  background: var(--sg-blue);
  color: #fff;
}

.sg-sidebar-link.active .sg-sidebar-arrow {
  color: var(--sg-blue);
}

.sg-sidebar-footer {
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sg-border);
  background: #fff;
}

.sg-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  background: #ffebee;
  color: #c62828 !important;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #ffcdd2;
}

.sg-sidebar-logout i {
  font-size: 16px;
}

/* Legacy sidebar hooks (style.css overrides) */
.ba-navbar .ba-navbar-user,
.ba-navbar .ba-main-menu h5 {
  display: none;
}

.ba-main-menu ul li a {
  border-bottom: 0;
  padding: 0;
}

.ba-main-menu .btn-purple {
  display: none;
}


/* ---- Bottom navigation ---- */
.sg-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background-color: #ffffff;
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.12);
  border-top: 1px solid #e0e0e0;
  isolation: isolate;
}

.sg-bottom-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-bottom-nav li {
  flex: 1;
}

.sg-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  min-height: 52px;
  color: #000000;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sg-bottom-nav a i {
  font-size: 20px;
  color: #000000;
}

.sg-bottom-nav a p {
  margin: 0;
  line-height: 1.1;
  color: #000000;
}

/* Home icon & label — red */
.sg-bottom-nav a.sg-nav-home i,
.sg-bottom-nav a.sg-nav-home p,
.sg-bottom-nav a[href="home.php"] i,
.sg-bottom-nav a[href="home.php"] p {
  color: #e53935;
}

.sg-bottom-nav a:hover,
.sg-bottom-nav a:focus {
  background: #f5f5f5;
}

.sg-bottom-nav a.active {
  background: #eeeeee;
}

.sg-bottom-nav a.sg-nav-home.active i,
.sg-bottom-nav a.sg-nav-home.active p,
.sg-bottom-nav a[href="home.php"].active i,
.sg-bottom-nav a[href="home.php"].active p {
  color: #e53935;
}

/* Override old theme footer (fixed bar + inline items) */
.sg-bottom-nav.footer-area {
  margin-bottom: 0 !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
}

.sg-bottom-nav .footer-bottom {
  position: static !important;
  width: 100% !important;
  left: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sg-bottom-nav .footer-bottom ul {
  display: flex !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.sg-bottom-nav .footer-bottom ul li {
  display: block !important;
  flex: 1;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* ---- Forms & login ---- */
body.sg-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(160deg, var(--sg-hero-start), var(--sg-blue-dark));
}

.sg-login-shell,
.login-shell {
  width: 100%;
  max-width: 400px;
}

.sg-login-card,
.login-card {
  background: #fff;
  border-radius: var(--sg-radius-lg);
  box-shadow: 0 20px 50px rgba(8, 50, 90, 0.25);
  padding: 28px 22px;
  overflow: hidden;
}

.sg-login-title {
  text-align: center;
  color: var(--sg-blue-dark);
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.sg-login-card .input-box,
.signin-area .single-input-wrap input,
.signin-area .single-input-wrap select,
.contact-form-inner input,
.contact-form-inner select {
  width: 100%;
  min-height: 44px;
  font-size: 13px;
  border: 1.5px solid var(--sg-border);
  border-radius: 12px;
  padding: 8px 12px 8px 38px;
  background: #f8fbff;
}

.sg-login-btn,
.btn-purple,
.signin-area .btn-purple {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sg-blue-light), var(--sg-blue-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  margin-top: 6px;
}

/* ---- Tables ---- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--sg-radius);
  background: #fff;
  border: 1px solid var(--sg-border);
}

.payment-table-card,
.ba-all-page-inner {
  border-radius: var(--sg-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sg-border);
  box-shadow: var(--sg-shadow);
}

.payment-table thead th,
.table.uikit-table-1 thead th {
  background: linear-gradient(135deg, var(--sg-blue), var(--sg-blue-dark));
  color: #fff;
  font-size: 11px;
  padding: 12px 10px;
  border: 0;
  white-space: nowrap;
}

.payment-table tbody td,
.table.uikit-table-1 tbody td {
  font-size: 13px;
  padding: 11px 10px;
  border-color: var(--sg-border);
}

.payment-title {
  display: inline-block;
  background: var(--sg-blue);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---- Mark details page ---- */
.sg-mark-card {
  margin-bottom: 16px;
}

.sg-mark-table thead th:nth-child(2),
.sg-mark-table thead th:nth-child(3),
.sg-mark-table tbody td:nth-child(2),
.sg-mark-table tbody td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

.sg-mark-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sg-mark-summary-item {
  background: #fff;
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sg-mark-summary-item span {
  font-size: 12px;
  color: var(--sg-muted);
  font-weight: 500;
}

.sg-mark-summary-item strong {
  font-size: 18px;
  color: var(--sg-blue-dark);
  line-height: 1.2;
}

.sg-mark-summary-item.sg-mark-grade strong {
  color: #c62828;
  font-size: 22px;
}

.sg-grade-guide {
  background: #fff;
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  padding: 14px;
  margin-bottom: 16px;
}

.sg-grade-guide h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--sg-blue-dark);
}

.sg-grade-table thead th {
  background: #e8f3fc;
  color: var(--sg-blue-dark);
  font-size: 11px;
  padding: 10px 8px;
  border: 0;
  text-align: center;
}

.sg-grade-table tbody td {
  font-size: 12px;
  padding: 10px 8px;
  text-align: center;
  border-color: var(--sg-border);
}

.sg-mark-empty {
  background: #fff;
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  box-shadow: var(--sg-shadow);
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.sg-mark-empty p {
  margin: 0 0 14px;
  color: var(--sg-muted);
}

.sg-mark-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.sg-mark-back-btn {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sg-blue-light), var(--sg-blue-dark));
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
}

.sg-mark-back-btn.sg-mark-back-secondary {
  background: #fff;
  color: var(--sg-blue) !important;
  border: 1.5px solid var(--sg-border);
}

.sg-mark-charts {
  margin-bottom: 14px;
}

.sg-mark-charts .sg-fee-chart-wrap.sg-mark-chart-bar,
.sg-mark-charts .sg-fee-chart-wrap.sg-mark-chart-percent {
  height: 170px;
}

@media (max-width: 380px) {
  .sg-mark-charts .sg-fee-chart-wrap.sg-mark-chart-bar,
  .sg-mark-charts .sg-fee-chart-wrap.sg-mark-chart-percent {
    height: 150px;
  }
}

/* ---- Notice page ---- */
.notice-board {
  background: #fff;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
  box-shadow: var(--sg-shadow);
  padding: 16px;
}

.notice-item {
  background: #f0f8ff;
  border-left: 4px solid var(--sg-blue);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

/* ---- Public pages header ---- */
.sg-public-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: #fff;
  box-shadow: 0 2px 12px rgba(11, 110, 199, 0.1);
  padding: 10px 0;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

body.sg-public-page {
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--sg-bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}

.sg-public-header .sg-public-title {
  margin: 0;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 700;
  color: var(--sg-blue-dark);
  line-height: 1.3;
  text-align: right;
}

.sg-public-header .sg-public-title span {
  display: block;
  color: #e6a800;
  font-size: 0.92em;
}

.sg-public-header img {
  height: 40px;
  width: auto;
}

/* ---- Gallery ---- */
.single-blog .thumb img {
  border-radius: var(--sg-radius);
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Inner student pages */
.sg-page-body.sg-inner-page {
  margin-top: -32px;
  padding-top: 0;
  padding-bottom: calc(var(--sg-bottom-nav-h) + 16px);
}

body.sg-subpage .sg-page-body.sg-inner-page {
  margin-top: 0;
  padding-top: calc(var(--sg-toolbar-h) + env(safe-area-inset-top, 0px) + 14px);
  padding-bottom: calc(var(--sg-bottom-nav-h) + 16px);
}

.sg-page-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--sg-blue-dark);
}

body.sg-student-app .signin-area {
  padding: 0;
  margin: 0;
}

body.sg-student-app .signin-area .container {
  padding-left: 0;
  padding-right: 0;
}

body.sg-student-app .contact-form-inner {
  background: var(--sg-card);
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
  box-shadow: var(--sg-shadow);
  padding: 20px 16px;
  margin-bottom: 16px;
}

body.sg-student-app .contact-form-inner .btn {
  width: 100%;
  height: auto;
  min-height: 48px;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: 12px;
  margin-top: 16px;
}

body.sg-student-app .contact-form-inner .forgot-btn {
  display: block;
  text-align: center;
  margin-top: 14px;
  color: var(--sg-blue);
  font-weight: 600;
}

body.sg-student-app .single-input-wrap input,
body.sg-student-app .single-input-wrap select {
  border-radius: 12px;
  border: 1.5px solid var(--sg-border);
  min-height: 48px;
  font-size: 16px;
  padding: 10px 14px;
}

body.sg-student-app .page-title {
  display: none !important;
}

body.sg-student-app .balance-area {
  display: none !important;
}

body.sg-student-app .add-balance-inner-wrap {
  display: none !important;
}

body.sg-student-app .mg-top-50,
body.sg-student-app .mg-top-40,
body.sg-student-app .mg-top-30,
body.sg-student-app .mg-bottom-40 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.sg-student-app .goal-area .single-goal {
  display: none !important;
}

body.sg-public-page .ba-bill-pay-inner {
  background: var(--sg-card);
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
  box-shadow: var(--sg-shadow);
  padding: 16px;
  margin-bottom: 12px;
}

body.sg-public-page .ba-single-bill-pay {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

body.sg-public-page .ba-single-bill-pay .details h5 {
  margin: 0 0 10px;
  color: var(--sg-blue-dark);
}

body.sg-public-page .ba-single-bill-pay .details p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

body.sg-public-page .transaction-area,
body.sg-public-page .signin-area {
  margin-top: 0 !important;
  padding-top: 12px;
  padding-bottom: 12px;
}

body.sg-login-page .login-shell {
  width: 100%;
}

body.sg-login-page .login-card {
  border-radius: var(--sg-radius-lg);
}

.back-to-top {
  bottom: calc(var(--sg-bottom-nav-h) + 12px);
  background: var(--sg-blue);
}

/* ---- Responsive breakpoints ---- */
@media (max-width: 400px) {
  .sg-toolbar-inner {
    column-gap: 4px;
  }

  .sg-brand {
    gap: 4px;
  }

  .sg-brand img {
    display: block;
    height: 26px;
    width: auto;
    flex-shrink: 0;
  }

  .sg-brand-text {
    align-items: flex-start;
    text-align: left;
  }

  .sg-brand-title {
    font-size: 9px;
    line-height: 1.2;
    word-break: break-word;
  }

  .sg-brand-sub {
    font-size: 8px;
    margin-top: 1px;
  }
}

@media (min-width: 401px) and (max-width: 480px) {
  .sg-brand img {
    height: 28px;
  }

  .sg-brand-title {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .sg-services-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .sg-fee-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .sg-fee-card {
    min-height: 72px;
    padding: 8px 4px;
  }

  .sg-fee-card .sg-fee-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-bottom: 5px;
  }

  .sg-fee-card h6 {
    font-size: 10px;
  }

  .sg-bottom-nav a {
    font-size: 9px;
  }

  .sg-bottom-nav a i {
    font-size: 18px;
  }
}

@media (min-width: 768px) {
  .sg-brand-title {
    font-size: 14px;
  }

  .sg-brand-sub {
    font-size: 11px;
  }

  .sg-brand img {
    height: 36px;
  }

  .sg-container,
  .sg-app-header .container,
  .sg-page-body .container {
    max-width: 480px;
  }

  .sg-fee-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .sg-fee-card {
    min-height: 84px;
  }
}
