/* Compact sizing layer for authenticated admin UI only. */
.app-shell {
  font-size: 13px;
}

.app-shell .app-main {
  padding: 0 20px 18px;
}

.app-shell .app-topbar {
  padding: 6px 20px;
  margin: 0 -20px 14px;
}

.app-shell .app-drawer,
.app-shell .app-drawer-right {
  padding: 12px 10px;
}

/* Drawer header margins must match app-drawer-right padding */
.app-shell .app-drawer-right .drawer-header {
  margin: -12px -10px 14px -10px;
  padding: 9px 10px;
}

.app-shell .drawer {
  gap: 12px;
}

.app-shell .drawer-brand {
  gap: 7px;
  font-size: 15px;
}

.app-shell .drawer-brand-logo {
  height: 22px;
}

.app-shell .drawer-brand-logo-full {
  height: 19px;
  max-width: 132px;
}

.app-shell .drawer-brand-logo-mark {
  height: 22px;
  width: 22px;
}

.app-shell .drawer-toggle,
.app-shell .drawer-nav .nav-link,
.app-shell .drawer-settings-link,
.app-shell .profile-button {
  padding: 7px 9px;
  gap: 7px;
  font-size: 12px;
}

.app-shell .drawer-toggle-pill {
  top: 24px;
  right: -18px;
  padding: 2px;
  min-width: 22px;
  min-height: 22px;
}

.app-shell .drawer-toggle-pill i {
  font-size: 11px;
}

.app-shell .drawer-nav .nav-link i,
.app-shell .drawer-settings-link i {
  width: 16px;
  height: 16px;
  font-size: 14px;
}

.app-shell .profile-icon {
  width: 30px;
  height: 30px;
}

.app-shell .profile-icon i {
  font-size: 15px;
}

.app-shell .drawer-footer {
  gap: 8px;
}

.app-shell .nav-section-divider {
  padding: 8px 9px 2px;
  font-size: 9px;
  gap: 6px;
}

.app-shell .drawer-collapsed .nav-section-divider {
  padding: 6px 6px 1px;
}

.app-shell .app-topbar-title {
  font-size: 12px;
}

.app-shell .profile-menu-name {
  font-size: 12px;
}

.app-shell .profile-menu-email {
  font-size: 10px;
}

.app-shell .profile-menu-item {
  font-size: 12px;
  padding: 7px 9px;
  gap: 7px;
}

.app-shell .drawer-collapsed {
  width: 64px;
}

.app-shell .drawer-expanded {
  width: 220px;
}

.app-shell .drawer-collapsed .drawer-brand-logo {
  height: 24px;
  width: 24px;
}

.app-shell .drawer-collapsed .drawer-nav .nav-link,
.app-shell .drawer-collapsed .drawer-settings-link {
  padding: 9px 6px;
}

.app-shell .drawer-collapsed .profile-button {
  padding: 5px 6px;
}

.app-shell .app-topbar-utilities {
  gap: 6px;
  padding: 3px 8px;
}

