:root {
    --bg: #f4fbff;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --text: #0a315f;
    --muted: #60738d;
    --line: rgba(10, 49, 95, 0.12);
    --primary: #0b85e8;
    --primary-dark: #073d75;
    --secondary: #12b9c8;
    --accent: #e4f6ff;
    --accent-strong: #c7edff;
    --shadow: 0 24px 80px rgba(7, 61, 117, 0.13);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(11, 133, 232, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(18, 185, 200, 0.14), transparent 28%),
        var(--bg);
    color: var(--text);
}

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

.site-header,
.featured-slider,
.hero-layout,
.specialties-section,
.login-shell,
.dashboard-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header,
.dashboard-topbar,
.header-actions,
.hero-actions,
.doctor-preview,
.search-shell,
.metric-grid,
.section-heading,
.login-shell,
.panel-header,
.form-row,
.panel-footer,
.dashboard-banner,
.stats-grid {
    display: flex;
}

.site-header,
.dashboard-topbar {
    align-items: center;
    justify-content: space-between;
}

.site-header {
    padding: 22px 0 10px;
}

.brand,
.doctor-preview,
.showcase-card,
.checkbox,
.brand-stack {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    width: clamp(190px, 23vw, 280px);
    height: auto;
    max-width: 100%;
}

.page-brand {
    min-width: 0;
    gap: 18px;
}

.page-brand .brand-logo {
    width: clamp(150px, 18vw, 220px);
}

.brand-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.brand-stack .brand-logo {
    width: min(100%, 220px);
}

.site-header h1,
.brand-stack h1 {
    margin-bottom: 0;
}

.brand-mark,
.avatar,
.showcase-avatar {
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 800;
}

.brand-mark {
    width: 56px;
    height: 56px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.header-actions,
.hero-actions,
.search-shell,
.metric-grid,
.specialties-grid,
.login-shell,
.form-row,
.stats-grid {
    gap: 16px;
}

.ghost-link,
.primary-link,
.button,
.status-pill,
.search-field,
.specialty-card,
.showcase-card,
.login-panel,
.login-showcase,
.hero-card,
.dashboard-banner,
.stat-card,
.sidebar,
.dashboard-content {
    border-radius: var(--radius-md);
}

.ghost-link,
.primary-link {
    padding: 12px 18px;
    font-weight: 600;
}

.ghost-link:hover,
.text-link:hover {
    color: var(--primary);
}

.primary-link,
.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}

.primary-link:hover,
.button-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.button,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 14px 22px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}

.full-width {
    width: 100%;
}

.featured-slider {
    padding: 28px 0 8px;
}

.slider-window {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
}

.slider-track {
    display: flex;
    transition: transform 0.55s ease;
    will-change: transform;
}

.slider-slide {
    position: relative;
    min-width: 100%;
    aspect-ratio: 3919 / 1741;
    overflow: hidden;
    background: #eef8ff;
}

.slider-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.slider-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 4vw, 56px);
    padding: clamp(24px, 5vw, 64px);
    color: #fff;
    background:
        radial-gradient(circle at right center, rgba(255, 255, 255, 0.24), transparent 32%),
        linear-gradient(135deg, #073d75, #0b85e8 56%, #12b9c8);
}

.slider-placeholder-alt {
    background:
        radial-gradient(circle at left center, rgba(255, 255, 255, 0.24), transparent 34%),
        linear-gradient(135deg, #0a315f, #0879d4 52%, #54ccec);
}

.slider-placeholder img {
    width: min(360px, 42%);
    height: auto;
    padding: 18px;
    object-fit: contain;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 52px rgba(7, 61, 117, 0.22);
}

.slider-placeholder h2 {
    max-width: 620px;
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 4.1rem);
    line-height: 1.04;
}

.slider-placeholder .eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(10, 49, 95, 0.22);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.slider-dots button.active {
    width: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    padding: 40px 0 48px;
}

.hero-copy h2 {
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: 1.04;
    margin-bottom: 18px;
}

