/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --color-primary: #4338ca;
  --color-primary-dark: #312e81;
  --color-primary-strong: #312e81;
  --color-surface: #ffffff;
  --color-surface-muted: #f8fafc;
  --color-border: #e5e7eb;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --radius-md: 0.75rem;
  --shadow-sm: 0 10px 25px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.app-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 150ms ease;
}

.app-nav a:hover,
.app-nav a:focus {
  color: var(--color-primary);
}

.app-nav form {
  margin-left: auto;
}

.app-nav button {
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease;
}

.app-nav button:hover,
.app-nav button:focus {
  background: var(--color-primary-strong);
}

.notice,
.alert {
  max-width: 640px;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: center;
}

.notice {
  background: #ecfccb;
  color: #3f6212;
}

.alert {
  background: #fee2e2;
  color: #b91c1c;
}

main {
  padding: 2rem 1.5rem 3rem;
}

.marketing main {
  padding: 0;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1.4rem;
  border: none;
  text-decoration: none;
  box-shadow: 0 12px 20px rgba(79, 70, 229, 0.2);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(79, 70, 229, 0.25);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-weight: 700;
  color: #374151;
  background: #fff;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  border-color: #dbeafe;
}

.input {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.input:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

.admin-dashboard {
  max-width: 1100px;
  margin: 0 auto;
}

.admin-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.admin-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.admin-header p {
  margin: 0;
  color: var(--color-text-muted);
}

.admin-header--dashboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #ffffff, #eef2ff);
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.admin-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.admin-section--accent {
  background: linear-gradient(135deg, #ffffff, #f1f5ff);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-section-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.admin-section-header p {
  margin: 0;
  color: var(--color-text-muted);
}

.admin-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.admin-tool-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  min-height: 100%;
}

.admin-tool-card h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-tool-card p {
  margin: 0;
  color: var(--color-text-muted);
}

.admin-tool-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.admin-resources--compact {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.admin-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.admin-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
}

.admin-card h2 {
  margin: 0;
}

.admin-card a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.admin-card a:hover,
.admin-card a:focus {
  color: var(--color-primary-dark);
}

.admin-card p {
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
}

.admin-card .admin-card-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.admin-card--resource {
  padding: 1.1rem;
}

.admin-card--resource .admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-card--resource h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-card-count {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-card--resource .admin-card-meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

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

.auth-page {
  max-width: 420px;
  margin: 4rem auto;
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-sm);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

.auth-card p {
  margin: 0;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .auth-page {
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 1.25rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--color-text);
}

.auth-form input {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

:is(.btn, .btn-primary, .btn-secondary, .btn-danger) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.35rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, color 120ms ease;
}

:is(.btn, .btn-primary) {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

:is(.btn, .btn-primary):hover,
:is(.btn, .btn-primary):focus {
  transform: translateY(-1px);
  box-shadow: 0 24px 40px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: #fff;
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover,
.btn-danger:focus {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 24px 35px rgba(185, 28, 28, 0.25);
}

.auth-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
  color: var(--color-primary-dark);
}

.admin-form-page {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-form-header,
.admin-form-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.admin-form-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-form-breadcrumb {
  margin: 0 0 1rem;
}

.admin-form-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: none;
}

.admin-form-breadcrumb-link:hover,
.admin-form-breadcrumb-link:focus {
  color: var(--color-primary);
}

.admin-form-header-actions {
  flex-shrink: 0;
}

.admin-form-title {
  margin-top: 0.5rem;
}

.admin-form-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.admin-form-title h1 {
  margin: 0.4rem 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.admin-form-title p {
  margin: 0;
  color: var(--color-text-muted);
}

.admin-form-meta {
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.25rem;
}

.admin-form-meta div {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-md) - 0.25rem);
  background: var(--color-surface-muted);
}

.admin-form-meta dt {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

.admin-form-meta dd {
  margin: 0;
  font-weight: 600;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-form-card {
  border: 1px dashed rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.04), transparent);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem 1.5rem;
}

.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-form-label {
  font-weight: 600;
  color: var(--color-text);
}

.admin-form-input-wrapper {
  display: flex;
  flex-direction: column;
}

.admin-form-input {
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-md) - 0.15rem);
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
}

.admin-form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.admin-form-input--textarea {
  min-height: 132px;
  resize: vertical;
}

.form-input {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-md) - 0.15rem);
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

.form-input--textarea {
  min-height: 132px;
  resize: vertical;
}

.admin-form-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.35rem;
  border: 1px solid var(--color-border);
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.admin-form-alert {
  border-radius: var(--radius-md);
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(254, 226, 226, 0.6);
  padding: 1rem 1.25rem;
}

