/* ============================================
   MEDSTART - Modern Medical Education Platform
   Main Stylesheet - Škálovatelný CSS systém
   Verze: 1.0.0
   ============================================ */

/* === CSS Variables - Centralizovaný design systém === */
:root {
  /* Brand Colors - Medstart */
  --brand-primary: #2A7BEF;
  --brand-text: #1E3A5F;
  --brand-field: #EAF1F8;
  --brand-accent: #7FB6EB;
  
  /* Primary Colors - Profesionální modrá paleta */
  --primary-50: #EAF1F8;
  --primary-100: #D5E3F1;
  --primary-200: #C0D5EA;
  --primary-300: #A8C6E4;
  --primary-400: #90B7DD;
  --primary-500: #2A7BEF;
  --primary-600: #2369D4;
  --primary-700: #1C57B9;
  --primary-800: #1E3A5F;
  --primary-900: #162D4A;
  
  /* Secondary Colors - Akcentní modrá */
  --secondary-50: #F5F8FB;
  --secondary-100: #EAF1F8;
  --secondary-200: #D5E3F1;
  --secondary-300: #A8C6E4;
  --secondary-400: #90B7DD;
  --secondary-500: #7FB6EB;
  --secondary-600: #6BA5E5;
  --secondary-700: #5794DF;
  --secondary-800: #4383D9;
  --secondary-900: #2F72D3;
  
  /* Medical Colors */
  --medical-blue: #2A7BEF;
  --medical-green: #059669;
  --medical-red: #dc2626;
  --medical-light-blue: #EAF1F8;
  --medical-light-green: #d1fae5;
  
  /* Neutral Colors */
  --gray-50: #F5F8FB;
  --gray-100: #E8ECF1;
  --gray-200: #D2D9E3;
  --gray-300: #A8B3C4;
  --gray-400: #7E8DA5;
  --gray-500: #5A6B82;
  --gray-600: #4A5A70;
  --gray-700: #3A495E;
  --gray-800: #2A384C;
  --gray-900: #1E3A5F;
  
  /* Semantic Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Shadows - Moderní stíny */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Spacing System */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Z-index System */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* === Global Resets & Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  color: var(--gray-900);
  background-color: var(--gray-50);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* === Container System === */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm {
  max-width: 640px;
}

.container-md {
  max-width: 768px;
}

.container-lg {
  max-width: 1024px;
}

.container-xl {
  max-width: 1280px;
}

/* === Typography System === */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

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

/* === Modern Gradients === */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-600) 100%);
}

.gradient-medical {
  background: linear-gradient(135deg, var(--medical-blue) 0%, var(--primary-500) 100%);
}

.gradient-success {
  background: linear-gradient(135deg, var(--medical-green) 0%, var(--success) 100%);
}

.gradient-hero {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-mesh {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === Button System - Univerzální a škálovatelný === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-600) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: white;
  color: var(--primary-600);
  border: 2px solid var(--primary-500);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-500);
  color: white;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--error);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-900);
  box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--primary-500);
  color: white;
}

/* Button Sizes */
.btn-xs { padding: var(--space-1) var(--space-3); font-size: 0.75rem; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: 0.875rem; }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: 1.125rem; }
.btn-xl { padding: var(--space-5) var(--space-10); font-size: 1.25rem; }

.btn-full { width: 100%; }

/* Button Shine Effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* === Card System - Univerzální komponenta === */
.card {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  transition: all var(--transition-slow);
  border: 1px solid var(--gray-200);
}

.card-sm { padding: var(--space-4); }
.card-lg { padding: var(--space-8); }

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-300);
}

.card-glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-header {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: var(--space-4);
}

.card-body {
  padding: var(--space-4) 0;
}

.card-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-4);
}

/* === Grid System === */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* === Flex System === */
.flex { display: flex; }
.inline-flex { display: inline-flex; }

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.space-x-2 > * + * { margin-left: var(--space-2); }
.space-x-4 > * + * { margin-left: var(--space-4); }
.space-x-6 > * + * { margin-left: var(--space-6); }

