﻿/* ============================================================
   Zentory – UI-v1 Custom Styles
   Built on top of Falcon v3.17.0 theme
   ============================================================ */

/* ── Top Navbar Redesign ───────────────────────────── */

/* Icon buttons in top navbar */
.top-nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--falcon-gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
}
.top-nav-icon-btn:hover {
  background: rgba(var(--falcon-primary-rgb), 0.08);
  color: var(--falcon-primary);
}

/* Search bar */
.top-search-wrapper {
  flex: 1;
  max-width: 380px;
  padding: 0 1.5rem;
}
.top-search-input {
  position: relative;
  width: 100%;
}
.top-search-input input.form-control {
  padding-left: 2.2rem;
  border-radius: 2rem;
  background: rgba(var(--falcon-gray-100-rgb), 0.7);
  border: 1px solid var(--falcon-gray-200);
  font-size: 0.8125rem;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.top-search-input input.form-control:focus {
  background: #fff;
  border-color: var(--falcon-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--falcon-primary-rgb), 0.18);
}
.top-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 2;
}

/* User toggle button in navbar */
.nav-user-toggle {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.625rem;
  transition: background 0.18s;
}
.nav-user-toggle:hover {
  background: rgba(var(--falcon-primary-rgb), 0.06);
}

/* ── App Loader (prevents flicker on initial paint) ─────── */
#app-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.3s ease;
}
[data-bs-theme="dark"] #app-loader {
  background: #0b1727;
}
#app-loader.app-loader-hide {
  opacity: 0;
  pointer-events: none;
}
.app-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.app-loader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--falcon-primary, #2c7be5);
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 8px 24px rgba(44, 123, 229, 0.35);
  animation: loaderLogoPulse 1.5s ease-in-out infinite;
}
@keyframes loaderLogoPulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 8px 24px rgba(44,123,229,.35); }
  50%       { transform: scale(1.07); box-shadow: 0 12px 32px rgba(44,123,229,.5); }
}
.app-loader-dots {
  display: flex;
  gap: 0.5rem;
}
.app-loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--falcon-primary, #2c7be5);
  opacity: 0.3;
  animation: loaderDot 1.2s ease-in-out infinite;
}
.app-loader-dots span:nth-child(2) { animation-delay: .2s; }
.app-loader-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes loaderDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40%           { opacity: 1;   transform: scale(1.15); }
}

/* ── Auth Pages (Login / Register) ─────────────────── */
/* Prevent scroll flash while auth page is active */
html.auth-open,
html.auth-open body {
  overflow: hidden !important;
}
/* Neutralise Falcon's sidebar-width margin on .content when on auth pages */
html.auth-open .content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0 !important;
}
html.auth-open .container-fluid[data-layout="container"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Full-height split layout: brand left, form right */
.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  background: #fff;
}

[data-bs-theme="dark"] .auth-split {
  background: var(--falcon-body-bg, #0b1727);
}

.auth-brand-panel {
  flex: 0 0 38%;
  max-width: 38%;
  background: linear-gradient(145deg, #0b1e4a 0%, #1340a5 50%, #1970e2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Dot-grid texture */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}
/* Bottom vignette to blend shelf into panel */
.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(11,30,74,0.85) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Scene wrapper — absolute fill, sits behind content */
.auth-brand-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* ── Floating stat chips ───────────────────────────── */
.auth-stat-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.55rem 0.875rem;
  border-radius: 0.875rem;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  white-space: nowrap;
}
.auth-sc1 { top: 15%;  left: 6%;  animation: authChipBob1 5s  ease-in-out 2s   infinite; }
.auth-sc2 { top: 45%;  right: 5%; animation: authChipBob2 4.5s ease-in-out 2.4s infinite; }
.auth-sc3 { bottom: 46%; left: 5%; animation: authChipBob1 6s  ease-in-out 1.8s infinite; }
@keyframes authChipBob1 {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(-7px); }
}
@keyframes authChipBob2 {
  0%, 100% { transform: translateY(0);   }
  50%       { transform: translateY(7px);  }
}
.auth-sc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(70,149,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: #93c5fd;
  flex-shrink: 0;
}
.auth-sc-val {
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
}
.auth-sc-lbl {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.65;
  line-height: 1.25;
}
.auth-sc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4695ff;
  flex-shrink: 0;
  margin-left: 0.25rem;
  animation: authScDotPulse 2s ease-in-out infinite;
}
@keyframes authScDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70,149,255,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(70,149,255,0);  }
}

/* ── Warehouse shelf illustration ─────────────────── */
.auth-shelf-scene {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
}
.auth-shelf-svg {
  width: 100%;
  height: auto;
  display: block;
}
/* Boxes slide up on load */
.auth-shelf-box {
  animation: authBoxSlideUp 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes authBoxSlideUp {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 340px;
}

.auth-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255,255,255,0.18);
  font-size: 1.75rem;
  color: #fff;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
  animation: authLogoFloat 3.5s ease-in-out infinite;
}
.auth-logo-icon:hover {
  transform: scale(1.1) rotate(-4deg);
  animation-play-state: paused;
}
@keyframes authLogoFloat {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  30%       { transform: translateY(-6px) rotate(-2deg); }
  60%       { transform: translateY(-3px) rotate(1deg); }
}

