/**
 * ============================================================================
 * AYLLA DESIGN SYSTEM
 * Sistema de design visual para IA Educacional
 * ============================================================================
 *
 * Paleta: Azul institucional + Cyan vibrante
 * Estilo: Moderno, limpo, profissional
 * Mobile-first, acessível, performático
 */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
  /* === PRIMÁRIAS === */
  --aylla-blue-900: #08215D;    /* Principal - headers, textos importantes */
  --aylla-blue-800: #0A2A75;
  --aylla-blue-700: #0D358E;
  --aylla-blue-600: #1042A8;
  --aylla-blue-500: #1450C2;
  --aylla-blue-400: #3D6FD1;
  --aylla-blue-300: #6690E0;
  --aylla-blue-200: #9AB4EC;
  --aylla-blue-100: #CDD9F5;
  --aylla-blue-50: #EEF2FC;

  /* === CYAN (Destaque) === */
  --aylla-cyan-500: #07C9FD;    /* Ações, destaques, hover */
  --aylla-cyan-400: #38D4FE;
  --aylla-cyan-300: #6DDFFF;
  --aylla-cyan-200: #A1EAFF;
  --aylla-cyan-100: #D3F5FF;
  --aylla-cyan-50: #EDFBFF;

  /* === NEUTRAS === */
  --aylla-white: #FFFFFF;
  --aylla-gray-50: #F9FAFB;
  --aylla-gray-100: #F3F4F6;
  --aylla-gray-200: #E5E7EB;
  --aylla-gray-300: #D1D5DB;
  --aylla-gray-400: #9CA3AF;
  --aylla-gray-500: #6B7280;
  --aylla-gray-600: #4B5563;
  --aylla-gray-700: #374151;
  --aylla-gray-800: #1F2937;
  --aylla-gray-900: #111827;
  --aylla-black: #030712;

  /* === SEMÂNTICAS === */
  --aylla-success: #10B981;
  --aylla-success-light: #34D399;
  --aylla-success-bg: #D1FAE5;
  --aylla-success-border: #A7F3D0;

  --aylla-warning: #F59E0B;
  --aylla-warning-light: #FBBF24;
  --aylla-warning-bg: #FEF3C7;
  --aylla-warning-border: #FDE68A;

  --aylla-error: #EF4444;
  --aylla-error-light: #F87171;
  --aylla-error-bg: #FEE2E2;
  --aylla-error-border: #FECACA;

  --aylla-info: #3B82F6;
  --aylla-info-light: #60A5FA;
  --aylla-info-bg: #DBEAFE;
  --aylla-info-border: #BFDBFE;

  /* === GRADIENTES === */
  --aylla-gradient: linear-gradient(135deg, #08215D 0%, #07C9FD 100%);
  --aylla-gradient-hover: linear-gradient(135deg, #0D358E 0%, #38D4FE 100%);
  --aylla-gradient-soft: linear-gradient(135deg, #1450C2 0%, #6DDFFF 100%);
  --aylla-gradient-reverse: linear-gradient(135deg, #07C9FD 0%, #08215D 100%);
  --aylla-gradient-radial: radial-gradient(circle at 30% 30%, #07C9FD 0%, #08215D 70%);

  /* === SOMBRAS === */
  --aylla-shadow-xs: 0 1px 2px rgba(8, 33, 93, 0.04);
  --aylla-shadow-sm: 0 1px 3px rgba(8, 33, 93, 0.06), 0 1px 2px rgba(8, 33, 93, 0.04);
  --aylla-shadow: 0 4px 6px -1px rgba(8, 33, 93, 0.08), 0 2px 4px -1px rgba(8, 33, 93, 0.04);
  --aylla-shadow-md: 0 10px 15px -3px rgba(8, 33, 93, 0.08), 0 4px 6px -2px rgba(8, 33, 93, 0.04);
  --aylla-shadow-lg: 0 20px 25px -5px rgba(8, 33, 93, 0.1), 0 10px 10px -5px rgba(8, 33, 93, 0.04);
  --aylla-shadow-xl: 0 25px 50px -12px rgba(8, 33, 93, 0.2);
  --aylla-shadow-glow: 0 0 20px rgba(7, 201, 253, 0.4);
  --aylla-shadow-glow-lg: 0 0 40px rgba(7, 201, 253, 0.5);
  --aylla-shadow-inner: inset 0 2px 4px rgba(8, 33, 93, 0.06);

  /* === TIPOGRAFIA === */
  --aylla-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --aylla-font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

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

  --aylla-leading-tight: 1.25;
  --aylla-leading-normal: 1.5;
  --aylla-leading-relaxed: 1.625;

  /* === BORDAS === */
  --aylla-radius-none: 0;
  --aylla-radius-sm: 0.25rem;   /* 4px */
  --aylla-radius: 0.5rem;       /* 8px */
  --aylla-radius-md: 0.75rem;   /* 12px */
  --aylla-radius-lg: 1rem;      /* 16px */
  --aylla-radius-xl: 1.5rem;    /* 24px */
  --aylla-radius-2xl: 2rem;     /* 32px */
  --aylla-radius-full: 9999px;

  /* === ESPAÇAMENTO === */
  --aylla-space-1: 0.25rem;     /* 4px */
  --aylla-space-2: 0.5rem;      /* 8px */
  --aylla-space-3: 0.75rem;     /* 12px */
  --aylla-space-4: 1rem;        /* 16px */
  --aylla-space-5: 1.25rem;     /* 20px */
  --aylla-space-6: 1.5rem;      /* 24px */
  --aylla-space-8: 2rem;        /* 32px */
  --aylla-space-10: 2.5rem;     /* 40px */
  --aylla-space-12: 3rem;       /* 48px */
  --aylla-space-16: 4rem;       /* 64px */

  /* === TRANSIÇÕES === */
  --aylla-transition-fast: 150ms ease;
  --aylla-transition: 200ms ease;
  --aylla-transition-slow: 300ms ease;
  --aylla-transition-slower: 500ms ease;

  /* === Z-INDEX === */
  --aylla-z-dropdown: 100;
  --aylla-z-sticky: 200;
  --aylla-z-fixed: 300;
  --aylla-z-modal-backdrop: 400;
  --aylla-z-modal: 500;
  --aylla-z-popover: 600;
  --aylla-z-tooltip: 700;
  --aylla-z-toast: 800;
}

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

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

body {
  font-family: var(--aylla-font);
  font-size: var(--aylla-text-base);
  line-height: var(--aylla-leading-normal);
  color: var(--aylla-gray-800);
  background-color: var(--aylla-gray-50);
  min-height: 100vh;
}

/* ============================================================================
   TYPOGRAPHY UTILITIES
   ============================================================================ */

/* Font Sizes */
.text-xs { font-size: var(--aylla-text-xs); }
.text-sm { font-size: var(--aylla-text-sm); }
.text-base { font-size: var(--aylla-text-base); }
.text-lg { font-size: var(--aylla-text-lg); }
.text-xl { font-size: var(--aylla-text-xl); }
.text-2xl { font-size: var(--aylla-text-2xl); }
.text-3xl { font-size: var(--aylla-text-3xl); }
.text-4xl { font-size: var(--aylla-text-4xl); }
.text-5xl { font-size: var(--aylla-text-5xl); }

/* Font Weights */
.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 Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Line Height */
.leading-tight { line-height: var(--aylla-leading-tight); }
.leading-normal { line-height: var(--aylla-leading-normal); }
.leading-relaxed { line-height: var(--aylla-leading-relaxed); }

/* ============================================================================
   COLOR UTILITIES
   ============================================================================ */

/* Text Colors */
.text-primary { color: var(--aylla-blue-900); }
.text-secondary { color: var(--aylla-gray-600); }
.text-muted { color: var(--aylla-gray-400); }
.text-accent { color: var(--aylla-cyan-500); }
.text-white { color: var(--aylla-white); }
.text-success { color: var(--aylla-success); }
.text-warning { color: var(--aylla-warning); }
.text-error { color: var(--aylla-error); }
.text-info { color: var(--aylla-info); }

/* Background Colors */
.bg-primary { background-color: var(--aylla-blue-900); }
.bg-secondary { background-color: var(--aylla-gray-100); }
.bg-accent { background-color: var(--aylla-cyan-500); }
.bg-white { background-color: var(--aylla-white); }
.bg-transparent { background-color: transparent; }
.bg-success { background-color: var(--aylla-success-bg); }
.bg-warning { background-color: var(--aylla-warning-bg); }
.bg-error { background-color: var(--aylla-error-bg); }
.bg-info { background-color: var(--aylla-info-bg); }

/* Gradient Backgrounds */
.bg-gradient { background: var(--aylla-gradient); }
.bg-gradient-soft { background: var(--aylla-gradient-soft); }

/* ============================================================================
   BUTTONS
   ============================================================================ */

.aylla-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--aylla-space-2);
  padding: var(--aylla-space-3) var(--aylla-space-5);
  font-family: var(--aylla-font);
  font-size: var(--aylla-text-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--aylla-radius-md);
  cursor: pointer;
  transition: all var(--aylla-transition);
  white-space: nowrap;
  user-select: none;
}

.aylla-btn:focus-visible {
  outline: 2px solid var(--aylla-cyan-500);
  outline-offset: 2px;
}

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

/* Primary Button */
.aylla-btn-primary {
  background: var(--aylla-gradient);
  color: var(--aylla-white);
  box-shadow: var(--aylla-shadow-sm);
}

.aylla-btn-primary:hover:not(:disabled) {
  background: var(--aylla-gradient-hover);
  box-shadow: var(--aylla-shadow-md), var(--aylla-shadow-glow);
  transform: translateY(-1px);
}

.aylla-btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--aylla-shadow-sm);
}

