/* ==========================================================================
   Authlier — custom design layer (sits on top of Mantis/Bootstrap 5)
   ========================================================================== */

:root {
  --al-primary: #5b5bd6;
  --al-primary-hover: #4a4ac4;
  --al-primary-soft: rgba(91, 91, 214, 0.1);
  --al-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  --al-bg: #f5f6fa;
  --al-surface: #ffffff;
  --al-surface-2: #f0f1f7;
  --al-border: #e5e7f0;
  --al-text: #171a26;
  --al-text-muted: #6b7280;

  --al-radius: 16px;
  --al-radius-sm: 10px;
  --al-shadow-sm: 0 1px 2px rgba(23, 26, 38, 0.06);
  --al-shadow: 0 4px 16px rgba(23, 26, 38, 0.08);
  --al-shadow-lg: 0 12px 40px rgba(23, 26, 38, 0.14);

  --al-bottomnav-h: 64px;
}

html[data-theme="dark"] {
  --al-primary: #818cf8;
  --al-primary-hover: #9ba2f9;
  --al-primary-soft: rgba(129, 140, 248, 0.14);
  --al-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);

  --al-bg: #0e1016;
  --al-surface: #171a23;
  --al-surface-2: #1f2330;
  --al-border: #2a2f40;
  --al-text: #e8eaf2;
  --al-text-muted: #98a0b3;

  --al-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --al-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --al-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.55);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--al-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
  --bs-body-bg: #0e1016;
  --bs-body-color: #e8eaf2;
  --pc-heading-color: #e8eaf2;
  --pc-active-background: #262b3a;
  --pc-sidebar-background: #131620;
  --pc-sidebar-color: #c6cbda;
  --pc-sidebar-caption-color: #7c8499;
  --pc-header-background: #131620;
  --pc-header-color: #e8eaf2;
  --pc-header-shadow: 0 1px 0 0px #262b3a;
  --pc-sidebar-shadow: none;
  --bs-card-bg: #171a23;
  --bs-card-cap-bg: transparent;
  --bs-border-color: #2a2f40;
  --bs-secondary-color: #98a0b3;
  --bs-tertiary-bg: #1f2330;
  --bs-tertiary-color: #98a0b3;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--al-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-muted, .form-check-label {
  color: var(--al-text-muted) !important;
}

a {
  color: var(--al-primary);
}

/* Preloader */
.loader-bg {
  background: var(--al-bg);
  z-index: 99999;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  box-shadow: var(--al-shadow-sm);
  background: var(--al-surface);
}

.card .card-body {
  padding: 1.5rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  border-radius: var(--al-radius-sm);
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--al-primary);
  border-color: var(--al-primary);
  --bs-btn-hover-bg: var(--al-primary-hover);
  --bs-btn-hover-border-color: var(--al-primary-hover);
  --bs-btn-active-bg: var(--al-primary-hover);
  --bs-btn-active-border-color: var(--al-primary-hover);
  --bs-btn-disabled-bg: var(--al-primary);
  --bs-btn-disabled-border-color: var(--al-primary);
  box-shadow: 0 2px 8px rgba(91, 91, 214, 0.35);
}

.btn-success {
  --bs-btn-bg: #16a34a;
  --bs-btn-border-color: #16a34a;
  --bs-btn-hover-bg: #15803d;
  --bs-btn-hover-border-color: #15803d;
  --bs-btn-active-bg: #15803d;
  --bs-btn-active-border-color: #15803d;
}

.btn-warning {
  --bs-btn-bg: #f59e0b;
  --bs-btn-border-color: #f59e0b;
  --bs-btn-hover-bg: #d97706;
  --bs-btn-hover-border-color: #d97706;
  --bs-btn-active-bg: #d97706;
  --bs-btn-active-border-color: #d97706;
}

