:root {
  --bg: #f6f8fc;
  --paper: #ffffff;
  --paper-2: #fbfcff;
  --text: #182235;
  --muted: #66768d;
  --line: #e7edf5;

  --primary: #4f46e5;
  --primary-2: #6f63ee;
  --accent: #14b8a6;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #16a34a;

  --shadow: 0 10px 26px rgba(23, 32, 51, .06);
  --shadow-soft: 0 6px 18px rgba(23, 32, 51, .045);

  --radius: 18px;
  --radius-sm: 13px;
  --radius-lg: 22px;

  --font: "IBM Plex Sans Arabic", "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;

  --mobile-topbar-h: 58px;
  --mobile-bottom-nav-h: 68px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(880px 320px at 100% -10%, rgba(79, 70, 229, .07), transparent 55%),
    radial-gradient(760px 320px at 0% 0%, rgba(20, 184, 166, .06), transparent 60%),
    var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

body.mobile-menu-open {
  overflow: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

.w-full {
  width: 100%
}

.h-full {
  height: 100%
}

.h1,
.h2 {
  font-weight: 900;
  letter-spacing: -.2px;
}

.h1 {
  font-size: 1.8rem
}

.h2 {
  font-size: 1.28rem
}

.skip-link:focus {
  position: fixed !important;
  right: 16px !important;
  top: 16px !important;
  width: auto !important;
  height: auto !important;
  padding: 10px 14px;
  background: #111827;
  color: #fff;
  border-radius: 12px;
  z-index: 9999;
  overflow: visible !important;
}

/* ===== Main Layout ===== */
.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.main-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .38);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 39;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-shell {
  background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  border-left: 1px solid var(--line);
  padding: 16px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  transition: transform .25s ease;
  z-index: 40;
  scrollbar-width: thin;
}

.sidebar-shell::-webkit-scrollbar {
  width: 8px;
}

.sidebar-shell::-webkit-scrollbar-thumb {
  background: #d8e1ec;
  border-radius: 999px;
}

/* ===== Brand / Profile ===== */
.brand-block {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 16px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: .95rem;
  box-shadow: var(--shadow-soft);
  letter-spacing: .3px;
  flex: 0 0 auto;
}

.brand-title {
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -.15px;
}

.brand-sub {
  color: var(--muted);
  font-size: .78rem;
}

.profile-mini {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: var(--shadow-soft);
  margin-bottom: 13px;
}

.profile-mini__name {
  font-weight: 900;
  font-size: .95rem;
}

.profile-mini__meta {
  color: var(--muted);
  font-size: .78rem;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.profile-mini__school {
  margin-top: 8px;
  font-size: .74rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
}

/* ===== Sidebar Nav ===== */
.nav-section-title {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 900;
  margin: 14px 8px 7px;
}

.side-nav a {
  position: relative;
  display: block;
  padding: 10px 12px 10px 36px;
  border-radius: 13px;
  color: #24314d;
  font-weight: 800;
  font-size: .92rem;
  margin-bottom: 5px;
  border: 1px solid transparent;
  transition: .18s;
}

.side-nav a::before {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(79, 70, 229, .16), rgba(20, 184, 166, .16));
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .12);
}

.side-nav a:hover {
  background: #f5f8fd;
  border-color: var(--line);
}

.side-nav a.is-active {
  background: linear-gradient(90deg, rgba(79, 70, 229, .09), rgba(20, 184, 166, .09));
  border-color: rgba(79, 70, 229, .16);
  color: #201e61;
}

.side-nav a.is-active::before {
  background: linear-gradient(135deg, rgba(79, 70, 229, .92), rgba(20, 184, 166, .84));
  box-shadow: none;
}

.sidebar-footer {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed var(--line);
}

.sidebar-note {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* ===== Topbar ===== */
.topbar-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 252, .88);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 8px;
  gap: 12px;
  border-bottom: 1px solid rgba(231, 237, 245, .8);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumbs {
  font-size: .74rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.2px;
}

