/* STREAMING_CHUNK:Setting global variables and reset rules... */

* {
box-sizing: border-box;
}

:root {
--bg: #f5f7fb;
--card: #ffffff;
--text: #172033;
--muted: #718096;
--line: #e5e9f1;
--accent: #4f46e5;
--accent2: #7c3aed;
--good: #16a34a;
--danger: #b42318;
--shadow: 0 14px 40px rgba(20, 30, 55, 0.07);
}

html {
scroll-behavior: smooth;
}

body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: Tahoma, Arial, sans-serif;
min-height: 100vh;
}

/* STREAMING_CHUNK:Styling main layout containers and topbar... */
.container {
max-width: 1180px;
margin: auto;
padding: 22px 18px 48px;
}

a {
color: inherit;
}

.topbar {
position: sticky;
top: 0;
z-index: 20;
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: 22px;
padding: 12px 0 18px;
background: linear-gradient(var(--bg) 82%, transparent);
backdrop-filter: blur(6px);
}

.brand {
text-decoration: none;
display: flex;
align-items: center;
gap: 10px;
}

.brand-mark {
width: 42px;
height: 42px;
display: grid;
place-items: center;
background: #ffffff;
border: 1px solid var(--line);
border-radius: 13px;
box-shadow: var(--shadow);
}

.brand b {
display: block;
font-size: 15px;
}

.brand small {
display: block;
color: var(--muted);
margin-top: 3px;
}

.brand-logo-img {
height: 40px;
max-width: 90px;
object-fit: contain;
border-radius: 8px;
background: #ffffff;
padding: 2px 5px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
border: 1px solid rgba(0, 0, 0, 0.06);
}

.user-badge {
display: inline-block;
max-width: 110px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 700;
vertical-align: middle;
color: var(--text);
margin-left: 4px;
}

/* STREAMING_CHUNK:Styling navigation and interactive buttons... */
.nav {
display: flex;
justify-content: center;
align-items: center;
gap: 4px;
flex-wrap: nowrap;
}

.nav a {
padding: 7px 11px;
border-radius: 10px;
text-decoration: none;
color: var(--muted);
font-size: 13px;
font-weight: 600;
white-space: nowrap;
transition: all 0.2s ease;
}

.nav a:hover,
.nav a.active {
background: #ffffff;
color: var(--accent);
box-shadow: 0 5px 18px rgba(30, 40, 70, 0.06);
}

.top-actions {
display: flex;
gap: 7px;
}

.icon-btn {
min-width: 42px;
padding: 9px;
}

.button,
button,
select,
input {
font: inherit;
}

.button,
button {
display: inline-flex;
justify-content: center;
align-items: center;
border: 1px solid var(--line);
background: #ffffff;
color: var(--text);
border-radius: 11px;
padding: 10px 14px;
text-decoration: none;
cursor: pointer;
transition: border-color 0.18s, background-color 0.18s;
}

.button:hover,
button:hover {
border-color: #c6c9ff;
}

.button:not(.secondary),
button:not(.secondary) {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
}

.secondary {
background: #f8f9fc !important;
color: var(--text) !important;
}

/* STREAMING_CHUNK:Styling page headings and card wrappers... */
.page-heading {
margin: 16px 0 22px;
}

.eyebrow {
color: var(--accent);
font-size: 12px;
font-weight: 800;
}

.page-heading h1 {
margin: 7px 0 4px;
font-size: clamp(26px, 4vw, 38px);
}

.page-heading p,
.muted {
color: var(--muted);
}

.card,
.subject-card,
.stage-card,
.channel,
.exam-card,
.day-block {
background: var(--card);
border: 1px solid var(--line);
border-radius: 18px;
box-shadow: var(--shadow);
}

.card {
padding: 21px;
}

.hero-grid {
display: grid;
grid-template-columns: 1.05fr 0.95fr;
gap: 18px;
}

.card-kicker {
font-size: 13px;
color: var(--muted);
font-weight: 700;
}