/* Animated Z lettermark */
.auth-logo-z {
  position: relative;
  overflow: visible;
}
.auth-z-svg {
  width: 46px;
  height: 46px;
  display: block;
}
.auth-logo-icon-sm .auth-z-svg {
  width: 34px;
  height: 34px;
}
/* Stroke-draw: measure path length and animate dashoffset */
.auth-z-path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: authZDraw 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards,
             authZGlow  2.8s ease-in-out 1.3s infinite;
}
@keyframes authZDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes authZGlow {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(255,255,255,0));   stroke-width: 4.5; }
  50%       { filter: drop-shadow(0 0 6px rgba(255,255,255,0.9)); stroke-width: 5;   }
}

.auth-logo-icon-sm {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.25rem;
}

/* Brand wordmark (ENTORY next to Z icon) */
.auth-brand-wordmark {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.18);
  line-height: 1;
  animation: authFadeIn 0.7s ease 0.5s both;
}

/* Feature list in brand panel */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 230px;
  text-align: left;
}
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s;
}
.auth-feature-item:hover {
  background: rgba(255,255,255,0.16);
  transform: translateX(4px);
}
.auth-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.auth-feature-text {
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0.95;
}

.auth-brand-footer {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.25rem;
}

/* Form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.auth-form-inner {
  width: 100%;
  max-width: 420px;
}

/* Form entrance animation */
.auth-form-animate {
  animation: authFormSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes authFormSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Brand panel staggered fade-in */
.auth-fade-in {
  animation: authFadeIn 0.6s ease both;
}
@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Welcome badge */
.auth-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  background: rgba(var(--falcon-primary-rgb), 0.06);
  border: 1px solid rgba(var(--falcon-primary-rgb), 0.12);
}
.auth-welcome-wave {
  font-size: 1.125rem;
  animation: authWave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
  display: inline-block;
}
@keyframes authWave {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Custom input styling */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8125rem;
  color: var(--falcon-gray-400);
  pointer-events: none;
  z-index: 2;
  transition: color 0.2s;
}
.auth-input {
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
  height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid var(--falcon-gray-300);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: rgba(var(--falcon-gray-100-rgb), 0.3);
}
.auth-input:focus {
  border-color: var(--falcon-primary);
  box-shadow: 0 0 0 3px rgba(var(--falcon-primary-rgb), 0.12);
  background: #fff;
}
[data-bs-theme="dark"] .auth-input:focus {
  background: var(--falcon-input-bg, #132238);
}
.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--falcon-primary);
}

/* Password toggle button */
.auth-pw-toggle {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--falcon-gray-400);
  font-size: 0.8125rem;
  z-index: 2;
  transition: color 0.2s;
  line-height: 1;
}
.auth-pw-toggle:hover {
  color: var(--falcon-gray-700);
}

