/* ECCOSALVA — overrides de marca (carregado por último)
   Cor primária aplicada no style.css (#c8102e). Aqui: tipografia, modo claro fixo,
   footer sempre no fundo. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --brand: #c8102e;
    --brand-dark: #8e0b20;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Projeto todo em modo claro — esconder o seletor de tema */
.dz-theme-mode { display: none !important; }

/* Footer sempre no fundo da página */
#main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#main-wrapper > .header,
#main-wrapper > .nav-header { flex: 0 0 auto; }
#main-wrapper > .content-body { flex: 1 0 auto; }
#main-wrapper > .footer { flex: 0 0 auto; margin-top: auto; }

.footer .copyright { color: #9aa5b1; font-size: 10px; line-height: 1.5; margin-top: 6px; opacity: 0.85; }
.footer .copyright p { margin: 0; }
.footer .copyright a { color: var(--brand); font-weight: 600; text-decoration: none; }
.footer .copyright .sep { color: #cfd3d9; margin: 0 6px; }

/* Footer com contacto + Termos (página pública) */
.hd-footer { text-align: center; }
.hd-footer__contact { color: #9aa5b1; font-size: 13px; line-height: 1.7; margin-bottom: 8px; }
.hd-footer__contact p { margin: 0; }
.hd-footer__contact i { color: var(--brand); margin-right: 6px; }
.hd-footer__contact a { color: var(--brand); font-weight: 600; text-decoration: none; }

/* Placeholder de loading da página /r/ */
.hd-loading { display: inline-flex; align-items: center; gap: 16px; margin: 6px 0;
    padding: 18px 22px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    box-shadow: 0 10px 30px -20px rgba(17,24,39,.4); cursor: pointer;
    font-family: 'Inter', sans-serif; }
.hd-loading__spin { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%;
    border: 3px solid rgba(200,16,46,.2); border-top-color: var(--brand);
    animation: hdspin .8s linear infinite; }
@keyframes hdspin { to { transform: rotate(360deg); } }
.hd-loading__txt { display: flex; flex-direction: column; line-height: 1.35; text-align: left; }
.hd-loading__txt strong { color: #1f2937; font-size: 15px; }
.hd-loading__txt span { color: #6b7280; font-size: 13px; }

/* Mobile: repor o título "Assistência Médica" no topo (o tema esconde-o < 576px) */
@media only screen and (max-width: 575px) {
    .header-left .dashboard_bar { display: block !important; font-size: 18px !important; }
}

/* Páginas de qualidade — remove header vazio do tema (form + thank-you) */
body:has(.hd-thankyou) .header,
body:has(.hd-thankyou) .nav-header,
body:has(.hd-thankyou) #main-wrapper > .header,
body:has(.hd-qualidade) .header,
body:has(.hd-qualidade) .nav-header,
body:has(.hd-qualidade) #main-wrapper > .header { display: none !important; }
body:has(.hd-thankyou) #main-wrapper .content-body,
body:has(.hd-qualidade) #main-wrapper .content-body { padding-top: 0 !important; }

.hd-thankyou { display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; }
.hd-thankyou__card {
    width: 100%; max-width: 480px; margin: 32px auto 24px;
    background: #fff; border: 1px solid #eef0f3; border-radius: 20px;
    box-shadow: 0 24px 60px -32px rgba(17,24,39,.25);
    padding: 40px 28px 32px; text-align: center;
    font-family: 'Inter', sans-serif;
}
.hd-thankyou__icon {
    width: 76px; height: 76px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--brand);
    background: rgba(200,16,46,.08);
}
.hd-thankyou__icon svg { width: 44px; height: 44px; }
.hd-thankyou__eyebrow {
    color: var(--brand); font-size: 12px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px;
}
.hd-thankyou__title {
    color: #111827; font-size: 22px; font-weight: 700;
    line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.01em;
}
.hd-thankyou__lead {
    color: #1f2937; font-size: 16px; font-weight: 500;
    line-height: 1.5; margin: 0 0 10px;
}
.hd-thankyou__body {
    color: #6b7280; font-size: 14px; line-height: 1.6;
    margin: 0;
}
@media (min-width: 576px) {
    .hd-thankyou__card { padding: 48px 40px 40px; }
    .hd-thankyou__title { font-size: 26px; }
}

/* ---------- Página "Classifique o serviço prestado" ---------- */
.hd-qualidade { padding: 24px 16px 32px; font-family: 'Inter', sans-serif; }
.hd-qualidade__wrap { width: 100%; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.hd-qualidade__intro { text-align: center; padding: 8px 4px 4px; }
.hd-qualidade__eyebrow {
    color: var(--brand); font-size: 12px; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px;
}
.hd-qualidade__title {
    color: #111827; font-size: 22px; font-weight: 700;
    line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.01em;
}
.hd-qualidade__lead { color: #6b7280; font-size: 14px; line-height: 1.55; margin: 0; }

/* Card base (perguntas, observações) */
.hd-card {
    background: #fff; border: 1px solid #eef0f3; border-radius: 16px;
    box-shadow: 0 12px 32px -24px rgba(17,24,39,.2);
    padding: 18px 18px 20px;
}
.hd-card__label {
    display: flex; align-items: center; gap: 10px;
    color: #111827; font-size: 15px; font-weight: 600;
    margin-bottom: 12px; letter-spacing: -0.005em;
}
.hd-card__label i {
    width: 32px; height: 32px; display: inline-flex;
    align-items: center; justify-content: center;
    background: rgba(200,16,46,.08); color: var(--brand);
    border-radius: 10px; font-size: 14px;
}

/* Grid das 3 estrelas — coluna em mobile, linha em desktop */
.hd-qualidade__stars { display: flex; flex-direction: column; gap: 12px; }
.hd-card--rate { display: flex; flex-direction: column; }
.hd-card--rate .hd-rating { padding-top: 2px; min-height: 32px; margin-top: auto; }
.hd-card--rate .hd-rating img { margin-right: 4px; }

/* Sim / Não como pills */
.hd-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.hd-choice__input { position: absolute; opacity: 0; pointer-events: none; }
.hd-choice__pill {
    flex: 1 1 120px; min-width: 120px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border: 1.5px solid #e5e7eb; border-radius: 12px;
    background: #fff; color: #374151; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: all .15s ease;
    margin: 0;
}
.hd-choice__pill i { font-size: 13px; opacity: .6; transition: inherit; }
.hd-choice__pill:hover { border-color: #cfd3d9; }
.hd-choice__input:checked + .hd-choice__pill {
    border-color: var(--brand); background: rgba(200,16,46,.06); color: var(--brand);
}
.hd-choice__input:checked + .hd-choice__pill i { opacity: 1; }
.hd-choice__input:focus-visible + .hd-choice__pill { outline: 2px solid rgba(200,16,46,.35); outline-offset: 2px; }

/* Textarea */
.hd-textarea {
    width: 100%; min-height: 90px;
    border: 1.5px solid #e5e7eb; border-radius: 12px;
    padding: 12px 14px; font: inherit; font-size: 14px; color: #111827;
    background: #fff; resize: vertical; transition: border-color .15s ease, box-shadow .15s ease;
}
.hd-textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(200,16,46,.12);
}
.hd-textarea::placeholder { color: #9aa5b1; }

/* Botão de submeter */
.hd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 20px; border: 0; border-radius: 14px;
    font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
    transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
}
.hd-btn--primary {
    background: var(--brand); color: #fff;
    box-shadow: 0 14px 30px -14px rgba(200,16,46,.55);
}
.hd-btn--primary:hover { background: #b40e28; }
.hd-btn--primary:active { transform: translateY(1px); }
.hd-btn--primary i { font-size: 15px; }

@media (min-width: 720px) {
    .hd-qualidade__title { font-size: 26px; }
    .hd-qualidade__stars { display: grid; grid-template-columns: repeat(3, 1fr); }
    .hd-card { padding: 22px 22px 24px; }
}

/* Override do template DexignZone: .btn-primary hover verde (#36bfa7) -> vermelho da marca */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background-color: #b40e28 !important;
    border-color: #b40e28 !important;
    color: #fff !important;
    box-shadow: none !important;
}


/* =============================================================
   ÁREA RESERVADA — camada de design premium (Eccosalva 2026)
   Override do template DexignZone para identidade e requinte.
   ============================================================= */

:root {
    --brand: #c8102e;
    --brand-600: #a80d26;
    --brand-50: rgba(200,16,46,.06);
    --brand-100: rgba(200,16,46,.12);
    --ink-900: #0f1524;
    --ink-700: #1f2937;
    --ink-500: #4b5563;
    --ink-400: #6b7280;
    --ink-300: #9ca3af;
    --line: #eceef2;
    --line-strong: #dfe3ea;
    --surface: #ffffff;
    --surface-soft: #f7f8fb;
    --canvas: #f5f7f6;
    --shadow-sm: 0 6px 16px -12px rgba(15,21,36,.15);
    --shadow-md: 0 16px 40px -24px rgba(15,21,36,.22);
    --shadow-lg: 0 24px 60px -30px rgba(15,21,36,.28);
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 20px;
}

/* Body + wrapper base */
body, body[data-theme-version="light"] {
    background: var(--canvas) !important;
    color: var(--ink-700);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#main-wrapper .content-body { background: transparent !important; }

/* ---------- Header (topbar) ---------- */
.header {
    background: rgba(255,255,255,.92) !important;
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: none !important;
    padding: 4px 0 !important;
}
.dashboard_bar {
    color: var(--ink-900) !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    font-size: 20px !important;
}
.header-profile > a.nav-link {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 999px !important;
    padding: 6px 16px 6px 6px !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all .15s ease;
}
.header-profile > a.nav-link:hover { border-color: var(--brand); }
.header-profile > a.nav-link img { border-radius: 999px; width: 32px !important; height: 32px !important; object-fit: cover; }
.header-profile .header-info span { color: var(--ink-900) !important; font-weight: 600; letter-spacing: -0.005em; }
.header-profile .fa-caret-down { color: var(--brand); opacity: .7; margin-left: 10px !important; }
.header-profile .dropdown-menu {
    border: 1px solid var(--line) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px -18px rgba(15,21,36,.28) !important;
    padding: 8px !important;
    margin-top: 12px !important;
    min-width: 260px !important;
    overflow: hidden;
}
/* Header do dropdown com nome/email do utilizador */
.header-profile .dropdown-menu::before {
    content: attr(data-user);
    display: block;
    padding: 12px 14px 14px;
    margin: -8px -8px 6px;
    background: linear-gradient(135deg, var(--brand-50), rgba(200,16,46,.02));
    border-bottom: 1px solid var(--line);
    color: var(--ink-900);
    font-weight: 700; font-size: 14px;
    letter-spacing: -0.005em;
}
.header-profile .dropdown-item {
    border-radius: 10px !important;
    padding: 11px 12px !important;
    color: var(--ink-700) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: background .12s ease, color .12s ease;
    display: flex !important; align-items: center; gap: 12px;
    margin: 2px 0;
}
.header-profile .dropdown-item:hover,
.header-profile .dropdown-item:focus {
    background: var(--brand-50) !important;
    color: var(--brand-600) !important;
}
.header-profile .dropdown-item i,
.header-profile .dropdown-item svg,
.header-profile .dropdown-item .flaticon-381-turn-off {
    color: var(--brand) !important;
    stroke: var(--brand) !important;
    width: 32px; height: 32px;
    display: inline-flex !important; align-items: center; justify-content: center;
    background: var(--brand-50);
    border-radius: 10px;
    font-size: 14px !important;
    transition: background .12s ease, color .12s ease;
    flex: 0 0 auto;
}
.header-profile .dropdown-item .flaticon-381-turn-off::before { color: var(--brand); }
.header-profile .dropdown-item:hover i,
.header-profile .dropdown-item:hover svg,
.header-profile .dropdown-item:hover .flaticon-381-turn-off {
    background: var(--brand) !important;
    color: #fff !important;
    stroke: #fff !important;
}
.header-profile .dropdown-item:hover .flaticon-381-turn-off::before { color: #fff; }
/* Separador antes do "Sair" */
.header-profile .dropdown-menu .dropdown-item:last-child {
    margin-top: 6px;
    padding-top: 12px !important;
    border-top: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-500) !important;
}

/* ---------- Sidebar (deznav) ---------- */
.nav-header {
    background: var(--surface) !important;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: none !important;
    height: 84px !important;
}
.nav-header .brand-logo {
    padding: 14px 0 !important;
    display: flex !important; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none !important;
}
.nav-header .brand-logo::after {
    content: 'HOMEDOC';
    color: var(--ink-900);
    font-weight: 800; font-size: 15px; letter-spacing: .14em;
}
.nav-header .brand-logo img {
    max-height: 40px; width: auto;
    filter: drop-shadow(0 6px 14px rgba(200,16,46,.22));
}
[data-sidebar-style="mini"] .nav-header .brand-logo::after,
.menu-toggle .nav-header .brand-logo::after {
    display: none;
}
.nav-control .hamburger .line { background: var(--ink-900) !important; }

.deznav {
    background: var(--surface) !important;
    border-right: 1px solid var(--line);
    box-shadow: none !important;
}
.deznav .metismenu { padding-top: 14px !important; }
.deznav .metismenu > li { position: relative; margin: 2px 0; }
.deznav .metismenu > li > a {
    color: var(--ink-700) !important;
    font-weight: 600 !important;
    font-size: 14.5px !important;
    padding: 10px 20px !important;
    border-radius: 0 999px 999px 0;
    margin: 0 14px 0 0;
    transition: background .15s ease, color .15s ease;
    display: flex !important; align-items: center; gap: 14px;
    letter-spacing: -0.005em;
    overflow: hidden;
}
.deznav .metismenu > li > a i {
    color: var(--brand) !important;
    font-size: 15px !important;
    width: 34px !important; height: 34px !important;
    line-height: 34px !important;
    text-align: center !important;
    display: inline-block !important;
    vertical-align: middle;
    border-radius: 10px;
    background: var(--brand-50);
    transition: background .15s ease, color .15s ease;
    flex: 0 0 auto;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}
/* Font Awesome 4: pequenos offsets internos por glyph */
.deznav .metismenu > li > a i::before {
    line-height: inherit;
    vertical-align: middle;
}
.deznav .metismenu > li > a:hover {
    background: var(--brand-50) !important;
    color: var(--brand-600) !important;
}
.deznav .metismenu > li > a:hover i {
    background: var(--brand);
    color: #fff !important;
}
.deznav .metismenu > li.mm-active > a,
.deznav .metismenu > li.active > a {
    background: linear-gradient(90deg, var(--brand-100), rgba(200,16,46,.02)) !important;
    color: var(--brand) !important;
    font-weight: 700 !important;
}
.deznav .metismenu > li.mm-active > a i,
.deznav .metismenu > li.active > a i {
    background: var(--brand) !important;
    color: #fff !important;
}
.deznav .metismenu > li.mm-active::before,
.deznav .metismenu > li.active::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; background: var(--brand); border-radius: 0 3px 3px 0;
}

/* Logout: destacar como ação secundária, não como link igual */
.deznav .metismenu > li:last-child > a {
    color: var(--ink-500) !important;
    margin-top: 10px;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding-top: 20px !important;
}
.deznav .metismenu > li:last-child > a i {
    background: var(--surface-soft) !important;
    color: var(--ink-500) !important;
}
.deznav .metismenu > li:last-child > a:hover {
    color: var(--brand-600) !important;
    background: transparent !important;
}
.deznav .metismenu > li:last-child > a:hover i {
    background: var(--brand) !important;
    color: #fff !important;
}

/* ---------- Cards genéricos ---------- */
.card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: hidden;
}
.card-body { padding: 22px !important; }
.card-header {
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    padding: 20px 22px 12px !important;
}
.card-title, .card h4, .card h5 {
    color: var(--ink-900) !important;
    letter-spacing: -0.01em;
    font-weight: 700;
}

/* ---------- Hero card (Intro) ---------- */
.hd-hero {
    position: relative;
    background: linear-gradient(135deg, #c8102e 0%, #8f0a20 100%);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    color: #fff !important;
    box-shadow: 0 24px 60px -24px rgba(200,16,46,.4);
    overflow: hidden;
    margin-bottom: 20px;
}
.hd-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 90% 20%, rgba(255,255,255,.14) 0%, transparent 50%),
                      radial-gradient(circle at 10% 90%, rgba(255,255,255,.08) 0%, transparent 50%);
    pointer-events: none;
}
.hd-hero *, .hd-hero h1, .hd-hero h2, .hd-hero h3, .hd-hero h4, .hd-hero p, .hd-hero span {
    color: #fff !important;
}
.hd-hero__eyebrow {
    font-size: 11px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    opacity: .8; margin: 0 0 10px;
}
.hd-hero__title {
    font-size: 28px !important; font-weight: 800 !important;
    line-height: 1.15; letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: #fff !important;
}
.hd-hero__meta { font-size: 14px; opacity: .9; margin: 0; }
.hd-hero__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; position: relative; }
.hd-hero__badge {
    background: rgba(255,255,255,.15); border-radius: 12px;
    padding: 12px 16px; text-align: right;
    font-size: 13px; line-height: 1.3; backdrop-filter: blur(6px);
}
.hd-hero__badge strong { display: block; font-size: 16px; font-weight: 700; margin-bottom: 2px; }

/* Blob decorativo — "vida" no hero */
.hd-hero__pulse {
    position: absolute; right: -30px; bottom: -30px;
    width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
    animation: hdBreathe 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes hdBreathe {
    0%, 100% { transform: scale(1); opacity: .9; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* ---------- CTA "Pedir médico agora" ---------- */
.hd-cta-request {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--brand);
    color: #fff !important;
    border-radius: var(--radius);
    padding: 22px 26px;
    text-decoration: none;
    box-shadow: 0 16px 40px -18px rgba(200,16,46,.55);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}
.hd-cta-request:hover {
    background: var(--brand);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 24px 50px -18px rgba(200,16,46,.65);
}
.hd-cta-request .hd-cta-request__body { display: flex; flex-direction: column; }
.hd-cta-request .hd-cta-request__label { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; opacity: .8; }
.hd-cta-request .hd-cta-request__title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-top: 2px; }
.hd-cta-request .hd-cta-request__icon {
    width: 52px; height: 52px; border-radius: 999px;
    background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
}

/* ---------- In-progress call card ---------- */
.hd-inprogress {
    background: #fff;
    border: 1px solid var(--brand-100);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex; align-items: center; gap: 18px;
    cursor: pointer; text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform .12s ease, box-shadow .12s ease;
}
.hd-inprogress:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.hd-inprogress__icon {
    width: 52px; height: 52px; flex: 0 0 auto;
    border-radius: 14px; background: var(--brand-50);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand); font-size: 22px;
    position: relative;
}
.hd-inprogress__icon::after {
    content: ''; position: absolute; inset: -3px; border-radius: 16px;
    border: 2px solid var(--brand); opacity: .35;
    animation: hdPulse 1.6s ease-out infinite;
}
@keyframes hdPulse {
    0% { transform: scale(1); opacity: .45; }
    100% { transform: scale(1.25); opacity: 0; }
}
.hd-inprogress__body { flex: 1; min-width: 0; }
.hd-inprogress__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--brand); margin: 0 0 4px; }
.hd-inprogress__title { font-size: 17px; font-weight: 700; color: var(--ink-900); margin: 0; letter-spacing: -0.01em; }
.hd-inprogress__chev { color: var(--ink-300); font-size: 20px; }

/* ---------- Historial (últimas assistências) ---------- */
.hd-history { display: flex; flex-direction: column; gap: 12px; }
.hd-history__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 4px 8px;
}
.hd-history__title { color: var(--ink-900); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin: 0; }
.hd-history__subtitle { color: var(--ink-400); font-size: 13px; }
.hd-history__item {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start;
    transition: border-color .15s ease, transform .12s ease;
}
.hd-history__item:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.hd-history__icon {
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
    background: var(--brand-50); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.hd-history__body { flex: 1; min-width: 0; }
.hd-history__type { color: var(--ink-900); font-weight: 700; font-size: 15px; letter-spacing: -0.005em; margin: 0 0 4px; line-height: 1.35; }
.hd-history__meta { color: var(--ink-400); font-size: 13px; margin: 0 0 8px; }
.hd-history__stars { display: inline-flex; gap: 2px; font-size: 12px; color: #f59e0b; }
.hd-history__stars i.text-gray { color: #d1d5db; }
.hd-history__pending {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fef3c7; color: #92400e;
    padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.hd-history__actions { display: flex; gap: 8px; align-items: center; }
.hd-history__action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--surface-soft); color: var(--ink-500);
    border: 1px solid var(--line);
    text-decoration: none; transition: all .12s ease;
}
.hd-history__action:hover { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.hd-history__action--rate { background: var(--brand); color: #fff !important; border-color: var(--brand); }
.hd-history__action--rate:hover { background: var(--brand-600); border-color: var(--brand-600); }
.hd-history__empty {
    text-align: center; padding: 40px 20px; color: var(--ink-400);
    background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---------- Profile page ---------- */
.hd-profile__hero {
    background: linear-gradient(135deg, #c8102e 0%, #8f0a20 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    color: #fff !important;
    display: flex; align-items: center; gap: 20px;
    box-shadow: 0 20px 50px -22px rgba(200,16,46,.4);
    margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.hd-profile__hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 85% 15%, rgba(255,255,255,.12) 0%, transparent 50%);
    pointer-events: none;
}
.hd-profile__hero::after {
    content: ''; position: absolute; right: -40px; bottom: -40px;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
    animation: hdBreathe 4s ease-in-out infinite;
    pointer-events: none;
}
.hd-profile__hero *, .hd-profile__hero h1, .hd-profile__hero h2, .hd-profile__hero h3, .hd-profile__hero h4, .hd-profile__hero p, .hd-profile__hero span {
    color: #fff !important;
}
.hd-profile__avatar {
    width: 72px; height: 72px; border-radius: 999px;
    background: rgba(255,255,255,.22); backdrop-filter: blur(6px);
    border: 2px solid rgba(255,255,255,.3);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 800; color: #fff !important;
    flex: 0 0 auto;
    box-shadow: 0 8px 20px -6px rgba(0,0,0,.2);
    position: relative;
}
.hd-profile__ident { position: relative; color: #fff; }
.hd-profile__hero .hd-profile__name,
.hd-profile__hero h1, .hd-profile__hero h2, .hd-profile__hero h3, .hd-profile__hero h4 {
    color: #fff !important;
    margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
}
.hd-profile__hero .hd-profile__email {
    color: rgba(255,255,255,.9) !important;
    margin: 4px 0 0; font-size: 14px;
}

.hd-form-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.hd-form-card::before {
    content: ''; position: absolute; left: 0; top: 24px; bottom: 24px;
    width: 3px; background: linear-gradient(180deg, var(--brand), transparent);
    border-radius: 0 3px 3px 0;
}
.hd-form-card__title {
    color: var(--brand) !important; font-size: 14px; font-weight: 700;
    letter-spacing: .12em; margin: 0 0 6px; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px;
}
.hd-form-card__title::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100);
}
.hd-form-card__lead { color: var(--ink-500); font-size: 14px; margin: 0 0 22px; line-height: 1.5; }

/* Input elegante com ícone opcional */
.hd-input-wrap { position: relative; }
.hd-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--ink-300); font-size: 16px;
    pointer-events: none;
    transition: color .15s ease;
}
.hd-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--line-strong); border-radius: 12px;
    font: inherit; font-size: 14.5px; color: var(--ink-900);
    background: #fff; transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
    line-height: 1.4;
}
.hd-input--icon { padding-left: 42px; }
.hd-input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-100);
    background: #fff;
}
.hd-input:focus + .hd-input-icon,
.hd-input-wrap:focus-within .hd-input-icon { color: var(--brand); }
.hd-input:disabled {
    background: #fafbfc; color: var(--ink-700);
    border-color: var(--line);
    border-style: dashed;
    cursor: not-allowed;
}
.hd-input::placeholder { color: var(--ink-300); }
.hd-label {
    display: block; color: var(--ink-500);
    font-size: 12px; font-weight: 700; margin: 0 0 6px;
    letter-spacing: .08em; text-transform: uppercase;
}

