/* MIND Remedy - Minimal Flat Professional Stylesheet
 * Featuring:
 * 1. Premium Rounded Corners across all UI elements
 * 2. Dark & Light Theme System with persistent state
 * 3. Compact Desktop Sticky Pagination
 * 4. Floating Scroll to Top Button
 * 5. Fully Responsive Mobile & Desktop Layouts
 */

:root {
  /* Brand Constants */
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #14b8a6;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --success: #16a34a;
  --danger: #dc2626;

  /* Premium Rounded Design Tokens */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
  --radius-full: 9999px;

  /* Zero Hard Shadows - Subtle Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.12);

  /* LIGHT THEME (Default) */
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --card-hover: #f1f5f9;
  --header-bg: #0f172a;
  --header-text: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #0f766e;
  --modal-bg: #ffffff;
  --modal-header-bg: #f8fafc;
  --input-bg: #ffffff;
  --input-text: #0f172a;
  --subtle-bg: #f8fafc;
  --primary-soft: #f0fdfa;

  /* Matrix Table (Light) */
  --matrix-header-bg: #f8fafc;
  --matrix-cell-bg: #ffffff;
  --matrix-alt-bg: #f8fafc;
  --matrix-sticky-bg: #ffffff;
  --matrix-hover-bg: #f1f5f9;

  /* Scrollbars & Pagination (Light) */
  --scrollbar-thumb: #cbd5e1;
  --scrollbar-hover: #94a3b8;
  --pagination-bg: rgba(255, 255, 255, 0.96);
  --pagination-border: rgba(226, 232, 240, 0.95);
  --pagination-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
  --page-btn-bg: rgba(0, 0, 0, 0.04);
  --page-btn-color: #334155;
  --page-btn-border: #e2e8f0;
  --page-btn-hover-bg: #e2e8f0;
  --page-btn-hover-color: #0f172a;

  /* Homeopathic Degrees (Light) */
  --deg4-color: #dc2626; /* Bold Red */
  --deg4-bg: #fef2f2;
  --deg4-border: #fecaca;
  --deg3-color: #2563eb; /* Bold Blue */
  --deg3-bg: #eff6ff;
  --deg3-border: #bfdbfe;
  --deg2-color: #16a34a; /* Green */
  --deg2-bg: #f0fdf4;
  --deg2-border: #bbf7d0;
  --deg1-color: #475569; /* Slate */
  --deg1-bg: #f8fafc;
  --deg1-border: #e2e8f0;
}

/* DARK THEME */
[data-theme="dark"] {
  --bg: #090d16;
  --card-bg: #0f172a;
  --card-hover: #162036;
  --header-bg: #030712;
  --header-text: #f8fafc;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-hover: #334155;
  --border-focus: #14b8a6;
  --modal-bg: #0f172a;
  --modal-header-bg: #0b1120;
  --input-bg: #1e293b;
  --input-text: #f8fafc;
  --subtle-bg: #141e33;
  --primary-soft: rgba(15, 118, 110, 0.25);

  /* Matrix Table (Dark) */
  --matrix-header-bg: #141e33;
  --matrix-cell-bg: #0f172a;
  --matrix-alt-bg: #111a2e;
  --matrix-sticky-bg: #0f172a;
  --matrix-hover-bg: #1e293b;

  /* Scrollbars & Pagination (Dark) */
  --scrollbar-thumb: #334155;
  --scrollbar-hover: #475569;
  --pagination-bg: rgba(15, 23, 42, 0.94);
  --pagination-border: rgba(51, 65, 85, 0.8);
  --pagination-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 4px 8px -2px rgba(0, 0, 0, 0.35);
  --page-btn-bg: rgba(255, 255, 255, 0.08);
  --page-btn-color: #f1f5f9;
  --page-btn-border: #334155;
  --page-btn-hover-bg: #1e293b;
  --page-btn-hover-color: #ffffff;

  /* Homeopathic Degrees (Dark - High Contrast & Radiant) */
  --deg4-color: #f87171;
  --deg4-bg: rgba(220, 38, 38, 0.18);
  --deg4-border: rgba(239, 68, 68, 0.38);
  --deg3-color: #60a5fa;
  --deg3-bg: rgba(37, 99, 235, 0.18);
  --deg3-border: rgba(59, 130, 246, 0.38);
  --deg2-color: #4ade80;
  --deg2-bg: rgba(22, 163, 74, 0.18);
  --deg2-border: rgba(34, 197, 94, 0.38);
  --deg1-color: #94a3b8;
  --deg1-bg: rgba(148, 163, 184, 0.12);
  --deg1-border: rgba(148, 163, 184, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* Custom Thin Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ================================================= Password Gatekeeper Screen */
html.app-locked body > *:not(.app-lock-screen) {
  display: none !important;
}

.app-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 35%, #0f172a 0%, #030712 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: lockFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

html:not(.app-locked) .app-lock-screen {
  display: none !important;
}

@keyframes lockFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lock-card {
  width: 100%;
  max-width: 350px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-2xl); /* 26px Rounded Corners */
  padding: 2.25rem 1.85rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transition: border-color 0.25s ease;
}

.lock-card.locked-out {
  border-color: #ef4444;
}

.lock-card.locked-out .lock-icon {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
}

.lock-brand {
  margin-bottom: 1.5rem;
}

.lock-icon {
  width: 58px;
  height: 58px;
  background: rgba(15, 118, 110, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary-light);
  font-size: 1.4rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.25s ease;
}

.lock-brand h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.lock-brand span {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lock-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.lock-input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
  pointer-events: none;
}

.lock-input {
  width: 100%;
  height: 46px;
  padding: 0 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #334155;
  border-radius: var(--radius-md); /* 12px Rounded Corners */
  color: #f8fafc;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: all 0.15s ease;
  letter-spacing: 0.15em;
  text-align: center;
}

.lock-input:focus {
  background: #1e293b;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.3);
}

.lock-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.25);
  border-color: #475569;
}