.hero-text,
.login-showcase p,
.panel-header p,
.dashboard-banner p,
.specialty-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero-card,
.login-panel,
.login-showcase,
.dashboard-banner,
.stat-card,
.sidebar,
.dashboard-content {
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.hero-card {
    padding: 24px;
}

.search-shell {
    align-items: center;
    margin-bottom: 22px;
}

.search-field {
    flex: 1;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 0 0 1px var(--line);
}

.search-field input,
.search-field select {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 4px 0 0;
    font: inherit;
    font-weight: 700;
    color: var(--text);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
}

.home-search-field,
.field-group {
    display: grid;
    gap: 10px;
}

.search-field span,
.panel-footer span,
.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.doctor-preview {
    padding: 18px;
    background: var(--surface-strong);
    box-shadow: inset 0 0 0 1px var(--line);
}

.doctor-preview h3 {
    margin-bottom: 8px;
}

.doctor-preview p {
    margin-bottom: 0;
}

.home-social-links {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.home-social-links a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(11, 133, 232, 0.12);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
}

.featured-doctor-list {
    display: grid;
    gap: 12px;
}

.preview-link {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-link:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px var(--line), 0 16px 32px rgba(15, 23, 42, 0.08);
}

.avatar,
.showcase-avatar,
.home-doctor-photo {
    width: 54px;
    height: 54px;
}

.home-doctor-photo {
    flex-shrink: 0;
    border-radius: 18px;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 24px rgba(7, 61, 117, 0.14);
}

.status-pill {
    margin-left: auto;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 0.92rem;
}

.metric-grid,
.stats-grid {
    margin-top: 18px;
    flex-wrap: wrap;
}

.home-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.metric-grid article,
.stat-card {
    flex: 1 1 160px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px var(--line);
}

.home-metric-row article {
    padding: 14px;
}

.home-metric-row strong {
    font-size: 1.45rem;
}

.home-metric-row span {
    line-height: 1.35;
}

.metric-grid strong,
.stat-card strong {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.specialties-section {
    padding: 0 0 56px;
}

.section-heading {
    align-items: end;
    justify-content: space-between;
    margin-bottom: 22px;
}

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

.specialty-card {
    padding: 24px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 0 0 1px var(--line);
}

.specialty-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
    margin-bottom: 14px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 0;
}

.login-shell {
    display: grid;
    grid-template-columns: 1fr 460px;
    align-items: stretch;
}

.login-showcase,
.login-panel {
    padding: 42px;
}

.login-showcase {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.6), transparent 38%),
        linear-gradient(135deg, rgba(7, 61, 117, 0.98), rgba(11, 133, 232, 0.92) 56%, rgba(18, 185, 200, 0.9));
    color: #fff;
}

.login-brand {
    display: inline-flex;
    width: min(360px, 100%);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 44px rgba(7, 61, 117, 0.2);
}

.login-logo {
    display: block;
    width: 100%;
    height: auto;
}

.login-showcase .eyebrow,
.login-showcase p,
.login-showcase .back-link {
    color: rgba(255, 255, 255, 0.82);
}

.login-showcase h1 {
    font-size: clamp(2.2rem, 4vw, 3.7rem);
    line-height: 1.08;
    margin-bottom: 18px;
}

.back-link {
    display: inline-block;
    margin-bottom: 42px;
    font-weight: 700;
}

.showcase-card {
    margin-top: 32px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form {
    display: grid;
    gap: 14px;
}

.panel-header {
    display: block;
}

.alert-message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    color: #b42318;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.16);
    font-weight: 600;
}

.success-message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(11, 133, 232, 0.12);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px rgba(11, 133, 232, 0.18);
    font-weight: 600;
}

.hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-inline-form {
    display: inline-flex;
}

.login-form label {
    font-weight: 700;
    font-size: 0.95rem;
}

.login-form input {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    color: var(--text);
}

.login-form input:focus {
    outline: 2px solid rgba(11, 133, 232, 0.18);
    border-color: rgba(11, 133, 232, 0.42);
}

.form-row {
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 10px;
}