/* Select nativo estilizado como hd-input */
select.hd-input {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8102e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    padding-right: 40px;
    cursor: pointer;
}
select.hd-input:focus { background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c8102e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---------- Chips de dados rápidos (Profile hero) ---------- */
.hd-chips {
    display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.hd-chip {
    background: #fff; border: 1px solid var(--line);
    border-radius: 14px; padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, transform .15s ease;
    flex: 0 0 auto; min-width: 0;
}
.hd-chip:hover { border-color: var(--brand-100); transform: translateY(-2px); }
.hd-chip--grow { flex: 1 1 260px; min-width: 240px; }
.hd-chip--wide { flex: 1 1 100%; }
@media (max-width: 575.98px) {
    .hd-chip, .hd-chip--grow { flex: 1 1 100%; }
}
.hd-chip__icon {
    width: 40px; height: 40px; flex: 0 0 auto;
    border-radius: 12px; background: var(--brand-50); color: var(--brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.hd-chip__label {
    display: block; color: var(--ink-400); font-size: 11px;
    font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    margin-bottom: 2px;
}
.hd-chip__value {
    display: block; color: var(--ink-900); font-size: 14.5px; font-weight: 600;
    letter-spacing: -0.005em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Segmented pill control (Apple-style) ---------- */
.hd-segments {
    display: inline-flex; flex-wrap: wrap;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(15,21,36,.04);
}
.hd-segments__input { position: absolute; opacity: 0; pointer-events: none; }
.hd-segments__pill {
    flex: 1 1 auto; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--ink-500);
    font-size: 13.5px; font-weight: 600;
    text-align: center; cursor: pointer;
    transition: all .18s ease;
    margin: 0; white-space: nowrap;
    border: 0;
}
.hd-segments__pill i { font-size: 13px; opacity: .7; }
.hd-segments__pill:hover { color: var(--brand); background: rgba(255,255,255,.5); }
.hd-segments__input:checked + .hd-segments__pill {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 12px -4px rgba(200,16,46,.5);
}
.hd-segments__input:checked + .hd-segments__pill i { opacity: 1; }
.hd-segments__input:focus-visible + .hd-segments__pill { outline: 2px solid rgba(200,16,46,.4); outline-offset: 2px; }

/* Neutraliza bootstrap-select do template para os nossos .hd-input select */
.hd-input.default-select ~ .dropdown-toggle,
.hd-input ~ .dropdown-toggle,
.hd-input + .dropdown-menu { display: none !important; }

/* ---------- Info list (Dados pessoais compacto) ---------- */
.hd-info-list { display: flex; flex-direction: column; }
.hd-info-list__row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--line);
    gap: 12px;
}
.hd-info-list__row:last-child { border-bottom: 0; }
.hd-info-list__label { color: var(--ink-400); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.hd-info-list__value { color: var(--ink-900); font-size: 14px; font-weight: 600; text-align: right; word-break: break-word; }

/* ---------- Buttons uniformes ---------- */
.btn-primary, button.btn-primary {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    box-shadow: 0 8px 20px -10px rgba(200,16,46,.4) !important;
    transition: all .15s ease !important;
}
.btn-primary:hover, button.btn-primary:hover {
    background: var(--brand-600) !important;
    border-color: var(--brand-600) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(200,16,46,.5) !important;
}

/* ---------- Breadcrumb refresh ---------- */
.breadcrumb {
    background: transparent !important;
    padding: 4px 0 !important;
    margin: 0 0 16px !important;
    font-size: 13px;
}
.breadcrumb-item a { color: var(--ink-400); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--brand); }
.breadcrumb-item.active { color: var(--ink-900); font-weight: 600; }

/* ---------- Preloader — mais subtil ---------- */
#preloader { background: var(--canvas) !important; }
.sk-child { background-color: var(--brand) !important; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 767.98px) {
    .hd-hero { padding: 24px 20px; }
    .hd-hero__title { font-size: 22px; }
    .hd-cta-request { padding: 18px 20px; }
    .hd-cta-request .hd-cta-request__title { font-size: 18px; }
    .hd-inprogress { padding: 16px 18px; gap: 14px; }
    .hd-history__item { padding: 14px 16px; }
    .hd-profile__hero { padding: 22px 20px; gap: 16px; }
    .hd-profile__avatar { width: 60px; height: 60px; font-size: 24px; }
    .hd-profile__name { font-size: 18px; }
}


/* =============================================================
   LOGIN / AUTH — homedoc identity
   ============================================================= */
.hd-auth {
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(247,248,251,.88));
    position: relative;
}
.hd-auth::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(200,16,46,.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(200,16,46,.05) 0%, transparent 45%);
    pointer-events: none;
}
.hd-auth__card {
    position: relative;
    width: 100%; max-width: 440px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 30px 80px -30px rgba(15,21,36,.28), 0 8px 24px -12px rgba(15,21,36,.12);
    padding: 40px 32px 32px;
}
.hd-auth__brand {
    text-align: center;
    margin-bottom: 28px;
}
.hd-auth__logo {
    max-height: 68px; width: auto;
    filter: drop-shadow(0 8px 18px rgba(200,16,46,.25));
    margin: 0 auto 18px;
    display: block;
}
.hd-auth__eyebrow {
    color: var(--brand);
    font-size: 11px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    margin: 0 0 6px;
}
.hd-auth__title {
    color: var(--ink-900);
    font-size: 26px; font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.hd-auth__lead {
    color: var(--ink-400);
    font-size: 14px; line-height: 1.5;
    margin: 0;
}
.hd-auth__form {
    display: flex; flex-direction: column;
    margin-top: 8px;
}
.hd-auth__form .hd-label { margin-top: 10px; }
.hd-auth__form .hd-input-wrap { margin-bottom: 4px; }
.hd-auth__forgot {
    color: var(--ink-400); font-size: 12.5px; font-weight: 600;
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .12s ease;
}
.hd-auth__forgot:hover { color: var(--brand); }
.hd-auth__footer {
    text-align: center;
    color: var(--ink-400); font-size: 12px;
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center; gap: 6px;
    flex-wrap: wrap;
}
.hd-auth__footer i { color: var(--brand); }
.hd-auth__phone {
    color: var(--brand); font-weight: 700; text-decoration: none;
    margin-left: 4px;
}
.hd-auth__phone:hover { text-decoration: underline; }
.hd-auth__copy {
    color: var(--ink-300); font-size: 11px;
    margin-top: 20px; opacity: .8;
    text-align: center;
}
.hd-auth__copy a { color: var(--brand); font-weight: 600; text-decoration: none; }
.hd-auth__copy .sep { color: var(--line-strong); margin: 0 6px; }

/* Login-only: alerts como toast centrado no topo, ao estilo notificação */
body:has(.hd-auth) .alert,
body:has(.authincation) .alert {
    position: fixed !important;
    top: 20px !important; left: 50% !important;
    transform: translateX(-50%) translateY(-8px);
    opacity: 0;
    max-width: 440px; width: calc(100% - 32px);
    margin: 0 !important;
    padding: 14px 44px 14px 18px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: #fff !important;
    color: var(--ink-900) !important;
    box-shadow: 0 20px 50px -18px rgba(15,21,36,.4), 0 6px 20px -8px rgba(15,21,36,.15) !important;
    z-index: 1050;
    animation: hdToastIn .35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-size: 14px; line-height: 1.4;
    display: flex; align-items: center; gap: 12px;
}
body:has(.hd-auth) .alert-danger,
body:has(.authincation) .alert-danger {
    background: #fff !important;
    border-left: 4px solid var(--brand) !important;
    color: var(--ink-900) !important;
}
body:has(.hd-auth) .alert-success,
body:has(.authincation) .alert-success,
body:has(.hd-auth) .alert-primary,
body:has(.authincation) .alert-primary {
    background: #fff !important;
    border-left: 4px solid #10b981 !important;
}
body:has(.hd-auth) .alert svg,
body:has(.authincation) .alert svg { color: var(--brand); flex: 0 0 auto; }
body:has(.hd-auth) .alert strong,
body:has(.authincation) .alert strong { color: var(--brand); font-weight: 700; }
body:has(.hd-auth) .alert .btn-close,
body:has(.authincation) .alert .btn-close,
body:has(.hd-auth) .alert .close,
body:has(.authincation) .alert .close {
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400); opacity: .7; font-size: 18px;
    padding: 4px 8px; background: transparent; border: 0;
    cursor: pointer; line-height: 1;
}
body:has(.hd-auth) .alert .btn-close:hover,
body:has(.authincation) .alert .btn-close:hover { opacity: 1; color: var(--brand); }