.lock-input.shake {
  animation: shakeInput 0.35s ease;
  border-color: #ef4444;
}

@keyframes shakeInput {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.lock-toggle-pwd {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.15s ease;
  border-radius: var(--radius-full);
}

.lock-toggle-pwd:hover {
  color: #ffffff;
}

.lock-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  animation: slideDownMobile 0.15s ease;
  line-height: 1.4;
}

.lock-countdown {
  font-family: monospace;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: 0.05em;
}

.lock-hint {
  margin-top: 1.25rem;
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

.nav-dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

/* ================================================= Header & Navbar */
.app-header {
  background: var(--header-bg);
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  text-decoration: none;
  color: #ffffff;
  user-select: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-md); /* 12px Rounded Brand */
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

.brand-text span {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  white-space: nowrap;
  line-height: 1.1;
}

/* Header Controls Cluster: Search, Filter Scope & Sort */
.header-controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 820px;
  min-width: 260px;
  margin: 0 0.85rem;
}

/* Header Search Bar (Pill Capsule) */
.header-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
}

.header-search-icon {
  position: absolute;
  left: 0.95rem;
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  height: 38px;
  padding: 0 2.25rem 0 2.45rem;
  border: 1px solid #334155;
  border-radius: var(--radius-full); /* Fully Rounded Search Pill */
  font-size: 0.88rem;
  font-family: inherit;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transition: all 0.15s ease;
}

.header-search-input:focus {
  background: #0f172a;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.25);
}

.header-search-input::placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
}

.header-search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.95rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
  padding: 0;
}

.header-search-clear-btn:hover {
  background: #334155;
  color: #ffffff;
}

/* Header Scope Filter Toggle (Rounded Pill) */
.header-scope-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-radius: var(--radius-full); /* Fully Rounded Pill */
  padding: 3px;
  gap: 2px;
  height: 38px;
  flex: 0 0 auto;
  flex-shrink: 0;
  width: auto;
  box-sizing: border-box;
}

.header-scope-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0 0.85rem;
  height: 32px;
  line-height: 32px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-full); /* Rounded Pill buttons */
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.header-scope-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.header-scope-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

/* Header Sort Dropdown (Rounded Pill) */
.header-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
}

.header-sort-icon {
  position: absolute;
  left: 0.75rem;
  color: #94a3b8;
  font-size: 0.78rem;
  pointer-events: none;
  z-index: 1;
}