.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }

/* === Hero Section - Univerzální === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-8) var(--space-4);
}

.hero-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero::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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  background-position: bottom;
  opacity: 0.5;
  animation: waveAnimation 20s ease-in-out infinite;
}

@keyframes waveAnimation {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-50px); }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 1200px;
}

/* === Dashboard Components === */
.dashboard-header {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-600) 100%);
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  color: white;
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-xl);
}

.stat-card {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.stat-icon-blue { 
  background: #dbeafe !important;
  color: #1e40af !important;
}
.stat-icon-green { 
  background: #d1fae5 !important;
  color: #059669 !important;
}
.stat-icon-purple { 
  background: #e0e7ff !important;
  color: #4f46e5 !important;
}
.stat-icon-yellow { 
  background: #fef3c7 !important;
  color: #d97706 !important;
}
.stat-icon-red { 
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

/* FORCE WHITE CARDS - Fix čitelnosti */
.card {
  background: #ffffff !important;
}

/* Text na bílých kartách MUSÍ být tmavý brand-text! */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
  color: #1E3A5F !important;
}

.card p,
.card li,
.card span:not(.badge) {
  color: #1E3A5F !important;
}

/* === Form System === */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  background: white;
  color: var(--gray-900);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-2);
}

.form-helper {
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-top: var(--space-2);
}

/* === Alert/Notification System === */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  border-left: 4px solid;
  animation: fadeIn 0.5s ease-out;
}

.alert-success {
  background: var(--success-light);
  border-left-color: var(--success);
  color: var(--gray-900);
}

.alert-warning {
  background: var(--warning-light);
  border-left-color: var(--warning);
  color: var(--gray-900);
}

.alert-error {
  background: var(--error-light);
  border-left-color: var(--error);
  color: var(--gray-900);
}

.alert-info {
  background: var(--info-light);
  border-left-color: var(--info);
  color: var(--gray-900);
}

/* === Badge System === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary { background: var(--primary-100); color: var(--primary-800); }
.badge-success { background: var(--success-light); color: var(--medical-green); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-error { background: var(--error-light); color: var(--error); }
.badge-gray { background: var(--gray-200); color: var(--gray-800); }

/* === Loading States === */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--gray-200);
  border-radius: 50%;
  border-top-color: var(--primary-500);
  animation: spin 1s ease-in-out infinite;
}

.spinner-sm { width: 1rem; height: 1rem; border-width: 2px; }
.spinner-lg { width: 2rem; height: 2rem; border-width: 4px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

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

/* === Animations === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-fadeIn { animation: fadeIn 0.6s ease-out; }
.animate-slideIn { animation: slideIn 0.8s ease-out; }
.animate-scaleIn { animation: scaleIn 0.5s ease-out; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* === Utility Classes === */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }
.shadow-none { box-shadow: none; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Spacing utilities */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

/* === Responsive Design - Mobile First === */
@media (max-width: 640px) {
  .container { padding: 0 var(--space-2); }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  .hero { min-height: auto; padding: var(--space-12) var(--space-4); }
  
  .text-4xl { font-size: 1.875rem; line-height: 2.25rem; }
  .text-5xl { font-size: 2.25rem; line-height: 2.5rem; }
  .text-6xl { font-size: 2.5rem; line-height: 1; }
}

@media (min-width: 641px) and (max-width: 768px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-700: #d1d5db;
    --gray-800: #e5e7eb;
    --gray-900: #f9fafb;
  }
  
  body {
    background-color: #0f172a;
    color: var(--gray-100);
  }
  
  .card,
  .stat-card,
  .form-input,
  .form-select,
  .form-textarea {
    background: #1e293b;
    border-color: #334155;
    color: var(--gray-100);
  }
  
  .btn-secondary {
    background: #1e293b;
    border-color: var(--primary-400);
    color: var(--primary-300);
  }
  
  .btn-ghost {
    color: var(--gray-100);
  }
  
  .btn-ghost:hover:not(:disabled) {
    background: var(--primary-500);
    color: white;
  }
}

