/* ==========================================================================
   Guia Medico 3L — Page-Specific Styles
   Premium SaaS Healthcare Marketplace
   Search Results · Doctor Profile · Auth · Dashboard · Admin
   ========================================================================== */


/* ==========================================================================
   SEARCH RESULTS PAGE
   ========================================================================== */

/* Search Hero Bar
   -------------------------------------------------------------------------- */
.search-hero {
    background: var(--bg);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

.search-bar-form {
    display: flex;
    gap: 0;
    max-width: 860px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    flex: 1;
    gap: 0;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder {
    color: var(--muted);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-btn {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0 !important;
    white-space: nowrap;
    padding-left: 24px;
    padding-right: 24px;
    font-weight: 600;
    letter-spacing: 0.01em;
}


/* Search Results Section
   -------------------------------------------------------------------------- */
.search-results-section {
    padding: 28px 0 56px;
}

/* Mobile controls — filter/sort toggles shown on small screens */
.search-mobile-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Results Header — count + sort */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.results-count strong {
    color: var(--primary);
    font-weight: 700;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-sort label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-select-sm {
    padding: 9px 36px 9px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a5568' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition);
}

.form-select-sm:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}


/* Search Layout — Sidebar + Results
   -------------------------------------------------------------------------- */
.search-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Filter Sidebar */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-h) + 20px);
}

.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.filter-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    line-height: 1;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.filter-close-btn:hover {
    background: var(--bg-alt);
}

.filter-group {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition);
}

.filter-checkbox-group label:hover {
    color: var(--text);
}

.filter-checkbox-group input[type="checkbox"],
.filter-checkbox-group input[type="radio"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.filter-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-price-range input {
    flex: 1;
    padding: 9px 12px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}

.filter-price-range input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.filter-price-range span {
    color: var(--muted);
    font-weight: 500;
}

.filter-overlay {
    display: none;
}


/* Search Results Content
   -------------------------------------------------------------------------- */
.search-results-content {
    flex: 1;
    min-width: 0;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* Search Map
   -------------------------------------------------------------------------- */
.search-map-section {
    margin-top: 36px;
}

.search-map-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.search-map {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    overflow: hidden;
}

/* Map Fullscreen Overlay */
.map-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.map-fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.search-map-mobile {
    width: 100%;
    flex: 1;
    min-height: 0;
}

/* Search Loading */
.search-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.search-loading p {
    margin-top: 16px;
    font-size: 0.9375rem;
}


/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.4;
    line-height: 1;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}


/* ==========================================================================
   DOCTOR / CLINIC PROFILE PAGE
   ========================================================================== */

/* Profile Hero — gradient banner + card layout
   -------------------------------------------------------------------------- */
.profile-hero {
    position: relative;
    background: var(--bg-alt);
    padding-bottom: 0;
}

.profile-hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a5276 60%, #0e3a5c 100%);
    z-index: 0;
}

.profile-hero .container {
    position: relative;
    z-index: 1;
}

.profile-breadcrumb {
    padding-top: 16px;
    padding-bottom: 12px;
}

.profile-breadcrumb,
.profile-breadcrumb a,
.profile-breadcrumb .breadcrumb-separator,
.profile-breadcrumb .breadcrumb-current {
    color: rgba(255, 255, 255, 0.7);
}

.profile-breadcrumb a:hover {
    color: #fff;
}

/* Profile Card — elevated card overlapping banner
   -------------------------------------------------------------------------- */
.profile-card {
    background: var(--bg);
    border-radius: var(--radius-xl, 16px) var(--radius-xl, 16px) 0 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-light);
    border-bottom: none;
    overflow: hidden;
}

.profile-card-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 28px 32px 20px;
}

.profile-card-avatar {
    flex-shrink: 0;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: var(--primary);
    font-weight: 700;
    user-select: none;
}

