/* Voice of Ittihad User Portal - Modern Design System */

/* Typography: Using Arial as specified in Ittihad Branding Guidelines */
/* Arial is the official web alternative font when Gilroy is unavailable */

/* ===================================
   DESIGN TOKENS & CSS VARIABLES
   Based on SHARED_DESIGN_SYSTEM.md
   =================================== */

:root {
  /* Core Brand Colors - Official Ittihad International Investment Branding */
  --background: 0 0% 100%;           /* #FFFFFF - White */
  --foreground: 0 0% 0%;             /* #000000 - Black */
  --muted: 210 20% 97%;              /* #F8FAFC - Very light gray */
  --muted-foreground: 210 11% 20%;   /* #32373C - Dark charcoal */
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 8%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 8%;
  --border: 210 14% 71%;             /* #ABB8C3 - Cyan bluish gray */
  --input: 210 14% 71%;
  --primary: 1 59% 40%;              /* #A12B2A - Official PANTONE 7628C Red (RGB: 161, 43, 42) */
  --primary-foreground: 0 0% 100%;   /* White text */
  --primary-hover: 1 59% 32%;        /* #852325 - Darker red on hover (8% darker) */
  --secondary: 220 2% 40%;           /* #636569 - PANTONE Cool Gray 10C (RGB: 99, 101, 105) */
  --secondary-foreground: 0 0% 100%; /* White text on secondary buttons */
  --accent: 166 100% 42%;            /* #00D084 - Green cyan */
  --accent-foreground: 0 0% 100%;
  --destructive: 0 56% 56%;          /* #CF2E2E - Vivid red */
  --destructive-foreground: 0 0% 100%;
  --ring: 1 59% 40%;                 /* #A12B2A - Official red focus ring */
  --success: 166 100% 42%;           /* #00D084 - Green cyan */
  --warning: 20 100% 50%;            /* #FF6900 - Orange */
  --brand-red: 1 59% 40%;            /* #A12B2A - Official PANTONE 7628C Red */
  --brand-red-hover: 1 59% 32%;      /* #852325 - Darker red on hover */
  --brand-gray: 220 2% 40%;          /* #636569 - PANTONE Cool Gray 10C (RGB: 99, 101, 105) */

  /* Border Radius */
  --radius-sm: 0.375rem;   /* 6px */
  --radius-base: 0.5rem;   /* 8px */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 0.875rem;   /* 14px - Primary radius */
  --radius-xl: 1.25rem;    /* 20px - Large cards */
  --radius-2xl: 1.75rem;   /* 28px - Hero sections */
  --radius-full: 9999px;   /* Full round */

  /* Spacing Scale - 8pt Grid */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-base: 1rem;    /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */

  /* Typography */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Shadows - Ittihad WordPress Presets */
  --shadow-natural: 6px 6px 9px rgba(0, 0, 0, 0.2);
  --shadow-deep: 12px 12px 50px rgba(0, 0, 0, 0.4);
  --shadow-sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);
  --shadow-outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);
  --shadow-crisp: 6px 6px 0px rgba(0, 0, 0, 1);

  /* Custom shadows for buttons */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px 0 rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 24px 0 rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 20px 40px 0 rgba(0, 0, 0, 0.25);
  --shadow-primary: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================
   BASE STYLES
   =================================== */

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

body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   LANDING PAGE LAYOUT
   =================================== */

.landing-container {
  display: flex;
  height: 100vh;
}