/* === Print Styles === */
@media print {
  .btn,
  .hero::before,
  [class*="animate-"] {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card,
  .stat-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

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

:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

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

/* ============================================
   AUTH PAGES - Jednotný design systém
   Pro: login, register, forgot-password, reset-password
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--brand-field) 0%, var(--primary-100) 50%, var(--brand-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(42, 123, 239, 0.1);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .logo-img {
    filter: invert(1) brightness(1.2);
}

[data-theme="light"] .logo-img {
    filter: none;
}

.auth-logo h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 0.5rem;
}

.auth-logo p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.auth-form {
    margin-top: 2rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    transition: all 0.2s;
    background: white;
    color: var(--brand-text);
}

.auth-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(42, 123, 239, 0.1);
}

.auth-input::placeholder {
    color: var(--gray-400);
}

.auth-helper {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.auth-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-md);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.auth-link {
    color: var(--brand-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

.auth-text-muted {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider-text {
    padding: 0 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.auth-alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.auth-alert-error {
    background: var(--error-light);
    border-left-color: var(--error);
    color: #991b1b;
}

.auth-alert-success {
    background: var(--success-light);
    border-left-color: var(--success);
    color: #065f46;
}

.auth-alert-info {
    background: var(--brand-field);
    border-left-color: var(--brand-primary);
    color: var(--brand-text);
}

.auth-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.auth-trust-badge {
    text-align: center;
}

.auth-trust-badge svg {
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.5rem;
}

.auth-trust-badge-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
}

.auth-social-proof {
    margin-top: 2rem;
    text-align: center;
}

.auth-social-proof-badge {
    display: inline-flex;
    align-items: center;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-md);
}

.auth-social-proof-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.auth-back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-back-link:hover {
    color: var(--gray-700);
}

@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   CUSTOMER THEME SYSTEM - Dark/Light Mode
   ============================================ */

/* Customer Theme Variables (merged with root) */
:root {
    --color-primary: var(--brand-primary);
    --color-primary-dark: var(--primary-600);
    --color-primary-light: var(--brand-accent);
    --color-secondary: var(--brand-text);
    --color-secondary-dark: var(--primary-900);
    --color-secondary-light: var(--primary-800);
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--brand-field);
    --bg-card: #ffffff;
    --bg-hover: var(--brand-field);
    --text-primary: var(--brand-text);
    --text-secondary: var(--gray-700);
    --text-tertiary: var(--gray-500);
    --text-inverse: #ffffff;
    --border-primary: var(--gray-200);
    --border-secondary: var(--gray-300);
    --border-focus: var(--brand-primary);
    --color-success: var(--success);
    --color-success-bg: var(--success-light);
    --color-warning: var(--warning);
    --color-warning-bg: var(--warning-light);
    --color-error: var(--error);
    --color-error-bg: var(--error-light);
    --color-info: var(--info);
    --color-info-bg: var(--info-light);
    --gradient-primary: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-text) 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, var(--medical-green) 100%);
    --gradient-warning: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-inverse: #0f172a;
    --border-primary: #334155;
    --border-secondary: #475569;
    --border-focus: #7c94f5;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-error-bg: rgba(239, 68, 68, 0.15);
    --color-info-bg: rgba(59, 130, 246, 0.15);
}

.theme-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.theme-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-secondary);
}

.theme-btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    border: none;
    transition: all 0.3s ease;
}

.theme-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.theme-btn-secondary {
    background-color: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    transition: all 0.3s ease;
}

.theme-btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.theme-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-primary);
    box-shadow: var(--shadow-sm);
}

.theme-nav {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-primary);
}

.theme-nav-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.theme-nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-secondary);
}