@keyframes hdToastIn {
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 480px) {
    .hd-auth__card { padding: 32px 22px 24px; border-radius: 18px; }
    .hd-auth__title { font-size: 22px; }
    .hd-auth__logo { max-height: 56px; }
}

/* Botão com estado busy (idle/spinner) */
.btn .hd-btn-busy { display: none; }
.btn.is-busy .hd-btn-idle { display: none; }
.btn.is-busy .hd-btn-busy { display: inline-flex; align-items: center; }
.btn.is-busy,
.btn[disabled] {
    cursor: not-allowed;
    opacity: .85;
    pointer-events: none;
    transform: none !important;
}

/* Full-screen loading overlay (usado durante login) */
.hd-page-loading {
    position: fixed; inset: 0;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    animation: hdFadeIn .2s ease-out;
}
@keyframes hdFadeIn { from { opacity: 0; } to { opacity: 1; } }
.hd-page-loading__box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px 44px;
    box-shadow: 0 30px 80px -30px rgba(15,21,36,.35);
    text-align: center;
    max-width: 360px;
}
.hd-page-loading__spinner {
    width: 48px; height: 48px; margin: 0 auto 18px;
    border-radius: 50%;
    border: 4px solid rgba(200,16,46,.15);
    border-top-color: var(--brand);
    animation: hdspin .8s linear infinite;
}
.hd-page-loading__title {
    color: var(--ink-900); font-size: 16px; font-weight: 700;
    letter-spacing: -0.005em; margin-bottom: 4px;
}
.hd-page-loading__sub {
    color: var(--ink-400); font-size: 13px;
}