/* Password strength meter */
.auth-pw-strength {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.auth-pw-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--falcon-gray-200);
  overflow: hidden;
}
.auth-pw-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s ease, background-color 0.35s ease;
  width: 0%;
}
.auth-pw-bar span.weak       { background: #e74c3c; }
.auth-pw-bar span.fair       { background: #f39c12; }
.auth-pw-bar span.good       { background: #f1c40f; }
.auth-pw-bar span.strong     { background: #27ae60; }
.auth-pw-bar span.very-strong { background: #16a34a; }
.auth-pw-label {
  min-width: 60px;
  text-align: right;
  color: var(--falcon-gray-500);
  font-weight: 600;
}

/* Custom alert styling */
.auth-alert {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  animation: authAlertIn 0.3s ease;
}
.auth-alert-danger {
  background: rgba(var(--falcon-danger-rgb), 0.08);
  color: var(--falcon-danger);
  border: 1px solid rgba(var(--falcon-danger-rgb), 0.15);
}
.auth-alert-success {
  background: rgba(var(--falcon-success-rgb), 0.08);
  color: var(--falcon-success);
  border: 1px solid rgba(var(--falcon-success-rgb), 0.15);
}
@keyframes authAlertIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* Forgot password icon */
.auth-forgot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(var(--falcon-primary-rgb), 0.08);
  color: var(--falcon-primary);
  font-size: 1.25rem;
}

/* Submit button */
.auth-submit-btn {
  height: 2.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.2s;
  box-shadow: 0 2px 8px rgba(var(--falcon-primary-rgb), 0.25);
}
.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(var(--falcon-primary-rgb), 0.35);
}
.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(var(--falcon-primary-rgb), 0.2);
}

/* OAuth social buttons */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--falcon-gray-500, #adb5bd);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--falcon-gray-300, #dee2e6);
}
.auth-divider span {
  padding: 0 0.75rem;
}
.auth-social-btn {
  height: 2.55rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.auth-social-btn:hover {
  background-color: var(--falcon-gray-100, #f8f9fa);
}

/* Link hover effect */
.auth-link-hover {
  transition: color 0.2s;
  text-decoration: none;
}
.auth-link-hover:hover {
  text-decoration: underline;
}

/* Auth page language dropdown */
.auth-lang-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.auth-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  border: 1.5px solid var(--falcon-gray-300);
  background: transparent;
  color: var(--falcon-gray-700);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}
.auth-lang-toggle:hover,
.auth-lang-toggle:focus {
  border-color: var(--falcon-primary);
  color: var(--falcon-primary);
  background: rgba(var(--falcon-primary-rgb), 0.06);
  text-decoration: none;
}
.auth-lang-toggle .fa-chevron-down {
  font-size: 0.6rem;
  opacity: 0.6;
  transition: transform 0.2s;
}
.auth-lang-toggle.show .fa-chevron-down {
  transform: rotate(180deg);
}
.auth-lang-menu {
  min-width: 130px;
  border-radius: 0.625rem;
  border: 1px solid var(--falcon-gray-200);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 0.375rem 0;
  overflow: hidden;
}
.auth-lang-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--falcon-gray-700);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.auth-lang-item:hover {
  background: rgba(var(--falcon-primary-rgb), 0.06);
  color: var(--falcon-primary);
}
.auth-lang-item.active {
  color: var(--falcon-primary);
  font-weight: 700;
}
.auth-lang-item.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.65rem;
  margin-left: auto;
}

/* Mobile: brand panel hidden, form takes full width */
@media (max-width: 991.98px) {
  .auth-split {
    flex-direction: column;
  }
  .auth-form-panel {
    padding: 1.5rem 1.25rem;
    align-items: flex-start;
    padding-top: 2.5rem;
  }
  .auth-form-inner {
    max-width: 100%;
  }
}

/* Tablet adjustments */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .auth-brand-panel {
    flex: 0 0 34%;
    max-width: 34%;
  }
  .auth-features {
    max-width: 200px;
  }
}

/* Small phone: tighter spacing */
@media (max-width: 575.98px) {
  .auth-form-panel {
    padding: 1.25rem 1rem;
    padding-top: 2rem;
  }
  .auth-input {
    height: 2.625rem;
  }
  .auth-submit-btn {
    height: 2.625rem;
  }
}

