/*
 * -- MODERN LANDING PAGE STYLES --
 * Clean, minimalist design with preserved functionality
 */

/* Import shared styles */
@import '../shared/variables.css';
@import '../shared/components.css';
@import '../shared/utilities.css';
@import '../shared/base.css';

/* Additional Google Fonts import for Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  color: var(--text-primary, #1f2937);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Poppins', sans-serif;
  background: var(--secondary, #f5f6fa);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--spacing-md) 0;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
}

p {
  line-height: 1.7;
  margin: 0 0 var(--spacing-md) 0;
  color: var(--secondaty-light);
}

/* ===== LAYOUT COMPONENTS ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

section {
  padding: var(--spacing-3xl) 0;
}

/* ===== HERO CAROUSEL SECTION ===== */
.hero-carousel {
  padding: 0;
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  min-height: 600px;
}

.carousel-inner {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--spacing-lg);
}

.banner-head {
  color: white;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-xl);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero-cta {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-full);
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Banner Backgrounds */
.banner1 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.banner3 {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.banner-bottom {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.banner-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.banner-bottom .banner-content {
  z-index: 2;
}

/* Carousel Controls */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-control:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.carousel-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.carousel-control.prev {
  left: var(--spacing-lg);
}

.carousel-control.next {
  right: var(--spacing-lg);
}

/* ===== HOOK SECTION ===== */
.hook-section {
  background: white;
  padding: var(--spacing-3xl) 0;
}

.hook {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hook-content {
  display: none;
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  /* Minimal: remove card-like border and shadow */
  border: none;
  box-shadow: none;
}

.hook-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.hook-content p {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== FEATURES SECTION ===== */
.features-section,
.benefits-section {
  background: white;
  padding: var(--spacing-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.features-grid {
  /* Use Pure CSS grid for structure; utilities below add gutters */
  margin-top: var(--spacing-2xl);
}

/* Gutters for Pure CSS rows */
.features-grid.pure-g {
  margin-left: calc(var(--spacing-md) * -1);
  margin-right: calc(var(--spacing-md) * -1);
}

.features-grid > [class*='pure-u-'] {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.feature-card {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  /* Minimal: remove card-like border and shadow */
  border: none;
  box-shadow: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover {
  /* Keep hover subtle and flat */
  transform: none;
  box-shadow: none;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.feature-cta {
  margin-top: var(--spacing-md);
  font-size: 0.875rem;
  padding: var(--spacing-sm) var(--spacing-lg);
}

/* ===== FAQ SECTION ===== */
.faq-section {
  background: var(--bg-secondary);
  padding: var(--spacing-3xl) 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Adjust spacing on medium viewports */
  .features-grid > [class*='pure-u-'] {
    margin-bottom: var(--spacing-lg);
  }
}

@media (max-width: 900px) {
  section {
    padding: var(--spacing-2xl) 0;
  }
  
  .carousel {
    height: 80vh;
    min-height: 500px;
  }
  
  .carousel-control {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  
  .carousel-control.prev {
    left: var(--spacing-md);
  }
  
  .carousel-control.next {
    right: var(--spacing-md);
  }
  
  .features-grid > [class*='pure-u-'] {
    margin-bottom: var(--spacing-lg);
  }
  
  .feature-card {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .carousel {
    height: 70vh;
    min-height: 400px;
  }
  
  .banner-content {
    padding: 0 var(--spacing-md);
  }
  
  .hook-content {
    padding: var(--spacing-lg);
  }
  
  .feature-card {
    padding: var(--spacing-md);
  }
}

@media (max-width: 600px) {
  .carousel {
    height: 60vh;
    min-height: 350px;
  }
  
  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }
  
  .carousel-control.prev {
    left: var(--spacing-sm);
  }
  
  .carousel-control.next {
    right: var(--spacing-sm);
  }
  
  .banner-bottom {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .carousel {
    height: 50vh;
    min-height: 300px;
  }
  
  .banner-content {
    padding: 0 var(--spacing-sm);
  }
  
  .hook-content {
    padding: var(--spacing-md);
  }
  
  .feature-card {
    padding: var(--spacing-sm);
  }
}

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

/* ===== FOCUS STATES ===== */
.carousel-control:focus,
.feature-cta:focus,
.hero-cta:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== LEGACY SUPPORT ===== */
/* Keep some legacy classes for compatibility */
.l-content {
  margin: 0 auto;
  min-height: 92.5vh;
}

.l-box {
  padding: var(--spacing-md) var(--spacing-xl);
}

.information-head {
  color: var(--text-primary);
  font-weight: 600;
}

/* ===== NAVIGATION STYLES (from base.html) ===== */
.r-menu {
  float: right;
  text-align: right;
  width: auto;
}

/* ===== NAVIGATION STYLES ===== */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  background: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-nav .pure-menu-heading {
  margin-right: auto;
  font-weight: 700;
  color: var(--primary);
}
.site-nav .nav-lists {
  display: flex;
  align-items: center;
  width: 100%;
}
.site-nav .pure-menu-list.left {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav .pure-menu-list.right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: currentColor;
  height: 2px;
  width: 24px;
  border-radius: 2px;
  position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle-label span::before { top: -7px; }
.nav-toggle-label span::after { top: 7px; }

@media (max-width: 900px) {
  .site-nav {
    position: relative;
    flex-wrap: wrap;
  }
  .site-nav .nav-toggle-label {
    display: block;
  }
  .site-nav .nav-lists {
    width: 100%;
    order: 3;
  }
  .site-nav .pure-menu-list.left,
  .site-nav .pure-menu-list.right {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 0.5rem 0;
  }
  .site-nav .pure-menu-list.right {
    margin-left: 0;
  }
  /* Show menus when toggled */
  .nav-toggle:checked ~ .nav-lists .pure-menu-list.left,
  .nav-toggle:checked ~ .nav-lists .pure-menu-list.right {
    display: flex;
  }
}
.l-content {
  margin: 0 auto;
  min-height: 92.5vh;
}

.l-box {
  padding: 0.5em 2em;
}

/*
 * -- MENU STYLES --
 * Make the menu have a very faint box-shadow.
 */
.pure-menu {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.pure-menu-link {
  padding: 0.5em 0.7em;
}







.footer {
  background: #111;
  color: #888;
  text-align: center;
}
.footer a {
  color: #ddd;
}

/* Responsive breakpoints are now handled by shared/utilities.css */

/* --- Dashboard-specific styles --- */
.secondary-nav {
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
  padding: 0 20px;
}
.secondary-nav .pure-menu-link {
  color: #333;
  padding: 10px 20px;
}
.secondary-nav .pure-menu-link:hover {
  background-color: #e8e8e8;
}
.secondary-nav .pure-menu-item {
  margin: 0 5px;
}
.active-esim {
  font-weight: bold;
  background: #e8e8e8;
}
.active-tab {
  border-bottom: 2px solid #1976d2;
  color: #1976d2 !important;
}
/* Responsive layout for sidebar and main content */
@media (max-width: 900px) {
  .form-box, .l-box {
    width: 100% !important;
    max-width: 100% !important;
  }
  .pure-u-md-9-24, .pure-u-md-14-24 {
    width: 100% !important;
    max-width: 100% !important;
  }
  .pure-g {
    display: block;
  }
}

@media (max-width: 600px) {
  .secondary-nav {
    padding: 0 5px;
  }
  .secondary-nav .pure-menu-link {
    padding: 8px 8px;
    font-size: 15px;
  }
  .pure-menu-heading {
    font-size: 18px;
  }
}

/* eSIM List Styles */
.esim-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.esim-list-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(60, 60, 60, 0.06);
  transition: box-shadow 0.2s, background 0.2s;
  margin-left: 16px;
}
.esim-list-item:hover {
  background: #f5faff;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.10);
}
.active-esim {
  background: #e3f2fd;
}
.esim-status {
  margin-right: 12px;
  display: flex;
  align-items: center;
}
.esim-badge {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 16px;
  text-align: center;
  line-height: 22px;
  font-weight: bold;
}
.esim-badge.sent {
  background: #4caf50;
  color: #fff;
}
.esim-badge.not-sent {
  background: #e0e0e0;
  color: #888;
}
.esim-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-decoration: none;
  color: #333;
  width: 100%;
}
.esim-link:hover .esim-iccid {
  text-decoration: underline;
}
.esim-iccid {
  font-weight: 600;
  margin-right: 8px;
}
.esim-recipient {
  color: #888;
  font-size: 0.95em;
  margin-left: 4px;
}

/* Responsive for mobile */
@media (max-width: 600px) {
  .esim-list-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 8px;
  }
  .esim-link {
    flex-direction: column;
    align-items: flex-start;
  }
  .esim-iccid, .esim-recipient {
    margin: 0 0 2px 0;
  }
}

/* Setup guide styles moved to css/main/setup.css */

/* Loading Bar Styles */
.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 200% 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-bar.active {
  opacity: 1;
  visibility: visible;
  animation: loadingProgress 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ================================
   MODERN DASHBOARD STYLES
   ================================ */

/* Dashboard Container */
.dashboard-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  flex-direction: column;
}

/* Dashboard Header */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 2rem 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.05"/></svg>') repeat;
  background-size: 40px 40px;
}

.header-content {
  flex: 1;
  z-index: 1;
  position: relative;
}

.dashboard-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-subtitle {
  font-size: 1.125rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 400;
  color: #f8fafc;
}

.header-actions {
  z-index: 1;
  position: relative;
}

/* Dashboard Main Layout */
.dashboard-main {
  flex: 1;
  display: flex;
  gap: 2rem;
  padding: 2rem;
  width: 100%;
  max-width: 100%;
}

/* Sidebar */
.dashboard-sidebar {
  width: 30%;
  min-width: 300px;
  background: white;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  height: fit-content;
  position: sticky;
  top: 2rem;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.sidebar-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
}

.esim-count {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Filter Section */
.filter-section {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.filter-chip:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.filter-chip.active {
  background: var(--pure-primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

/* eSIM List Container */
.esim-list-container {
  padding: 1.5rem 2rem;
  max-height: 500px;
  overflow-y: auto;
}

.esim-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* eSIM Card */
.esim-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.esim-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.1);
  transform: translateY(-2px);
}

.esim-card.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0.02) 100%);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.esim-status-indicator {
  flex-shrink: 0;
}



.esim-link {
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.esim-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.esim-iccid {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.esim-recipient {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-icon {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  text-transform: none;
  letter-spacing: normal;
}

.empty-state p {
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  justify-content: center;
}

/* Dashboard Content */
.dashboard-content {
  flex: 1;
  min-width: 0;
  background: white;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.content-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.content-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
  text-transform: none;
  letter-spacing: normal;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  gap: 1rem;
}

.tab-link {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: var(--transition);
  background: transparent;
  border: 1px solid transparent;
}

.tab-link:hover {
  background: rgba(0, 122, 255, 0.05);
  color: var(--primary);
  border-color: rgba(0, 122, 255, 0.2);
}

.tab-link.active {
  background: var(--pure-primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

/* Content Body */
.content-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.content-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-light);
  font-size: 1.125rem;
}

/* Form styles are now imported from shared/components.css */
/* Pure CSS select improvements (readability + arrow alignment) */
.pure-form select {
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem; /* comfortable tap target */
  padding: 0.5rem 2.5rem 0.5rem 0.75rem; /* leave space for arrow */
  line-height: 1.5;
  color: var(--text, #111827);
  background-color: #fff;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2362748b'%3E%3Cpath d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center; /* arrow position */
  background-size: 1rem;
}

.pure-form select:focus {
  outline: none;
  border-color: var(--pure-primary-color, #4361ee);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Hide native arrow on IE */
select::-ms-expand { display: none; }

/* Welcome Section */
.welcome-section {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.welcome-content {
  max-width: 800px;
  margin: 0 auto;
}

.welcome-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  text-transform: none;
  letter-spacing: -0.025em;
}

.welcome-section p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin: 0 0 3rem 0;
  line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #0066cc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
  text-transform: none;
  letter-spacing: normal;
}

.feature-card p {
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* Welcome Actions */
.welcome-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Button styles are now imported from shared/components.css */

/* Messages */
/* Message components are now imported from shared/components.css */

/* Bundle Template Styles */
.bundle-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.bundle-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
  text-transform: none;
  letter-spacing: normal;
}

.bundle-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.bundle-refills h5,
.bundle-coverage h5 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bundle-refills ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bundle-refills li {
  padding: 0.25rem 0;
  color: var(--text-light);
  font-size: 0.875rem;
}

.bundle-coverage p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-main {
    flex-direction: column;
    gap: 1.5rem;
  }

  .dashboard-sidebar {
    width: 100%;
    position: static;
  }

  .esim-list-container {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
  }

  .dashboard-title {
    font-size: 2rem;
  }

  .dashboard-main {
    padding: 1rem;
  }

  .sidebar-header {
    padding: 1rem 1.5rem;
  }

  .filter-section {
    padding: 1rem 1.5rem;
  }

  .esim-list-container {
    padding: 1rem 1.5rem;
  }

  .content-header {
    padding: 1.5rem;
  }

  .content-body {
    padding: 1.5rem;
  }

  .tab-navigation {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tab-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .welcome-section {
    padding: 2rem 1rem;
  }

  .welcome-section h2 {
    font-size: 2rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .welcome-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .messages-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    padding: 1rem;
  }

  .dashboard-title {
    font-size: 1.75rem;
  }

  .dashboard-subtitle {
    font-size: 1rem;
  }

  .esim-card {
    padding: 0.75rem;
  }

  .esim-iccid {
    font-size: 0.8rem;
  }

  .esim-recipient {
    font-size: 0.7rem;
  }

  .filter-chips {
    gap: 0.25rem;
  }

  .filter-chip {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }

  .welcome-section h2 {
    font-size: 1.5rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }
}

/* ================================
   Purchase Form refinements
   - Keep scope narrow to stacked Pure forms within main content
   - Improves visibility and usability of the "How many?" number field
   ================================ */
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="number"] {
  width: 7.5rem;           /* clearer width for quantity */
  min-height: 2.75rem;     /* consistent touch target */
  font-size: 1.125rem;     /* larger, more legible digits */
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  text-align: center;      /* centered now that spinners are hidden */
  -moz-appearance: textfield;  /* remove Firefox spinners */
  appearance: textfield;
}

/* Ensure other text inputs/selects in the purchase form are comfortable */
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="text"],
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="email"],
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group select {
  min-height: 2.75rem;
}

/* Normalize spin button area sizing in WebKit for the number input */
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="number"]::-webkit-outer-spin-button,
.pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; /* hide Chrome/Edge spinners */
  margin: 0;
  height: auto;
}

@media (max-width: 480px) {
  /* Slightly wider on small screens for easier tapping */
  .pure-u-md-14-24 .l-box form.pure-form.pure-form-stacked .pure-control-group input[type="number"] {
    width: 9rem;
  }
}

/* ================================
   Purchase page visual cohesion
   Scoped with data-page="purchase" to prevent leaks
   ================================ */
[data-page="purchase"] .pure-u-md-10-24 .l-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

[data-page="purchase"] .pure-u-md-14-24 .l-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

/* Headings and meta text rhythm */
[data-page="purchase"] h2 { margin-bottom: var(--spacing-sm); }
[data-page="purchase"] h3 { margin-top: 0; color: var(--text-secondary); font-weight: 500; }
[data-page="purchase"] .exchange-rate-info small { color: var(--text-muted); }

/* Refills list and coverage as clean list blocks */
[data-page="purchase"] ul { margin: 0; padding-left: 1.1rem; }
[data-page="purchase"] li { color: var(--text-secondary); margin: 0.25rem 0; }
[data-page="purchase"] .competitor-links { margin-top: var(--spacing-lg); }
[data-page="purchase"] .competitor-links h4 { margin: 0 0 var(--spacing-sm) 0; }
[data-page="purchase"] .competitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--spacing-md);
}
[data-page="purchase"] .competitor-item .competitor-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: 0.625rem 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}
[data-page="purchase"] .competitor-item .competitor-link:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.08);
  transform: translateY(-2px);
}
[data-page="purchase"] .competitor-name { font-weight: 600; }
[data-page="purchase"] .competitor-country { color: var(--text-secondary); font-size: 0.875rem; }

/* Purchase form controls: ensure comfortable height and focus ring */
[data-page="purchase"] .pure-form.pure-form-stacked .pure-control-group input,
[data-page="purchase"] .pure-form.pure-form-stacked .pure-control-group select,
[data-page="purchase"] .pure-form.pure-form-stacked .pure-control-group textarea {
  min-height: 2.75rem;
}
[data-page="purchase"] .pure-form.pure-form-stacked .pure-control-group label { font-weight: 600; }

/* Form actions alignment spacing */
[data-page="purchase"] .form-actions { margin-top: var(--spacing-md); }

/* Purchase card container padding/margins for cohesion */
[data-page="purchase"] .pure-u-md-10-24 .l-box,
[data-page="purchase"] .pure-u-md-14-24 .l-box {
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Add responsive gap between columns without affecting global .pure-g */
[data-page="purchase"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: var(--spacing-xl);
}

/* Flex widths so purchase columns fit and are responsive */
[data-page="purchase"] .pure-u-1.pure-u-md-10-24,
[data-page="purchase"] .pure-u-md-10-24 {
  flex: 0 1 420px;
  max-width: 520px;
}

[data-page="purchase"] .pure-u-1.pure-u-md-14-24,
[data-page="purchase"] .pure-u-md-14-24 {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 900px) {
  [data-page="purchase"] .pure-u-md-10-24,
  [data-page="purchase"] .pure-u-md-14-24 {
    flex: 1 1 100%;
    max-width: 100%;
  }
  [data-page="purchase"] { gap: var(--spacing-lg); padding: var(--spacing-lg); }
}

/* Purchase page polish */
[data-page="purchase"] h2 { margin-top: 0; margin-bottom: var(--spacing-md); letter-spacing: 0.02em; }
[data-page="purchase"] h3 { margin-bottom: var(--spacing-sm); }
[data-page="purchase"] .pure-control-group { margin-bottom: var(--spacing-md); }
[data-page="purchase"] .form-actions { display: flex; gap: var(--spacing-sm); align-items: center; }

/* ================================
   Search page visual cohesion
   Scoped with data-page="search" to prevent leaks
   ================================ */
[data-page="search"] .form-box .l-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}
[data-page="search"] #bundles.l-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

/* Unified padding and vertical rhythm for search cards */
[data-page="search"] .form-box .l-box,
[data-page="search"] #bundles.l-box {
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Add responsive gap between search columns and safe side padding */
[data-page="search"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: var(--spacing-xl);
}

/* Use flex-based widths so columns fit screen and remain responsive */
[data-page="search"] .pure-u-1.pure-u-md-9-24,
[data-page="search"] .pure-u-md-9-24 {
  flex: 0 1 420px;           /* comfortable min width for form panel */
  max-width: 520px;          /* don’t let it get too wide on desktop */
}

[data-page="search"] .pure-u-1.pure-u-md-14-24,
[data-page="search"] .pure-u-md-14-24 {
  flex: 1 1 0;               /* grow to fill remaining space */
  min-width: 0;              /* allow content to shrink without overflow */
}

@media (max-width: 900px) {
  /* Stack on smaller screens */
  [data-page="search"] .pure-u-md-9-24,
  [data-page="search"] .pure-u-md-14-24 {
    flex: 1 1 100%;
    max-width: 100%;
  }
  [data-page="search"] { gap: var(--spacing-lg); padding: var(--spacing-lg); }
}

/* Search page polish: tighter heading rhythm and inner spacing */
[data-page="search"] h2 { margin-top: 0; margin-bottom: var(--spacing-md); letter-spacing: 0.02em; }
[data-page="search"] .form-box .pure-control-group { margin-bottom: var(--spacing-md); }
[data-page="search"] .form-actions { display: flex; gap: var(--spacing-sm); align-items: center; }
[data-page="search"] .bundle-card h4 { margin-bottom: var(--spacing-sm); }
[data-page="search"] .bundle-card ul { margin: 0.25rem 0 0 1rem; }
[data-page="search"] .bundle-card li { margin: 0.125rem 0; }

/* Search input/button sizing to match dashboard */
[data-page="search"] .form-box .pure-form .pure-control-group label { font-weight: 600; }
[data-page="search"] .form-box .pure-form input#country {
  min-height: 2.75rem;
  padding: var(--pure-input-padding);
  font-size: 1rem;
}
[data-page="search"] .form-box .pure-form #search-button {
  min-height: 2.75rem;
}

[data-page="search"] .bundle-card { border: 1px solid var(--border-color); }
[data-page="search"] .bundle-card + .bundle-card { margin-top: var(--spacing-md); }
[data-page="search"] .bundle-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.08);
  transform: translateY(-2px);
}

/* Empty state for search results */
[data-page="search"] #bundles .no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-light);
}