/* STREAMING_CHUNK:Styling progress bars and metrics... */
.overall-value {
font-size: 52px;
font-weight: 900;
color: var(--accent);
margin: 8px 0;
}

.progress {
height: 11px;
background: #edf0f5;
border-radius: 999px;
overflow: hidden;
margin: 14px 0;
}

.progress span {
display: block;
height: 100%;
background: linear-gradient(90deg, var(--accent), var(--accent2));
border-radius: inherit;
transition: width 0.5s ease;
}

.stats-row {
display: flex;
gap: 28px;
margin-top: 17px;
}

.stats-row div {
display: grid;
gap: 3px;
}

.stats-row b {
font-size: 20px;
}

.stats-row span {
font-size: 12px;
color: var(--muted);
}

.exam-hero h2 {
margin: 9px 0 4px;
}

.countdown-big {
font-size: 22px;
font-weight: 900;
color: var(--accent);
margin: 22px 0;
}

/* STREAMING_CHUNK:Styling subjects grid and stage progress cards... */
.section-block {
margin-top: 30px;
}

.section-title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
margin-bottom: 13px;
}

.section-title h2 {
margin: 0 0 4px;
font-size: 20px;
}

.section-title p {
margin: 0;
color: var(--muted);
font-size: 13px;
}

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

.subject-grid.large {
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}

.subject-card {
padding: 18px;
text-decoration: none;
display: block;
transition: transform 0.18s, border-color 0.18s;
}

.subject-card:hover {
transform: translateY(-2px);
border-color: #c9c8ff;
}

.subject-card-head {
display: flex;
justify-content: space-between;
gap: 10px;
align-items: center;
}

.subject-card-head span {
font-weight: 800;
}

.subject-card-head strong {
font-size: 22px;
color: var(--accent);
}

.subject-card small {
color: var(--muted);
}

.mini-progress {
height: 7px;
}

.subject-meta {
display: flex;
justify-content: space-between;
color: var(--muted);
font-size: 12px;
}

.tiny-stages {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 7px;
margin-top: 15px;
}

.tiny-stages span {
padding: 8px;
background: #f8f9fc;
border-radius: 9px;
font-size: 11px;
color: var(--muted);
}

.tiny-stages b {
color: var(--text);
}

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

.stage-card {
padding: 15px;
}

.stage-card strong {
display: block;
color: var(--accent);
font-size: 25px;
}

.stage-card b {
display: block;
margin: 5px 0;
}

.stage-card span {
display: block;
color: var(--muted);
font-size: 12px;
}

.stage-card .progress {
height: 7px;
margin-bottom: 0;
}

.compact-stages {
margin-bottom: 18px;
}

/* STREAMING_CHUNK:Styling lessons, units navigation, and checklists... */
.subject-summary {
display: grid;
grid-template-columns: 180px 1fr;
gap: 22px;
align-items: center;
margin-bottom: 15px;
}

.summary-percent {
display: block;
font-size: 38px;
color: var(--accent);
margin-top: 5px;
}

.summary-progress small {
color: var(--muted);
}

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

.unit-toolbar {
display: grid;
grid-template-columns: 1fr 1.5fr 1fr;
gap: 10px;
align-items: center;
margin-top: 18px;
}

.unit-current {
text-align: center;
display: grid;
gap: 4px;
}

.unit-current span {
font-size: 12px;
color: var(--muted);
}

.unit-current strong {
font-size: 20px;
}

.unit-progress-head {
display: flex;
justify-content: space-between;
color: var(--muted);
font-size: 13px;
margin-top: 18px;
}

.unit-progress-head strong {
color: var(--accent);
}

.unit-progress-head + .progress {
height: 8px;
}

.lessons {
display: grid;
gap: 10px;
}

.lesson-row {
display: flex;
justify-content: space-between;
gap: 18px;
align-items: center;
border: 1px solid var(--line);
border-radius: 14px;
padding: 14px;
}