.avatar-placeholder-lg {
    width: 110px;
    height: 110px;
    font-size: 2.5rem;
    border: 4px solid var(--bg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.avatar-placeholder-clinic {
    background: linear-gradient(135deg, #e0f2fe, #7dd3fc);
    color: var(--primary);
}

.avatar-placeholder-sm {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* Profile Card Info */
.profile-card-info {
    flex: 1;
    min-width: 0;
}

.profile-card-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.profile-name {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0;
}

.profile-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6875rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    white-space: nowrap;
}

.profile-specialty {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 2px;
    font-weight: 500;
}

.profile-crm {
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.profile-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Profile Meta — inline info items */
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-top: 4px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.profile-meta-item svg {
    flex-shrink: 0;
    color: var(--muted);
}

/* Profile Rating — inside meta */
.profile-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-rating .stars {
    display: inline-flex;
    gap: 2px;
}

.profile-rating .star,
.stars .star {
    color: var(--star);
}

.profile-rating .star-empty,
.stars .star-empty {
    color: var(--border);
}

.profile-rating .star-half {
    color: var(--star);
}

.rating-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9375rem;
}

.rating-count {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 400;
}

/* Profile Card Bottom — price, insurances, actions
   -------------------------------------------------------------------------- */
.profile-card-bottom {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 16px 32px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-alt);
}

.profile-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: auto;
}

.profile-price-label {
    font-size: 0.6875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.profile-price-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.profile-price-muted {
    color: var(--muted);
    font-size: 1rem;
    font-weight: 500;
}

/* Profile Insurance Tags */
.profile-card-insurances {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.profile-insurance-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: border-color var(--transition);
}

.profile-insurance-tag:hover {
    border-color: var(--accent);
}

.profile-insurance-more {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-favorite {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-favorite:hover {
    background: var(--accent-light);
}

.btn-favorite.favorited {
    background: var(--accent);
    color: var(--primary);
}

.btn-success {
    background-color: #25d366;
    color: #fff;
    border-color: #25d366;
}

.btn-success:hover {
    background-color: #1fb855;
    border-color: #1fb855;
}


/* Profile Tabs — inside the hero section, below the card
   -------------------------------------------------------------------------- */
.profile-tabs {
    display: flex;
    gap: 0;
    background: var(--bg);
    border-radius: 0 0 var(--radius-xl, 16px) var(--radius-xl, 16px);
    border: 1px solid var(--border-light);
    border-top: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.profile-tab:hover {
    color: var(--accent);
    background: var(--bg-alt);
}

.profile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
    background: var(--bg);
}

/* Legacy badge-outline — used in convenios section */
.badge-outline {
    background: var(--bg-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition);
}

.badge-outline:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}


/* Clinic Contact List
   -------------------------------------------------------------------------- */
.profile-contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.profile-contact-item svg {
    flex-shrink: 0;
    color: var(--accent);
}

.profile-contact-item a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.profile-contact-item a:hover {
    color: var(--accent);
}

.profile-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.profile-address svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--accent);
}

/* ==========================================================================
   PROFILE BODY — Card-based sections below profile header
   ========================================================================== */
.profile-body {
    background: var(--bg-alt);
    padding: 32px 0 48px;
}

.profile-body-content {
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Profile Section Card — each section is an elevated card */
.profile-section-card {
    background: var(--bg);
    border-radius: var(--radius-xl, 16px);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    scroll-margin-top: calc(var(--header-h, 64px) + 20px);
}

.profile-section-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.profile-section-card-header svg {
    color: var(--accent);
    flex-shrink: 0;
}

.profile-section-card-header h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.profile-section-count {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.9375rem;
}

.profile-section-card-body {
    padding: 24px 28px;
}

/* Profile Subsection Title */
.profile-subsection-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

/* Profile Bio */
.profile-bio {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Profile Specialties Block */
.profile-specialties-block {
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.profile-specialty-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--accent-light), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #047857;
    text-decoration: none;
    transition: all 0.2s ease;
}

.profile-specialty-badge:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Badge Group */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ==========================================================================
   REVIEW SUMMARY — Score card
   ========================================================================== */
.review-summary-card {
    background: linear-gradient(135deg, var(--bg-alt) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.review-summary-score {
    display: flex;
    align-items: center;
    gap: 16px;
}

.review-summary-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.review-summary-stars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-summary-label {
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 500;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ==========================================================================
   REVIEW CARD — Individual review
   ========================================================================== */
.review-card {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: box-shadow var(--transition);
}

.review-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.review-card-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.review-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-light), rgba(16, 185, 129, 0.15));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.review-card-name {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9375rem;
    line-height: 1.3;
}

.review-card-date {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
    display: block;
    margin-top: 2px;
}

.review-card-comment {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
}


/* ==========================================================================
   REVIEW FORM
   ========================================================================== */
.review-form-wrapper {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.review-form-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
}

.review-login-prompt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.review-login-prompt svg {
    color: var(--muted);
    flex-shrink: 0;
}

.stars-input {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
}

.stars-input .star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 1.5rem;
    color: var(--border);
    transition: color var(--transition), transform var(--transition);
}

.stars-input .star-btn:hover {
    transform: scale(1.15);
}

.stars-input .star-btn:hover,
.stars-input .star-btn.active {
    color: var(--star);
}


/* ==========================================================================
   LOCATION / MAP
   ========================================================================== */
.profile-location-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.profile-location-info svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--accent);
}

.profile-map {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    background: var(--bg-alt);
    overflow: hidden;
}

.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


/* ==========================================================================
   CONVENIOS GRID
   ========================================================================== */
.convenio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.convenio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: border-color var(--transition), background var(--transition);
}

.convenio-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.convenio-item:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* Legacy profile-section (used by clinic pages) */
.profile-section {
    max-width: 800px;
}