.app-shell .app-topbar-utility-link {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.app-shell .app-lang-switch {
  font-size: 10px;
  gap: 5px;
}

.app-shell .app-nav-toggle,
.app-shell .theme-toggle {
  font-size: 11px;
}

.app-shell .theme-toggle {
  padding: 4px 8px 4px 6px;
  gap: 5px;
}

.app-shell .theme-toggle-icon {
  width: 19px;
  height: 19px;
  font-size: 11px;
}

.app-shell .theme-toggle-text {
  font-size: 9px;
}

/* Topbar already shows the current page title, so hide duplicate large H1 headers. */
.app-shell .content .settings-header h1,
.app-shell .content .users-header h1,
.app-shell .content .teams-header h1,
.app-shell .content .team-editor-header h1,
.app-shell .content .crm-header h1,
.app-shell .content .reports-header h1,
.app-shell .content .inbox-header h1,
.app-shell .content .help-header h1,
.app-shell .content .content-header h1 {
  display: none;
}

.app-shell .content {
  font-size: 13px;
  line-height: 1.4;
}

.app-shell .content h1 {
  font-size: clamp(22px, 1.6vw, 27px) !important;
}

.app-shell .content h2 {
  font-size: clamp(18px, 1.3vw, 23px) !important;
}

.app-shell .content h3 {
  font-size: clamp(16px, 1vw, 19px) !important;
}

.app-shell .content p,
.app-shell .content li,
.app-shell .content td,
.app-shell .content th,
.app-shell .content .form-label,
.app-shell .content .text-muted,
.app-shell .content small {
  font-size: 12px;
}

.app-shell .content .btn,
.app-shell .content button,
.app-shell .content .form-control,
.app-shell .content .form-select,
.app-shell .content input,
.app-shell .content textarea,
.app-shell .content select {
  font-size: 12px;
}

.app-shell .content .btn,
.app-shell .content button {
  padding: 5px 9px;
}

.app-shell .content .btn.btn-sm,
.app-shell .content button.btn-sm {
  font-size: 11px;
  padding: 3px 7px;
}

/* Modals are moved to <body> by helpalotModal, so do not scope to .app-shell. */
.modal .modal-title {
  font-size: 15px;
  line-height: 1.25;
}

.modal .modal-body,
.modal .modal-body p,
.modal .modal-body div,
.modal .modal-body .form-text,
.modal .modal-body .text-muted,
.modal .modal-body small {
  font-size: 12px;
  line-height: 1.45;
}

.modal .btn,
.modal button,
.modal .form-control,
.modal .form-select,
.modal .form-label,
.modal input,
.modal textarea,
.modal select {
  font-size: 12px;
}

.modal .btn,
.modal button {
  padding: 5px 10px;
}

.modal .btn-close {
  width: 0.7rem;
  height: 0.7rem;
}

.app-shell .app-toast {
  padding: 10px 11px;
  gap: 10px;
}

.app-shell .app-toast-body {
  font-size: 12px;
}

.app-shell .app-toast-body span {
  font-size: 11px;
}

/* ── Right drawer: compact form elements (mirrors .content rules) ──────────── */

.app-shell .app-drawer-right .details-card {
  font-size: 13px;
  gap: 12px;
}

.app-shell .app-drawer-right .details-card strong {
  font-size: 13px;
}

.app-shell .app-drawer-right .form-label,
.app-shell .app-drawer-right .form-text,
.app-shell .app-drawer-right .text-muted,
.app-shell .app-drawer-right small {
  font-size: 12px;
}

.app-shell .app-drawer-right .form-control,
.app-shell .app-drawer-right .form-select,
.app-shell .app-drawer-right input:not([type="checkbox"]):not([type="radio"]),
.app-shell .app-drawer-right textarea,
.app-shell .app-drawer-right select {
  font-size: 12px;
  padding: 5px 9px;
}

.app-shell .app-drawer-right .form-control-sm,
.app-shell .app-drawer-right .form-select-sm {
  font-size: 11px;
  padding: 3px 7px;
}

.app-shell .app-drawer-right .collection-form-grid {
  gap: 12px;
}

@media (max-width: 768px) {
  .app-shell .app-main {
    padding: 0 10px 14px;
  }

  .app-shell .app-topbar {
    padding: 6px 10px;
    margin: 0 -10px 12px;
  }

  .app-shell .app-drawer,
  .app-shell .app-drawer.drawer-collapsed,
  .app-shell .app-drawer.drawer-expanded {
    width: min(250px, 78vw);
  }

  .app-shell .content {
    font-size: 12px;
  }

  .app-shell .content h1 {
    font-size: clamp(19px, 6.2vw, 22px) !important;
  }

  .app-shell .content h2 {
    font-size: clamp(17px, 5.3vw, 19px) !important;
  }

  .app-shell .content h3 {
    font-size: clamp(15px, 4.8vw, 17px) !important;
  }

  .app-shell .content .btn,
  .app-shell .content button,
  .app-shell .content .form-control,
  .app-shell .content .form-select,
  .app-shell .content input,
  .app-shell .content textarea,
  .app-shell .content select {
    font-size: 11px;
  }

  .app-shell .content .btn,
  .app-shell .content button {
    padding: 5px 8px;
  }

  .modal .modal-title {
    font-size: 14px;
  }

  .modal .modal-body,
  .modal .modal-body p,
  .modal .modal-body div,
  .modal .modal-body .form-text,
  .modal .modal-body .text-muted,
  .modal .modal-body small {
    font-size: 11px;
  }

  .modal .btn,
  .modal button,
  .modal .form-control,
  .modal .form-select,
  .modal .form-label,
  .modal input,
  .modal textarea,
  .modal select {
    font-size: 11px;
  }

  .modal .btn,
  .modal button {
    padding: 5px 8px;
  }
}

@media (max-width: 420px) {
  .app-shell .app-drawer,
  .app-shell .app-drawer.drawer-collapsed,
  .app-shell .app-drawer.drawer-expanded {
    width: min(228px, 74vw);
    padding: 10px 8px;
  }

  .app-shell .app-nav-toggle {
    padding: 3px 8px;
    font-size: 10px;
  }

  .app-shell .content h1 {
    font-size: clamp(17px, 6.8vw, 20px) !important;
  }
}