/* ── Toast Notifications ───────────────────────────── */
#toast-container .toast-item {
  min-width: 280px;
  max-width: 380px;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: toastSlideIn 0.3s ease;
  margin-bottom: 0.5rem;
  backdrop-filter: blur(4px);
}
.toast-item.success { background: var(--falcon-success); }
.toast-item.error   { background: var(--falcon-danger); }
.toast-item.warning { background: var(--falcon-warning); }
.toast-item.info    { background: var(--falcon-info); }

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ══ Trial Banner ══════════════════════════════════════════ */
.trial-banner {
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.trial-banner__body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.1rem;
  flex-wrap: wrap;
}
/* Icon */
.trial-banner__icon-wrap {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
/* Text */
.trial-banner__text { flex: 1; min-width: 0; }
.trial-banner__title { font-weight: 600; font-size: .875rem; }
.trial-banner__sub   { font-size: .775rem; opacity: .82; margin-top: .15rem; }
.trial-banner__end-date {
  font-weight: 600; opacity: 1;
  margin-left: .35rem;
}
/* Right side: days badge + CTA */
.trial-banner__right {
  display: flex; align-items: center; gap: .75rem;
  flex-shrink: 0; margin-left: auto;
}
.trial-banner__days-badge {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1; background: rgba(255,255,255,.35);
  border-radius: 8px; padding: .3rem .6rem;
  min-width: 44px; text-align: center;
}
.trial-banner__days-n {
  font-size: 1.5rem; font-weight: 800; line-height: 1;
}
.trial-banner__days-w {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .04em;
  opacity: .7;
}
.trial-banner__cta {
  display: inline-flex; align-items: center;
  font-size: .78rem; font-weight: 600;
  padding: .45rem .9rem; border-radius: 7px;
  text-decoration: none; white-space: nowrap;
  transition: opacity .15s;
}
.trial-banner__cta:hover { opacity: .85; text-decoration: none; }
/* Dismiss */
.trial-banner__dismiss {
  position: absolute; top: .5rem; right: .6rem;
  background: none; border: none;
  font-size: 1.1rem; line-height: 1;
  cursor: pointer; opacity: .5; padding: 0;
  transition: opacity .15s;
}
.trial-banner__dismiss:hover { opacity: 1; }
/* Progress track */
.trial-banner__progress-track {
  height: 4px; background: rgba(0,0,0,.1);
}
.trial-banner__progress-bar {
  height: 100%; transition: width .5s ease;
}

/* ── Urgency variants ── */
/* low (>7 days) — calm blue */
.trial-banner--low {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe; color: #1e40af;
}
.trial-banner--low .trial-banner__icon-wrap { background: rgba(37,99,235,.12); color: #2563eb; }
.trial-banner--low .trial-banner__cta       { background: #2563eb; color: #fff; }
.trial-banner--low .trial-banner__progress-bar { background: #2563eb; }

/* medium (4-7 days) — amber */
.trial-banner--high {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a; color: #92400e;
}
.trial-banner--high .trial-banner__icon-wrap { background: rgba(217,119,6,.12); color: #d97706; }
.trial-banner--high .trial-banner__cta       { background: #d97706; color: #fff; }
.trial-banner--high .trial-banner__progress-bar { background: #d97706; }
.trial-banner--high .trial-banner__progress-track { background: rgba(217,119,6,.15); }

/* critical (<=2 days) — orange-red */
.trial-banner--critical {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa; color: #9a3412;
}
.trial-banner--critical .trial-banner__icon-wrap { background: rgba(234,88,12,.12); color: #ea580c; }
.trial-banner--critical .trial-banner__cta       { background: #ea580c; color: #fff; }
.trial-banner--critical .trial-banner__progress-bar { background: #ea580c; }
.trial-banner--critical .trial-banner__progress-track { background: rgba(234,88,12,.15); }
.trial-banner--critical .trial-banner__days-n { color: #dc2626; }

/* expired — red */
.trial-banner--expired {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca; color: #991b1b;
}
.trial-banner--expired .trial-banner__icon-wrap { background: rgba(220,38,38,.12); color: #dc2626; }
.trial-banner--expired .trial-banner__cta       { background: #dc2626; color: #fff; }

/* mobile */
@media (max-width: 576px) {
  .trial-banner__right { width: 100%; justify-content: space-between; }
  .trial-banner__dismiss { top: .4rem; right: .5rem; }
}

/* ── Dashboard Date Badge ──────────────────────────── */
.dash-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  padding: 0.5rem 0.25rem;
  border-radius: 0.875rem;
  background: rgba(var(--falcon-primary-rgb), 0.07);
  border: 1.5px solid rgba(var(--falcon-primary-rgb), 0.15);
  text-align: center;
  line-height: 1;
  gap: 2px;
}
.dash-date-day {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--falcon-primary);
  text-transform: uppercase;
}
.dash-date-num {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--falcon-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.dash-date-month {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--falcon-gray-600);
  letter-spacing: 0.04em;
}

/* ── Dashboard Stat Cards ──────────────────────────── */
.stat-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(var(--falcon-primary-rgb), 0.1);
}

.stat-icon-sm {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.stat-icon-lg {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
}

.stat-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ── Active Nav Link Highlight ─────────────────────── */
.navbar-vertical .nav-link.active-page {
  color: var(--falcon-primary) !important;
  font-weight: 600;
  background: rgba(var(--falcon-primary-rgb), 0.06);
  border-radius: 0.375rem;
}
.navbar-vertical .nav-link.active-page .nav-link-icon {
  color: var(--falcon-primary) !important;
}

/* ── Collapsible Nav Chevron ───────────────────────── */
.nav-collapse-arrow {
  font-size: .6rem;
  color: var(--falcon-gray-400);
  transition: transform .2s ease, color .2s ease;
  flex-shrink: 0;
}
.nav-link[aria-expanded="true"] .nav-collapse-arrow {
  transform: rotate(90deg);
  color: var(--falcon-primary);
}

/* ── Page Transitions ──────────────────────────────── */
#page {
  animation: pageFadeIn 0.25s ease;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ── Welcome Banner Shortcut Buttons ──────────────── */
.card .btn-falcon-primary,
.card .btn-falcon-success,
.card .btn-falcon-warning,
.card .btn-falcon-info,
.card .btn-falcon-danger {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card .btn-falcon-primary:hover,
.card .btn-falcon-success:hover,
.card .btn-falcon-warning:hover,
.card .btn-falcon-info:hover,
.card .btn-falcon-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ── Icon Pulse (low-stock warning) ───────────────── */
.icon-pulse {
  animation: iconPulse 1.8s ease-in-out infinite;
}
@keyframes iconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.88); }
}

/* ── Empty State ───────────────────────────────────── */
.empty-state,
.empty-state-sm {
  text-align: center;
  padding: 1.5rem 1rem;
}
.empty-state .fas,
.empty-state .far {
  font-size: 3rem;
  color: var(--falcon-gray-400);
  margin-bottom: 1rem;
}

/* ── Table Enhancements ────────────────────────────── */
.table-hover tbody tr {
  transition: background-color 0.15s;
}

/* ── POS Layout ────────────────────────────────────── */
#pos-wrap {
  display: flex;
  flex-direction: column;
}
.pos-topbar {
  height: 52px;
  background: var(--falcon-white);
  border-bottom: 1px solid var(--falcon-gray-200);
  flex-shrink: 0;
}
.pos-layout {
  display: flex;
  height: calc(100vh - 182px);
  overflow: hidden;
}
/* Fullscreen mode */
#pos-wrap.pos-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: var(--falcon-body-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#pos-wrap.pos-fullscreen .pos-layout {
  height: calc(100vh - 52px);
  flex: 1;
}
/* Panels */
.pos-left {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: rgba(var(--falcon-gray-100-rgb), 0.5);
}
.pos-right {
  width: 380px;
  min-width: 320px;
  flex-shrink: 0;
  background: var(--falcon-white);
  border-left: 1px solid var(--falcon-gray-200);
}
/* Category filter bar */
.pos-cat-bar {
  flex-shrink: 0;
  background: var(--falcon-white);
  flex-wrap: wrap !important;
}
.pos-cat-pill {
  white-space: nowrap;
  border-radius: 100px;
  border: 1px solid var(--falcon-gray-300);
  background: var(--falcon-white);
  color: var(--falcon-gray-700);
  font-size: 0.75rem;
  padding: 0.25rem 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.pos-cat-pill.active,
.pos-cat-pill:hover {
  background: var(--falcon-primary);
  color: #fff;
  border-color: var(--falcon-primary);
}
.pos-cat-count {
  font-size: 0.65rem;
  opacity: 0.7;
}
/* Product cards grid */
.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem;
}
.pos-card {
  background: var(--falcon-white);
  border: 1.5px solid var(--falcon-gray-200);
  border-radius: 0.75rem;
  padding: 0.875rem 0.75rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.pos-card:hover:not(.pos-card-oos) {
  border-color: var(--falcon-primary);
  box-shadow: 0 4px 14px rgba(var(--falcon-primary-rgb), 0.15);
  transform: translateY(-2px);
}
.pos-card:active:not(.pos-card-oos) {
  transform: scale(0.97);
  transition-duration: 0.05s;
}
.pos-card-oos {
  opacity: 0.42;
  cursor: not-allowed;
}
.pos-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  margin: 0 auto 0.5rem;
}
.pos-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--falcon-gray-900);
  line-height: 1.3;
  margin-bottom: 0.1875rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pos-card-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--falcon-primary);
  margin-bottom: 0.25rem;
}
/* Cart items */
.pos-cart-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--falcon-gray-100);
}
.pos-cart-item:last-child { border-bottom: none; }
.pos-cart-avatar {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.pos-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--falcon-gray-300);
  background: var(--falcon-white);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.6875rem;
  color: var(--falcon-gray-700);
  flex-shrink: 0;
  transition: all 0.12s;
}
.pos-qty-btn:hover {
  border-color: var(--falcon-primary);
  color: var(--falcon-primary);
  background: rgba(var(--falcon-primary-rgb), 0.05);
}
/* Add-to-cart flash */
@keyframes posCardAdded {
  0%   { box-shadow: 0 0 0 0 rgba(var(--falcon-success-rgb), 0.5); }
  50%  { box-shadow: 0 0 0 6px rgba(var(--falcon-success-rgb), 0.15); border-color: var(--falcon-success); }
  100% { box-shadow: none; }
}
.pos-card-added {
  animation: posCardAdded 0.35s ease;
}
/* Grand Total hero block */
.pos-total-block {
  background: linear-gradient(135deg, var(--falcon-primary) 0%, #1a56db 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(var(--falcon-primary-rgb), 0.35);
}
.pos-total-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}
.pos-total-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
/* Fullscreen prompt modal */
.pos-fs-modal-header {
  background: linear-gradient(135deg, var(--falcon-primary) 0%, #1a56db 100%);
}
.pos-fs-modal-header h5,
.pos-fs-modal-header p {
  color: rgba(255,255,255,0.95) !important;
}
.pos-fs-modal-header p {
  color: rgba(255,255,255,0.75) !important;
}
.pos-fs-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
}
/* Responsive: stack on small screens */
@media (max-width: 767.98px) {
  .pos-layout { flex-direction: column; height: auto; }
  .pos-right  { width: 100%; min-width: 0; border-left: none; border-top: 1px solid var(--falcon-gray-200); }
  #pos-wrap.pos-fullscreen .pos-layout { height: auto; overflow-y: auto; }
}

/* ── Scrollbar refinement ──────────────────────────── */
.scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.scrollbar::-webkit-scrollbar-thumb {
  background: var(--falcon-gray-300);
  border-radius: 4px;
}

/* ── Products Page ─────────────────────────────────── */

/* Overview stat cards */
.prod-overview-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.prod-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1.25rem rgba(0,0,0,0.08) !important;
}
.prod-overview-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}
.prod-overview-body {
  flex: 1;
  min-width: 0;
}
.prod-overview-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--falcon-gray-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.prod-overview-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--falcon-gray-500);
  margin-top: 2px;
}
.prod-overview-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Search box */
.prod-search-box {
  position: relative;
}
.prod-search-box .form-control {
  padding-left: 2.1rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  background: var(--falcon-gray-100);
  border-color: var(--falcon-gray-200);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.prod-search-box .form-control:focus {
  background: #fff;
  border-color: var(--falcon-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--falcon-primary-rgb), 0.18);
}
.prod-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  pointer-events: none;
  z-index: 2;
}