.profile-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    letter-spacing: -0.01em;
}


/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    padding: 12px 0;
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--muted);
    font-size: 0.75rem;
    user-select: none;
}

.breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}


/* ==========================================================================
   AUTH PAGES — Login, Register, Forgot Password
   ========================================================================== */
.auth-container {
    max-width: 450px;
    margin: 48px auto;
    padding: 40px 36px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--accent);
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links p {
    margin-bottom: 8px;
}

.auth-section {
    padding: 20px 0;
}

.auth-title {
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition);
}

.auth-footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Register Choice Cards */
.register-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.register-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    cursor: pointer;
}

.register-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.register-card:hover .register-card-icon {
    transform: scale(1.1);
}

.register-card-icon {
    font-size: 2.75rem;
    margin-bottom: 14px;
    transition: transform 0.25s ease;
    line-height: 1;
    color: var(--accent);
}

.register-card-icon svg {
    width: 56px;
    height: 56px;
    margin: 0 auto;
    stroke: var(--accent);
}

.register-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.register-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}


/* ==========================================================================
   PATIENT DASHBOARD
   ========================================================================== */
.dashboard-welcome {
    margin-bottom: 28px;
}

.dashboard-welcome h2 {
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    margin-top: 4px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 36px;
}

.dashboard-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.dashboard-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    line-height: 1;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.dashboard-card-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* ==========================================================================
   ADMIN / PANEL — Filter Tabs, Status Badges
   ========================================================================== */

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-error   { background: var(--error-light);   color: var(--error); }
.badge-info    { background: var(--info-light);     color: var(--info); }
.badge-primary { background: var(--accent-light);   color: #047857; }

/* Filter Tabs — admin status navigation */
.filter-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 12px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.filter-tab:hover {
    color: var(--accent);
}

.filter-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.filter-tab .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: var(--bg-alt);
    border-radius: var(--radius-full);
    margin-left: 6px;
    transition: background var(--transition), color var(--transition);
}

.filter-tab.active .count {
    background: var(--accent-light);
    color: var(--accent);
}


/* ==========================================================================
   SPINNER / LOADING
   ========================================================================== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin: 0 auto;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

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


/* ==========================================================================
   RESPONSIVE OVERRIDES — Search & Profile (page-level)
   ========================================================================== */
@media (max-width: 767px) {
    /* Search layout stacks */
    .search-layout {
        flex-direction: column;
    }

    /* Filter sidebar becomes off-screen drawer */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-radius: 0;
        border: none;
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }

    .filter-open .filter-sidebar {
        transform: translateX(0);
    }

    .filter-close-btn {
        display: block;
    }

    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
    }

    .filter-open .filter-overlay {
        display: block;
    }

    /* Profile hero — smaller banner on mobile */
    .profile-hero-banner {
        height: 120px;
    }

    /* Profile card stacks to column */
    .profile-card-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px 16px;
    }

    .profile-card-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-card-name-row {
        justify-content: center;
    }

    .profile-name {
        font-size: 1.25rem;
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
        text-align: center;
    }

    .profile-meta-item {
        font-size: 0.75rem;
    }

    .profile-rating {
        justify-content: center;
    }

    .profile-description {
        text-align: center;
    }

    /* Profile card bottom — stacks */
    .profile-card-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 16px 20px 20px;
        gap: 14px;
    }

    .profile-card-price {
        align-items: center;
        margin-right: 0;
    }

    .profile-card-insurances {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
        width: 100%;
    }

    .profile-actions .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }

    /* Profile tabs — compact on mobile */
    .profile-tabs {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
    }

    .profile-tab {
        padding: 12px 14px;
        font-size: 0.8125rem;
    }

    /* Profile body sections — mobile */
    .profile-body {
        padding: 20px 0 32px;
    }

    .profile-body-content {
        gap: 16px;
    }

    .profile-section-card {
        border-radius: var(--radius-lg);
    }

    .profile-section-card-header {
        padding: 16px 20px;
    }

    .profile-section-card-header h2 {
        font-size: 1rem;
    }

    .profile-section-card-body {
        padding: 20px;
    }

    .review-summary-number {
        font-size: 2rem;
    }

    .review-card {
        padding: 16px;
    }

    .review-form-card {
        padding: 20px;
    }

    .convenio-grid {
        grid-template-columns: 1fr;
    }

    .profile-map {
        height: 240px;
    }

    /* Auth adjustments */
    .auth-card {
        padding: 28px 20px;
    }

    .auth-container {
        margin: 24px auto;
    }
}

@media (min-width: 768px) {
    .search-mobile-controls {
        display: none;
    }

    .search-map-section {
        margin-top: 28px;
    }
}

@media (min-width: 1024px) {
    .filter-sidebar {
        display: block;
    }

    .search-layout {
        display: flex;
    }
}