.checkbox input {
    width: auto;
    margin: 0;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.panel-footer {
    justify-content: space-between;
    align-items: center;
    padding-top: 22px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
}

.dashboard-page {
    min-height: 100vh;
    padding: 28px 0;
}

.search-page,
.doctor-page {
    min-height: 100vh;
    padding-bottom: 48px;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    align-items: start;
}

.sidebar,
.dashboard-content {
    padding: 24px;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.sidebar-media-card {
    margin-top: 22px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(231, 246, 255, 0.9);
    box-shadow: inset 0 0 0 1px var(--line);
    display: grid;
    gap: 12px;
}

.sidebar-media-card .eyebrow {
    margin: 0;
}

.superdashboard-layout {
    grid-template-columns: 280px 1fr;
}

.superdashboard-layout .sidebar {
    min-width: 0;
}

.superdashboard-layout .brand-stack h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4.6vw, 3.2rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
}

.superdashboard-layout .sidebar-nav {
    margin-top: 22px;
}

.superdashboard-layout .sidebar-media-card {
    min-width: 0;
    overflow: hidden;
}

.superdashboard-layout .sidebar-media-card p:not(.eyebrow) {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.superdashboard-layout .sidebar-media-card .button {
    min-width: 0;
    width: 100%;
}

@media (max-width: 1180px) {
    .superdashboard-layout {
        grid-template-columns: 1fr;
    }
}

.super-banner-row {
    display: grid;
    gap: 14px;
}

.super-banner-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.super-banner-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px var(--line);
    display: grid;
    gap: 10px;
}

.super-banner-link-form {
    display: grid;
    gap: 8px;
}

.super-banner-preview {
    width: 100%;
    max-height: 210px;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--line);
}

.super-specialty-form {
    margin-bottom: 18px;
}

.super-specialty-list {
    display: grid;
    gap: 12px;
}

.super-specialty-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px var(--line);
}

.super-specialty-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.super-doctor-banners {
    display: grid;
    gap: 12px;
}

.super-doctor-banner-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px var(--line);
    display: grid;
    gap: 10px;
}

.sidebar-nav a {
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 700;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: rgba(11, 133, 232, 0.12);
    color: var(--primary-dark);
}

.dashboard-banner {
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    margin-top: 22px;
}

.topbar-text {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.dashboard-hero,
.dashboard-main-grid,
.profile-layout,
.input-grid,
.quick-actions,
.map-coordinates,
.form-actions,
.section-title,
.review-header {
    display: grid;
    gap: 18px;
}

.hero-left-stack {
    display: grid;
    gap: 18px;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.4fr) 290px;
    margin-top: 24px;
}

.hero-banner-card,
.map-card,
.dashboard-card,
.action-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.banner-surface {
    min-height: 160px;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 10px;
    color: #f8fcff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.3), transparent 35%),
        linear-gradient(135deg, #9ddcff, #2d99e8 45%, #073d75);
}

.banner-surface-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.doctor-banner.doctor-banner-image {
    background: #fff;
}

.banner-pill {
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.84rem;
    font-weight: 700;
}

.map-visual {
    position: relative;
    min-height: 220px;
    border-radius: 22px;
    margin-bottom: 18px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(228, 241, 249, 0.9)),
        repeating-linear-gradient(
            45deg,
            rgba(116, 147, 174, 0.12) 0,
            rgba(116, 147, 174, 0.12) 10px,
            transparent 10px,
            transparent 24px
        );
}

.map-visual::before,
.map-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 35%, rgba(132, 170, 198, 0.3), transparent 10%),
        linear-gradient(90deg, transparent 48%, rgba(95, 129, 156, 0.18) 49%, transparent 50%),
        linear-gradient(0deg, transparent 48%, rgba(95, 129, 156, 0.18) 49%, transparent 50%);
    opacity: 0.55;
}

.map-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px 999px 999px 0;
    background: var(--primary);
    transform: rotate(-45deg);
    box-shadow: 0 8px 16px rgba(11, 133, 232, 0.24);
}

.map-pin::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
}

.pin-one {
    top: 34%;
    left: 52%;
}

.pin-two {
    top: 56%;
    left: 38%;
}

.pin-three {
    top: 44%;
    left: 68%;
}

.map-coordinates {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
}

.map-coordinates div {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px var(--line);
}

.coordinate-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px var(--line);
}

.coordinate-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: var(--text);
}

.coordinate-field input:focus {
    outline: none;
}