.page-subtitle {
  color: var(--muted);
  font-size: .86rem;
  margin-top: 3px;
}

.page-shell {
  padding: 10px 20px 24px;
  min-width: 0;
}

/* ===== Buttons / Inputs ===== */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn {
  display: none;
}

.alert {
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  font-weight: 700;
  font-size: .9rem;
}

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

.alert.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b
}

.alert.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e
}

.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: .92rem;
}

.input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, .35);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .08);
}

.btn {
  border: 0;
  cursor: pointer;
  padding: 9px 13px;
  border-radius: 13px;
  font-weight: 900;
  font-family: inherit;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  letter-spacing: 0;
  min-height: 40px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 10px 20px rgba(79, 70, 229, .18);
}

.btn-light,
.btn.btn-light,
.btn.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
}

.btn-soft {
  background: #f3f5ff;
  color: #312e81;
  border: 1px solid #d9ddff;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* ===== Generic Cards ===== */
.card,
.soft-card,
.toolbar-card,
.note-card,
.info-card,
.metric,
.item-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card+.card {
  margin-top: 12px
}

.card-bd {
  padding: 15px
}

.card-hd {
  padding: 15px 15px 0
}

.hero {
  background: linear-gradient(135deg, #171f43 0%, #322f8f 100%);
  border: none;
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(23, 31, 67, .19);
}

.hero .muted {
  color: rgba(255, 255, 255, .82)
}

.page-intro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #06b6d4 100%);
  border-radius: 22px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
  margin-bottom: 12px;
}

.page-intro::after {
  content: "";
  position: absolute;
  inset-inline-end: -30px;
  top: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}

.page-intro.soft {
  background: linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
  color: #0f172a;
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow-soft);
}

.page-intro.soft .page-intro__desc {
  color: #475569
}

.page-intro__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -.2px;
}

.page-intro__desc {
  margin: 8px 0 0;
  max-width: 920px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .92);
  font-size: .92rem;
}

.page-intro__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.page-intro__badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: .78rem;
  font-weight: 800;
}

.page-intro.soft .page-intro__badge {
  background: #fff;
  border-color: #dbeafe;
  color: #0f172a;
}

/* ===== Guide / Context ===== */
.guide-card {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}

.guide-card__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 13px 15px;
  font-family: inherit;
  font-weight: 900;
  font-size: .94rem;
  cursor: pointer;
  color: #0f172a;
}

.guide-card__hint {
  font-size: .72rem;
  color: #64748b;
}

.guide-card__body {
  padding: 0 15px 15px;
}

.guide-card.is-collapsed .guide-card__body {
  display: none
}

.guide-steps {
  margin: 0;
  padding: 0 18px 0 0;
  display: grid;
  gap: 8px;
  color: #334155;
  line-height: 1.8;
  font-size: .9rem;
}

.context-panel {
  background: linear-gradient(135deg, #ffffff 0%, #eef8ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 14px 15px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 12px;
}

.context-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.context-panel__eyebrow {
  font-size: .72rem;
  font-weight: 900;
  color: #2563eb;
  margin-bottom: 3px;
}

.context-panel__title {
  font-size: 1.08rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -.2px;
}

.context-panel__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #bfdbfe;
  font-size: .72rem;
  font-weight: 900;
  color: #1d4ed8;
}

.context-panel__desc {
  color: #475569;
  line-height: 1.8;
  margin-top: 6px;
  font-size: .88rem;
}

.context-panel__steps {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.context-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 10px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid #e0efff;
  border-radius: 12px;
  color: #334155;
  font-size: .86rem;
}

.context-step__num {
  color: #2563eb;
  font-weight: 900;
}

