/* ==========================================================================
   KHOTWA LOGISTICS ERP - DESIGN SYSTEM (style.css)
   منظومة خطوة للشحن واللوجستيات
   Typography: Cairo & Tajawal & Outfit
   Palette: Eye-Comfort Royal Blue (#1d4ed8, #1e40af),
            Vibrant Sky Blue (#0284c7, #0ea5e9, #38bdf8),
            Soft Azure Glassmorphism & High Contrast Dark Navy Sidebar
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-arabic: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Outfit', sans-serif;

  /* Primary Brand Colors (Comfortable Blue & Sky Blue) */
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #0284c7;
  --color-primary-soft: #e0f2fe;
  --color-primary-gradient: linear-gradient(135deg, #1e40af 0%, #0284c7 50%, #38bdf8 100%);
  --color-sky-glow: rgba(2, 132, 199, 0.22);
  --color-sky-accent: #0ea5e9;

  /* Neutrals & Surfaces */
  --bg-landing: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
  --bg-dashboard: #f4f8fb;
  --surface-card: #ffffff;
  --surface-card-subtle: #f0f9ff;
  --surface-border: #bae6fd;
  --surface-border-subtle: #e0f2fe;

  /* Sidebar Dark Theme (Deep Ocean Navy & Sky Highlights) */
  --sidebar-bg: #0b1329;
  --sidebar-card-bg: #111e38;
  --sidebar-border: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg: #0284c7;
  --sidebar-active-text: #ffffff;

  /* Text & Accents */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-danger: #ef4444;
  --text-success: #10b981;
  --text-warning: #f59e0b;

  /* Shadows & Glass */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(2, 132, 199, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 16px 40px rgba(2, 132, 199, 0.14), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  background: var(--bg-landing);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   LANDING / PORTAL SWITCHER LAYOUT
   ========================================================================== */

.landing-viewport {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at 10% 20%, #e0f2fe 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, #bae6fd 0%, transparent 40%),
              #f0f7fc;
}

.landing-card {
  background: #ffffff;
  width: 100%;
  max-width: 1100px;
  min-height: 580px;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(2, 132, 199, 0.15), 0 10px 25px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  position: relative;
  overflow: hidden;
}

/* Right Column: Interactive Illustration / Mascot */
.landing-hero-side {
  position: relative;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid #bae6fd;
}

.hero-glow-circle {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, #bae6fd 0%, #e0f2fe 70%, transparent 100%);
  z-index: 1;
}

.hero-svg-art {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 360px;
  filter: drop-shadow(0 15px 25px rgba(2, 132, 199, 0.18));
  animation: floatSubtle 4s ease-in-out infinite alternate;
}

@keyframes floatSubtle {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}

/* Left Column: Brand & Portal Selections */
.landing-content-side {
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.khotwa-logo-brand,
.codex-logo-brand {
  font-family: var(--font-arabic);
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0284c7;
  display: flex;
  align-items: center;
  gap: 8px;
}

.khotwa-pill-badge,
.codex-pill-badge {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.landing-description {
  font-size: 0.98rem;
  color: #64748b;
  line-height: 1.65;
  margin-bottom: 2.5rem;
  max-width: 460px;
}

/* Portal Cards Grid */
.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 850px) {
  .portal-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portal-card-btn {
  background: #ffffff;
  border: 1px solid #e0f2fe;
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.portal-card-btn:hover {
  transform: translateY(-4px);
  border-color: #0284c7;
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.16);
}

.portal-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  transition: transform var(--transition-normal);
}

.portal-card-btn:hover .portal-card-icon {
  transform: scale(1.08) rotate(-4deg);
}

.portal-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

/* Third Portal (Warehouse/Fulfillment Card) - Full Width or Centered */
.portal-card-center-row {
  display: flex;
  justify-content: center;
}

.portal-card-center-row .portal-card-btn {
  width: 50%;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .landing-card {
    grid-template-columns: 1fr;
    max-width: 550px;
  }
  .landing-hero-side {
    display: none;
  }
  .landing-content-side {
    padding: 2.5rem 1.75rem;
  }
  .portal-card-center-row .portal-card-btn {
    width: 100%;
  }
}