.header-sort-select {
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-radius: var(--radius-full); /* Rounded Sort Pill */
  color: #f8fafc;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  padding: 0 1.75rem 0 1.95rem;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.header-sort-select option {
  background: #0f172a;
  color: #f8fafc;
}

.header-sort-select:hover {
  border-color: #475569;
}

.header-sort-select:focus {
  border-color: var(--primary-light);
  background-color: #0f172a;
}

/* Header Reset Search & Filters Button */
.header-reset-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-radius: var(--radius-full);
  color: #94a3b8;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-reset-btn:hover {
  background: #1e293b;
  border-color: #64748b;
  color: #ffffff;
}

.header-reset-btn:active i {
  transform: rotate(-180deg);
}

.header-reset-btn i {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-action-btn {
  height: 38px;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-radius: var(--radius-full); /* Rounded Action Pills */
  color: #f8fafc;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.header-action-btn:hover {
  background: #1e293b;
  border-color: #475569;
  color: #ffffff;
}

.header-action-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.theme-toggle-btn {
  width: 38px;
  padding: 0;
  border-radius: var(--radius-full);
}

.theme-toggle-btn i {
  font-size: 0.95rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle-btn:hover i {
  transform: rotate(20deg) scale(1.1);
}

.mobile-search-btn {
  display: none;
  width: 38px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ================================================= Navigation Dropdown */
.nav-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.95rem;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid #334155;
  border-radius: var(--radius-full);
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-wrap.open .nav-dropdown-trigger {
  background: #1e293b;
  border-color: #475569;
  color: #ffffff;
}

.nav-current-label {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f8fafc;
}

.nav-dropdown-arrow {
  font-size: 0.72rem;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  display: inline-block;
}

.nav-dropdown-wrap.open .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: #ffffff;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 185px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); /* 12px Rounded Dropdown Menu */
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
  z-index: 1200;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-wrap.open .nav-dropdown-menu {
  display: flex;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  border-radius: var(--radius-sm); /* 8px Rounded Menu Item */
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
}

.nav-dropdown-item:hover {
  background: var(--card-hover);
  color: var(--text-main);
}

.nav-dropdown-item.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.nav-dropdown-icon {
  font-size: 0.88rem;
  width: 16px;
  text-align: center;
}

.nav-dropdown-text {
  flex: 1;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.nav-dropdown-item .nav-badge {
  margin-left: auto;
}

/* ================================================= Main Layout */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

.view-section {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: calc(100vh - 170px);
}

.view-section.active {
  display: flex;
}

/* Status Indicator */
.status-indicator {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  font-weight: 500;
  min-height: 22px;
  line-height: 22px;
}

/* ================================================= Rubrics & Remedies List */
.rubrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 520px;
}

.rubric-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); /* 16px Rounded Cards */
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.rubric-card:hover {
  border-color: var(--border-hover);
  background-color: var(--card-hover);
  box-shadow: var(--shadow-sm);
}

.rubric-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.rubric-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  word-break: break-word;
}

.rubric-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Rounded Badges & Chips */
.badge-remedy {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full); /* Rounded Pill Badge */
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(15, 118, 110, 0.25);
}

.badge-subrubric {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full); /* Rounded Pill Badge */
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--subtle-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-deg4 {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full); /* Rounded Pill Badge */
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--deg4-bg);
  color: var(--deg4-color);
  border: 1px solid var(--deg4-border);
}

.badge-category {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.badge-category strong {
  color: var(--text-main);
}

/* Rubric Actions Buttons */
.rubric-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Action Buttons (Rounded Pills) */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full); /* Pill Buttons */
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-icon:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
}

.btn-icon.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-icon.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-icon.btn-added {
  background: var(--deg2-bg);
  color: var(--deg2-color);
  border-color: var(--deg2-border);
}

.btn-icon.btn-added:hover {
  filter: brightness(0.95);
}

.btn-icon.btn-danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.25);
  background: var(--card-bg);
}

.btn-icon.btn-danger:hover {
  background: var(--deg4-bg);
  border-color: var(--deg4-border);
}

/* ================================================= Case Repertorization View */
.case-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg); /* 16px Rounded */
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.case-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.case-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.case-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  background: var(--subtle-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); /* 12px Rounded Item */
  margin-bottom: 0.45rem;
  gap: 0.75rem;
  transition: border-color 0.15s ease;
}

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