/* ===== Stats / Tables / Chips ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.kpi-card {
  border-radius: 18px;
  padding: 14px;
}

.kpi-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 900;
  margin-top: 5px;
  line-height: 1.1;
}

.kpi-note {
  color: var(--muted);
  font-size: .73rem;
  margin-top: 4px;
}

.section-title {
  font-size: 1.06rem;
  font-weight: 900;
  margin: 0 0 8px;
}

.section-sub {
  color: var(--muted);
  line-height: 1.8;
  font-size: .9rem;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}

.table th,
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: right;
  font-size: .9rem;
}

.table th {
  font-size: .74rem;
  color: var(--muted);
  font-weight: 900;
  background: #fafbff;
  position: sticky;
  top: 0;
}

.table .chip-success {
  background: #ecfdf5;
  color: #166534;
  border-color: #bbf7d0
}

.table .chip-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca
}

.table .chip-info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  gap: 11px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  border: 1px solid var(--line);
  background: #fff;
}

.chip-soft {
  background: #f7f8ff;
  color: #312e81;
  border-color: #d9ddff
}

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

.chip-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca
}

.chip-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a
}

/* ===== Misc ===== */
.muted {
  color: var(--muted)
}

.text-lg {
  font-size: 1.05rem;
  font-weight: 900;
}

.meta {
  font-size: .78rem;
  color: var(--muted);
}

.item-card {
  border-radius: 17px;
  padding: 14px;
}