/* Table header */
.prod-table-head th {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--falcon-gray-600);
  background: rgba(var(--falcon-gray-100-rgb), 0.6);
  border-bottom: 1px solid var(--falcon-gray-200);
  white-space: nowrap;
}

/* Product avatar */
.prod-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

/* Icon action buttons */
.btn-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  padding: 0;
  font-size: 0.8125rem;
}
.btn-icon-action:hover {
  transform: translateY(-1px);
  filter: brightness(0.9);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.btn-icon-action:active {
  transform: scale(0.93);
}
/* Edit — always blue */
.btn-icon-action.btn-icon-edit {
  background: rgba(var(--falcon-primary-rgb), 0.12);
  color: var(--falcon-primary);
}
.btn-icon-action.btn-icon-edit:hover {
  background: var(--falcon-primary);
  color: #fff;
}
/* Delete — always red */
.btn-icon-action.btn-icon-del {
  background: rgba(var(--falcon-danger-rgb), 0.12);
  color: var(--falcon-danger);
}
.btn-icon-action.btn-icon-del:hover {
  background: var(--falcon-danger);
  color: #fff;
}
/* Create-Box shortcut — amber/warning */
.btn-icon-action.btn-icon-box {
  background: rgba(var(--falcon-warning-rgb), 0.12);
  color: var(--falcon-warning);
}
.btn-icon-action.btn-icon-box:hover {
  background: var(--falcon-warning);
  color: #fff;
}
/* Stock Adjustment — cyan/info */
.btn-icon-action.btn-icon-adj {
  background: rgba(var(--falcon-info-rgb), 0.12);
  color: var(--falcon-info);
}
.btn-icon-action.btn-icon-adj:hover {
  background: var(--falcon-info);
  color: #fff;
}
/* Product History — violet/plum */
.btn-icon-action.btn-icon-hist {
  background: rgba(122, 105, 254, 0.12);
  color: #7a69fe;
}
.btn-icon-action.btn-icon-hist:hover {
  background: #7a69fe;
  color: #fff;
}

/* Product history modal — tab strip */
.hist-tab-btn {
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--falcon-gray-600);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.hist-tab-btn:hover {
  color: var(--falcon-primary);
  background: rgba(var(--falcon-primary-rgb), 0.04);
}
.hist-tab-btn.active {
  color: var(--falcon-primary);
  border-bottom-color: var(--falcon-primary);
  background: rgba(var(--falcon-primary-rgb), 0.04);
}

/* Choices.js dropdown must appear above Bootstrap modals (z-index 1055) */
.choices__list--dropdown { z-index: 1060 !important; }

/* Striped rows */
.prod-row:nth-child(odd) {
  background: #fff;
}
.prod-row:nth-child(even) {
  background: rgba(var(--falcon-gray-100-rgb), 0.55);
}
.prod-row {
  transition: background 0.12s;
}
.prod-row:hover {
  background: rgba(var(--falcon-primary-rgb), 0.06) !important;
}

/* Modal section labels */
.prod-modal-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--falcon-gray-600);
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--falcon-gray-200);
}