.btn-danger {
  --bs-btn-bg: #ef4444;
  --bs-btn-border-color: #ef4444;
  --bs-btn-hover-bg: #dc2626;
  --bs-btn-hover-border-color: #dc2626;
  --bs-btn-active-bg: #dc2626;
  --bs-btn-active-border-color: #dc2626;
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-block, .d-grid > .btn {
  min-height: 48px;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-control {
  border-radius: var(--al-radius-sm);
  border: 1.5px solid var(--al-border);
  padding: 0.65rem 0.9rem;
  font-size: 16px; /* prevents iOS zoom on focus */
  background-color: var(--al-surface);
  color: var(--al-text);
  min-height: 48px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html[data-theme="dark"] .form-control {
  --bs-border-color: #2a2f40;
  background-color: #131620;
  color: #e8eaf2;
}

html[data-theme="dark"] .form-control::placeholder {
  color: #6b7280;
}

.form-control:focus {
  border-color: var(--al-primary);
  box-shadow: 0 0 0 4px var(--al-primary-soft);
}

.form-control[readonly] {
  background-color: var(--al-surface-2);
  color: var(--al-text-muted);
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--al-text);
  margin-bottom: 0.4rem;
}

.form-check-input {
  border-radius: 6px;
}

.form-check-input:checked {
  background-color: var(--al-primary);
  border-color: var(--al-primary);
}

.form-check-label {
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Header (top bar)
   -------------------------------------------------------------------------- */

.pc-header {
  background: var(--al-surface) !important;
  box-shadow: var(--al-shadow-sm) !important;
  border-bottom: 1px solid var(--al-border);
  height: 64px;
  border-radius: 0;
  z-index: 1027;
}

.pc-header .pc-head-link {
  color: var(--al-text);
  font-size: 1.35rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.pc-header .pc-head-link:hover {
  background: var(--al-primary-soft);
  color: var(--al-primary);
}

/* Theme toggle button */
.al-theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--al-border);
  border-radius: 10px;
  background: var(--al-surface);
  color: var(--al-text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.al-theme-toggle:hover {
  background: var(--al-primary-soft);
  color: var(--al-primary);
}

html[data-theme="dark"] .al-theme-toggle .al-sun { display: none; }
html:not([data-theme="dark"]) .al-theme-toggle .al-moon { display: none; }

.auth-main .auth-wrapper .auth-form .al-auth-topbar {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
}

.auth-main .auth-wrapper.v3 .auth-form {
  justify-content: center;
  gap: 0;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.pc-sidebar {
  background: var(--al-surface) !important;
  border-right: 1px solid var(--al-border);
  box-shadow: none !important;
}

.pc-sidebar .m-header {
  border-bottom: 1px solid var(--al-border);
  padding: 1rem 1.25rem;
  height: 64px;
  align-items: center;
}

.pc-sidebar .b-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.pc-sidebar .al-sidebar-logo {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 8px;
  object-fit: contain;
}

.pc-sidebar .b-brand .logotext {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--al-text);
  background: var(--al-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pc-navbar {
  padding: 0.75rem 0.75rem 1.5rem;
}

.pc-navbar .pc-item .pc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--al-text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.pc-navbar .pc-item .pc-link .pc-micon {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--al-text-muted);
  transition: color 0.12s ease;
}

.pc-navbar .pc-item .pc-link:hover {
  background: var(--al-primary-soft);
  color: var(--al-primary);
}

.pc-navbar .pc-item .pc-link:hover .pc-micon {
  color: var(--al-primary);
}

.pc-navbar .pc-item .pc-link.active {
  background: var(--al-primary-soft);
  color: var(--al-primary);
  font-weight: 600;
}

.pc-navbar .pc-item .pc-link.active .pc-micon {
  color: var(--al-primary);
}

/* Content area */
.pc-container .pc-content {
  padding: 1.5rem 1.75rem;
  min-height: calc(100vh - 64px);
}

/* Page header / breadcrumb */
.page-header {
  margin-bottom: 1.25rem;
}

.page-header .breadcrumb {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.page-header .breadcrumb .breadcrumb-item a {
  color: var(--al-text-muted);
  text-decoration: none;
}

.page-header .breadcrumb .breadcrumb-item a:hover {
  color: var(--al-primary);
}

.page-header .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--al-text-muted);
}

.page-header h5, .page-header .page-header-title h5 {
  font-size: 1.35rem;
  margin: 0;
}

/* Footer */
.pc-footer {
  background: transparent;
  border-top: 1px solid var(--al-border);
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: var(--al-text-muted);
}

.pc-footer a {
  color: var(--al-text-muted);
  text-decoration: none;
}

.pc-footer a:hover {
  color: var(--al-primary);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table {
  color: var(--al-text);
  --bs-table-bg: transparent;
  --bs-table-color: var(--al-text);
  --bs-table-hover-bg: var(--al-primary-soft);
  --bs-table-hover-color: var(--al-text);
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--al-text-muted);
  border-bottom: 2px solid var(--al-border);
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.9rem 1rem;
  border-color: var(--al-border);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Status pill
   -------------------------------------------------------------------------- */

.al-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.al-pill .al-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------------------
   Auth pages (login / register / site auth)
   -------------------------------------------------------------------------- */

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--al-bg);
  padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
}

.auth-wrapper.v3 {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.al-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.al-brand .al-auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(91, 91, 214, 0.25);
}

.al-brand .al-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--al-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(91, 91, 214, 0.4);
}

.al-brand .al-brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--al-text);
  background: var(--al-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--al-text);
  margin: 0;
}