.item-card+.item-card {
  margin-top: 11px
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.item-title {
  font-size: 1.02rem;
  font-weight: 900;
}

.item-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.section-box {
  background: #fafbff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  margin-top: 10px;
}

.scale-preview {
  padding: 11px;
  border-radius: 13px;
  background: #fffef7;
  border: 1px solid #f7e9b5;
  line-height: 1.8;
  margin-top: 10px;
  font-size: .88rem;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.rating-choice input {
  display: none
}

.rating-choice label {
  display: block;
  padding: 10px 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  font-size: .88rem;
}

.rating-choice input:checked+label {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: transparent;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.login-side {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #171f43 0%, #312f8a 100%);
  padding: 24px;
  color: #fff;
}

.login-side::after {
  content: "";
  position: absolute;
  inset-inline-end: -45px;
  top: -35px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.login-form {
  padding: 24px
}

.login-list {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.login-list li {
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  padding: 10px 12px;
  list-style: none;
  font-size: .88rem;
}

.login-helper {
  margin-top: 13px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
}

.login-helper strong {
  display: block;
  margin-bottom: 6px;
}

.login-cred {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.login-cred div {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: .84rem;
}

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

.metric {
  padding: 11px;
  border-radius: 14px;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fbfcff;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

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

.info-card {
  border-radius: 16px;
  padding: 14px;
}

.info-card__title {
  font-weight: 900;
  margin-bottom: 8px;
  font-size: .95rem;
}

.info-list {
  display: grid;
  gap: 8px;
}

.info-list div {
  padding: 9px 11px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: .88rem;
}

.note-card {
  border-radius: 18px;
  padding: 14px;
}

.note-card__title {
  font-size: .98rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.note-card__desc {
  color: #64748b;
  line-height: 1.8;
  font-size: .88rem;
}

.toolbar-card {
  border-radius: 17px;
  padding: 13px;
}

.toolbar-card .grid,
.toolbar-card .row {
  align-items: end;
}

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

.quick-tip {
  padding: 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5edf7;
}

.quick-tip strong {
  display: block;
  margin-bottom: 4px;
  font-size: .9rem;
}

.quick-tip span {
  display: block;
  color: #64748b;
  line-height: 1.7;
  font-size: .8rem;
}

.footer-note {
  margin-top: 14px;
  padding: 11px 13px;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  border: 1px dashed #dbe4f0;
  border-radius: 14px;
  color: #64748b;
  line-height: 1.8;
  font-size: .78rem;
}

details summary {
  list-style: none
}

details summary::-webkit-details-marker {
  display: none
}

/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav {
  display: none;
}

/* ===== Tablet and Down ===== */
@media (max-width:1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
  }

  .sidebar-shell {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: min(290px, 84vw);
    height: 100dvh;
    transform: translateX(100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    border-left: none;
    border-inline-end: 1px solid var(--line);
    border-radius: 0 18px 18px 0;
    z-index: 40;
    background: #fff;
  }

  .sidebar-shell.is-open {
    transform: translateX(0);
  }

  .page-shell,
  .topbar-shell {
    padding-inline: 14px;
  }

  .kpi-grid,
  .grid-4,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-card {
    grid-template-columns: 1fr;
  }
}

/* ===== Mobile ===== */
@media (max-width:720px) {
  html {
    font-size: 14px;
  }

  .topbar-shell {
    min-height: var(--mobile-topbar-h);
    padding: 10px 12px 8px;
    gap: 8px;
  }

  .topbar-left {
    flex: 1;
    min-width: 0;
  }

  .topbar-right {
    gap: 6px;
  }

  .breadcrumbs {
    display: none;
  }

  .page-title {
    font-size: 1.12rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .page-subtitle {
    display: none;
  }

  .page-shell {
    padding: 8px 10px calc(var(--mobile-bottom-nav-h) + 14px);
  }

  .kpi-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .metric-strip,
  .rating-grid,
  .info-grid,
  .quick-tips {
    grid-template-columns: 1fr;
  }

  .card-bd,
  .card-hd,
  .item-card,
  .toolbar-card,
  .context-panel,
  .note-card,
  .info-card {
    padding: 12px;
  }

  .hero,
  .page-intro {
    border-radius: 18px;
    padding: 16px;
  }

  .page-intro__title {
    font-size: 1.2rem;
  }

  .page-intro__desc {
    font-size: .84rem;
    line-height: 1.75;
  }

  .page-intro__badges {
    gap: 6px;
    margin-top: 10px;
  }

  .page-intro__badge {
    padding: 6px 9px;
    font-size: .72rem;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .btn {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    font-size: .86rem;
  }

  .row .btn {
    width: auto;
  }

  .input,
  select,
  textarea {
    padding: 10px 11px;
    border-radius: 12px;
    font-size: .9rem;
  }

  .table-wrap {
    overflow: visible;
  }

  .table,
  .table thead,
  .table tbody,
  .table th,
  .table td,
  .table tr {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table {
    min-width: 0;
    border-spacing: 0;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: grid;
    gap: 10px;
  }

  .table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
  }

  .table td {
    border: none;
    padding: 6px 0;
    text-align: right;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    font-size: .72rem;
    font-weight: 900;
    color: var(--muted);
    margin-bottom: 2px;
  }

  .mobile-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    height: var(--mobile-bottom-nav-h);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 45;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, .06);
  }

  .mobile-bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 6px calc(env(safe-area-inset-bottom, 0px) + 8px);
    font-size: .76rem;
    font-weight: 900;
    color: #475569;
  }

  .mobile-bottom-nav a.is-active {
    color: var(--primary);
    background: linear-gradient(180deg, rgba(79, 70, 229, .06), rgba(79, 70, 229, .02));
  }

  .footer-note {
    margin-bottom: 6px;
  }
}

/* ===== Assessment pages on mobile ===== */
body.page-my_assessment {
  overflow-x: hidden;
}

.page-my_assessment .page-shell {
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width:720px) {

  body.page-my_assessment .context-panel,
  body.page-my_assessment .footer-note,
  body.page-my_assessment .page-subtitle,
  body.page-my_assessment .topbar-right {
    display: none;
  }

  body.page-my_assessment .topbar-shell {
    padding: 8px 10px 7px;
  }

  body.page-my_assessment .page-shell {
    padding: 7px 9px calc(var(--mobile-bottom-nav-h) + 16px);
  }

  body.page-my_assessment .page-title {
    font-size: 1.08rem;
  }

  body.page-my_assessment .item-card {
    border-radius: 15px;
    padding: 11px;
  }

  body.page-my_assessment .rating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.page-my_assessment .rating-choice label {
    padding: 11px 8px;
    border-radius: 12px;
    font-size: .86rem;
  }

  body.page-my_assessment .section-box {
    padding: 10px;
    border-radius: 12px;
  }
}