.map-coordinates span,
.profile-aside span,
.list-row span,
.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
}

.stat-card small {
    color: var(--muted);
    font-size: 0.88rem;
}

.stats-grid-under-banner {
    margin-top: 0;
}

.profile-link-card {
    display: grid;
    gap: 14px;
}

.profile-link-card h3 {
    margin: 0;
}

.profile-link-actions {
    display: grid;
    gap: 10px;
}

.profile-link-actions input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font: inherit;
}

.dashboard-main-grid {
    grid-template-columns: minmax(0, 1.8fr) 320px;
    margin-top: 20px;
    align-items: start;
}

.section-title {
    grid-template-columns: 1fr auto;
    align-items: start;
    margin-bottom: 20px;
}

.section-title h3 {
    margin-bottom: 8px;
}

.section-title p,
.list-row p,
.review-item p {
    margin: 0;
    color: var(--muted);
}

.profile-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
}

.profile-aside {
    padding: 22px;
    border-radius: 22px;
    background: rgba(231, 246, 255, 0.9);
    box-shadow: inset 0 0 0 1px var(--line);
    text-align: center;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #2c5e9d);
}

.profile-photo-preview {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    border-radius: 28px;
    object-fit: cover;
    display: block;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.profile-form,
.dashboard-side-stack,
.list-stack {
    display: grid;
    gap: 16px;
}

.input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 16px;
}

.input-grid label,
.input-grid .field-group {
    display: grid;
    gap: 8px;
    font-weight: 700;
    font-size: 0.94rem;
}

.field-label {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.input-grid input,
.input-grid select,
.input-grid textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
    color: var(--text);
    resize: vertical;
}

.input-grid textarea {
    min-height: 140px;
}

.hidden-rich-input {
    display: none;
}

.rich-editor {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(228, 246, 255, 0.65);
}

.rich-editor-toolbar button {
    min-width: 38px;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.rich-editor-surface {
    min-height: 260px;
    padding: 16px;
    color: var(--text);
    line-height: 1.7;
    outline: none;
}

.rich-editor-surface p,
.rich-editor-surface ul,
.rich-editor-surface ol {
    margin: 0 0 12px;
}

.input-grid input:focus,
.input-grid select:focus,
.input-grid textarea:focus,
.search-field input:focus,
.search-field select:focus {
    outline: 2px solid rgba(11, 133, 232, 0.16);
    border-radius: 10px;
}

.full-span {
    grid-column: 1 / -1;
}

.form-actions {
    justify-content: end;
}

.list-row,
.review-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px var(--line);
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.review-header {
    grid-template-columns: 1fr auto;
    margin-bottom: 10px;
}

.review-item small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.review-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
}

.action-card h3 {
    margin-bottom: 10px;
}

.action-card p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-layout,
.doctor-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 320px;
    gap: 22px;
    padding-top: 22px;
}

.search-results-panel,
.search-map-panel,
.doctor-hero-card,
.doctor-reviews {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.results-searchbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
}

.results-header {
    margin: 22px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.results-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(11, 133, 232, 0.12);
    color: var(--primary-dark);
    font-weight: 700;
}

.results-list,
.social-links-list,
.reviews-grid {
    display: grid;
    gap: 16px;
}

.empty-state {
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px var(--line);
}

.empty-state h3,
.empty-state p {
    margin-bottom: 8px;
}

.compact-empty {
    padding: 18px;
}

.result-card,
.mini-info-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 0 0 1px var(--line);
}

.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px var(--line), 0 16px 36px rgba(15, 23, 42, 0.08);
}

.result-main,
.doctor-summary,
.doctor-summary-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.result-main {
    flex: 1;
}

.result-avatar {
    flex-shrink: 0;
}