/*  Sales Invoice Page  */
.si-row-alt {
  background-color: rgba(0, 0, 0, 0.018);
}

/* Invoice modal wrapper */
.si-invoice-wrap {
  background: #fff;
}
[data-bs-theme="dark"] .si-invoice-wrap {
  background: var(--falcon-card-bg);
}

/* Company logo chip */
.si-inv-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(var(--falcon-primary-rgb), 0.15);
  color: var(--falcon-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Info boxes inside modal */
.si-inv-section {
  background: var(--falcon-gray-100);
  border: 1px solid var(--falcon-border-color);
}

/* Totals summary box */
.si-inv-totals {
  background: rgba(var(--falcon-primary-rgb), 0.06);
  border: 1px solid rgba(var(--falcon-primary-rgb), 0.18);
}
.si-inv-total-line {
  border-top: 2px solid var(--falcon-border-color);
}

/* Items table inside modal */
.si-inv-table thead th {
  background: var(--falcon-gray-200);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--falcon-gray-700);
  padding: 10px 8px;
}
.si-inv-table tbody tr:hover {
  background: rgba(var(--falcon-primary-rgb), 0.04);
}

/* ================================================================
   RTL (Arabic) Overrides
   ================================================================ */

/* Toast slides from left when RTL */
@keyframes toastSlideInRtl {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
[dir="rtl"] #toast-container .toast-item {
  animation: toastSlideInRtl 0.3s ease;
}
html[dir="rtl"] #toast-container {
  left: 1rem;
  right: auto;
}

