/* ============================================================
   mi-cuenta.css — Patient Account Dashboard
   Patient Portal Colors: Navy #043259, Teal #64ada9,
   Steel Blue #4d6F8C, Mint #dbece7, Coral #FF6B4A
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito Sans', sans-serif;
    background: #f4f8f7;
    color: #043259;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ── Layout ── */
.account-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    gap: 24px;
    padding: 32px 24px;
}

/* ── Sidebar ── */
.account-sidebar {
    background: #ffffff;
    border: 1px solid #dbece7;
    border-radius: 12px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: fit-content;
    position: sticky;
    top: 88px;
}

.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    background: linear-gradient(135deg, #64ada9, #043259);
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.sidebar-name {
    font-size: 16px;
    font-weight: 700;
    color: #043259;
    margin-bottom: 4px;
}

.sidebar-slogan {
    font-size: 11px;
    color: #64ada9;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-bottom: 20px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #4d6F8C;
    cursor: pointer;
    text-align: left;
    font-family: 'Nunito Sans', sans-serif;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav-item img { width: 25px; height: 25px; opacity: 0.6; }

.sidebar-nav-item:hover { background: #f4f8f7; }

.sidebar-nav-item.active {
    background: rgba(100, 173, 169, 0.12);
    color: #043259;
}

.sidebar-nav-item.active img { opacity: 1; }

.sidebar-logout {
    width: 100%;
    background: transparent;
    border: 1.5px solid #dbece7;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #4d6F8C;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
}

.sidebar-logout:hover {
    border-color: #FF6B4A;
    color: #FF6B4A;
}

/* ── Main ── */
.account-main { min-width: 0; }

.account-tab { display: none; }
.account-tab.active { display: block; }

.tab-title {
    font-size: 22px;
    font-weight: 800;
    color: #043259;
    margin: 0;
}

.citas-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.add-cita-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #FF6B4A;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.add-cita-btn svg {
    width: 14px;
    height: 14px;
}

.add-cita-btn:hover { background: #e55a3a; }
.add-cita-btn svg { width: 18px; height: 18px; }

.citas-search {
    position: relative;
    max-width: 400px;
    margin-bottom: 16px;
}

.citas-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #4d6F8C;
    pointer-events: none;
}

.citas-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1.5px solid #dbece7;
    border-radius: 8px;
    font-size: 13px;
    font-family: "Nunito Sans", sans-serif;
    color: #043259;
    outline: none;
    transition: border-color 0.2s;
}

.citas-search input:focus { border-color: #64ada9; }

/* ── Sticky-Note Appointment Cards ── */
.citas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.cita-note {
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(4, 50, 89, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-pending    { background: #FDF3E3; }
.note-review     { background: rgba(255, 249, 196, 0.5); }
.note-confirmed  { background: #dbece7; }
.note-completed  { background: #E6F0EA; }
.note-cancelled  { background: rgba(255, 107, 74, 0.08); }
.note-manual     { background: rgba(200, 247, 197, 0.35); }

.note-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.note-date {
    font-size: 11px;
    font-weight: 700;
    color: #043259;
}

.note-icons {
    display: flex;
    gap: 8px;
}

.note-icons a, .note-icons span {
    color: #4d6F8C;
    display: flex;
    cursor: pointer;
    transition: color 0.2s;
}

.note-icons a:hover, .note-icons span:hover { color: #043259; }
.note-icons svg { width: 15px; height: 15px; }

.note-provider {
    font-size: 14px;
    font-weight: 700;
    color: #043259;
}

.note-especialidad {
    font-size: 12px;
    color: #4d6F8C;
    margin-top: -4px;
}

.note-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4d6F8C;
}

.note-detail svg { width: 13px; height: 13px; flex-shrink: 0; }

.note-map a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #036A6F;
    text-decoration: none;
    font-weight: 600;
}

.note-map a:hover { text-decoration: underline; }

.note-action {
    margin-top: 6px;
}

.note-status-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-label-confirmed { background: #E3F3F1; color: #036A6F; }
.status-label-completed { background: #E6F0EA; color: #2F7A4D; }
.status-label-cancelled { background: #FAECE7; color: #993C1D; }
.status-label-pending { background: #FDF3E3; color: #B7791F; }
.status-label-review  { background: #FFF9C4; color: #8B7500; }
.status-label-manual  { background: #C8F7C5; color: #1B7A3D; }


.note-confirm-btn {
    width: 100%;
    background: #FF6B4A;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 9px;
    font-size: 12px;
    font-weight: 700;
    font-family: "Nunito Sans", sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}

.note-confirm-btn:hover:not(.disabled) { background: #e55a3a; }

.note-confirm-btn.disabled {
    background: #dbece7;
    color: #8aacbc;
    cursor: not-allowed;
}

.note-attribution-self {
    background: #043259;
}

/* ── Manual Entry Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    max-width: 440px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 24px;
    color: #4d6F8C;
    cursor: pointer;
    line-height: 1;
}

.manual-entry-title {
    font-size: 18px;
    font-weight: 700;
    color: #043259;
    margin-bottom: 6px;
}

.manual-entry-subtitle {
    font-size: 12px;
    color: #4d6F8C;
    line-height: 1.6;
    margin-bottom: 20px;
}

.manual-provider-results {
    margin-top: 6px;
    max-height: 180px;
    overflow-y: auto;
}

.manual-provider-item {
    padding: 10px 12px;
    border: 1px solid #dbece7;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s;
}

.manual-provider-item:hover { background: #f4f8f7; }
.manual-provider-item strong { font-size: 13px; color: #043259; }
.manual-provider-item span { font-size: 11px; color: #4d6F8C; }
.manual-provider-item.empty { cursor: default; color: #8aacbc; font-size: 12px; }

.manual-provider-selected {
    margin-top: 8px;
    padding: 10px 12px;
    background: #dbece7;
    border-radius: 6px;
    font-size: 13px;
    color: #043259;
}

.manual-provider-warning {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(255, 107, 74, 0.1);
    border-radius: 6px;
    font-size: 11px;
    color: #993C1D;
    line-height: 1.5;
}

.unvalidated-tag {
    display: inline-block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #BA7517;
    background: rgba(186, 117, 23, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

/* ── Filter Bar ── */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #ffffff;
    border: 1.5px solid #dbece7;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #4d6F8C;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
}

.filter-btn:hover { border-color: #64ada9; }

.filter-btn.active {
    background: #043259;
    border-color: #043259;
    color: #ffffff;
}

.citas-loading {
    text-align: center;
    padding: 40px;
    color: #80A4AE;
    font-size: 14px;
}

.cita-card {
    background: #ffffff;
    border: 1px solid #dbece7;
    border-radius: 12px;
    padding: 20px;
}

.cita-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f7f6;
}

.cita-provider {
    font-size: 15px;
    font-weight: 700;
    color: #043259;
}

.cita-especialidad {
    font-size: 12px;
    color: #64ada9;
    font-weight: 600;
    margin-top: 2px;
}

.status-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-pending { background: #FDF3E3; color: #B7791F; }
.status-confirmed { background: #E3F3F1; color: #036A6F; }
.status-completed { background: #E6F0EA; color: #2F7A4D; }
.status-cancelled { background: #FAECE7; color: #993C1D; }

.cita-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.cita-detail-row {
    font-size: 13px;
    color: #4d6F8C;
    line-height: 1.5;
}

.cita-detail-sub {
    padding-left: 22px;
    font-size: 12px;
    color: #80A4AE;
}

.cita-ref {
    font-size: 11px;
    color: #B0C4CC;
    font-family: monospace;
    margin-top: 4px;
}

.cita-cancel-btn {
    display: inline-block;
    width: auto;
}

/* ── Empty State ── */
.empty-state {
    background: #ffffff;
    border: 1px dashed #dbece7;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-icon { width: 40px; opacity: 0.4; margin-bottom: 6px; }

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: #043259;
}

.empty-state p {
    font-size: 13px;
    color: #4d6F8C;
    max-width: 320px;
    margin-bottom: 8px;
}

/* ── Cards (Perfil / Seguridad) ── */
.profile-card, .security-card {
    background: #ffffff;
    border: 1px solid #dbece7;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
}

.security-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #043259;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f7f6;
}

/* ── Session Info ── */
.session-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 13px;
}

.session-info-label { color: #80A4AE; font-weight: 600; }
.session-info-value { color: #043259; font-weight: 700; }

/* ── Form Elements ── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #043259;
    margin-bottom: 8px;
}

.required { color: #FF6B4A; font-weight: 700; }

.form-input {
    width: 100%;
    height: 42px;
    padding: 8px 14px;
    border: 1.5px solid #dbece7;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Nunito Sans', sans-serif;
    color: #043259;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: #64ada9; }

.form-input:disabled {
    background: #f4f8f7;
    color: #80A4AE;
    cursor: not-allowed;
}

.field-hint {
    display: block;
    font-size: 11px;
    color: #80A4AE;
    margin-top: 6px;
}

.field-static {
    font-size: 14px;
    color: #4d6F8C;
    padding: 8px 0;
    font-weight: 600;
}

.password-input-container { position: relative; }

.password-input-container input { padding-right: 44px; }

.toggle-password-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    opacity: 0.6;
}

.toggle-password-btn:hover { opacity: 1; }

.password-requirements {
    list-style: none;
    margin-top: 10px;
    padding: 12px 14px;
    background: #f4f8f7;
    border: 1px solid #dbece7;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.password-requirements li {
    font-size: 12px;
    color: #80A4AE;
    position: relative;
    padding-left: 20px;
    transition: color 0.2s;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: 0;
    font-size: 11px;
}

.password-requirements li.met { color: #64ada9; font-weight: 600; }
.password-requirements li.met::before { content: '✓'; }

.form-feedback {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.form-feedback-success {
    background: rgba(100, 173, 169, 0.1);
    color: #036A6F;
    border: 1px solid rgba(100, 173, 169, 0.3);
}

.form-feedback-error {
    background: rgba(229, 97, 99, 0.08);
    color: #E56163;
    border: 1px solid rgba(229, 97, 99, 0.25);
}

/* ── Privacy Rights ── */
.privacy-rights-text {
    font-size: 13px;
    color: #4d6F8C;
    line-height: 1.7;
    margin-bottom: 18px;
}

.privacy-rights-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    background: #FF6B4A;
    color: #ffffff;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    transition: background 0.2s;
    text-align: center;
}

.btn-primary:hover { background: #e55a3a; }
.btn-primary:disabled { background: #9CA3AF; cursor: not-allowed; }

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #64ada9;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #64ada9;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
    text-align: center;
}

.btn-secondary:hover { background: #64ada9; color: #ffffff; }

.btn-danger-outline {
    display: inline-block;
    background: transparent;
    color: #E56163;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1.5px solid #E56163;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.2s;
    text-align: center;
}

.btn-danger-outline:hover { background: #E56163; color: #ffffff; }

/* ── Footer (shared shell) ── */
footer {
    background: #ffffff;
    border-top: 1px solid #dbece7;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links span { font-size: 11px; color: #8aacbc; }
.footer-links a { font-size: 11px; color: #64ada9; text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer-links a:hover { color: #043259; }
.social-media-container .social-media { display: flex; gap: 10px; }
.social-media img { width: 22px; height: 22px; opacity: 0.6; transition: opacity 0.2s; }
.social-media img:hover { opacity: 1; }

/* ── Family Filter Row (Mis Citas) ── */
.family-filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.family-chip-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
}

.family-chip-icon:hover {
    transform: translateY(-1px);
}

.family-chip-icon.active {
    border-color: #043259;
}

/* ── Note Attribution Tag ── */
.note-attribution-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
}

/* ── Mi Familia Tab ── */
.familia-subtitle {
    font-size: 13px;
    color: #4d6F8C;
    margin-bottom: 20px;
}

.dependents-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dependent-card {
    background: #ffffff;
    border: 1px solid #dbece7;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dependent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dependent-info { flex: 1; min-width: 0; }

.dependent-name {
    font-size: 14px;
    font-weight: 700;
    color: #043259;
}

.dependent-meta {
    font-size: 12px;
    color: #4d6F8C;
    margin-top: 2px;
}

.dependent-locked-msg {
    font-size: 11px;
    color: #BA7517;
    background: rgba(186, 117, 23, 0.1);
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 8px;
    line-height: 1.5;
}

.dependent-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dependent-actions span {
    color: #4d6F8C;
    cursor: pointer;
    display: flex;
    transition: color 0.2s;
}

.dependent-actions span:hover { color: #043259; }
.dependent-actions svg { width: 15px; height: 15px; }

.dependent-consent-box {
    background: #f4f8f7;
    border: 1px solid #dbece7;
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    font-size: 12px;
}

/* ── Favoritos Tab ── */
.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.favorite-card {
    background: #ffffff;
    border: 1px solid #dbece7;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.favorite-info { flex: 1; min-width: 0; }

.favorite-name {
    font-size: 14px;
    font-weight: 700;
    color: #043259;
}

.favorite-meta {
    font-size: 12px;
    color: #4d6F8C;
    margin-top: 2px;
}

.favorite-scheduling-tag {
    display: inline-block;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #036A6F;
    background: rgba(100, 173, 169, 0.12);
    padding: 3px 8px;
    border-radius: 10px;
}

.favorite-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.favorite-actions span {
    color: #4d6F8C;
    cursor: pointer;
    display: flex;
    transition: color 0.2s;
}

.favorite-actions span:hover { color: #E56163; }
.favorite-actions svg { width: 15px; height: 15px; }

/* ── Toast Notifications ── */
.patient-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.patient-toast {
    background: #ffffff;
    border-left: 4px solid #64ada9;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(4,50,89,0.15);
    padding: 14px 18px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #043259;
    min-width: 260px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.patient-toast.show { opacity: 1; transform: translateX(0); }
.patient-toast.success { border-left-color: #64ada9; }
.patient-toast.error { border-left-color: #E56163; }
.patient-toast.info { border-left-color: #4d6F8C; }
.patient-toast-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Confirm Modal ── */
.patient-confirm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(4,50,89,0.4);
    z-index: 5100;
    align-items: center;
    justify-content: center;
}

.patient-confirm-overlay.active { display: flex; }

.patient-confirm-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 12px 32px rgba(4,50,89,0.2);
}

.patient-confirm-message {
    font-size: 14px;
    color: #043259;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 600;
}

.patient-confirm-actions { display: flex; gap: 10px; }

.patient-confirm-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    border: none;
}

.patient-confirm-cancel {
    background: transparent;
    border: 1.5px solid #dbece7 !important;
    color: #4d6F8C;
}

.patient-confirm-ok {
    background: #FF6B4A;
    color: #ffffff;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}


.beta-badge {
    background: rgba(255, 107, 74, 0.12);
    color: #FF6B4A;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.field-error-text {
    display: block;
    font-size: 12px;
    color: #E56163;
    margin: 4px 0 10px 0;
}

.codigo-k-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px 16px;
    background: #dbece7;
    border-radius: 12px;
}

.codigo-k-logo {
    height: 72px;
    margin-bottom: 8px;
}

.codigo-k-tagline {
    color: #043259;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
}

/* ── Código K — Aviso Legal ── */
.codigo-k-disclaimer {
    background: rgba(232, 97, 61, 0.06);
    border: 1.5px solid rgba(232, 97, 61, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.codigo-k-disclaimer h3 {
    font-size: 16px;
    font-weight: 800;
    color: #043259;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(232, 97, 61, 0.2);
}

.codigo-k-disclaimer p {
    font-size: 13px;
    color: #4d6F8C;
    line-height: 1.7;
    margin-bottom: 12px;
}

.codigo-k-disclaimer p strong {
    color: #043259;
    font-weight: 700;
}

.codigo-k-disclaimer ul {
    margin: 8px 0 12px 0;
    padding-left: 0;
    list-style: none;
}

.codigo-k-disclaimer ul li {
    font-size: 13px;
    color: #4d6F8C;
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.codigo-k-disclaimer ul li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: #E8613D;
    font-weight: 700;
}

/* The 911 emergency line — deliberately the loudest thing in the block */
.codigo-k-disclaimer p:has(strong:only-child) {
    background: rgba(232, 97, 61, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
}

.codigo-k-disclaimer p:has(strong:only-child) strong {
    color: #C94A2C;
    font-size: 14px;
}

.codigo-k-disclaimer a {
    color: #64ada9;
    font-weight: 700;
    text-decoration: none;
}

.codigo-k-disclaimer a:hover {
    text-decoration: underline;
}

/* Consent checkboxes inside the disclaimer */
.codigo-k-disclaimer .raffle-checkbox-label {
    align-items: flex-start;
    gap: 10px;
}

.codigo-k-disclaimer .raffle-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.codigo-k-disclaimer .raffle-checkbox-label span {
    font-size: 13px;
    line-height: 1.6;
    color: #4d6F8C;
}

.codigo-k-disclaimer .raffle-checkbox-label span strong {
    color: #043259;
}

.codigo-k-disclaimer .raffle-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #E8613D;
}

.codigo-k-disclaimer .raffle-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

.raffle-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.raffle-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #E8613D;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.raffle-checkbox-label span {
    font-size: 13px;
    color: #043259;
    line-height: 1.5;
}

#ck-qr-canvas {
    border: 3px solid #E8613D;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
        padding: 20px 16px;
    }
    .account-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        text-align: left;
        padding: 16px;
        align-items: center;
        
    }
    .sidebar-avatar {
        margin-bottom: 0;
        margin-right: 12px;
        width: 48px;
        height: 48px;
        font-size: 16px;
        flex-shrink: 0;
    }
    .sidebar-name,
    .sidebar-slogan {
        width: auto;
        text-align: left;
        margin-bottom: 0;
    }
    .sidebar-name {
        margin-bottom: 2px;
    }
    .sidebar-nav {
        flex-direction: row;
        margin-top: 14px;
        margin-bottom: 0;
        overflow-x: auto;
        width: 100%;
    }
    
    .sidebar-logout { display: none; }
    footer { flex-direction: column; text-align: center; padding: 16px; }
    .footer-links { justify-content: center; }
    .privacy-rights-actions { flex-direction: column; }

    .citas-header-row {
        gap: 10px;
        margin-bottom: 12px;
    }

    .family-filter-row {
        gap: 8px;
    }

    .family-chip-icon {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .citas-search {
        max-width: 100%;
    }

    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .citas-list,
    .dependents-list,
    .favorites-list {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
        width: 92%;
    }

    .dependent-card,
    .favorite-card {
        flex-wrap: wrap;
    }

    .favorite-actions {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .profile-card,
    .security-card {
        padding: 20px;
    }

    .account-sidebar,
    .account-main,
    .sidebar-nav,
    .citas-header-row,
    .family-filter-row,
    .filter-bar {
        min-width: 0;
    }

    .sidebar-nav-item {
        padding: 10px;
        justify-content: center;
        white-space: nowrap;
    }
    .nav-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .tab-title {
        font-size: 19px;
    }

    .add-cita-btn {
        width: 22px;
        height: 22px;
    }

    .add-cita-btn svg {
        width: 12px;
        height: 12px;
    }

    .family-chip-icon {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    .cita-note {
        padding: 12px;
    }

    .note-provider {
        font-size: 13px;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    .modal-content {
        padding: 16px;
        width: 94%;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .dependent-avatar,
    .favorite-actions svg {
        flex-shrink: 0;
    }

    .privacy-rights-actions {
        flex-direction: column;
    }

    .btn-secondary,
    .btn-danger-outline {
        width: 100%;
        text-align: center;
    }
}