/* Secondary Button */
.aylla-btn-secondary {
  background: var(--aylla-white);
  color: var(--aylla-blue-900);
  border: 1px solid var(--aylla-gray-200);
  box-shadow: var(--aylla-shadow-xs);
}

.aylla-btn-secondary:hover:not(:disabled) {
  background: var(--aylla-gray-50);
  border-color: var(--aylla-gray-300);
  box-shadow: var(--aylla-shadow-sm);
}

/* Ghost Button */
.aylla-btn-ghost {
  background: transparent;
  color: var(--aylla-gray-600);
}

.aylla-btn-ghost:hover:not(:disabled) {
  background: var(--aylla-gray-100);
  color: var(--aylla-gray-800);
}

/* Accent Button */
.aylla-btn-accent {
  background: var(--aylla-cyan-500);
  color: var(--aylla-blue-900);
  font-weight: 600;
}

.aylla-btn-accent:hover:not(:disabled) {
  background: var(--aylla-cyan-400);
  box-shadow: var(--aylla-shadow-glow);
}

/* Danger Button */
.aylla-btn-danger {
  background: var(--aylla-error);
  color: var(--aylla-white);
}

.aylla-btn-danger:hover:not(:disabled) {
  background: var(--aylla-error-light);
}

/* Button Sizes */
.aylla-btn-sm {
  padding: var(--aylla-space-2) var(--aylla-space-3);
  font-size: var(--aylla-text-xs);
}