.case-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.case-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Repertorization Matrix Table */
.matrix-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius-lg); /* 16px Rounded Table Container */
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
}

.matrix-table th,
.matrix-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text-main);
}

.matrix-table th {
  background: var(--matrix-header-bg);
  font-weight: 600;
  text-align: left;
}

.matrix-table th.col-score {
  text-align: center;
}

.matrix-table tr:hover td {
  background-color: var(--matrix-hover-bg);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.matrix-table td.col-sticky-left,
.matrix-table th.col-sticky-left {
  position: sticky;
  left: 0;
  background: var(--matrix-sticky-bg);
  z-index: 10;
  text-align: left;
}

.matrix-table tr:hover td.col-sticky-left {
  background: var(--matrix-hover-bg);
}

/* Score Pills */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: var(--radius-full); /* Rounded Pill */
  font-weight: 700;
  font-size: 0.82rem;
}

.score-badge.score-top {
  background: var(--primary);
  color: #ffffff;
}

.score-badge.score-normal {
  background: var(--subtle-bg);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* Degree Cells */
.deg-cell {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.deg-cell-4 { background: var(--deg4-bg); color: var(--deg4-color); border: 1px solid var(--deg4-border); }
.deg-cell-3 { background: var(--deg3-bg); color: var(--deg3-color); border: 1px solid var(--deg3-border); }
.deg-cell-2 { background: var(--deg2-bg); color: var(--deg2-color); border: 1px solid var(--deg2-border); }
.deg-cell-1 { background: var(--deg1-bg); color: var(--deg1-color); border: 1px solid var(--deg1-border); }

/* ================================================= Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--modal-bg);
  border-radius: var(--radius-xl); /* 20px Rounded Modal */
  border: 1px solid var(--border);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  outline: none;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.modal-header {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--modal-header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-full);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--card-hover);
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: var(--text-main);
}