.search-doctor-photo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    max-width: 56px;
    flex: 0 0 56px;
    border-radius: 18px;
    object-fit: cover;
    display: block;
    box-shadow: 0 10px 24px rgba(7, 61, 117, 0.14);
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.result-meta span {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(23, 32, 51, 0.06);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.result-side {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.large-map {
    min-height: 420px;
}

.search-leaflet-map {
    min-height: 420px;
}

.leaflet-popup-content p {
    margin: 4px 0;
}

.leaflet-popup-content a {
    display: inline-block;
    margin-top: 6px;
    color: var(--primary);
    font-weight: 700;
}

.pin-four {
    top: 68%;
    left: 58%;
}

.compact-title {
    margin-bottom: 18px;
}

.compact-title h3 {
    margin-bottom: 0;
}

.doctor-layout {
    padding-top: 22px;
    display: grid;
    gap: 22px;
}

.doctor-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 360px;
    gap: 22px;
    align-items: stretch;
}

.doctor-banner {
    grid-column: 1 / -1;
    aspect-ratio: 3919 / 1741;
    min-height: 0;
    border-radius: 28px;
    padding: 0;
    display: block;
    margin-bottom: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.26), transparent 28%),
        linear-gradient(135deg, #a4e6ff, #2d99e8 42%, #073d75);
    color: #f8fcff;
}

.doctor-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.leaflet-map {
    width: 100%;
    min-height: 260px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--line);
    margin-bottom: 18px;
}

.coordinates-form {
    display: grid;
    gap: 16px;
}

.doctor-banner-content {
    max-width: 680px;
}

.doctor-banner h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.06;
    margin-bottom: 14px;
}

.doctor-banner p {
    color: rgba(248, 252, 255, 0.82);
    line-height: 1.7;
    margin-bottom: 0;
}

.doctor-summary {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 24px;
}

.doctor-summary-actions {
    display: grid;
    gap: 12px;
    width: min(280px, 100%);
}

.large-avatar {
    width: 76px;
    height: 76px;
    font-size: 1.6rem;
}

.doctor-profile-photo {
    width: 192px;
    height: 192px;
    border-radius: 40px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 14px 34px rgba(7, 61, 117, 0.18);
}

.whatsapp-button {
    gap: 10px;
    background: #20b15a;
    color: #fff;
}

.whatsapp-button:hover {
    background: #158a43;
}

.whatsapp-button svg,
.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doctor-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 360px;
    gap: 22px;
    padding: 0;
    align-items: start;
}

.doctor-sidebar {
    display: grid;
    gap: 22px;
    align-content: start;
}

.doctor-info-card,
.social-card {
    padding: 24px;
}

.allies-card {
    padding: 24px;
    display: grid;
    gap: 12px;
}

.allies-image {
    width: 100%;
    height: auto;
    max-height: 220px;
    display: block;
    border-radius: 18px;
    object-fit: contain;
    object-position: center;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--line);
}

.doctor-content-grid > * {
    min-width: 0;
}

.doctor-content-grid .map-card,
.doctor-content-grid .social-card,
.doctor-content-grid .doctor-info-card {
    width: 100%;
}

.doctor-bio-sections {
    display: grid;
    gap: 18px;
}

.doctor-bio-block {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: inset 0 0 0 1px var(--line);
}

.doctor-bio-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.doctor-bio-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--primary-dark);
    background: rgba(11, 133, 232, 0.12);
}

.doctor-bio-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doctor-bio-block h5 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
}

.doctor-bio {
    color: var(--muted);
    line-height: 1.8;
}

.doctor-bio p,
.doctor-bio ul,
.doctor-bio ol {
    margin: 0 0 14px;
}

.doctor-bio h2,
.doctor-bio h3 {
    color: var(--text);
    margin-bottom: 10px;
}

.doctor-bio-two-columns {
    column-count: 2;
    column-gap: 24px;
}

.doctor-bio-two-columns p {
    break-inside: avoid;
}

.doctor-bio-flow-columns p {
    break-inside: auto;
    orphans: 2;
    widows: 2;
}

.feature-list {
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--text);
}

.feature-list li {
    margin-bottom: 12px;
    color: var(--muted);
    line-height: 1.7;
}

.doctor-map {
    min-height: 0;
    aspect-ratio: 1 / 1;
    max-height: 360px;
}

.review-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(7, 36, 67, 0.52);
}

.review-modal-overlay.is-open {
    display: grid;
}

.review-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 42px);
    overflow: auto;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(7, 36, 67, 0.3);
}

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

.review-modal-header h3 {
    margin: 0;
}

.review-modal-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.review-modal-form,
.review-step {
    display: grid;
    gap: 14px;
}