.aylla-btn-lg {
  padding: var(--aylla-space-4) var(--aylla-space-6);
  font-size: var(--aylla-text-base);
}

.aylla-btn-xl {
  padding: var(--aylla-space-5) var(--aylla-space-8);
  font-size: var(--aylla-text-lg);
}

/* Icon Button */
.aylla-btn-icon {
  padding: var(--aylla-space-3);
  border-radius: var(--aylla-radius-full);
}

.aylla-btn-icon.aylla-btn-sm {
  padding: var(--aylla-space-2);
}

.aylla-btn-icon.aylla-btn-lg {
  padding: var(--aylla-space-4);
}

/* ============================================================================
   CARDS
   ============================================================================ */

.aylla-card {
  background: var(--aylla-white);
  border-radius: var(--aylla-radius-lg);
  box-shadow: var(--aylla-shadow);
  overflow: hidden;
}

.aylla-card-flat {
  box-shadow: none;
  border: 1px solid var(--aylla-gray-200);
}

.aylla-card-elevated {
  box-shadow: var(--aylla-shadow-lg);
}

.aylla-card-header {
  padding: var(--aylla-space-5) var(--aylla-space-6);
  border-bottom: 1px solid var(--aylla-gray-100);
}

.aylla-card-header-gradient {
  background: var(--aylla-gradient);
  color: var(--aylla-white);
  border-bottom: none;
}

.aylla-card-title {
  font-size: var(--aylla-text-lg);
  font-weight: 600;
  color: var(--aylla-gray-900);
  margin: 0;
}

.aylla-card-header-gradient .aylla-card-title {
  color: var(--aylla-white);
}

.aylla-card-subtitle {
  font-size: var(--aylla-text-sm);
  color: var(--aylla-gray-500);
  margin-top: var(--aylla-space-1);
}