.admin-form-alert h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.admin-form-alert ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #7f1d1d;
}

.dashboard-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
}

.dashboard-shell {
  width: 100%;
}

.dashboard-sidebar {
  transition: width 180ms ease, padding 180ms ease, opacity 180ms ease;
  position: relative;
  background-color: #6d28d9;
  background-image: linear-gradient(180deg, #6d28d9 0%, #6d28d9 45%, #4c1d95 100%);
}

.dashboard-sidebar__logo {
  display: block;
  width: 8.5rem;
  max-width: 100%;
  height: auto;
}

.dashboard-sidebar__link .dashboard-icon {
  flex-shrink: 0;
}

.dashboard-sidebar__link {
  position: relative;
}

@media (min-width: 1024px) {
  .dashboard-sidebar.is-collapsed {
    width: 4rem;
    min-width: 4rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

.dashboard-sidebar.is-collapsed {
  width: 4rem;
  min-width: 4rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__text,
.dashboard-sidebar.is-collapsed .dashboard-sidebar__section-title,
.dashboard-sidebar.is-collapsed .dashboard-sidebar__pill,
.dashboard-sidebar.is-collapsed .dashboard-sidebar__eyebrow,
.dashboard-sidebar.is-collapsed .dashboard-sidebar__title {
  display: none;
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__link {
  justify-content: center;
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__toggle {
  justify-content: center;
}

.dashboard-sidebar.is-collapsed .dashboard-icon {
  margin-inline: auto;
}

.dashboard-sidebar__toggle {
  margin-left: auto;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.dashboard-sidebar__toggle-icon.is-rotated {
  transform: rotate(180deg);
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__toggle {
  position: absolute;
  right: -0.65rem;
  top: 1rem;
  transform: none;
  background: #ffffff;
  color: #6b21a8;
  border-color: rgba(126, 34, 206, 0.25);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__toggle-icon {
  color: #6b21a8;
}

.dashboard-sidebar.is-collapsed .dashboard-sidebar__link[data-label]:hover::after,
.dashboard-sidebar.is-collapsed .dashboard-sidebar__link[data-label]:focus-visible::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  font-size: 0.8rem;
  z-index: 10;
}

.dashboard-backdrop {
  display: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.native-only {
  display: none;
}

.native-app .native-only {
  display: block;
}

.native-app .native-hidden {
  display: none;
}

.native-app .app-nav,
.native-app footer {
  display: none;
}

.native-app main {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.native-app .dashboard-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.native-app .dashboard-sections > * + * {
  margin-top: 0;
}

.native-app .dashboard-section--hero {
  order: 1;
}

.native-app .dashboard-section--next-up {
  order: 3;
}

.native-app .dashboard-section--modes {
  order: 2;
}

.native-app .dashboard-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(243, 244, 255, 0.92));
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12);
}

.native-app .dashboard-hero::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -20%;
  width: 14rem;
  height: 14rem;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.4), transparent 70%);
  opacity: 0.75;
  pointer-events: none;
}

.native-app .dashboard-hero::after {
  content: "";
  position: absolute;
  bottom: -55%;
  left: -25%;
  width: 16rem;
  height: 16rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.26), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

.native-app .dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.native-app .dashboard-section--modes,
.native-app .dashboard-section--next-up {
  padding: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.native-app .dashboard-mode-tile,
.native-app .dashboard-next-up-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.2rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.native-app .dashboard-mode-tile {
  position: relative;
  overflow: hidden;
}

.native-app .dashboard-mode-tile::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 8rem;
  height: 8rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.native-app .dashboard-next-up-card {
  background: linear-gradient(140deg, #ffffff, #f8fafc);
}

.native-app .dashboard-mode-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.native-app .dashboard-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 10px 18px rgba(15, 23, 42, 0.12);
}

.native-app .dashboard-mode-icon__svg {
  width: 1.2rem;
  height: 1.2rem;
}

.native-app .dashboard-mode-cta {
  margin-top: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  letter-spacing: 0.01em;
}

.native-app .dashboard-quick-action {
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.native-app .dashboard-quick-action:not(.bg-purple-600) {
  background: rgba(255, 255, 255, 0.96);
}

.native-app .dashboard-mode-tile:active,
.native-app .dashboard-quick-action:active {
  transform: translateY(1px);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.14);
}

@media (max-width: 768px) {
  .native-app .native-listing-page {
    padding: 1.75rem 1.25rem 2rem;
  }

  .native-app .native-mcq-page {
    padding: 1.25rem 0.5rem 2rem;
  }

  .native-app .native-listing-page > * + * {
    margin-top: 2rem;
  }

  .native-app .native-listing-header {
    gap: 0.4rem;
  }

  .native-app .native-listing-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }

  .native-app .native-listing-subtitle {
    font-size: 0.95rem;
  }

  .native-app .native-listing-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .native-app .native-listing-hero .native-listing-action {
    width: 100%;
    justify-content: center;
  }

  .native-app .native-listing-panel {
    padding: 1.5rem;
    border-radius: 1.75rem;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .native-app .native-filter-panel {
    padding: 1.1rem;
    border-radius: 1.6rem;
  }

  .native-app .native-filter-collapsible {
    margin-top: 1.25rem;
  }

  .native-app .native-filter-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.95rem 1.1rem;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  }

  .native-app .native-filter-summary::-webkit-details-marker {
    display: none;
  }

  .native-app .native-filter-summary-icon {
    height: 2rem;
    width: 2rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 200ms ease;
    background: #f8fafc;
  }

  .native-app .native-filter-summary-icon svg {
    height: 1rem;
    width: 1rem;
  }

  .native-app .native-filter-collapsible[open] .native-filter-summary-icon {
    transform: rotate(180deg);
  }

  .native-app .native-filter-collapsible .native-filter-panel {
    margin-top: 0.75rem;
  }

  .native-app .native-filter-panel label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }

  .native-app .native-filter-panel select,
  .native-app .native-filter-panel input {
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
  }

  .native-app .native-filter-actions {
    margin-top: 0.75rem;
    gap: 0.5rem;
  }

  .native-app .native-listing-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .native-app .native-listing-card {
    border-radius: 1.5rem;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  }

  .native-app .native-stack-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .native-app .native-listing-actions {
    width: 100%;
    align-items: flex-start;
  }

  .native-app .native-listing-action {
    width: 100%;
    justify-content: center;
  }

  .native-app .native-listing-badge {
    align-self: flex-start;
  }

  .native-app .native-listing-cta {
    color: #6d28d9;
  }

  .native-app .native-simpatient-card {
    perspective: none;
  }

  .native-app .native-simpatient-card-inner {
    max-width: none;
    aspect-ratio: auto;
    min-height: 140px;
    border-radius: 1.5rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .native-app .native-simpatient-flip {
    transform: none;
    transition: none;
  }

  .native-app .native-simpatient-front {
    position: static;
    text-align: left;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .native-app .native-simpatient-avatar {
    height: 3.25rem;
    width: 3.25rem;
  }

  .native-app .native-simpatient-details {
    flex: 1;
  }

  .native-app .native-simpatient-summary {
    font-size: 0.85rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .native-app .native-simpatient-action {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
  }

  .native-app .native-simpatient-back,
  .native-app .native-simpatient-flip-indicator {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1366px) and (min-height: 600px) {
  .native-app .native-filter-collapsible {
    margin-top: 1.5rem;
  }

  .native-app .native-filter-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.6rem;
    border: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .native-app .native-filter-summary::-webkit-details-marker {
    display: none;
  }

  .native-app .native-filter-summary::marker {
    content: "";
  }

  .native-app .native-filter-summary-icon {
    height: 2.25rem;
    width: 2.25rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform 200ms ease;
    background: #f8fafc;
  }

  .native-app .native-filter-summary-icon svg {
    height: 1.1rem;
    width: 1.1rem;
  }

  .native-app .native-filter-collapsible[open] .native-filter-summary-icon {
    transform: rotate(180deg);
  }

  .native-app .native-filter-collapsible .native-filter-panel {
    margin-top: 0.9rem;
    padding: 1.25rem;
    border-radius: 1.6rem;
  }

  .native-app .native-filter-panel label {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
  }

  .native-app .native-filter-panel select,
  .native-app .native-filter-panel input {
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
  }

  .native-app .native-filter-actions {
    margin-top: 0.85rem;
    gap: 0.75rem;
  }

  .native-app .native-listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .native-app .native-simpatient-card {
    perspective: none;
  }

  .native-app .native-simpatient-card-inner {
    max-width: none;
    aspect-ratio: auto;
    min-height: 170px;
    border-radius: 1.75rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
  }

  .native-app .native-simpatient-flip {
    transform: none;
    transition: none;
  }

  .native-app .native-simpatient-front {
    position: static;
    text-align: left;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .native-app .native-simpatient-avatar {
    height: 3.5rem;
    width: 3.5rem;
    flex-shrink: 0;
  }

  .native-app .native-simpatient-details {
    flex: 1;
  }

  .native-app .native-simpatient-summary {
    font-size: 0.9rem;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .native-app .native-simpatient-action {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
  }

  .native-app .native-simpatient-back,
  .native-app .native-simpatient-flip-indicator {
    display: none;
  }
}

@media (max-width: 1024px) {
  .native-app .dashboard-menu-bar {
    border: 0;
    background: transparent;
    padding: 0.4rem 1.1rem 0.6rem;
    box-shadow: none;
    border-bottom: 0;
    border-radius: 0;
    justify-content: flex-start;
  }

  .native-app .native-menu-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 0.15rem;
    background: rgba(255, 255, 255, 0.96);
    text-align: left;
    color: #0f172a;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  }

  .native-app .native-menu-button:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
  }

  .native-app .native-menu-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    pointer-events: none;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .native-app .native-menu-title,
  .native-app .native-menu-icon-wrap {
    display: none;
  }

  .native-app .native-menu-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    width: 2rem;
    border-radius: 999px;
    border: 0;
    background: #f8fafc;
    color: #0f172a;
  }

  .native-app .native-menu-icon {
    height: 1rem;
    width: 1rem;
    transition: transform 200ms ease;
  }

  .native-app .native-menu-icon.is-rotated {
    transform: none;
  }

  .native-app .dashboard-shell {
    position: relative;
  }

  .native-app .dashboard-menu-bar {
    position: sticky;
    top: 0;
    z-index: 25;
  }

  .native-app .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 82vw;
    max-width: 19rem;
    background-color: #6d28d9;
    background-image: linear-gradient(180deg, #6d28d9 0%, #6d28d9 45%, #4c1d95 100%);
    color: #fff;
    transform: translateX(-110%);
    transition: transform 220ms ease;
    z-index: 30;
    border-radius: 0 1.5rem 1.5rem 0;
  }

  .native-app .dashboard-shell:not(.is-sidebar-collapsed) .dashboard-sidebar {
    transform: translateX(0);
  }

  .native-app .dashboard-sidebar.is-collapsed {
    width: 82vw;
    max-width: 19rem;
  }

  .native-app .dashboard-content {
    position: relative;
    z-index: 1;
  }

  .native-app .dashboard-backdrop.is-active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 20;
  }

  .native-android .dashboard-shell {
    isolation: isolate;
  }

  .native-android .dashboard-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    height: auto;
    min-height: 100%;
    z-index: 60;
    left: -110%;
    transform: none;
    transition: left 220ms ease;
    will-change: left;
  }

  .native-android .dashboard-shell:not(.is-sidebar-collapsed) .dashboard-sidebar {
    left: 0;
    transform: none;
  }

  .native-android .dashboard-backdrop.is-active {
    z-index: 50;
  }
}

@media (max-width: 640px) {
  .native-app .dashboard-hero {
    padding: 1.25rem;
  }

  .native-app .dashboard-hero h1 {
    font-size: 1.9rem;
  }

  .native-app .dashboard-hero p {
    font-size: 0.95rem;
  }

  .native-app .dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .native-app .dashboard-quick-action {
    width: 100%;
  }

  .native-app .dashboard-next-up {
    padding: 1rem;
  }

  .native-app .dashboard-next-up-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .native-app .dashboard-modes {
    padding: 1rem;
  }

  .native-app .dashboard-mode-grid {
    gap: 0.75rem;
  }

  .native-app .dashboard-mode-tile {
    padding: 1rem;
  }
}

@media (max-width: 640px) {
  .admin-form-header,
  .admin-form-panel {
    padding: 1.5rem;
  }

  .admin-form-card {
    padding: 1rem;
  }
}

.native-app .native-simpatient-shell {
  gap: 1rem;
}

.native-app .native-simpatient-admin {
  margin-bottom: 0;
}

.native-app .native-admin-edit {
  border: 0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
  box-shadow: none;
}

.native-app .native-simpatient-native {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.25rem 1.25rem 1.25rem;
  margin-top: -1rem;
}

.native-app .native-simpatient-tablist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.native-app .native-simpatient-tab {
  border-radius: 999px;
  border: 0;
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.native-app .native-simpatient-panel {
  min-height: 0;
}

.native-app .native-simpatient-panel--assistant {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.native-app .native-simpatient-panel--marksheet {
  padding-bottom: 1rem;
}

.native-app .native-simpatient-marksheet-card section {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.native-app .native-simpatient-marksheet-card section > div {
  padding: 0;
}

.native-app .native-simpatient-marksheet-card [role="tablist"] {
  border: 0;
  padding-bottom: 0.75rem;
}

.native-app .native-simpatient-marksheet-card .rounded-3xl {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.native-app .native-simpatient-marksheet-card .grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.native-app .native-simpatient-assistant-panel {
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.native-app .native-simpatient-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
}

.native-app .native-simpatient-assistant-body {
  padding: 1rem 1.1rem 1.2rem;
}

.native-app .native-simpatient-assistant-close {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #fff;
}

.native-app .native-simpatient-marksheet-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.native-app .native-simpatient-marksheet-actions,
.native-app .native-simpatient-marksheet-attempts {
  margin-top: 1.25rem;
}

.native-app .native-simpatient-conversation-inner {
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.native-app .native-simpatient-input-row {
  max-width: 42rem;
  margin: 0 auto;
}

.native-app .native-simpatient-card {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.native-app .native-simpatient-sidebar,
.native-app .native-simpatient-chat,
.native-app .native-simpatient-meta {
  border: 0;
}

.native-app .native-simpatient-sidebar {
  padding: 0 1.25rem;
  gap: 1rem;
}

.native-app .native-simpatient-meta {
  padding: 0 1.25rem 1rem;
}

.native-app .native-simpatient-chat {
  padding-bottom: 0.5rem;
}

.native-app .native-simpatient-patient {
  display: none;
}

.native-app .native-simpatient-actions {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.native-app .native-simpatient-actions-title {
  font-size: 0.7rem;
  color: #94a3b8;
}

.native-app .native-simpatient-action-list {
  margin: 0.75rem 0 0;
  padding: 0.35rem;
  background: #f1f5f9;
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  overflow: visible;
}

.native-app .native-simpatient-action-button {
  min-width: 0;
  width: 100%;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.native-app .native-simpatient-action-button span {
  text-align: center;
}

.native-app .native-simpatient-action-button.bg-purple-100 {
  background: #fff;
  color: #6d28d9;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.native-app .native-simpatient-action-disabled {
  opacity: 0.55;
}

.native-app .native-simpatient-action-icon,
.native-app .native-simpatient-action-arrow {
  display: none;
}

.native-app .native-simpatient-log {
  background: transparent;
  padding: 0 0.25rem 0.25rem;
  border-radius: 0;
}

.native-app .native-simpatient-log-empty {
  padding: 0 0.25rem;
  color: #94a3b8;
}

.native-app .native-simpatient-message-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.native-app .native-simpatient-message-bubble {
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 0.85rem 1rem;
  border-radius: 1.25rem;
}

.native-app .native-simpatient-message-avatar {
  height: 2.25rem;
  width: 2.25rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.native-app .native-simpatient-system-card {
  border-style: solid;
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: none;
}

.native-app .native-simpatient-system-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.native-app .native-simpatient-input {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.06);
  z-index: 20;
}

.native-app .native-simpatient-input-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.native-app .native-simpatient-input-field {
  padding: 0.6rem 1rem;
}

.native-app .native-simpatient-input-field textarea {
  font-size: 0.95rem;
  line-height: 1.5;
}

.native-app .native-simpatient-voice {
  width: 100%;
  height: 2.75rem;
  border-radius: 999px;
  justify-content: center;
  padding: 0 1rem;
  gap: 0.5rem;
}

.native-app .native-simpatient-voice .native-only {
  display: inline-flex;
  align-items: center;
}

.native-app .native-simpatient-send {
  width: auto;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.native-app .native-simpatient-send-label {
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .native-app .native-simpatient-input-actions {
    width: auto;
    display: flex;
  }

  .native-app .native-simpatient-voice {
    width: auto;
    padding: 0 1rem;
    order: 2;
  }

  .native-app .native-simpatient-send {
    order: 1;
  }
}

.logout-loading-overlay,
.account-deletion-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
}

.logout-loading-overlay.is-visible,
.account-deletion-loading-overlay.is-visible {
  display: flex;
}

.logout-loading-card,
.account-deletion-loading-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

.logout-loading-spinner,
.account-deletion-loading-spinner {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 999px;
  border: 3px solid #e2e8f0;
  animation: logout-spin 900ms linear infinite;
  flex-shrink: 0;
}

.logout-loading-spinner {
  border-top-color: #7c3aed;
}

.account-deletion-loading-spinner {
  border-top-color: #e11d48;
}

.logout-loading-text p,
.account-deletion-loading-text p {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
}

.logout-loading-text .logout-loading-subtext,
.account-deletion-loading-text .account-deletion-loading-subtext {
  font-weight: 500;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

@keyframes logout-spin {
  to {
    transform: rotate(360deg);
  }
}