.review-step-hidden {
    display: none;
}

.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
}

.star-rating input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.star-rating label {
    font-size: 1.9rem;
    line-height: 1;
    color: #c7d5e7;
    cursor: pointer;
    user-select: none;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f4b400;
}

.review-modal textarea,
.review-modal input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
}

.review-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Ajuste fino doctor.php: alineación exacta banner/mapa y sin desbordes */
.doctor-page {
    --doctor-side-width: clamp(300px, 31vw, 360px);
}

.doctor-page .doctor-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.doctor-page .doctor-hero-card {
    grid-template-columns: minmax(0, 1fr) var(--doctor-side-width);
    overflow: hidden;
}

.doctor-page .doctor-summary {
    grid-template-columns: minmax(0, 1fr) var(--doctor-side-width);
    align-items: center;
}

.doctor-page .doctor-summary-main,
.doctor-page .doctor-summary-actions {
    min-width: 0;
}

.doctor-page .doctor-content-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, var(--doctor-side-width));
    align-items: start;
}

.doctor-page .doctor-sidebar,
.doctor-page .doctor-content-grid .map-card {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.doctor-page .doctor-map {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
}

@media (max-width: 1220px) {
    .doctor-page .doctor-hero-card,
    .doctor-page .doctor-summary,
    .doctor-page .doctor-content-grid {
        grid-template-columns: 1fr;
    }
}

.social-links-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 0 0 1px var(--line);
    font-weight: 600;
    min-width: 0;
}

.social-links-list a span:last-child,
.mini-info-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 12px;
    color: var(--primary-dark);
    background: var(--accent);
}

.register-page {
    min-height: 100vh;
    padding-bottom: 48px;
}

.register-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    padding-top: 24px;
}

.register-intro,
.register-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.register-intro h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
    margin-bottom: 16px;
}

.register-intro p:last-child {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.register-form {
    display: grid;
    gap: 18px;
}

.register-form select,
.register-form input,
.register-form textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
    color: var(--text);
}

.register-form select:focus,
.register-form input:focus,
.register-form textarea:focus {
    outline: 2px solid rgba(11, 133, 232, 0.16);
}

/* Overrides finales para dashboard y perfil doctor: layout consistente */
.dashboard-page .dashboard-layout {
    grid-template-columns: 260px minmax(0, 1fr);
}

.dashboard-page .dashboard-main-grid {
    grid-template-columns: minmax(0, 1.9fr) 320px;
}

.dashboard-page .profile-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
}

.dashboard-page .profile-form {
    width: 100%;
    min-width: 0;
}

.dashboard-page .input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-page .rich-editor-surface {
    min-height: 320px;
}

.doctor-page .doctor-content-grid,
.doctor-page .doctor-sidebar,
.doctor-page .doctor-info-card,
.doctor-page .map-card,
.doctor-page .social-card {
    width: 100%;
}

.doctor-page .doctor-content-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 360px);
}