.lesson-info strong {
display: block;
}

.lesson-info p {
margin: 5px 0 0;
color: var(--muted);
font-size: 12px;
}

.checks {
display: flex;
flex-wrap: wrap;
gap: 6px;
justify-content: flex-end;
}

.checks label {
font-size: 11px;
border: 1px solid var(--line);
border-radius: 9px;
padding: 7px 8px;
background: #fafbfe;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
}

.checks input {
accent-color: var(--accent);
}

/* STREAMING_CHUNK:Styling educational channels and forms... */
.channels {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}

.channels.large {
grid-template-columns: repeat(3, 1fr);
}

.channel {
padding: 16px;
}

.channel h3 {
margin: 9px 0;
}

.channel a,
.source-note {
display: block;
text-decoration: none;
background: #f5f6fb;
border-radius: 9px;
padding: 8px 10px;
margin-top: 7px;
font-size: 12px;
}

.channel p {
font-size: 12px;
color: var(--muted);
margin: 10px 0 0;
}

.tag {
display: inline-block;
color: var(--accent);
background: #f0efff;
padding: 5px 8px;
border-radius: 999px;
font-size: 11px;
}

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

.form-grid.six {
grid-template-columns: repeat(3, 1fr);
}

input,
select {
width: 100%;
border: 1px solid var(--line);
background: #ffffff;
color: var(--text);
border-radius: 11px;
padding: 11px 12px;
outline: none;
transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
border-color: #aaa8ff;
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

/* STREAMING_CHUNK:Styling daily schedule and exam cards... */
.days {
display: grid;
gap: 13px;
}

.day-block {
padding: 16px;
}

.day-block.today {
border-color: #c7c5ff;
}

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

.day-head h3 {
margin: 0;
}

.day-head span {
font-size: 12px;
color: var(--muted);
}

.task-row {
display: flex;
justify-content: space-between;
gap: 12px;
align-items: center;
border-top: 1px solid var(--line);
padding: 11px 0;
}

.task-row label {
display: flex;
gap: 9px;
align-items: center;
cursor: pointer;
}

.task-row input {
width: auto;
accent-color: var(--accent);
}

.task-row small {
color: var(--muted);
}

.danger-link {
border: 0 !important;
background: none !important;
color: var(--danger) !important;
padding: 5px !important;
font-size: 12px;
cursor: pointer;
}

.exam-list {
display: grid;
gap: 12px;
}

.exam-card {
display: grid;
grid-template-columns: 1fr auto auto;
align-items: center;
gap: 20px;
padding: 17px;
}

.exam-card h3 {
margin: 8px 0 4px;
}

.exam-card p {
color: var(--muted);
font-size: 12px;
}

.exam-count {
font-weight: 900;
color: var(--accent);
white-space: nowrap;
}

.empty {
padding: 28px;
text-align: center;
color: var(--muted);
border: 1px dashed var(--line);
border-radius: 14px;
background: #fafbfe;
}

.compact {
padding: 18px;
}

.error {
background: #fff0f0;
border: 1px solid #ffcaca;
color: #a33;
padding: 14px;
border-radius: 13px;
margin: 18px 0;
}

.hidden {
display: none !important;
}

footer, .site-footer {
  text-align: center;
  padding: 25px 20px;
  font-size: 0.9em;
  background: linear-gradient(135deg, #f0f7ff, #e6f0fa);
  color: #333;
  margin-top: 50px;
  border-top: 2px solid #cce0ff;
  border-radius: 14px;
}

.site-footer .site-title {
  color: #4285F4;
  font-size: 1.1em;
}

.site-footer .site-copy {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
}

.site-footer .social-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.site-footer .social-links svg {
  fill: #333;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-footer .social-links a:hover svg {
  transform: translateY(-2px);
  opacity: 0.85;
}

/* STREAMING_CHUNK:Styling annual study activity calendar components... */
.weekly-activity {
margin-top: 18px;
padding: 22px;
}

.activity-heading {
align-items: flex-start;
}

.current-week-badge {
font-size: 12px;
padding: 8px 11px;
border-radius: 999px;
background: #f0efff;
color: var(--accent);
white-space: nowrap;
}

.activity-summary {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
margin: 18px 0;
}

.activity-summary div {
border: 1px solid var(--line);
border-radius: 12px;
padding: 12px;
background: #fafbfe;
}

.activity-summary strong {
display: block;
font-size: 20px;
color: var(--text);
}

.activity-summary span {
display: block;
margin-top: 3px;
font-size: 11px;
color: var(--muted);
}

.activity-scroll {
overflow-x: auto;
padding: 14px 2px 10px;
scrollbar-width: thin;
}

.activity-calendar {
min-width: max-content;
}

/* STREAMING_CHUNK:Styling activity months labels and alignment... */
.activity-months-wrap {
display: grid;
grid-template-columns: 52px auto;
gap: 10px;
align-items: end;
margin-bottom: 6px;
}

.activity-weekday-spacer {
width: 52px;
}

.activity-months {
display: grid;
grid-template-columns: repeat(53, 14px);
column-gap: 4px;
height: 22px;
align-items: center;
position: relative;
}

.activity-month-label {
font-size: 11px;
font-weight: 700;
color: var(--muted);
white-space: nowrap;
overflow: visible;
text-overflow: clip;
text-align: start;
padding: 0 1px;
}

/* STREAMING_CHUNK:Styling 5-day study activity board and cells... */
.activity-board {
display: grid;
grid-template-columns: 52px auto;
gap: 10px;
align-items: start;
}

/* 5 صفوف مخصصة لأيام الأحد إلى الخميس مع تطابق الارتفاع التام */
.activity-weekdays {
display: grid;
grid-template-rows: repeat(7, 14px);
row-gap: 4px;
height: auto;
min-height: 122px;
align-items: center;
}

.activity-weekdays span {
font-size: 11px;
color: var(--muted);
text-align: right;
padding-left: 2px;
line-height: 14px;
font-weight: 600;
}

.activity-grid {
display: grid;
grid-template-rows: repeat(7, 14px);
grid-auto-flow: column;
grid-auto-columns: 14px;
column-gap: 4px;
row-gap: 4px;
min-width: max-content;
}

.activity-cell {
width: 14px;
height: 14px;
min-width: 14px;
padding: 0;
border: 1px solid rgba(27, 31, 36, 0.08) !important;
border-radius: 3px;
background: #ebedf0 !important;
box-shadow: none !important;
cursor: pointer;
transition: transform 0.12s ease;
}

.activity-cell:hover {
transform: scale(1.18);
z-index: 2;
}

.activity-cell.activity-0 {
background: #ebedf0 !important;
}

.activity-cell.activity-1 {
background: #c6e48b !important;
}

.activity-cell.activity-2 {
background: #7bc96f !important;
}

.activity-cell.activity-3 {
background: #4caf50 !important;
}

.activity-cell.activity-4 {
background: #239a3b !important;
}

.activity-cell.activity-5 {
background: #196127 !important;
}

.activity-cell.is-current-week {
outline: 2px solid var(--accent);
outline-offset: 1px;
}

/* STREAMING_CHUNK:Styling activity legend and details preview... */
.activity-legend {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 5px;
margin-top: 14px;
color: var(--muted);
font-size: 11px;
}

.activity-legend .activity-cell {
display: inline-block;
cursor: default;
}

.activity-details {
min-height: 24px;
margin-top: 12px;
}

.activity-details > div {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
border-radius: 10px;
background: #fafbfe;
border: 1px solid var(--line);
color: var(--muted);
font-size: 12px;
}

.activity-details b {
color: var(--text);
}

.activity-details strong {
margin-right: auto;
color: var(--accent);
font-size: 13px;
}

/* STREAMING_CHUNK:Configuring responsive media queries... */
@media (max-width: 950px) {
.topbar {
grid-template-columns: auto 1fr auto;
gap: 12px;
}
.hero-grid,
.subject-summary {
grid-template-columns: 1fr;
}
.subject-grid {
grid-template-columns: repeat(2, 1fr);
}
.stage-grid {
grid-template-columns: repeat(3, 1fr);
}
.channels,
.channels.large {
grid-template-columns: repeat(2, 1fr);
}
.form-grid,
.form-grid.six {
grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 768px) {
.container {
padding: 10px 12px 35px;
padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
}

.topbar {
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
position: sticky !important;
top: 0 !important;
z-index: 100 !important;
padding: 8px 0 !important;
gap: 6px !important;
background: var(--bg) !important;
backdrop-filter: blur(14px) !important;
-webkit-backdrop-filter: blur(14px) !important;
}

/* Completely hide the header nav links on mobile to rely entirely on the bottom navigation bar */
.topbar .nav {
display: none !important;
}

.brand {
padding-left: 0 !important;
display: flex !important;
align-items: center !important;
gap: 6px !important;
flex-shrink: 0 !important;
}

.brand .brand-logo-img {
height: 34px !important;
max-width: 70px !important;
padding: 2px 3px !important;
}

.brand-text small {
display: none !important;
}

.brand-text b {
font-size: 14px !important;
white-space: nowrap !important;
}

.top-actions {
position: static !important;
display: flex !important;
align-items: center !important;
gap: 4px !important;
flex-shrink: 1 !important;
flex-wrap: nowrap !important;
}

.top-actions .conn-badge {
display: none !important;
}

.user-badge {
max-width: 65px !important;
font-size: 11px !important;
}

.topbar-pomo {
padding: 3px 6px !important;
font-size: 11px !important;
}

.theme-toggle-btn,
.top-actions .icon-btn {
min-width: 30px !important;
width: 30px !important;
height: 30px !important;
padding: 0 !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
font-size: 12px !important;
}

.top-actions button.secondary,
.top-actions #logout {
padding: 4px 8px !important;
font-size: 11px !important;
min-height: 30px !important;
margin: 0 !important;
}

.hero-grid,
.subject-grid,
.subject-grid.large,
.channels,
.channels.large,
.stage-grid {
grid-template-columns: 1fr;
}

.stats-row {
justify-content: space-between;
gap: 8px;
}

.section-title {
align-items: flex-start;
flex-direction: column;
}
.form-grid,
.form-grid.six {
grid-template-columns: 1fr;
}
.lesson-row {
align-items: flex-start;
flex-direction: column;
}
.checks {
justify-content: flex-start;
}
.unit-toolbar {
grid-template-columns: 1fr 1fr;
}
.unit-current {
grid-column: 1 / -1;
grid-row: 1;
}
.exam-card {
grid-template-columns: 1fr;
}
.exam-count {
white-space: normal;
}
.brand b {
font-size: 13px;
}
.brand small {
font-size: 11px;
}
.activity-summary {
grid-template-columns: repeat(2, 1fr);
}
.current-week-badge {
white-space: normal;
}
.weekly-activity {
padding: 16px;
}
.activity-details > div {
flex-wrap: wrap;
}
.activity-details strong {
margin-right: 0;
}
.activity-months-wrap,
.activity-board {
grid-template-columns: 44px auto;
gap: 7px;
}
.activity-weekday-spacer,
.activity-weekdays {
width: 44px;
}
.activity-months {
grid-template-columns: repeat(53, 13px);
column-gap: 3px;
}
.activity-grid {
grid-template-rows: repeat(7, 13px);
grid-auto-columns: 13px;
column-gap: 3px;
row-gap: 3px;
}
.activity-cell {
width: 13px;
height: 13px;
min-width: 13px;
}
.activity-weekdays {
grid-template-rows: repeat(7, 13px);
row-gap: 3px;
height: auto;
min-height: 109px;
}
.activity-weekdays span {
font-size: 9px;
}
}

/* ==========================================================
   SUPER WEB APP & PWA STYLES - KHUTA PLATFORM
   Dark Mode, Glassmorphism, Mobile Bottom Bar, Super Tools
   ========================================================== */

/* Dark Mode Theme Variables */
[data-theme="dark"] {
  --bg: #0b1120;
  --card: #151f32;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --line: #1e293b;
  --accent: #6366f1;
  --accent2: #8b5cf6;
  --good: #22c55e;
  --danger: #ef4444;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"],
[data-theme="dark"] html,
[data-theme="dark"] body {
  background-color: #0b1120 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .container {
  background: transparent !important;
}

[data-theme="dark"] .topbar {
  background: #0b1120 !important;
}

[data-theme="dark"] .user-badge {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .brand-text b,
[data-theme="dark"] .brand b {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .brand-text small,
[data-theme="dark"] .brand small {
  color: #94a3b8 !important;
}

[data-theme="dark"] .brand-logo-img {
  background: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .brand-mark {
  background: #1e293b;
  border-color: #334155;
}

[data-theme="dark"] .brand img {
  mix-blend-mode: normal !important;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav a.active {
  background: #1e293b;
  color: #818cf8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .card,
[data-theme="dark"] .subject-card,
[data-theme="dark"] .stage-card,
[data-theme="dark"] .channel,
[data-theme="dark"] .exam-card,
[data-theme="dark"] .day-block {
  background: rgba(21, 31, 50, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="dark"] .secondary {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] .progress {
  background: #1e293b;
}

[data-theme="dark"] footer,
[data-theme="dark"] .site-footer {
  background: linear-gradient(135deg, #0f172a, #1e1b4b) !important;
  color: #cbd5e1 !important;
  border-top-color: #334155 !important;
}

[data-theme="dark"] footer svg,
[data-theme="dark"] .site-footer svg {
  fill: #cbd5e1 !important;
}

[data-theme="dark"] .site-footer .site-title {
  color: #60a5fa !important;
}

[data-theme="dark"] .site-footer .site-copy {
  color: #94a3b8 !important;
}

[data-theme="dark"] .activity-calendar {
  background: #0f172a;
  border-color: #1e293b;
}

[data-theme="dark"] .activity-cell {
  background-color: #1e293b;
}

/* Glassmorphism & Hover Elevations */
.card,
.subject-card,
.stage-card,
.channel,
.exam-card,
.day-block {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover,
.subject-card:hover,
.channel:hover,
.exam-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(79, 70, 229, 0.12);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .subject-card:hover,
[data-theme="dark"] .channel:hover,
[data-theme="dark"] .exam-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  border-color: rgba(99, 102, 241, 0.3);
}

.progress span {
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #06b6d4);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.45);
}

/* Topbar Interactive Widgets */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-toggle-btn {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: scale(1.06);
  border-color: var(--accent) !important;
}

.topbar-pomo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(249, 115, 22, 0.12));
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.topbar-pomo:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}

.topbar-pomo.running {
  animation: pulsePomo 2s infinite;
}

@keyframes pulsePomo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.install-btn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 7px 13px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.install-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.45) !important;
}

.conn-badge {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.conn-badge.online {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.conn-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Toast Notifications Container */
#toastContainer {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
  width: 420px;
}

.toast {
  pointer-events: auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast.toast-exit {
  animation: toastOut 0.3s forwards;
}

.toast.toast-success { border-right: 5px solid #22c55e; }
.toast.toast-error { border-right: 5px solid #ef4444; }
.toast.toast-info { border-right: 5px solid #3b82f6; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-15px) scale(0.95); }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .container {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    padding: 6px 3px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  }

  [data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.94);
    border-top-color: #1e293b;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.55);
  }

  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 10px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    text-align: center;
  }

  .mobile-bottom-nav a .nav-icon {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-bottom-nav a span:not(.nav-icon) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .mobile-bottom-nav a.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.12);
  }

  .mobile-bottom-nav a.active .nav-icon {
    filter: drop-shadow(0 2px 6px rgba(99, 102, 241, 0.4));
  }
}

/* ==========================================================
   SUPER TOOLS SUITE - (tools.html)
   ========================================================== */

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

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

/* Tool 1: Pomodoro Card */
.pomodoro-card {
  text-align: center;
  padding: 30px 24px;
  position: relative;
  overflow: hidden;
}

.pomodoro-modes {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg);
  padding: 6px;
  border-radius: 999px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pomo-mode-btn {
  background: transparent !important;
  color: var(--muted) !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pomo-mode-btn.active {
  background: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.pomo-svg-wrap {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto 24px;
}

.pomo-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.pomo-circle-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 10;
}

.pomo-circle-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}

.pomo-inner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pomo-time-display {
  font-size: 46px;
  font-weight: 900;
  color: var(--text);
  font-family: monospace, Tahoma, sans-serif;
  letter-spacing: -1px;
}

.pomo-status-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
}

.pomo-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.pomo-btn-main {
  background: var(--accent) !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  padding: 12px 28px !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35) !important;
}

.pomo-btn-sub {
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  padding: 12px 16px !important;
  border-radius: 14px !important;
  font-size: 16px !important;
}

.pomo-streak-badge {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

[data-theme="dark"] .pomo-streak-badge {
  color: #fbbf24;
}

/* Tool 2: 3D Flashcards */
.flashcards-card {
  padding: 24px;
}

.flashcard-wrapper {
  perspective: 1200px;
  width: 100%;
  min-height: 240px;
  margin: 18px 0;
  cursor: pointer;
}

.flashcard {
  width: 100%;
  min-height: 240px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-radius: 20px;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--line);
}

.flashcard-front {
  background: var(--card);
}

.flashcard-back {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
  transform: rotateY(180deg);
  border-color: var(--accent);
}

.flashcard-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  border-radius: 999px;
  margin-bottom: 14px;
}

.flashcard-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.flashcard-tip {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}

.flashcard-eval-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

.eval-btn-know {
  background: rgba(34, 197, 94, 0.14) !important;
  color: #16a34a !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

.eval-btn-review {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  padding: 8px 18px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

.flashcard-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Tool 3: Daily MIT Checklist */
.mit-card {
  padding: 24px;
}

.mit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.mit-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.mit-item:hover {
  border-color: var(--accent);
}

.mit-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  cursor: pointer;
  accent-color: var(--accent);
}

.mit-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-weight: 600;
  color: var(--text) !important;
}

.mit-input:focus {
  outline: none;
  box-shadow: none !important;
}

.mit-item.done .mit-input {
  text-decoration: line-through;
  color: var(--muted) !important;
}

/* Tool 4: Auto-Save Quick Notes */
.notes-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.notes-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  margin: 14px 0 10px;
}

.notes-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
}

.notes-status-badge {
  color: #16a34a;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* Dark mode GitHub contribution activity colors */
[data-theme="dark"] .activity-cell.activity-0 { background: #1e293b !important; border-color: rgba(255, 255, 255, 0.05) !important; }
[data-theme="dark"] .activity-cell.activity-1 { background: #0e4429 !important; border-color: #0e4429 !important; }
[data-theme="dark"] .activity-cell.activity-2 { background: #006d32 !important; border-color: #006d32 !important; }
[data-theme="dark"] .activity-cell.activity-3 { background: #26a641 !important; border-color: #26a641 !important; }
[data-theme="dark"] .activity-cell.activity-4 { background: #39d353 !important; border-color: #39d353 !important; }
[data-theme="dark"] .activity-cell.activity-5 { background: #56e36d !important; border-color: #56e36d !important; }


/* ==========================================================
   DARK MODE OVERRIDES FOR WEEKLY ACTIVITY & CARDS
   ========================================================== */
[data-theme="dark"] .activity-summary div {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .activity-summary strong {
  color: #f8fafc !important;
}

[data-theme="dark"] .activity-summary span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .current-week-badge {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #c7d2fe !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
}

[data-theme="dark"] .activity-details > div {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .activity-details b {
  color: #f8fafc !important;
}

[data-theme="dark"] .activity-weekdays span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .activity-month-label {
  color: #94a3b8 !important;
}

[data-theme="dark"] .activity-legend span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .checks label {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .summary-progress {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .day-block {
  background: rgba(21, 31, 50, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .day-block.today {
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2) !important;
}

[data-theme="dark"] .day-head h3 {
  color: #f8fafc !important;
}

[data-theme="dark"] .day-head span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .task-row {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .task-row span {
  color: #f8fafc !important;
}

[data-theme="dark"] .task-row small {
  color: #94a3b8 !important;
}

/* Dark Mode Enhancements for Channels Page */
[data-theme="dark"] .channel {
  background: rgba(21, 31, 50, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .channel a,
[data-theme="dark"] .source-note {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .channel a:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  color: #bfdbfe !important;
  border-color: rgba(99, 102, 241, 0.4) !important;
}

[data-theme="dark"] .tag {
  background: rgba(79, 70, 229, 0.25) !important;
  color: #c7d2fe !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
}

[data-theme="dark"] .channel h3 {
  color: #f8fafc !important;
}

[data-theme="dark"] .channel p {
  color: #94a3b8 !important;
}

[data-theme="dark"] .danger-link,
[data-theme="dark"] [data-del-channel] {
  color: #f87171 !important;
}

[data-theme="dark"] .form-grid input,
[data-theme="dark"] .form-grid select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .form-grid input::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] .form-grid select option {
  background: #0f172a !important;
  color: #f8fafc !important;
}

/* Dark Mode Enhancements for Subjects Page & Subject Details */
[data-theme="dark"] .tiny-stages span {
  background: rgba(30, 41, 59, 0.8) !important;
  color: #94a3b8 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .tiny-stages b {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .subject-card {
  background: rgba(21, 31, 50, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .subject-card-head span {
  color: #f8fafc !important;
  font-weight: 700;
}

[data-theme="dark"] .subject-card-head strong {
  color: #60a5fa !important;
}

[data-theme="dark"] .subject-meta span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .subject-card:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .page-heading h1 {
  color: #f8fafc !important;
}

[data-theme="dark"] .page-heading p {
  color: #94a3b8 !important;
}

[data-theme="dark"] .lesson-row {
  background: rgba(21, 31, 50, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .lesson-info strong {
  color: #f8fafc !important;
}

[data-theme="dark"] .lesson-info p {
  color: #94a3b8 !important;
}

[data-theme="dark"] .unit-progress-head span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .unit-progress-head strong {
  color: #60a5fa !important;
}

/* ==========================================================
   ADMIN & SUPERVISION SUITE - KHUTA PLATFORM
   ========================================================== */

.admin-badge-owner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.admin-badge-admin {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-badge-student {
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted) !important;
  border: 1px solid rgba(100, 116, 139, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tab-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
}

.admin-tab-btn.active {
  background: var(--accent);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  min-width: 650px;
}

.admin-table th {
  padding: 12px 14px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.88em;
  font-weight: 700;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9em;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(99, 102, 241, 0.04);
}

[data-theme="dark"] .admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.admin-search-input,
.admin-select {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-input:focus,
.admin-select:focus {
  border-color: var(--accent);
}

[data-theme="dark"] .admin-search-input,
[data-theme="dark"] .admin-select {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

.admin-stat-card {
  text-align: center;
  padding: 22px 18px;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ==========================================================
   GLOBAL BACK NAVIGATION BUTTON
   ========================================================== */

.page-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  text-decoration: none;
}

.back-nav-btn:hover {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.back-nav-btn .back-nav-icon {
  font-size: 1.15em;
  line-height: 1;
}

[data-theme="dark"] .back-nav-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .back-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff !important;
}
