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

/* ==========================================
   1. DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  /* Color Palette (Deep Space Dark & Indigo/Cyan accents) */
  --bg-app: hsl(224, 25%, 8%);
  --bg-panel: hsl(224, 22%, 13%);
  --bg-panel-hover: hsl(224, 22%, 16%);
  --bg-card: rgba(30, 41, 59, 0.45);
  
  --primary: hsl(250, 95%, 65%);
  --primary-glow: hsla(250, 95%, 65%, 0.35);
  --primary-gradient: linear-gradient(135deg, hsl(250, 95%, 65%) 0%, hsl(280, 95%, 60%) 100%);
  
  --accent: hsl(180, 100%, 45%);
  --accent-glow: hsla(180, 100%, 45%, 0.35);
  --accent-gradient: linear-gradient(135deg, hsl(180, 100%, 45%) 0%, hsl(160, 100%, 40%) 100%);
  
  --text-primary: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --text-muted-dark: hsl(215, 15%, 45%);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: hsla(250, 95%, 65%, 0.5);
  --border-glass: rgba(255, 255, 255, 0.1);
  
  --success: hsl(142, 70%, 45%);
  --error: hsl(0, 84%, 60%);
  
  /* Layout & Shadows */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
  --shadow-neon: 0 0 20px 0px hsla(250, 95%, 65%, 0.15);
  
  /* Fonts */
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font-he: 'Heebo', system-ui, -apple-system, sans-serif;
}

/* Base resets & scrollbars */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-en);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, hsla(250, 95%, 65%, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(180, 100%, 45%, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 50%, hsla(280, 95%, 60%, 0.05) 0px, transparent 60%);
  background-attachment: fixed;
}

body.rtl {
  font-family: var(--font-he);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted-dark);
}

/* UTILITIES */
.flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ==========================================
   2. APP CONTAINER & LAYOUTS
   ========================================== */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

/* Header & Logo styling */
.main-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-neon);
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Dual Column Dashboard Builder */
.builder-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Panel Styles */
.form-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.preview-panel {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Section Header */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.75rem;
}

/* ==========================================
   3. FORM ELEMENTS & INTERACTIVES
   ========================================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.full-width {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.form-group:focus-within label {
  color: var(--primary);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted-dark);
  pointer-events: none;
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.rtl .input-icon {
  left: auto;
  right: 1rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  padding-left: 2.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rtl .form-control {
  padding-left: 1rem;
  padding-right: 2.75rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: rgba(15, 23, 42, 0.6);
}

.form-control:focus + .input-icon {
  color: var(--primary);
}

/* Custom Select & Textarea */
textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Color Palette Picker */
.theme-selector {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.theme-bubble {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.theme-bubble:hover {
  transform: scale(1.1);
}

.theme-bubble.active {
  border-color: var(--text-primary);
  transform: scale(1.05);
}

/* Custom Theme Picker Input wrapper */
.custom-color-picker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.color-input-container {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.color-input-container input[type="color"] {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 50px;
  height: 50px;
  border: none;
  cursor: pointer;
  background: none;
}

/* Logo selector cards */
.icon-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.icon-option {
  background: rgba(15, 23, 42, 0.4);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.2s ease;
}

.icon-option:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--text-muted-dark);
}

.icon-option.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: white;
}

.btn-primary {
  background: var(--primary-gradient);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px hsla(250, 95%, 65%, 0.4);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-only:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.toggle-group {
  display: flex;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.toggle-btn.active {
  background: var(--bg-panel);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* ==========================================
   4. MOBILE SIMULATOR (DASHBOARD PREVIEW)
   ========================================== */
.phone-simulator {
  width: 320px;
  height: 600px;
  border-radius: 40px;
  background: #0f172a;
  border: 8px solid #334155;
  box-shadow: var(--shadow-lg), 0 0 0 4px #1e293b;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Speaker notch */
.phone-simulator::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  background: #334155;
  border-radius: 10px;
  z-index: 10;
}

.phone-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-app);
  padding: 1.5rem;
  padding-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

/* ==========================================
   5. BUSINESS CARD CARD DESIGN (VIEWER/PREVIEW)
   ========================================== */
.digital-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.digital-card.hebrew {
  text-align: right;
  direction: rtl;
}

/* Card Glow Accent line */
.digital-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
}

/* Card glass reflections */
.digital-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    30deg,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 60%
  );
  pointer-events: none;
  transform: rotate(30deg);
  transition: transform 0.8s ease;
}