.left-panel {
  width: 40%;
  background: linear-gradient(135deg, #32373c 0%, #1a1d1f 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pattern {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  /* Background pattern removed for cleaner look */
  background-image: none;
}

.left-footer {
  position: absolute;
  bottom: var(--space-xl);
  left: var(--space-xl);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

.left-footer a {
  color: hsl(var(--accent));
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.left-footer a:hover {
  opacity: 0.8;
}

.right-panel {
  width: 60%;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
}

.content-box {
  background: hsl(var(--card));
  padding: var(--space-3xl);
  border-radius: var(--radius-2xl);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid hsl(var(--border));
}

/* ===================================
   LOGO & BRANDING
   =================================== */

.logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.logo-image {
  width: 120px;
  height: auto;
}

.platform-name {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: hsl(var(--primary));
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.info-link {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.info-link a {
  color: hsl(var(--primary));
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transition: color 0.2s ease;
}

.info-link a:hover {
  color: hsl(var(--accent));
}

.tagline {
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: var(--text-base);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  line-height: 1.625;
}

/* ===================================
   BUTTONS - Modern SaaS Design
   =================================== */

.btn {
  width: 100%;
  height: 2.75rem;
  padding: 0 var(--space-lg);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 10px 24px hsla(var(--primary) / 0.25);
  margin-bottom: var(--space-base);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: hsl(var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: 0 15px 30px hsla(var(--primary) / 0.35);
  transition: all 0.3s ease;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px hsla(var(--primary) / 0.25);
}

.btn-secondary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: none;
  box-shadow: 0 4px 12px rgba(99, 101, 105, 0.3);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: hsl(220 2% 32%);
  color: hsl(var(--secondary-foreground));
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(99, 101, 105, 0.4);
  transition: all 0.3s ease;
}

.btn-outline {
  background: transparent;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 16px hsla(var(--primary) / 0.2);
}

/* ===================================
   FORMS - Clean & Modern
   =================================== */

.form-container {
  max-width: 800px;
  margin: var(--space-2xl) auto;
  padding: var(--space-2xl);
  background: hsl(var(--card));
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid hsl(var(--border));
}

.form-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.form-title {
  font-size: var(--text-3xl);
  color: hsl(var(--primary));
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.form-subtitle {
  color: hsl(var(--muted-foreground));
  font-size: var(--text-sm);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(var(--foreground));
  margin-bottom: var(--space-sm);
}

.required {
  color: hsl(var(--destructive));
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 2.75rem;
  padding: 0 var(--space-base);
  border: 2px solid hsl(var(--brand-gray));
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-family: inherit;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsla(var(--ring) / 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: hsl(var(--muted-foreground));
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-base) center;
  padding-right: var(--space-2xl);
  appearance: none;
}

.form-textarea {
  min-height: 120px;
  padding: var(--space-base);
  resize: vertical;
  line-height: 1.5;
}

.form-help {
  font-size: var(--text-xs);
  color: hsl(var(--muted-foreground));
  margin-top: var(--space-xs);
  line-height: 1.4;
}

/* ===================================
   MESSAGES & ALERTS
   =================================== */

.error-message {
  background: hsla(var(--destructive) / 0.1);
  border: 1px solid hsla(var(--destructive) / 0.3);
  border-left: 4px solid hsl(var(--destructive));
  color: hsl(var(--destructive));
  padding: var(--space-base);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.success-message {
  background: hsla(var(--success) / 0.1);
  border: 1px solid hsla(var(--success) / 0.3);
  border-left: 4px solid hsl(var(--success));
  color: hsl(var(--success));
  padding: var(--space-base);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ===================================
   LANGUAGE GRID
   =================================== */

.languages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-base);
  max-height: 60vh;
  overflow-y: auto;
  padding: var(--space-base);
}

.language-btn {
  padding: var(--space-lg);
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.language-btn:hover {
  background: hsl(var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.language-btn:active {
  transform: translateY(0);
}

.language-btn-disabled {
  background: hsl(var(--muted)) !important;
  color: hsl(var(--muted-foreground)) !important;
  opacity: 0.6;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.language-btn-disabled:hover {
  transform: none !important;
  background: hsl(var(--muted)) !important;
  box-shadow: none !important;
}

/* ===================================
   REPORT NUMBER DISPLAY
   =================================== */

.report-number-display {
  display: flex;
  align-items: center;
  gap: var(--space-base);
  margin-bottom: var(--space-2xl);
}

.number-boxes {
  display: flex;
  gap: var(--space-sm);
  flex: 1;
}

.number-box {
  width: 50px;
  height: 50px;
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: hsl(var(--primary));
  background: hsl(var(--secondary));
  font-family: monospace;
  transition: all 0.2s ease;
}

.number-box:hover {
  transform: scale(1.05);
  border-color: hsl(var(--primary));
}

.copy-btn {
  width: 50px;
  height: 50px;
  background: hsl(var(--primary));
  border: none;
  border-radius: var(--radius-lg);
  color: hsl(var(--primary-foreground));
  font-size: var(--text-xl);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.copy-btn:hover {
  background: hsl(var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.copy-btn:active {
  transform: translateY(0);
}

/* ===================================
   PASSWORD GENERATOR
   =================================== */

.password-suggestion {
  margin-top: var(--space-base);
  padding: var(--space-base);
  background: white;
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-base);
  cursor: pointer;
  transition: all 0.2s ease;
}

.password-suggestion:hover {
  background: white;
  border-color: hsl(var(--primary));
  box-shadow: var(--shadow-md);
}

.password-strength {
  margin-top: var(--space-sm);
  display: flex;
  gap: var(--space-xs);
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: hsl(var(--border));
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.strength-bar.active {
  background: hsl(var(--success));
  box-shadow: 0 0 8px hsla(var(--success) / 0.3);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
  background: hsl(var(--card));
  padding: var(--space-xs) var(--space-base);
  text-align: center;
  border-top: 1px solid hsl(var(--border));
  margin-top: auto;
}

.footer-content {
  width: 100%;
  margin: 0;
  padding: var(--space-xs) 0;
}

.footer-content p {
  color: hsl(var(--muted-foreground));
  font-size: 10px;
  margin: 2px 0;
}

.footer-powered a {
  color: hsl(var(--primary));
  text-decoration: none;
  font-weight: var(--weight-medium);
  transition: color 0.2s ease;
}

.footer-powered a:hover {
  color: hsl(var(--accent));
}

/* ===================================
   LOADING SPINNER
   =================================== */

.loading {
  text-align: center;
  padding: var(--space-2xl);
}

.spinner {
  border: 4px solid hsl(var(--border));
  border-top: 4px solid hsl(var(--primary));
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===================================
   CARDS & CONTAINERS
   =================================== */

.card {
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border-radius: var(--radius-2xl);
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-base);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 24px rgba(161, 43, 42, 0.25);
  transform: translateY(-4px);
  border-color: hsl(var(--primary));
}

/* ===================================
   BADGES & STATUS INDICATORS
   =================================== */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-base);
  padding: var(--space-xs) var(--space-base);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-success {
  background: hsla(var(--success) / 0.1);
  color: hsl(var(--success));
}

.badge-warning {
  background: hsla(var(--warning) / 0.1);
  color: hsl(var(--warning));
}

.badge-error {
  background: hsla(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* iPad / Tablet (Portrait and Landscape) */
@media (max-width: 1024px) {
  .landing-container {
    flex-direction: column;
  }

  /* IMPORTANT: Swap order on mobile/tablet - show login (right panel) first */
  .left-panel {
    width: 100%;
    min-height: 200px;
    height: auto;
    padding-bottom: var(--space-xl);
    order: 2; /* Show second on mobile/iPad */
  }

  .left-panel > div {
    padding: var(--space-lg) !important;
    max-width: 100% !important;
  }

  .left-panel h2 {
    font-size: 22px !important;
    margin-bottom: 18px !important;
  }

  .left-panel p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 14px !important;
  }

  .left-panel a {
    font-size: 14px !important;
  }

  .right-panel {
    width: 100%;
    height: auto;
    min-height: auto;
    padding: var(--space-lg);
    order: 1; /* Show first on mobile/iPad */
  }

  .content-box {
    max-width: 600px;
    padding: var(--space-2xl);
  }

  .form-container {
    margin: var(--space-lg) auto;
    padding: var(--space-xl);
  }
}

/* Mobile / Phone (Portrait and Landscape) */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .landing-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  /* IMPORTANT: Swap order on mobile - show login (right panel) first */
  .left-panel {
    width: 100%;
    min-height: 150px;
    height: auto;
    padding-bottom: var(--space-lg);
    order: 2; /* Show second on mobile */
  }

  .left-panel > div {
    padding: var(--space-base) !important;
    max-width: 100% !important;
  }

  .left-panel h2 {
    font-size: 18px !important;
    margin-bottom: 16px !important;
  }

  .left-panel p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin-bottom: 12px !important;
  }

  .left-panel a {
    font-size: 13px !important;
  }

  .right-panel {
    width: 100%;
    height: auto;
    min-height: auto;
    padding: var(--space-base);
    order: 1; /* Show first on mobile */
  }

  .content-box {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
  }

  .platform-name {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-base);
  }

  .tagline {
    font-size: var(--text-sm);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  .btn {
    height: 3rem;
    font-size: var(--text-base);
  }

  .form-container {
    padding: var(--space-lg);
    margin: var(--space-base);
    border-radius: var(--radius-xl);
  }

  .form-title {
    font-size: var(--text-xl);
  }

  .form-subtitle {
    font-size: var(--text-xs);
  }

  .form-input,
  .form-select,
  .form-textarea {
    height: 3rem;
    font-size: var(--text-base);
  }

  .languages-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    max-height: 50vh;
  }

  .language-btn {
    padding: var(--space-base);
    font-size: var(--text-base);
  }

  .number-box {
    width: 45px;
    height: 45px;
    font-size: var(--text-lg);
  }

  .copy-btn {
    width: 45px;
    height: 45px;
    font-size: var(--text-lg);
  }

  .card {
    padding: var(--space-base);
  }

  /* Dashboard specific mobile styles */
  .report-status-badge {
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-sm);
  }

  /* Message form mobile optimization */
  .message-form {
    padding: var(--space-base);
  }

  .message-input {
    min-height: 100px;
  }
}

/* Small Mobile (iPhone SE, small Android phones) */
@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  /* Maintain order on small mobile */
  .left-panel {
    min-height: 120px;
    order: 2; /* Show second on small mobile */
  }

  .left-panel > div {
    padding: var(--space-sm) !important;
    max-width: 100% !important;
  }

  .left-panel h2 {
    font-size: 16px !important;
    margin-bottom: 14px !important;
  }

  .left-panel p {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
  }

  .left-panel a {
    font-size: 12px !important;
  }

  .right-panel {
    order: 1; /* Show first on small mobile */
  }

  .content-box {
    padding: var(--space-base);
    border-radius: var(--radius-lg);
  }

  .platform-name {
    font-size: var(--text-xl);
  }

  .tagline {
    font-size: var(--text-xs);
  }

  .btn {
    height: 2.75rem;
    font-size: var(--text-sm);
    padding: 0 var(--space-base);
  }

  .form-container {
    padding: var(--space-base);
    margin: var(--space-sm);
  }

  .form-title {
    font-size: var(--text-lg);
  }

  .form-label {
    font-size: var(--text-xs);
  }

  .form-input,
  .form-select,
  .form-textarea {
    height: 2.75rem;
    font-size: var(--text-sm);
    padding: 0 var(--space-sm);
  }

  .form-textarea {
    padding: var(--space-sm);
  }

  .number-boxes {
    gap: 4px;
  }

  .number-box {
    width: 38px;
    height: 38px;
    font-size: var(--text-base);
  }

  .copy-btn {
    width: 38px;
    height: 38px;
  }

  .language-btn {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }

  /* Info cards on homepage */
  .content-box a[style*="padding: 16px"] {
    padding: 12px 16px !important;
  }

  .content-box a[style*="padding: 16px"] div {
    font-size: 14px !important;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .landing-container {
    flex-direction: row;
  }

  /* In landscape, show side-by-side with right panel (login) on the left */
  .left-panel {
    width: 40%;
    height: 100vh;
    min-height: auto;
    overflow-y: auto;
    order: 2; /* Still second in landscape, but appears on right side */
  }

  .right-panel {
    width: 60%;
    height: 100vh;
    overflow-y: auto;
    order: 1; /* First in landscape, appears on left side */
  }

  .left-panel > div {
    padding: var(--space-base) !important;
  }

  .content-box {
    padding: var(--space-lg);
  }
}

/* ===================================
   RTL SUPPORT
   =================================== */

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .left-panel {
  left: auto;
  right: 0;
}

[dir="rtl"] .right-panel {
  right: auto;
  left: 0;
}

[dir="rtl"] .error-message,
[dir="rtl"] .success-message {
  border-left: none;
  border-right: 4px solid;
}

[dir="rtl"] .form-select {
  background-position: left var(--space-base) center;
  padding-left: var(--space-2xl);
  padding-right: var(--space-base);
}

/* ===================================
   ACCESSIBILITY & INTERACTIONS
   =================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }

  .form-input,
  .form-select,
  .form-textarea {
    border-width: 2px;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold { font-weight: var(--weight-bold); }

.text-primary { color: hsl(var(--primary)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-destructive { color: hsl(var(--destructive)); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-base); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-base); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

/* ===================================
   FILE UPLOAD COMPONENTS
   =================================== */

.file-upload-container {
  margin-top: var(--space-sm);
}

.form-file-input {
  display: block;
  width: 100%;
  padding: var(--space-base);
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius-lg);
  background: hsl(var(--muted));
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: var(--text-sm);
  color: hsl(var(--muted-foreground));
}

.form-file-input:hover {
  border-color: hsl(var(--primary));
  background: hsl(var(--secondary));
}

.form-file-input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.file-upload-status {
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: hsl(var(--muted-foreground));
  font-weight: var(--weight-medium);
}

.file-upload-status.uploading {
  color: hsl(var(--chart-orange));
}

.file-upload-status.success {
  color: hsl(var(--primary));
}

.file-upload-status.error {
  color: hsl(var(--destructive));
}

.file-list {
  margin-top: var(--space-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-base);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}

.file-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.file-item-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.file-item-details {
  display: flex;
  flex-direction: column;
}

.file-item-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: hsl(var(--foreground));
}

.file-item-size {
  font-size: var(--text-xs);
  color: hsl(var(--muted-foreground));
}

.file-item-remove {
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  color: hsl(var(--destructive));
  font-size: var(--text-sm);
  border-radius: var(--radius-base);
  transition: all 0.2s ease;
}

.file-item-remove:hover {
  background: hsl(var(--destructive) / 0.1);
}

/* ===================================
   DISCLAIMER SECTION
   =================================== */

/* Disclaimer Box - For Left Panel (Homepage) */
.disclaimer-box-left {
  position: relative;
  margin: var(--space-2xl) var(--space-lg) var(--space-base) var(--space-lg);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  z-index: 10;
  flex-shrink: 0;
}

.disclaimer-box-left .disclaimer-box-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: #ffffff;
  margin-bottom: var(--space-sm);
  text-align: left;
}

.disclaimer-box-left .disclaimer-box-intro {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin-bottom: var(--space-base);
  text-align: justify;
}

.disclaimer-details {
  margin-top: var(--space-base);
}

.disclaimer-box-left .disclaimer-details summary {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: #ffffff;
  cursor: pointer;
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-base);
  list-style: none;
  text-align: center;
  transition: all 0.2s ease;
}

.disclaimer-box-left .disclaimer-details summary::-webkit-details-marker {
  display: none;
}

.disclaimer-box-left .disclaimer-details summary::after {
  content: " ▼";
  font-size: var(--text-xs);
  margin-left: var(--space-xs);
}

.disclaimer-box-left .disclaimer-details[open] summary::after {
  content: " ▲";
}

.disclaimer-box-left .disclaimer-details summary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.disclaimer-box-left .disclaimer-details-content {
  margin-top: var(--space-base);
  padding: var(--space-base);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-base);
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Custom scrollbar for disclaimer details */
.disclaimer-box-left .disclaimer-details-content::-webkit-scrollbar {
  width: 6px;
}

.disclaimer-box-left .disclaimer-details-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.disclaimer-box-left .disclaimer-details-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.disclaimer-box-left .disclaimer-details-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.disclaimer-box-left .disclaimer-box-item {
  margin-bottom: var(--space-base);
  padding-left: var(--space-sm);
}

.disclaimer-box-left .disclaimer-box-item:last-child {
  margin-bottom: 0;
}

.disclaimer-box-left .disclaimer-box-item strong {
  display: block;
  font-size: var(--text-xs);
  color: #ffffff;
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-xs);
}

.disclaimer-box-left .disclaimer-box-item p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: var(--space-xs);
}

.disclaimer-box-left .disclaimer-box-item p:last-child {
  margin-bottom: 0;
}

/* Disclaimer Section - Simple Text Format (Email Style) */
.disclaimer-text-section {
  background: hsl(var(--muted));
  border-top: 1px solid hsl(var(--border));
  padding: var(--space-sm) var(--space-base) var(--space-xs) var(--space-base);
  margin-top: auto;
}

.disclaimer-text-container {
  width: 100%;
  margin: 0;
}

.disclaimer-text-content {
  font-size: 10px;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  text-align: left;
}

.disclaimer-text-content strong {
  color: hsl(var(--foreground));
  font-weight: var(--weight-semibold);
  display: inline;
  margin-right: 4px;
}

/* Responsive adjustments for disclaimer */
@media (max-width: 768px) {
  .disclaimer-box-left {
    margin: var(--space-lg) var(--space-sm) var(--space-base) var(--space-sm);
    padding: var(--space-base);
  }

  .disclaimer-box-left .disclaimer-box-title {
    font-size: var(--text-sm);
  }

  .disclaimer-box-left .disclaimer-box-intro {
    font-size: 11px;
  }

  .disclaimer-box-left .disclaimer-details-content {
    max-height: 250px;
  }

  .disclaimer-box-left .disclaimer-box-item {
    font-size: 10px;
  }

  .disclaimer-box-left .disclaimer-box-item p {
    font-size: 10px;
  }

  .disclaimer-text-section {
    padding: var(--space-sm) var(--space-xs);
  }

  .disclaimer-text-content {
    font-size: 9px;
    line-height: 1.5;
  }
}

/* ===================================
   MOBILE-SPECIFIC PAGE STYLES
   =================================== */

/* Dashboard and Report Details Mobile Styles */
@media (max-width: 768px) {
  /* Dashboard header */
  .dashboard-header {
    flex-direction: column;
    gap: var(--space-base);
  }

  /* Report cards on dashboard */
  .report-card {
    padding: var(--space-base);
  }

  .report-card-title {
    font-size: var(--text-base);
  }

  .report-card-meta {
    font-size: var(--text-xs);
    flex-wrap: wrap;
  }

  /* Message threads */
  .message-thread {
    padding: var(--space-base);
  }

  .message-bubble {
    max-width: 85%;
    padding: var(--space-sm) var(--space-base);
    font-size: var(--text-sm);
  }

  .message-bubble.sent {
    margin-left: auto;
    margin-right: 0;
  }

  .message-bubble.received {
    margin-right: auto;
    margin-left: 0;
  }

  .message-timestamp {
    font-size: 10px;
  }

  /* File attachments */
  .file-attachment {
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-sm);
  }

  /* Report form mobile optimization */
  .report-form-section {
    padding: var(--space-base);
    margin-bottom: var(--space-base);
  }

  .report-form-section h2 {
    font-size: var(--text-lg);
  }

  /* Form validation messages */
  .validation-message {
    font-size: var(--text-xs);
  }

  /* Submit button container */
  .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: var(--space-base);
    border-top: 1px solid hsl(var(--border));
    margin: 0 calc(var(--space-base) * -1);
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Info pages mobile optimization */
  .info-page-container {
    padding: var(--space-base);
  }

  .info-page-container h1 {
    font-size: var(--text-xl);
  }

  .info-page-container h2 {
    font-size: var(--text-lg);
  }

  .info-page-container p {
    font-size: var(--text-sm);
  }

  /* Login page mobile */
  .login-container {
    padding: var(--space-base);
  }

  .login-form {
    padding: var(--space-lg);
  }

  /* Success page mobile */
  .success-container {
    padding: var(--space-base);
  }

  .success-icon {
    width: 60px;
    height: 60px;
  }

  /* Table responsive wrapper */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
    font-size: var(--text-xs);
  }

  /* Stack elements on mobile */
  .desktop-flex {
    display: block !important;
  }

  .desktop-flex > * {
    margin-bottom: var(--space-sm);
  }

  .desktop-flex > *:last-child {
    margin-bottom: 0;
  }
}

/* Small mobile specific */
@media (max-width: 480px) {
  .message-bubble {
    max-width: 90%;
    font-size: var(--text-xs);
  }

  .report-card {
    padding: var(--space-sm);
  }

  .form-actions {
    padding: var(--space-sm);
  }

  /* Reduce spacing on small screens */
  .form-group {
    margin-bottom: var(--space-base);
  }

  /* Make interactive elements easier to tap */
  .btn,
  .form-input,
  .form-select,
  .form-textarea {
    min-height: 44px; /* iOS minimum tap target */
  }
}

/* iPad specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
  .form-container {
    max-width: 700px;
  }

  .content-box {
    max-width: 550px;
  }

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

  /* Two column layout for form if space permits */
  .form-row-tablet {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-base);
  }

  .form-row-tablet .form-group {
    margin-bottom: 0;
  }
}