.auth-form .card {
  box-shadow: var(--al-shadow-lg);
  border-radius: 20px;
}

.auth-form .card .card-body {
  padding: 2rem;
}

.auth-form h3 {
  font-size: 1.35rem;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--al-text-muted);
}

.auth-footer a {
  color: var(--al-text-muted);
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--al-primary);
}

/* Form error labels */
.auth-form .form-label, .card .form-label {
  display: block;
}

.alert-form-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: var(--al-radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Landing page
   -------------------------------------------------------------------------- */

.al-landing .card {
  border: none;
  box-shadow: none;
  background: transparent;
}

.al-hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}

.al-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--al-primary-soft);
  color: var(--al-primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.al-hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 1rem;
}

.al-hero h1 .al-gradient-text {
  background: var(--al-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.al-hero p {
  font-size: 1.1rem;
  color: var(--al-text-muted);
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.al-hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.al-section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 0.5rem;
}

.al-section-sub {
  text-align: center;
  color: var(--al-text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}

.al-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.al-feature-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  padding: 1.5rem;
  box-shadow: var(--al-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.al-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--al-shadow);
}

.al-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--al-primary-soft);
  color: var(--al-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.al-feature-card h5 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.al-feature-card p {
  font-size: 0.9rem;
  color: var(--al-text-muted);
  margin: 0;
}

.al-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.al-price-card {
  position: relative;
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--al-shadow-sm);
  display: flex;
  flex-direction: column;
}

.al-price-card.al-featured {
  border: 2px solid var(--al-primary);
  box-shadow: var(--al-shadow);
}

.al-price-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--al-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}

.al-price-card h6 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--al-text-muted);
  margin-bottom: 0.5rem;
}

.al-price-amount {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--al-text);
  margin-bottom: 0.9rem;
}

.al-price-amount span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--al-text-muted);
}

.al-price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  flex: 1;
}

