:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #10b981;
  --accent: #f59e0b;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 900px;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo-container {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.logo-icon {
  font-size: 2.5rem;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

.header h1 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

.card-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.card-description {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card.atencion {
  border-top: 4px solid var(--primary);
}

.card.peluqueria {
  border-top: 4px solid var(--accent);
}

.search-section {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.search-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-search {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-search:hover {
  background: var(--primary-dark);
}

#results {
  margin-top: 1.5rem;
}

.patient-card {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.patient-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.patient-info {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.patient-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-view {
  background: var(--primary);
  color: white;
}

.btn-view:hover {
  background: var(--primary-dark);
}

.btn-edit {
  background: var(--secondary);
  color: white;
}

.btn-edit:hover {
  background: #059669;
}

.error {
  color: #ef4444;
  padding: 1rem;
  background: #fee2e2;
  border-radius: 8px;
  text-align: center;
}

.results-header {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .search-input-group {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
  }
}