/* Search icon position */
html[dir="rtl"] .prod-search-icon,
html[dir="rtl"] .top-search-icon {
  left: auto;
  right: 0.75rem;
}
html[dir="rtl"] .prod-search-box .form-control,
html[dir="rtl"] .top-search-input input.form-control {
  padding-left: 0.75rem;
  padding-right: 2.2rem;
}

/* POS right panel border */
html[dir="rtl"] .pos-right {
  border-left: none;
  border-right: 1px solid var(--falcon-gray-200);
}

/* Table text alignment overrides */
html[dir="rtl"] .text-end { text-align: left !important; }
html[dir="rtl"] .text-start { text-align: right !important; }
html[dir="rtl"] .ps-3 { padding-left: 0 !important; padding-right: 1rem !important; }
html[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem !important; }
html[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .ms-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }

/* Current plan ribbon flip */
html[dir="rtl"] .billing-plan-current-ribbon {
  right: auto;
  left: -10px;
  border-radius: 0 3px 3px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 15% 50%);
}

/* Cart item left highlight border → right */
html[dir="rtl"] .pos-cart-item[style*="border-left"] {
  border-left: none !important;
  border-right: 3px solid var(--falcon-warning);
}

/* Font family for Arabic */
html[dir="rtl"] body {
  font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Droid Arabic Kufi', sans-serif;
}

/* ============================================================
   MODULES PAGE
   ============================================================ */

/* Page header */
.mod-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.mod-page-hero {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.mod-page-hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4695ff 0%, #1970e2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.35rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(25,112,226,.35);
}
.mod-page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--falcon-gray-900);
}
.mod-page-sub {
  font-size: 0.82rem;
  color: var(--falcon-gray-600);
  max-width: 520px;
  line-height: 1.5;
}
.mod-page-stats {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}
.mod-stat-pill {
  background: var(--falcon-gray-100);
  border: 1px solid var(--falcon-gray-200);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  color: var(--falcon-gray-700);
  white-space: nowrap;
}

/* Card grid */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

/* Individual card */
.mod-card {
  background: var(--falcon-white);
  border: 1.5px solid var(--falcon-gray-200);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.mod-card:hover:not(.mod-card--soon) {
  box-shadow: 0 8px 28px rgba(0,0,0,.10);
  transform: translateY(-2px);
}
.mod-card--soon {
  opacity: 0.72;
}

/* Badge */
.mod-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  z-index: 1;
}
.mod-badge--popular { background: #fff3cd; color: #856404; border: 1px solid #ffd040; }
.mod-badge--new     { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.mod-badge--soon    { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.mod-badge--plan    { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }

/* ── Basic Module card ────────────────────────────── */
.mod-card--plan { order: -1; }
.mod-card--plan.mod-card--plan-active  { border-top: 3px solid #059669; }
.mod-card--plan.mod-card--plan-trial   { border-top: 3px solid #3b82f6; }
.mod-card--plan.mod-card--plan-expired { border-top: 3px solid #dc2626; }

.mod-plan-status-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.mod-plan-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
}
.mod-plan-status--active  { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.mod-plan-status--trial   { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.mod-plan-status--expired { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Activated notice */
.mod-plan-activated {
  font-size: 0.82rem;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #34d399;
  border-radius: 8px;
  padding: 0.6rem 0.875rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

/* Trial countdown mini-block */
.mod-plan-trial-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.mod-plan-trial-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}
.mod-plan-trial-n {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1d4ed8;
  line-height: 1;
}
.mod-plan-trial-w {
  font-size: 0.65rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
}
.mod-plan-trial-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mod-plan-trial-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
}
.mod-plan-trial-sub {
  font-size: 0.72rem;
  color: #3b82f6;
}

/* Expired notice */
.mod-plan-expired-notice {
  font-size: 0.82rem;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.6rem 0.875rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
}

/* Plan CTA button states */
.mod-cta-btn--plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #059669;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s;
}
.mod-cta-btn--plan:hover:not(:disabled) { opacity: 0.87; }
.mod-cta-btn--activated {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border: 1px solid #34d399 !important;
  cursor: default;
}
.mod-cta-btn--expired {
  background: #dc2626 !important;
}

/* ── Locked module card ───────────────────────────── */
.mod-card--locked { opacity: 0.78; }
.mod-cta-btn--locked {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #cbd5e1 !important;
  cursor: not-allowed;
}

/* ── Subscribed module card ──────────────────────── */
.mod-card--subscribed { border-color: rgba(5,150,105,.35); }
.mod-badge--subscribed {
  background: #059669 !important;
  color: #fff !important;
}
.mod-cta-btn--subscribed {
  background: #d1fae5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  cursor: default;
  font-weight: 600;
}

/* Card header */
.mod-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.1rem 1.1rem 1rem;
}
.mod-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.mod-header-text {
  flex: 1;
  min-width: 0;
}
.mod-name {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--falcon-gray-900);
  margin-bottom: 0.2rem;
}
.mod-tagline {
  font-size: 0.76rem;
  color: var(--falcon-gray-600);
  margin: 0;
  line-height: 1.4;
}

/* Card body */
.mod-card-body {
  padding: 0.25rem 1.1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mod-desc {
  font-size: 0.78rem;
  color: var(--falcon-gray-600);
  line-height: 1.55;
  margin-bottom: 0.875rem;
}
.mod-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.mod-feature-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--falcon-gray-700);
}
.mod-feature-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Card footer */
.mod-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.1rem;
  border-top: 1px solid var(--falcon-gray-200);
  background: var(--falcon-gray-100);
}
.mod-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}
.mod-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--falcon-gray-900);
  line-height: 1;
}
.mod-period {
  font-size: 0.75rem;
  color: var(--falcon-gray-500);
}
.mod-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: filter 0.15s;
}
.mod-cta-btn:not([disabled]):hover {
  filter: brightness(1.1);
}
.mod-cta-btn--soon {
  background: var(--falcon-gray-400) !important;
  cursor: not-allowed;
}