@media (max-width: 860px) {
    .hero-layout,
    .login-shell,
    .dashboard-layout,
    .specialties-grid {
        grid-template-columns: 1fr;
    }

    .site-header,
    .header-actions,
    .page-brand,
    .search-shell,
    .section-heading,
    .dashboard-banner,
    .panel-footer,
    .form-row,
    .list-row {
        flex-direction: column;
        align-items: stretch;
    }

    .brand-logo,
    .page-brand .brand-logo {
        width: min(100%, 260px);
    }

    .slider-placeholder {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .slider-placeholder img {
        width: min(320px, 100%);
    }

    .dashboard-hero,
    .dashboard-main-grid,
    .profile-layout,
    .search-layout,
    .register-layout,
    .doctor-content-grid,
    .super-banner-grid,
    .super-specialty-grid,
    .quick-actions,
    .input-grid,
    .map-coordinates,
    .section-title,
    .review-header,
    .results-searchbar {
        grid-template-columns: 1fr;
    }

    .status-pill {
        margin-left: 0;
        width: fit-content;
    }

    .doctor-summary,
    .doctor-summary-main,
    .result-card,
    .result-main,
    .results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .doctor-summary-actions {
        width: 100%;
    }

    .result-side {
        justify-items: start;
    }
}

@media (min-width: 700px) and (max-width: 860px) {
    .doctor-hero-card,
    .doctor-content-grid {
        grid-template-columns: minmax(0, 1.35fr) 300px;
    }

    .doctor-summary,
    .doctor-summary-main {
        flex-direction: row;
        align-items: center;
    }

    .doctor-summary-actions {
        width: 260px;
    }

    .doctor-map {
        aspect-ratio: 1 / 1;
        max-height: 300px;
    }
}

@media (max-width: 640px) {
    .login-showcase,
    .login-panel,
    .hero-card,
    .sidebar,
    .dashboard-content {
        padding: 24px;
    }

    .hero-copy h2,
    .login-showcase h1 {
        font-size: 2.2rem;
    }

    .featured-slider {
        padding-top: 18px;
    }

    .slider-slide {
        aspect-ratio: 1.35 / 1;
    }

    .slider-placeholder h2 {
        font-size: 1.8rem;
    }
}

/* Ajuste final de grilla para dashboard */
.dashboard-page .dashboard-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.dashboard-page .dashboard-content,
.dashboard-page .profile-card,
.dashboard-page .profile-form {
    min-width: 0;
}

.dashboard-page .dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.dashboard-page .profile-layout {
    grid-template-columns: 1fr;
    gap: 18px;
}

.dashboard-page .profile-aside {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-align: left;
}

.dashboard-page .profile-aside .profile-avatar,
.dashboard-page .profile-aside .profile-photo-preview {
    margin: 0;
}

.dashboard-page .input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-page .rich-editor-surface {
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
}

.dashboard-page .field-group textarea {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    font: inherit;
    color: var(--text);
    resize: vertical;
    min-height: 120px;
}

.dashboard-page .field-group textarea:focus {
    outline: 2px solid rgba(11, 133, 232, 0.16);
}

@media (max-width: 1200px) {
    .dashboard-page .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .dashboard-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .dashboard-page .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-page .dashboard-side-stack,
    .dashboard-page .input-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .profile-aside {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dashboard-page .profile-aside .profile-avatar,
    .dashboard-page .profile-aside .profile-photo-preview {
        margin: 0 auto;
    }
}

/* Responsive puntual: solo páginas públicas (home, doctor y search) */
@media (max-width: 900px) {
    .doctor-page .doctor-hero-card,
    .doctor-page .doctor-summary,
    .doctor-page .doctor-content-grid {
        grid-template-columns: 1fr;
    }

    .doctor-page .doctor-summary-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .doctor-page .doctor-profile-photo {
        width: 144px;
        height: 144px;
        border-radius: 32px;
    }

    .doctor-page .doctor-summary-actions {
        width: 100%;
    }

    .doctor-page .doctor-map {
        aspect-ratio: 16 / 10;
        max-height: none;
    }

    .doctor-page .doctor-bio,
    .doctor-page .doctor-bio p,
    .doctor-page .feature-list li,
    .doctor-page .mini-info-card p,
    .doctor-page .social-links-list a span:last-child {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .doctor-page .doctor-bio-two-columns {
        column-count: 1;
    }

    .search-page .search-layout {
        grid-template-columns: 1fr;
    }

    .search-page .search-map-panel {
        order: 2;
    }

    .search-page .search-leaflet-map {
        min-height: 280px;
        aspect-ratio: 16 / 10;
    }

    .search-page .result-card {
        gap: 12px;
    }

    .search-page .result-main > .search-doctor-photo {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        flex: 0 0 56px !important;
    }
}

@media (max-width: 640px) {
    .home-page .featured-slider {
        padding-top: 18px;
    }

    .home-page .slider-window {
        border-radius: 20px;
    }

    .home-page .slider-slide {
        aspect-ratio: 16 / 9;
        background: #fff;
    }

    .home-page .slider-slide img {
        object-fit: contain;
        object-position: center;
    }

    .home-page .hero-layout {
        padding: 28px 0 36px;
    }

    .doctor-page .doctor-layout,
    .search-page .search-layout {
        width: min(1180px, calc(100% - 20px));
    }
}

.negrilla {
   font-weight: bold;
}