.digital-card:hover::after {
  transform: rotate(30deg) translate(50%, -50%);
}

/* Card Header: Avatar & Main Badge */
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.hebrew .card-header-row {
  flex-direction: row-reverse;
}

/* Custom Dynamic Avatar */
.avatar-container {
  position: relative;
}

.card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.75rem;
  color: white;
  border: 2px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

/* Card Badge/Logo */
.card-badge {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.card-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Card Watermark Background */
.digital-card .card-watermark {
  position: absolute;
  bottom: -25px;
  right: -25px;
  width: 180px;
  height: 180px;
  background-image: url('difs-logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-15deg);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.digital-card.hebrew .card-watermark {
  right: auto;
  left: -25px;
  transform: rotate(15deg);
}

.digital-card:hover .card-watermark {
  transform: rotate(-5deg) scale(1.08);
  opacity: 0.07;
}

.digital-card.hebrew:hover .card-watermark {
  transform: rotate(5deg) scale(1.08);
  opacity: 0.07;
}

/* Ensure contents stay above watermark */
.digital-card .card-header-row,
.digital-card .card-identity,
.digital-card .card-work,
.digital-card .card-contacts,
.digital-card .card-actions {
  position: relative;
  z-index: 1;
}

/* Identity Block */
.card-identity {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.2;
}

.card-rank {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-top: 0.15rem;
}

/* Work Details */
.card-work {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.card-dept {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-org {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Direct Contacts List */
.card-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  word-break: break-all;
}

.hebrew .contact-item {
  flex-direction: row-reverse;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-color);
  color: var(--text-primary);
  transform: translateX(4px);
}

.hebrew .contact-item:hover {
  transform: translateX(-4px);
}

.contact-icon {
  font-size: 1.1rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
}

/* Quick Action Row (Bottom of card) */
.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-card-action {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.btn-save-contact {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.btn-save-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px -3px hsla(250, 95%, 65%, 0.4);
}

.btn-share-card {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-share-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Card Language Toggle */
.card-lang-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}

.hebrew .card-lang-toggle {
  right: auto;
  left: 1rem;
}

.card-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

/* ==========================================
   6. QR GENERATOR PANEL & OUTPUT
   ========================================== */
.qr-output-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

.qr-frame-wrapper {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.qr-frame-wrapper canvas, .qr-frame-wrapper svg {
  display: block;
}

.qr-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
}

.share-link-box {
  width: 100%;
  display: flex;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.share-link-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.6rem 0.75rem;
  outline: none;
  font-family: var(--font-en);
}

.btn-copy-link {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-left: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-copy-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

/* ==========================================
   7. STANDALONE DIGITAL CARD VIEWER PAGE
   ========================================== */
.standalone-viewer-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

.standalone-card-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating badge for branding at bottom of standalone card */
.branding-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.branding-tag:hover {
  color: var(--text-muted);
}

.branding-tag svg {
  color: var(--primary);
}

/* ==========================================
   8. ANIMATIONS & TRANSITIONS
   ========================================== */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: slideUpFade 0.5s ease forwards;
}

/* Alert/Toast styling */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: hsl(224, 25%, 15%);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success-rtl {
  border-right: 4px solid var(--success);
  border-left: none;
}

/* ==========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1024px) {
  .builder-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .preview-panel {
    position: static;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .phone-simulator {
    width: 100%;
    max-width: 360px;
    height: 640px;
  }
}

@media (max-width: 640px) {
  .app-container {
    padding: 1rem;
  }
  .form-panel {
    padding: 1.25rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full-width {
    grid-column: span 1;
  }
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .logo-text h1 {
    font-size: 1.25rem;
  }
}