.theme-nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.theme-badge-success {
    background-color: var(--color-success-bg);
    color: var(--color-success);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-badge-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-badge-error {
    background-color: var(--color-error-bg);
    color: var(--color-error);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-badge-info {
    background-color: var(--color-info-bg);
    color: var(--color-info);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-input {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    transition: all 0.3s ease;
}

.theme-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.theme-input::placeholder {
    color: var(--text-tertiary);
}

.theme-gradient-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.theme-gradient-success {
    background: var(--gradient-success);
    color: var(--text-inverse);
}

.theme-stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.theme-stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.theme-toggle {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-secondary);
    transform: scale(1.05);
}

.theme-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.theme-table {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
}

.theme-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-secondary);
}

.theme-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.theme-table tr:hover {
    background-color: var(--bg-hover);
}

.theme-modal {
    background-color: var(--bg-card);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    border-radius: 0.75rem;
}

.theme-modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .theme-modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.theme-progress-bar {
    background-color: var(--bg-tertiary);
    border-radius: 9999px;
    overflow: hidden;
}

.theme-progress-fill {
    background: var(--gradient-primary);
    height: 100%;
    transition: width 0.5s ease;
}

.theme-divider {
    border-color: var(--border-primary);
}

* {
    transition-property: background-color, border-color, color;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

a, button, input, select, textarea, .no-transition {
    transition-property: none;
}

a, button {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ============================================
   LEGAL PAGES CSS - Nudný ale ČITELNÝ!
   Pro: GDPR, Obchodní podmínky, atd.
   ============================================ */

.legal-content {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--brand-text);
}

.legal-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-text);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.legal-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--brand-text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.legal-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--gray-700);
    font-size: 1rem;
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    font-size: 1rem;
    line-height: 1.7;
}

.legal-content strong {
    font-weight: 600;
    color: var(--brand-text);
}

.legal-content a {
    color: var(--brand-primary);
    text-decoration: underline;
    font-weight: 500;
}

.legal-content a:hover {
    color: var(--primary-600);
}

.legal-content .info-box {
    background: var(--info-light);
    border-left: 4px solid var(--brand-primary);
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.legal-content .info-box p {
    margin-bottom: 0;
    color: var(--primary-700);
}

.legal-section {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
    background: var(--gray-50);
    border-radius: 0.5rem;
}

.legal-section-blue { border-left-color: var(--brand-primary); }
.legal-section-green { border-left-color: var(--success); }
.legal-section-purple { border-left-color: #8b5cf6; }
.legal-section-orange { border-left-color: var(--warning); }
.legal-section-red { border-left-color: var(--error); }

.legal-section h3 {
    margin-top: 0;
}

.legal-contact-box {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.legal-contact-box p {
    margin-bottom: 0.5rem;
}

.legal-updated {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.legal-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background: white;
}

.legal-wrapper h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--brand-text);
    line-height: 1.3;
}

.legal-wrapper h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--brand-text);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.legal-wrapper h3 {
    font-size: 19px;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.legal-wrapper p {
    font-size: 17px;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--brand-text);
}

.legal-wrapper ul {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.legal-wrapper li {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
    color: var(--brand-text);
}

.legal-wrapper li:before {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 0.75em;
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
}

.legal-wrapper a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.legal-wrapper a:hover {
    color: var(--primary-600);
}

.legal-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.legal-header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legal-header img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
}

.legal-header-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-text);
    margin-left: 1rem;
}

.legal-back {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 15px;
}

.legal-back:hover {
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .legal-content h1 {
        font-size: 2rem;
    }
    
    .legal-content h2 {
        font-size: 1.5rem;
    }
    
    .legal-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .legal-wrapper h1 {
        font-size: 28px;
    }
    
    .legal-wrapper h2 {
        font-size: 21px;
    }
    
    .legal-wrapper p,
    .legal-wrapper li {
        font-size: 16px;
    }
}