.aylla-card-header-gradient .aylla-card-subtitle {
  color: var(--aylla-cyan-100);
}

.aylla-card-body {
  padding: var(--aylla-space-6);
}

.aylla-card-footer {
  padding: var(--aylla-space-4) var(--aylla-space-6);
  background: var(--aylla-gray-50);
  border-top: 1px solid var(--aylla-gray-100);
}

/* ============================================================================
   FORM INPUTS
   ============================================================================ */

.aylla-input,
.aylla-select,
.aylla-textarea {
  width: 100%;
  padding: var(--aylla-space-3) var(--aylla-space-4);
  font-family: var(--aylla-font);
  font-size: var(--aylla-text-sm);
  color: var(--aylla-gray-800);
  background: var(--aylla-white);
  border: 1px solid var(--aylla-gray-200);
  border-radius: var(--aylla-radius-md);
  transition: all var(--aylla-transition);
}

.aylla-input:hover,
.aylla-select:hover,
.aylla-textarea:hover {
  border-color: var(--aylla-gray-300);
}

.aylla-input:focus,
.aylla-select:focus,
.aylla-textarea:focus {
  outline: none;
  border-color: var(--aylla-cyan-500);
  box-shadow: 0 0 0 3px rgba(7, 201, 253, 0.15);
}

.aylla-input::placeholder,
.aylla-textarea::placeholder {
  color: var(--aylla-gray-400);
}

.aylla-input:disabled,
.aylla-select:disabled,
.aylla-textarea:disabled {
  background: var(--aylla-gray-100);
  color: var(--aylla-gray-400);
  cursor: not-allowed;
}

/* Input with icon */
.aylla-input-wrapper {
  position: relative;
}

.aylla-input-wrapper .aylla-input {
  padding-left: var(--aylla-space-10);
}

.aylla-input-icon {
  position: absolute;
  left: var(--aylla-space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--aylla-gray-400);
  pointer-events: none;
}

/* Input sizes */
.aylla-input-sm {
  padding: var(--aylla-space-2) var(--aylla-space-3);
  font-size: var(--aylla-text-xs);
}

.aylla-input-lg {
  padding: var(--aylla-space-4) var(--aylla-space-5);
  font-size: var(--aylla-text-base);
}

/* Select */
.aylla-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--aylla-space-3) center;
  background-size: 1.25rem;
  padding-right: var(--aylla-space-10);
  cursor: pointer;
}

/* Textarea */
.aylla-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Input States */
.aylla-input-error {
  border-color: var(--aylla-error);
}

.aylla-input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.aylla-input-success {
  border-color: var(--aylla-success);
}

.aylla-input-success:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Form Label */
.aylla-label {
  display: block;
  font-size: var(--aylla-text-sm);
  font-weight: 500;
  color: var(--aylla-gray-700);
  margin-bottom: var(--aylla-space-2);
}

.aylla-label-required::after {
  content: ' *';
  color: var(--aylla-error);
}

/* Help Text */
.aylla-help-text {
  font-size: var(--aylla-text-xs);
  color: var(--aylla-gray-500);
  margin-top: var(--aylla-space-1);
}

.aylla-error-text {
  font-size: var(--aylla-text-xs);
  color: var(--aylla-error);
  margin-top: var(--aylla-space-1);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.aylla-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--aylla-space-1);
  padding: var(--aylla-space-1) var(--aylla-space-3);
  font-size: var(--aylla-text-xs);
  font-weight: 500;
  border-radius: var(--aylla-radius-full);
  white-space: nowrap;
}

.aylla-badge-primary {
  background: var(--aylla-blue-100);
  color: var(--aylla-blue-700);
}

.aylla-badge-accent {
  background: var(--aylla-cyan-100);
  color: var(--aylla-blue-900);
}

.aylla-badge-success {
  background: var(--aylla-success-bg);
  color: var(--aylla-success);
}

.aylla-badge-warning {
  background: var(--aylla-warning-bg);
  color: var(--aylla-warning);
}

.aylla-badge-error {
  background: var(--aylla-error-bg);
  color: var(--aylla-error);
}

.aylla-badge-info {
  background: var(--aylla-info-bg);
  color: var(--aylla-info);
}

.aylla-badge-neutral {
  background: var(--aylla-gray-100);
  color: var(--aylla-gray-600);
}

