/* ========================================
   VARIABLES DE COLORES - TEMA CLARO
   ======================================== */
:root {
    /* Paleta Principal */
    --oxford-blue: #0a1027;
    --flax: #e7d38e;
    --rich-black: #0a1426;
    --lapis-lazuli: #386593;
    --space-cadet: #222a3e;
    
    /* Variantes */
    --primary-light: #4a7db0;
    --primary-dark: #2c5174;
    --accent-light: #f0dda7;
    --accent-dark: #d4b667;
    
    /* Estados */
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #386593;
    
    /* Tema Claro */
    --content-bg: #f8f9fa;
    --sidebar-bg: #0a1426;
    --bg-white: #ffffff;
    --sidebar-hover-bg: #0a1027;
    --sidebar-text: #ecf0f1;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #95a5a6;
    --border-color: rgba(56, 101, 147, 0.2);
    --sidebar-border: #0a1027;
    --primary-color: #386593;
    --gradient-primary: linear-gradient(135deg, #386593 0%, #222a3e 100%);
    --sidebar-active-bg: var(--lapis-lazuli);
    --sidebar-accent: var(--flax);
    --card-shadow: 0 2px 12px rgba(10, 16, 39, 0.08);
    --card-hover-shadow: 0 8px 25px rgba(56, 101, 147, 0.15);
}

/* ========================================
   VARIABLES DE COLORES - TEMA OSCURO
   ======================================== */
[data-bs-theme="dark"] {
    --content-bg: #121212;
    --sidebar-bg: #1E1E1E;
    --bg-white: #1E1E1E;
    --sidebar-hover-bg: #2a2a2a;
    --sidebar-text: #E0E0E0;
    --text-primary: #F5F5F5;
    --text-secondary: #BDBDBD;
    --text-muted: #757575;
    --border-color: rgba(255, 255, 255, 0.15);
    --sidebar-border: #2c2c2c;
    --primary-color: #5893c5;
    --gradient-primary: linear-gradient(135deg, #2c3e50 0%, #1e2b38 100%);
    --sidebar-active-bg: var(--lapis-lazuli);
    --sidebar-accent: var(--flax);
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 8px 25px rgba(88, 147, 197, 0.2);
}

/* ========================================
   ESTILOS BASE
   ======================================== */
body {
    background-color: var(--content-bg);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   HEADER DEL PERFIL
   ======================================== */
.profile-header {
    background: linear-gradient(135deg, var(--rich-black) 0%, var(--space-cadet) 50%, var(--lapis-lazuli) 100%);
    border-radius: 16px 16px 0 0;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(231, 211, 142, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 101, 147, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-header-content {
    position: relative;
    z-index: 1;
}

.profile-name {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.profile-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(231, 211, 142, 0.15);
    border: 1px solid rgba(231, 211, 142, 0.3);
    color: var(--flax);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.profile-code i {
    font-size: 0.75rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.active {
    background: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.inactive {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge.active .status-dot {
    background: #2ecc71;
}

.status-badge.inactive .status-dot {
    background: #e74c3c;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* ========================================
   CARDS DE INFORMACIÓN
   ======================================== */
.info-card {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.info-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-2px);
}

.info-card-header {
    background: linear-gradient(90deg, rgba(56, 101, 147, 0.08) 0%, rgba(231, 211, 142, 0.05) 100%);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-bs-theme="dark"] .info-card-header {
    background: linear-gradient(90deg, rgba(88, 147, 197, 0.1) 0%, rgba(231, 211, 142, 0.05) 100%);
}

.info-card-header i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.info-card-header h6 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.info-card-body {
    padding: 1.25rem;
}

/* ========================================
   CAMPOS DE DATOS
   ======================================== */
.data-field {
    margin-bottom: 1.25rem;
}

.data-field:last-child {
    margin-bottom: 0;
}

.data-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-label i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.data-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.data-value.highlight {
    color: var(--flax);
    background: linear-gradient(90deg, rgba(231, 211, 142, 0.15) 0%, transparent 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
}

[data-bs-theme="dark"] .data-value.highlight {
    background: linear-gradient(90deg, rgba(231, 211, 142, 0.1) 0%, transparent 100%);
}

.data-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.data-value a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ========================================
   ACCIONES RÁPIDAS
   ======================================== */
.quick-actions-section {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.quick-actions-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.quick-actions-title i {
    color: var(--flax);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-btn:hover::before {
    transform: scaleX(1);
}

.action-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(56, 101, 147, 0.15);
    transform: translateY(-3px);
}

.action-btn i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.action-btn:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: color 0.3s ease;
}

.action-btn:hover span {
    color: var(--text-primary);
}

/* Variantes de botones de acción */
.action-btn.primary {
    background: linear-gradient(135deg, rgba(56, 101, 147, 0.08) 0%, rgba(56, 101, 147, 0.03) 100%);
    border-color: rgba(56, 101, 147, 0.2);
}

.action-btn.primary::before {
    background: var(--primary-color);
}

.action-btn.primary i {
    color: var(--primary-color);
}

.action-btn.accent {
    background: linear-gradient(135deg, rgba(231, 211, 142, 0.1) 0%, rgba(231, 211, 142, 0.03) 100%);
    border-color: rgba(231, 211, 142, 0.3);
}

.action-btn.accent::before {
    background: var(--flax);
}

.action-btn.accent i {
    color: var(--accent-dark);
}

.action-btn.accent:hover {
    border-color: var(--flax);
    box-shadow: 0 4px 15px rgba(231, 211, 142, 0.2);
}

.action-btn.secondary {
    background: linear-gradient(135deg, rgba(34, 42, 62, 0.05) 0%, transparent 100%);
}

.action-btn.secondary::before {
    background: var(--space-cadet);
}

[data-bs-theme="dark"] .action-btn {
    background: var(--sidebar-hover-bg);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .action-btn:hover {
    background: rgba(88, 147, 197, 0.1);
    border-color: var(--primary-color);
}

[data-bs-theme="dark"] .action-btn.primary {
    background: rgba(88, 147, 197, 0.1);
}

[data-bs-theme="dark"] .action-btn.accent {
    background: rgba(231, 211, 142, 0.08);
}

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.profile-main-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.profile-content {
    padding: 1.5rem;
}

/* ========================================
   TOGGLE DE TEMA
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.theme-toggle .btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle .btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: rotate(180deg);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .profile-header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .profile-name {
        font-size: 1.35rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-container {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 1rem 0.75rem;
    }
    
    .action-btn i {
        font-size: 1.25rem;
    }
    
    .action-btn span {
        font-size: 0.7rem;
    }
}

/* Encabezado compacto exclusivo de la ficha de atención de socios. */
.profile-header-compact .profile-header-content {
    padding: 0.45rem 1rem !important;
}

.profile-header-compact .profile-name {
    margin-bottom: 0.2rem !important;
    line-height: 1.15;
}

.profile-header-compact .profile-code,
.profile-header-compact .badge-status {
    padding: 0.15rem 0.5rem;
    gap: 0.3rem;
    font-size: 0.73rem;
    line-height: 1.2;
}

.profile-header-compact .profile-code i {
    font-size: 0.65rem;
}

.profile-header-compact .status-dot {
    width: 6px;
    height: 6px;
}

@media (max-width: 576px) {
    .profile-header-compact .profile-header-content {
        padding: 0.4rem 0.65rem !important;
    }
}