/* RTL */
html[dir="rtl"] .mod-badge { right: auto; left: 0.75rem; }
html[dir="rtl"] .mod-page-stats { flex-direction: row-reverse; }

/* ============================================================
   BASKET / CART
   ============================================================ */

/* Basket toggle button */
.mod-basket-btn {
  position: relative;
  background: var(--falcon-white);
  border: 1.5px solid var(--falcon-gray-200);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--falcon-gray-600);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.mod-basket-btn:hover { border-color: #2563eb; color: #2563eb; }
.mod-basket-btn--has-items { border-color: #2563eb; color: #2563eb; }
.mod-basket-counter {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc2626;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* In-basket badge on card */
.mod-badge--in-basket {
  background: #2563eb !important;
  color: #fff !important;
}
.mod-badge--trial {
  background: #7c3aed !important;
  color: #fff !important;
}
.mod-card--in-basket { border-color: rgba(37,99,235,.35); }
.mod-card--trial { border-color: rgba(124,58,237,.35); }
.mod-cta-btn--in-basket {
  background: #dbeafe !important;
  color: #1e40af !important;
  border: 1px solid #93c5fd !important;
  font-weight: 600;
}
.mod-cta-btn--in-basket:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}
.mod-cta-btn--trial {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border: 1px solid #c4b5fd !important;
  cursor: default;
  font-weight: 600;
}

/* Trial info line on card */
.mod-trial-info {
  font-size: 0.75rem;
  font-weight: 600;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #e9d5ff;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.6rem;
  display: inline-flex;
  align-items: center;
}

/* ── Basket drawer (slide-in panel) ── */
.mod-basket-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: flex;
  justify-content: flex-end;
}
.mod-basket-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  cursor: pointer;
}
.mod-basket-panel {
  position: relative;
  width: 380px;
  max-width: 92vw;
  background: var(--falcon-white);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  z-index: 1;
}
.mod-basket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--falcon-gray-200);
  font-weight: 700;
  font-size: 0.95rem;
}
.mod-basket-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--falcon-gray-500);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}
.mod-basket-close:hover { color: var(--falcon-gray-900); }
.mod-basket-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
}

/* Individual basket item */
.mod-basket-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--falcon-gray-100);
}
.mod-basket-item:last-child { border-bottom: none; }
.mod-basket-item-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}
.mod-basket-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--falcon-gray-900);
}
.mod-basket-item-price {
  font-size: 0.72rem;
  color: var(--falcon-gray-500);
}
.mod-basket-item-remove {
  background: none;
  border: none;
  color: var(--falcon-gray-400);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.mod-basket-item-remove:hover { color: #dc2626; }

/* Basket footer */
.mod-basket-footer {
  border-top: 1px solid var(--falcon-gray-200);
  padding: 1rem 1.25rem;
}
.mod-basket-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--falcon-gray-700);
  margin-bottom: 0.75rem;
}
.mod-basket-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}
.mod-basket-checkout-btn:hover { background: #1d4ed8; }

/* RTL for basket */
html[dir="rtl"] .mod-basket-drawer { justify-content: flex-start; }
html[dir="rtl"] .mod-basket-panel { box-shadow: 4px 0 24px rgba(0,0,0,.12); }
html[dir="rtl"] .mod-basket-counter { right: auto; left: -6px; }

@media (max-width: 576px) {
  .mod-basket-panel { width: 100vw; max-width: 100vw; }
}