.al-price-card ul li {
  font-size: 0.875rem;
  color: var(--al-text-muted);
  padding: 0.3rem 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.al-price-card ul li .ti {
  color: #16a34a;
  flex-shrink: 0;
  margin-top: 2px;
}

.al-price-card .btn {
  width: 100%;
}

.al-cta {
  text-align: center;
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  box-shadow: var(--al-shadow-sm);
}

.al-cta h5 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.al-cta p {
  color: var(--al-text-muted);
  max-width: 460px;
  margin: 0 auto 1.5rem;
}

/* --------------------------------------------------------------------------
   Dashboard stat cards
   -------------------------------------------------------------------------- */

.al-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.al-stat-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  padding: 1.25rem;
  box-shadow: var(--al-shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.al-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.al-stat-icon.al-indigo { background: var(--al-primary-soft); color: var(--al-primary); }
.al-stat-icon.al-green { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.al-stat-icon.al-amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.al-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--al-text);
  line-height: 1.1;
}

.al-stat-label {
  font-size: 0.8rem;
  color: var(--al-text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Site cards (sites.html)
   -------------------------------------------------------------------------- */

.al-site-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.al-site-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius);
  padding: 1.25rem;
  box-shadow: var(--al-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.al-site-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--al-shadow);
}

.al-site-card .al-site-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--al-primary-soft);
  color: var(--al-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.al-site-card h5 {
  font-size: 1.05rem;
  margin: 0;
}

.al-site-card .al-site-domain {
  font-size: 0.85rem;
  color: var(--al-text-muted);
  margin: 0;
}

.al-site-card .al-site-meta {
  font-size: 0.8rem;
  color: var(--al-text-muted);
}

.al-site-card .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Upgrade / promo card */
.al-promo-card {
  text-align: center;
  background: var(--al-surface);
  border: 1px dashed var(--al-border);
  border-radius: var(--al-radius);
  padding: 1.75rem 1.25rem;
}

.al-promo-card .al-feature-icon {
  margin: 0 auto 0.75rem;
}

.al-promo-card h5 {
  margin-bottom: 0.25rem;
}

.al-promo-card p {
  color: var(--al-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.al-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--al-text-muted);
}

.al-empty .ti {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  color: var(--al-text-muted);
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Bottom navigation (mobile app-style)
   -------------------------------------------------------------------------- */

.al-bottomnav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--al-bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--al-surface);
  border-top: 1px solid var(--al-border);
  z-index: 1050;
  box-shadow: 0 -4px 20px rgba(23, 26, 38, 0.06);
}

.al-bottomnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100%;
}

.al-bottomnav li {
  flex: 1;
  min-width: 0;
}

.al-bottomnav a {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--al-text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.4rem 0;
  min-height: 48px;
  transition: color 0.12s ease;
}

.al-bottomnav a .ti {
  font-size: 1.4rem;
  line-height: 1;
}

.al-bottomnav a.active {
  color: var(--al-primary);
}

.al-bottomnav a.active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--al-primary);
}

/* --------------------------------------------------------------------------
   Mobile (<= 991.98px, matches Bootstrap md breakpoint used by Mantis)
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .pc-sidebar {
    display: none;
  }

  /* hide the old hamburger — bottom nav replaces it */
  .pc-mob-drp {
    display: none !important;
  }

  .al-bottomnav {
    display: block;
  }

  .pc-container, .pc-content {
    margin-left: 0;
  }

  .pc-container .pc-content {
    padding: 1rem 1rem calc(var(--al-bottomnav-h) + 1.5rem + env(safe-area-inset-bottom));
  }

  .pc-footer {
    margin-left: 0;
    padding-bottom: calc(var(--al-bottomnav-h) + env(safe-area-inset-bottom));
  }

  .pc-header {
    left: 0;
    right: 0;
  }

  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .page-header .breadcrumb {
    display: none;
  }

  .card .card-body {
    padding: 1.15rem;
  }

  .al-features-grid {
    grid-template-columns: 1fr;
  }

  .al-pricing-grid {
    grid-template-columns: 1fr;
  }

  .al-stat-grid {
    grid-template-columns: 1fr;
  }

  .al-site-grid {
    grid-template-columns: 1fr;
  }

  .al-hero {
    padding: 2rem 0.5rem 1.5rem;
  }

  .al-hero p {
    font-size: 1rem;
  }

  /* Tables -> stacked cards on mobile */
  .al-table-card table {
    border: none;
  }

  .al-table-card thead {
    display: none;
  }

  .al-table-card table tr {
    display: block;
    background: var(--al-surface);
    border: 1px solid var(--al-border);
    border-radius: var(--al-radius);
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    box-shadow: var(--al-shadow-sm);
  }

  .al-table-card table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: none;
    padding: 0.3rem 0;
  }

  .al-table-card table td::before {
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--al-text-muted);
  }
}

@media (max-width: 430px) {
  .auth-form .d-flex.justify-content-between {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Larger phones / small tablets: keep 2-col grids */
@media (min-width: 576px) and (max-width: 991.98px) {
  .al-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .al-pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