/* Degree Filter Bar */
.degree-summary-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.degree-filter-pill {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full); /* Rounded Pills */
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.degree-pill-all { background: var(--subtle-bg); color: var(--text-main); border-color: var(--border); }
.degree-pill-all.active { background: var(--primary); color: #ffffff; border-color: var(--primary); }

.degree-pill-4 { background: var(--deg4-bg); color: var(--deg4-color); border-color: var(--deg4-border); }
.degree-pill-4.active { background: var(--deg4-color); color: #ffffff; }

.degree-pill-3 { background: var(--deg3-bg); color: var(--deg3-color); border-color: var(--deg3-border); }
.degree-pill-3.active { background: var(--deg3-color); color: #ffffff; }

.degree-pill-2 { background: var(--deg2-bg); color: var(--deg2-color); border-color: var(--deg2-border); }
.degree-pill-2.active { background: var(--deg2-color); color: #ffffff; }

.degree-pill-1 { background: var(--deg1-bg); color: var(--deg1-color); border-color: var(--deg1-border); }
.degree-pill-1.active { background: var(--deg1-color); color: #ffffff; }

/* Remedies Cloud */
.remedies-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem;
  background: var(--subtle-bg);
  border-radius: var(--radius-md); /* 12px Rounded Cloud Container */
  border: 1px solid var(--border);
  min-height: 50px;
}

.remedy-chip {
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full); /* Rounded Remedy Pills */
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  border: 1px solid transparent;
}

.remedy-chip:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.remedy-chip.deg-4 { background: var(--deg4-bg); color: var(--deg4-color); border-color: var(--deg4-border); font-weight: 700; text-transform: uppercase; }
.remedy-chip.deg-3 { background: var(--deg3-bg); color: var(--deg3-color); border-color: var(--deg3-border); font-weight: 700; }
.remedy-chip.deg-2 { background: var(--deg2-bg); color: var(--deg2-color); border-color: var(--deg2-border); font-style: italic; font-weight: 600; }
.remedy-chip.deg-1 { background: var(--deg1-bg); color: var(--deg1-color); border-color: var(--deg1-border); }

/* ================================================= Pagination (Desktop Compact Size) */
.pagination {
  position: sticky;
  bottom: 0.85rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem; /* Reduced Gap */
  margin: 1.15rem auto 0.65rem; /* Reduced Margin */
  width: fit-content;
  max-width: calc(100vw - 2rem);
  background: var(--pagination-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--pagination-border);
  border-radius: var(--radius-full); /* Fully Rounded Pill Capsule */
  padding: 0.22rem 0.45rem; /* Reduced Capsule Size for Desktop */
  box-shadow: var(--pagination-shadow);
  user-select: none;
  animation: floatFadeIn 0.2s ease-out;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

@keyframes floatFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pagination:empty {
  display: none !important;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px; /* Reduced Desktop Size */
  height: 27px;    /* Reduced Desktop Height */
  padding: 0 0.38rem;
  border: 1px solid var(--page-btn-border);
  background: var(--page-btn-bg);
  color: var(--page-btn-color);
  border-radius: var(--radius-full); /* Rounded Circle/Pill */
  font-size: 0.76rem; /* Clean Compact Font */
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1;
}

.page-btn:hover:not(:disabled) {
  background: var(--page-btn-hover-bg);
  color: var(--page-btn-hover-color);
  border-color: var(--border-hover);
}

.page-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.page-nav-btn {
  padding: 0 0.35rem;
  font-size: 0.72rem;
  min-width: 27px;
  height: 27px;
}

.pagination-ellipsis {
  padding: 0 0.22rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* ================================================= Floating Scroll to Top Button */
.btn-scroll-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 80;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.btn-scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.btn-scroll-top:hover {
  background: var(--primary-light);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.5);
}

.btn-scroll-top:active {
  transform: translateY(0) scale(0.96);
}

/* ================================================= App Footer Bar */
.app-footer {
  background: var(--header-bg);
  border-top: 1px solid var(--border);
  color: #94a3b8;
  padding: 0.85rem 1.25rem;
  margin-top: auto;
  font-size: 0.82rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-brand i {
  color: var(--primary);
  font-size: 0.95rem;
}

.footer-title {
  color: #f8fafc;
  font-weight: 600;
}

.footer-sep {
  color: #475569;
}

.footer-desc {
  color: #94a3b8;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Spinner and Status Indicator */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(15, 118, 110, 0.2);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 3rem auto;
}

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

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 0.85rem;
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.error-msg {
  padding: 1rem 1.25rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--danger);
  border-radius: var(--radius-md);
  margin: 1rem 0;
  font-size: 0.9rem;
}

/* ================================================= Responsive Media Queries */
@media (max-width: 992px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap !important; /* Top row: Brand + Actions; In-flow Row 2: Search Cluster */
    padding: 0.6rem 1rem;
    gap: 0.5rem;
    position: relative;
  }

  .brand {
    order: 1;
    flex-shrink: 0 !important;
    gap: 0.6rem;
  }

  /* Increased Prominent Logo Size on Mobile */
  .brand-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 1.15rem !important;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 1.15rem !important;
    font-weight: 700;
  }

  .brand-text span {
    font-size: 0.72rem !important;
    display: block !important;
    letter-spacing: 0.04em;
  }

  .header-actions {
    order: 2;
    flex-shrink: 0 !important;
    gap: 0.4rem;
  }

  .mobile-search-btn {
    display: inline-flex;
  }

  /* STATIC / IN-FLOW EXPANSION:
   * When clicked, the search controls expand in normal document flow (NOT absolute!),
   * naturally expanding header height so .app-container is pushed down and NEVER hidden!
   */
  .header-controls-cluster {
    order: 3;
    display: none;
    position: static !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    margin: 0.35rem 0 0.15rem 0;
    padding-top: 0.2rem;
    border-top: none !important;
    animation: slideDownMobile 0.18s ease;
    box-shadow: none;
    background: transparent;
  }

  .header-controls-cluster.mobile-open,
  .header-controls-cluster.open {
    display: flex;
  }
}

/* SCREEN > 700px and <= 992px (Wide Screens, like Image 3):
 * Keeps all 4 items on 1 row with plenty of room for search input
 */
@media (min-width: 701px) and (max-width: 992px) {
  .header-inner {
    padding: 0.55rem 1rem;
    gap: 0.5rem;
  }

  .header-controls-cluster {
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* 1 ROW */
    align-items: center;
    gap: 0.45rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .header-search-wrap {
    flex: 1 1 auto !important;
    min-width: 200px !important;
    width: auto !important;
    height: 38px;
  }

  .header-search-input {
    height: 38px;
    font-size: 0.84rem;
    padding: 0 0.75rem 0 2.2rem;
  }

  .header-search-icon {
    left: 0.8rem;
    font-size: 0.85rem;
  }

  .header-scope-toggle {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: 38px;
    padding: 3px;
  }

  .header-scope-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 0.85rem;
    font-size: 0.82rem;
  }

  .header-sort-wrap {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: 140px !important;
    height: 38px;
  }

  .header-sort-select {
    height: 38px;
    font-size: 0.82rem;
    padding: 0 1.6rem 0 1.95rem;
    width: auto;
  }

  .header-sort-icon {
    left: 0.75rem;
    font-size: 0.8rem;
  }

  .header-reset-btn {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 0.88rem;
  }
}

/* SCREEN <= 700px (Mobile and Narrow Screens, e.g. 502px, 480px, 420px, 390px):
 * "search input is very small, make full width after image 3"
 * Row 1: Search input (100% full width)
 * Row 2: Category/Title + Order + Reset (matching Image 2)
 */
@media (max-width: 700px) {
  .header-inner {
    padding: 0.55rem 0.85rem;
    gap: 0.4rem;
  }

  /* Keep Logo Size Prominent on Mobile as requested */
  .brand {
    gap: 0.5rem;
  }

  .brand-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 1.15rem !important;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 1.12rem !important;
    font-weight: 700;
  }

  .brand-text span {
    font-size: 0.68rem !important;
    display: block !important;
    letter-spacing: 0.04em;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .theme-toggle-btn,
  .mobile-search-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .nav-dropdown-trigger {
    height: 36px;
    padding: 0 0.75rem;
    gap: 0.4rem;
  }

  .nav-current-label {
    font-size: 0.82rem;
  }

  /* Like Image 2: Search on Row 1 (Full Width), Category/Title + Order + Reset on Row 2 */
  .header-controls-cluster {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    padding-top: 0.35rem;
    margin: 0.35rem 0 0.1rem 0;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Row 1: Search input (100% full width) */
  .header-search-wrap {
    flex: 1 1 100% !important;
    width: 100% !important;
    height: 38px;
  }

  .header-search-input {
    height: 38px;
    font-size: 0.85rem;
    padding: 0 1rem 0 2.2rem;
  }

  .header-search-icon {
    left: 0.8rem;
    font-size: 0.85rem;
  }

  /* Row 2: Category/Title (shrink: 0), Sort (flex: 1), Reset (shrink: 0) */
  .header-scope-toggle {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: 38px;
    padding: 3px;
  }

  .header-scope-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 0.8rem;
    font-size: 0.82rem;
  }

  .header-sort-wrap {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    height: 38px;
  }

  .header-sort-select {
    width: 100%;
    height: 38px;
    font-size: 0.82rem;
    padding: 0 1.5rem 0 1.95rem;
  }

  .header-sort-icon {
    left: 0.7rem;
    font-size: 0.8rem;
  }

  .header-reset-btn {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 0.88rem;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 0.85rem 0.75rem 2rem;
  }

  .rubric-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .rubric-actions {
    width: 100%;
  }

  .rubric-actions .btn-icon {
    flex: 1;
  }

  .modal-content {
    max-height: 94vh;
  }

  .btn-scroll-top {
    right: 1rem;
    bottom: 1rem;
    width: 38px;
    height: 38px;
    font-size: 0.88rem;
  }

  .pagination {
    bottom: 0.65rem;
    padding: 0.2rem 0.35rem;
    gap: 0.15rem;
  }

  .page-btn {
    min-width: 25px;
    height: 25px;
    padding: 0 0.3rem;
    font-size: 0.72rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }
}

@media (max-width: 350px) {
  .brand-text span {
    font-size: 0.62rem !important;
    display: block !important;
  }

  .brand-text h1 {
    font-size: 1.05rem !important;
  }

  .brand-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 1.05rem !important;
  }

  .header-scope-btn {
    padding: 0 0.55rem;
    font-size: 0.76rem;
  }

  .header-sort-select {
    font-size: 0.76rem;
  }
}

@keyframes slideDownMobile {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