/* Badge with dot */
.aylla-badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================================
   AVATARS
   ============================================================================ */

.aylla-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--aylla-radius-full);
  background: var(--aylla-gradient);
  color: var(--aylla-white);
  font-weight: 600;
  font-size: var(--aylla-text-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.aylla-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aylla-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--aylla-text-xs);
}

.aylla-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--aylla-text-lg);
}

.aylla-avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--aylla-text-2xl);
}

/* ============================================================================
   DIVIDERS
   ============================================================================ */

.aylla-divider {
  height: 1px;
  background: var(--aylla-gray-200);
  border: none;
  margin: var(--aylla-space-4) 0;
}

.aylla-divider-vertical {
  width: 1px;
  height: auto;
  margin: 0 var(--aylla-space-4);
}

/* ============================================================================
   UTILITIES - SPACING
   ============================================================================ */

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: var(--aylla-space-1); }
.m-2 { margin: var(--aylla-space-2); }
.m-4 { margin: var(--aylla-space-4); }
.m-6 { margin: var(--aylla-space-6); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--aylla-space-1); }
.mt-2 { margin-top: var(--aylla-space-2); }
.mt-4 { margin-top: var(--aylla-space-4); }
.mt-6 { margin-top: var(--aylla-space-6); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--aylla-space-1); }
.mb-2 { margin-bottom: var(--aylla-space-2); }
.mb-4 { margin-bottom: var(--aylla-space-4); }
.mb-6 { margin-bottom: var(--aylla-space-6); }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--aylla-space-1); }
.p-2 { padding: var(--aylla-space-2); }
.p-4 { padding: var(--aylla-space-4); }
.p-6 { padding: var(--aylla-space-6); }

/* Gap */
.gap-1 { gap: var(--aylla-space-1); }
.gap-2 { gap: var(--aylla-space-2); }
.gap-3 { gap: var(--aylla-space-3); }
.gap-4 { gap: var(--aylla-space-4); }
.gap-6 { gap: var(--aylla-space-6); }

/* ============================================================================
   UTILITIES - FLEXBOX & GRID
   ============================================================================ */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-none { flex: none; }

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

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

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

/* ============================================================================
   UTILITIES - MISC
   ============================================================================ */

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

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

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

.shadow { box-shadow: var(--aylla-shadow); }
.shadow-md { box-shadow: var(--aylla-shadow-md); }
.shadow-lg { box-shadow: var(--aylla-shadow-lg); }
.shadow-glow { box-shadow: var(--aylla-shadow-glow); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(7, 201, 253, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(7, 201, 253, 0.6);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Animation utility classes */
.animate-fadeIn { animation: fadeIn var(--aylla-transition-slow) ease-out; }
.animate-fadeOut { animation: fadeOut var(--aylla-transition-slow) ease-out; }
.animate-slideUp { animation: slideUp var(--aylla-transition-slow) ease-out; }
.animate-slideDown { animation: slideDown var(--aylla-transition-slow) ease-out; }
.animate-scaleIn { animation: scaleIn var(--aylla-transition-slow) ease-out; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-bounce { animation: bounce 1s ease infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* ============================================================================
   RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Mobile first - base styles are mobile */

/* sm: 640px */
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* md: 768px */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* lg: 1024px */
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* xl: 1280px */
@media (min-width: 1280px) {
  .xl\:flex { display: flex; }
  .xl\:hidden { display: none; }
  .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================================
   SCROLLBAR STYLING
   ============================================================================ */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--aylla-gray-100);
  border-radius: var(--aylla-radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--aylla-gray-300);
  border-radius: var(--aylla-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--aylla-gray-400);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--aylla-gray-300) var(--aylla-gray-100);
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .aylla-card {
    box-shadow: none;
    border: 1px solid var(--aylla-gray-200);
  }
}

/* ============================================================================
   SESSION EXPIRED MODAL
   ============================================================================ */

.session-expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  animation: fadeIn 0.3s ease;
}

.session-expired-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

.session-expired-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.session-expired-content h2 {
  color: var(--aylla-blue-900);
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 700;
}

.session-expired-content p {
  color: var(--aylla-gray-500);
  margin-bottom: 8px;
  font-size: 14px;
}

.session-expired-btn {
  margin-top: 20px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--aylla-cyan-500), #0284c7);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.session-expired-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(7, 201, 253, 0.4);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
