/* ═══════════════════════════════════════════════
   CCFamilia — Estilos Aconsejados
   Reutiliza las variables CSS del plugin base
═══════════════════════════════════════════════ */

/* ── Wrapper general ── */
.ccfam-acceso-wrap,
.ccfam-dashboard-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 16px;
    font-family: inherit;
}

/* ── Tabs ── */
.ccfam-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 32px;
}

.ccfam-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.ccfam-tab:hover {
    color: var(--cc-primary, #7C9B16);
}

.ccfam-tab.active {
    color: var(--cc-primary, #7C9B16);
    border-bottom-color: var(--cc-primary, #7C9B16);
}

.ccfam-tab-panel { display: none; }
.ccfam-tab-panel.active { display: block; }

/* ── Form header ── */
.ccfam-form-header {
    margin-bottom: 24px;
}
.ccfam-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.ccfam-form-header p {
    color: #64748b;
    margin: 0;
}

/* ── Fields ── */
.ccfam-field {
    margin-bottom: 16px;
}
.ccfam-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.ccfam-field .req {
    color: #ef4444;
}
.ccfam-field input[type="text"],
.ccfam-field input[type="email"],
.ccfam-field input[type="password"],
.ccfam-field input[type="tel"],
.ccfam-field input[type="date"],
.ccfam-field select,
.ccfam-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ccfam-field input:focus,
.ccfam-field select:focus,
.ccfam-field textarea:focus {
    outline: none;
    border-color: var(--cc-primary, #7C9B16);
    box-shadow: 0 0 0 3px rgba(124, 155, 22, 0.12);
}
.ccfam-field small {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}
.ccfam-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Password toggle ── */
.ccfam-pass-wrap {
    position: relative;
    display: flex;
}
.ccfam-pass-wrap input {
    flex: 1;
    border-radius: 8px 0 0 8px !important;
}
.ccfam-show-pass {
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0 12px;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
}

/* ── Grid de 2 columnas ── */
.ccfam-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 520px) {
    .ccfam-grid-2 { grid-template-columns: 1fr; }
}

/* ── Botones ── */
.ccfam-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cc-primary, #7C9B16);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.ccfam-btn-primary:hover {
    background: var(--cc-primary-d, #5f7711);
    color: #fff;
    text-decoration: none;
}
.ccfam-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--cc-primary, #7C9B16);
    border: 2px solid var(--cc-primary, #7C9B16);
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.ccfam-btn-outline:hover {
    background: rgba(124,155,22,0.07);
    text-decoration: none;
}
.ccfam-btn-full { width: 100%; }
.ccfam-btn-sm { padding: 8px 16px; font-size: 14px; }

.ccfam-btn-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 24px;
}

/* ── Steps indicator ── */
.ccfam-steps {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
}
.ccfam-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    border-bottom: 3px solid #e2e8f0;
    cursor: default;
}
.ccfam-step span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.ccfam-step.active {
    color: var(--cc-primary, #7C9B16);
    border-bottom-color: var(--cc-primary, #7C9B16);
}
.ccfam-step.active span {
    background: var(--cc-primary, #7C9B16);
    color: #fff;
}
.ccfam-step.done span {
    background: #10b981;
    color: #fff;
}

/* ── Messages ── */
.ccfam-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.ccfam-msg.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.ccfam-msg.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* ── Consent box ── */
.ccfam-consent-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    max-height: 240px;
    overflow-y: auto;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}
.ccfam-consent-box h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e293b;
}
.ccfam-consent-box ol {
    padding-left: 20px;
}
.ccfam-consent-box li {
    margin-bottom: 8px;
}

/* ── Checkbox label ── */
.ccfam-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400 !important;
    color: #374151;
}
.ccfam-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--cc-primary, #7C9B16);
    flex-shrink: 0;
}

/* ── Radio group ── */
.ccfam-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ccfam-radio-group label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
    font-size: 14px;
}
.ccfam-radio-group input[type="radio"] {
    accent-color: var(--cc-primary, #7C9B16);
    width: 16px;
    height: 16px;
}

/* ── Field row ── */
.ccfam-field-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}
.ccfam-link-small {
    font-size: 13px;
    color: var(--cc-primary, #7C9B16);
    text-decoration: none;
}
.ccfam-link-small:hover { text-decoration: underline; }

/* ── Notices ── */
.ccfam-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}
.ccfam-notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* ═══════════ DASHBOARD ═══════════ */

.ccfam-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}
.ccfam-dashboard-saludo h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}
.ccfam-dashboard-saludo p {
    color: #64748b;
    margin: 0;
}
.ccfam-dashboard-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Empty state ── */
.ccfam-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
}
.ccfam-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.ccfam-empty-state h3 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 8px;
}
.ccfam-empty-state p {
    margin: 0 0 24px;
}

/* ── Citas lista ── */
.ccfam-citas-lista {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ccfam-cita-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 24px;
    border-left: 4px solid #e2e8f0;
}
.ccfam-cita-card.ccfam-estado-confirmado { border-left-color: #10b981; }
.ccfam-cita-card.ccfam-estado-pendiente  { border-left-color: #f59e0b; }
.ccfam-cita-card.ccfam-estado-cancelado  { border-left-color: #ef4444; }
.ccfam-cita-card.ccfam-estado-visto      { border-left-color: #3b82f6; }

.ccfam-cita-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ccfam-cita-estado {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}
.ccfam-estado-confirmado .ccfam-cita-estado { background: #dcfce7; color: #166534; }
.ccfam-estado-pendiente  .ccfam-cita-estado { background: #fef9c3; color: #854d0e; }
.ccfam-estado-cancelado  .ccfam-cita-estado { background: #fee2e2; color: #991b1b; }
.ccfam-estado-visto      .ccfam-cita-estado { background: #dbeafe; color: #1e40af; }

.ccfam-cita-fecha-reg { font-size: 12px; color: #9ca3af; }
.ccfam-cita-body h4 { margin: 0 0 4px; font-size: 16px; color: #1e293b; }
.ccfam-cita-fecha { margin: 0 0 4px; color: #64748b; font-size: 14px; }
.ccfam-cita-motivo { margin: 0; font-size: 13px; color: #94a3b8; font-style: italic; }

/* ── Perfil ── */
.ccfam-perfil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 560px) {
    .ccfam-perfil-grid { grid-template-columns: 1fr; }
}
.ccfam-perfil-full { grid-column: 1 / -1; }

.ccfam-perfil-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}
.ccfam-perfil-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
}
.ccfam-perfil-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}
.ccfam-perfil-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 2px;
}
.ccfam-perfil-row span:last-child {
    font-size: 15px;
    color: #1e293b;
}

.ccfam-perfil-footer {
    margin-top: 24px;
}
.ccfam-perfil-footer .ccfam-notice-info {
    text-align: center;
    font-size: 13px;
}
.ccfam-perfil-footer a {
    color: var(--cc-primary, #7C9B16);
}
