/* =================================================================
   PAGES MODERN - Shared Enterprise Page Styles
   Applies to: triage, documents, medications, history, about, contact
   ================================================================= */

/* Base Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modern Container */
.page-modern-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.4) 0%, rgba(186, 230, 253, 0.3) 50%, rgba(125, 211, 252, 0.2) 100%);
  min-height: 100vh;
}

/* Hero Section */
.page-hero-modern {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out;
}

.page-hero-modern h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.page-hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Info Card */
.info-card-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(14, 165, 233, 0.3);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.15);
  animation: fadeInUp 0.6s ease-out 0.1s both;
  position: relative;
  overflow: hidden;
}

.info-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 50%, #3b82f6 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.info-card-modern h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 0.75rem;
}

.info-card-modern p {
  color: #0c4a6e;
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
}

.info-card-modern ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
  color: #0c4a6e;
}

.info-card-modern li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Warning Alert */
.warning-alert-modern {
  padding: 1.5rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  color: #78350f;
  font-weight: 500;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.warning-alert-modern strong {
  font-weight: 700;
}

/* Modern Card */
.card-modern {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.card-modern:hover {
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.2);
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.4);
}

.card-modern-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(14, 165, 233, 0.1);
}

.card-modern-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-modern-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

/* Form Elements */
.form-group-modern {
  margin-bottom: 1.5rem;
}

.form-label-modern {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-input-modern {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid rgba(14, 165, 233, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input-modern:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.form-textarea-modern {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Button Styles */
.btn-modern-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
  text-decoration: none;
  white-space: nowrap;
}

.btn-modern-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
  color: white;
}

.btn-modern-primary:active {
  transform: translateY(0);
}

.btn-modern-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-modern-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: white;
  color: #0ea5e9;
  border: 2px solid #0ea5e9;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-modern-secondary:hover {
  background: #0ea5e9;
  color: white;
}

.btn-modern-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-modern-ghost:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

/* Badge */
.badge-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  color: #0c4a6e;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #0ea5e9;
}

.badge-modern.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #22c55e;
  color: #065f46;
}

.badge-modern.warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  color: #78350f;
}

.badge-modern.error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  color: #991b1b;
}

/* Status Messages */
.status-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-left: 4px solid #0ea5e9;
  border-radius: 12px;
  color: #0c4a6e;
  font-weight: 500;
  animation: pulse 2s ease-in-out infinite;
}

.status-success {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #22c55e;
  border-radius: 12px;
  color: #065f46;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-error {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  color: #991b1b;
  font-weight: 500;
}

/* Spinner */
.spinner-modern {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(14, 165, 233, 0.2);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Grid Layouts */
.grid-modern-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-modern-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .grid-modern-2,
  .grid-modern-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* List Item */
.list-item-modern {
  background: white;
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.4s ease-out;
}

.list-item-modern:hover {
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px -2px rgba(14, 165, 233, 0.15);
  transform: translateX(4px);
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.list-item-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.125rem;
}

.list-item-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.list-item-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Empty State */
.empty-state-modern {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-modern-container {
    padding: 1.5rem 1rem;
  }

  .card-modern {
    padding: 1.5rem;
  }

  .page-hero-modern h1 {
    font-size: 2rem;
  }

  .page-hero-subtitle {
    font-size: 1.125rem;
  }

  .form-group-modern {
    margin-bottom: 1.25rem;
  }

  .btn-modern-primary,
  .btn-modern-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Utility Classes */
.text-center-modern {
  text-align: center;
}

.mb-modern-sm {
  margin-bottom: 1rem;
}

.mb-modern-md {
  margin-bottom: 1.5rem;
}

.mb-modern-lg {
  margin-bottom: 2rem;
}

.mt-modern-sm {
  margin-top: 1rem;
}

.mt-modern-md {
  margin-top: 1.5rem;
}

.mt-modern-lg {
  margin-top: 2rem;
}

.flex-modern {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.flex-modern-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
