/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        url('../img/diagonal-noise.png') repeat,
        linear-gradient(135deg, 
            #f8fafc 0%, 
            #e2e8f0 25%, 
            #f1f5f9 50%, 
            #e2e8f0 75%, 
            #f8fafc 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.8);
    z-index: -1;
    pointer-events: none;
}

/* Fondo especial solo para la página de login */
body.login-page {
    background: url('../img/fondo_escritorio.png') center center/cover no-repeat;
    background-attachment: fixed;
}

body.login-page::before {
    background: none;
}

/* Componentes Generales */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #85e2c2;
    color: #2d3748;
}

.btn-primary:hover {
    background-color: #6dd6b3;
    color: #1a202c;
}

.btn-logout {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-logout:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-logout:hover:before {
    left: 100%;
}

.btn-logout:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.btn-logout i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.btn-logout:hover i {
    transform: rotate(-10deg);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background-color: #fef2f2;
    color: var(--error-color);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    font-weight: 500;
    color: var(--text-muted);
}

.notification-badge {
    background-color: var(--error-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Página de Login */
.login-page {
    background: url('../img/fondo_escritorio.png') center center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.3) 0%, 
        rgba(59, 130, 246, 0.4) 25%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(96, 165, 250, 0.3) 75%,
        rgba(125, 211, 252, 0.4) 100%);
    z-index: 1;
    animation: gradientShift 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(125, 211, 252, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(96, 165, 250, 0.3) 0%, transparent 50%);
    z-index: 1;
    animation: floatingOrbs 12s ease-in-out infinite;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    animation: slideInUp 1s ease-out;
}

.login-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.login-box:hover::before {
    left: 100%;
}

.login-header {
    text-align: center;
    padding: 50px 30px 40px;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.9) 0%, 
        rgba(59, 130, 246, 0.9) 50%,
        rgba(125, 211, 252, 0.9) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

.login-header i {
    font-size: 64px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    background: linear-gradient(45deg, #fff, #e0e7ff, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-form {
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    box-shadow: 
        0 4px 20px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.6);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 8px 32px rgba(37, 99, 235, 0.25),
        0 0 0 4px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
}

.form-group input:focus::placeholder {
    color: rgba(30, 41, 59, 0.3);
    transform: translateX(5px);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, 
        #2563eb 0%, 
        #3b82f6 25%, 
        #60a5fa 50%, 
        #7dd3fc 75%, 
        #2563eb 100%);
    background-size: 400% 400%;
    color: white;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 32px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: gradientMove 3s ease infinite;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 48px rgba(37, 99, 235, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation-duration: 1.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 24px rgba(37, 99, 235, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-footer {
    padding: 20px 30px;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.demo-credentials {
    text-align: center;
}

.demo-credentials h4 {
    margin-bottom: 8px;
    color: var(--text-color);
}

.demo-credentials p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Panel de Admin */
.admin-page {
    min-height: 100vh;
    position: relative;
}

.admin-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(125, 211, 252, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: subtleMove 20s ease-in-out infinite;
}

.admin-content {
    padding: 30px 0;
}

.project-selector {
    margin-bottom: 40px;
}

.project-selector h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    transform: translateY(-8px) scale(1.02);
}

.project-card:hover::before {
    left: 100%;
}

.project-card.active {
    border-color: rgba(37, 99, 235, 0.6);
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.project-card a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: var(--text-color);
}

.project-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.add-project {
    border: 2px dashed var(--border-color);
    text-align: center;
}

.add-project a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.add-project i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Estadísticas */
.stats-section {
    margin-bottom: 40px;
}

.stats-section h2 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color), var(--warning-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card i {
    font-size: 24px;
    color: var(--primary-color);
}

.stat-card.completed i {
    color: var(--success-color);
}

.stat-card.progress i {
    color: var(--warning-color);
}

.stat-card.pending i {
    color: var(--text-muted);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Fases */
.phases-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.phases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.phase-item {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
    position: relative;
}

.phase-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--success-color));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.phase-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(8px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.phase-item:hover::before {
    transform: scaleY(1);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.phase-header:hover {
    background-color: var(--background-color);
}

.phase-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
}

.phase-item.completada .phase-number {
    background-color: var(--success-color);
    color: white;
}

.phase-item.en_progreso .phase-number {
    background-color: var(--warning-color);
    color: white;
}

.phase-info {
    flex: 1;
}

.phase-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.phase-info p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.phase-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phase-status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.phase-status.planificada {
    background-color: #f1f5f9;
    color: var(--text-muted);
}

.phase-status.en_progreso {
    background-color: #fef3c7;
    color: var(--warning-color);
}

.phase-status.completada {
    background-color: #dcfce7;
    color: var(--success-color);
}

.phase-date {
    font-size: 12px;
    color: var(--text-muted);
}

.phase-date-expected {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.phase-date-expected.warning {
    color: var(--warning-color);
    background: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.3);
    animation: pulse 2s infinite;
}

.phase-date-expected.danger {
    color: var(--error-color);
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    animation: pulse 1.5s infinite;
}

.phase-date-expected i {
    margin-right: 4px;
}

.phase-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.updates-count,
.messages-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.messages-count.unread {
    color: var(--error-color);
    font-weight: 600;
}

.toggle-icon {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.phase-item.expanded .toggle-icon {
    transform: rotate(180deg);
}

.phase-details {
    border-top: 1px solid var(--border-color);
    padding: 20px;
    background-color: var(--background-color);
    display: none;
}

.phase-item.expanded .phase-details {
    display: block;
}

/* Timeline del Cliente */
.phases-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Barra de Progreso */
.progress-bar-container {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

/* Información del Proyecto */
.project-info {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.project-info:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

.project-info h2 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.project-status {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.project-status.active {
    background-color: var(--success-color);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Chat */
.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--background-color);
    border-radius: 8px;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.chat-message.admin {
    align-items: flex-start;
}

.chat-message.cliente {
    align-items: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.admin .message-bubble {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
}

.chat-message.cliente .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-input {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    min-height: 40px;
    max-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Formularios en Modales */
.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-color);
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.modal-body .form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Botones adicionales */
.btn-secondary {
    background-color: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #b45309;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #047857;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Botón de editar fase con color específico */
.btn-primary.btn-small {
    background-color: #f2d363;
    color: #2d3748;
}

.btn-primary.btn-small:hover {
    background-color: #edc95a;
    color: #1a202c;
}

.btn-primary.btn-small .fa-edit {
    color: #2d3748;
}

.btn-primary.btn-small:hover .fa-edit {
    color: #1a202c;
}

/* Configuración de fases */
.settings-section {
    padding: 20px 0;
}

.setting-group {
    margin-bottom: 24px;
}

.setting-group h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.status-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-color);
}

/* Tabs */
.phase-detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Updates */
.updates-section h4,
.chat-section h4 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.update-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.update-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-content p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.update-preview {
    margin: 8px 0;
}

.preview-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.preview-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.update-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        padding: 12px 16px;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .phase-header {
        padding: 16px;
    }
    
    .phase-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .phase-detail-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 16px;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout i {
        margin: 0;
    }
}

/* ========================================
   ANIMACIONES ESPECTACULARES
   ======================================== */

@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, 
            rgba(37, 99, 235, 0.3) 0%, 
            rgba(59, 130, 246, 0.4) 25%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(96, 165, 250, 0.3) 75%,
            rgba(125, 211, 252, 0.4) 100%);
    }
    25% {
        background: linear-gradient(135deg, 
            rgba(96, 165, 250, 0.4) 0%, 
            rgba(125, 211, 252, 0.3) 25%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(37, 99, 235, 0.4) 75%,
            rgba(59, 130, 246, 0.3) 100%);
    }
    50% {
        background: linear-gradient(135deg, 
            rgba(125, 211, 252, 0.3) 0%, 
            rgba(37, 99, 235, 0.4) 25%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(96, 165, 250, 0.3) 75%,
            rgba(59, 130, 246, 0.4) 100%);
    }
    75% {
        background: linear-gradient(135deg, 
            rgba(59, 130, 246, 0.4) 0%, 
            rgba(125, 211, 252, 0.3) 25%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(37, 99, 235, 0.3) 75%,
            rgba(96, 165, 250, 0.4) 100%);
    }
}

@keyframes floatingOrbs {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translate(-10px, 10px) rotate(180deg);
        opacity: 0.9;
    }
    75% {
        transform: translate(-20px, -10px) rotate(270deg);
        opacity: 0.7;
    }
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes subtleMove {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translate(10px, -5px) rotate(1deg);
        opacity: 0.9;
    }
    50% {
        transform: translate(-5px, 5px) rotate(-0.5deg);
        opacity: 0.7;
    }
    75% {
        transform: translate(-10px, -2px) rotate(0.5deg);
        opacity: 0.85;
    }
}

/* Efectos de partículas flotantes */
.login-page {
    position: relative;
}

.login-page .floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.login-page .floating-particles::before,
.login-page .floating-particles::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
}

.login-page .floating-particles::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.login-page .floating-particles::after {
    top: 70%;
    right: 15%;
    animation-delay: 4s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) translateX(-10px);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) translateX(15px);
        opacity: 0.6;
    }
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .login-box {
        margin: 10px;
        border-radius: 20px;
    }
    
    .login-header {
        padding: 40px 25px 30px;
    }
    
    .login-header i {
        font-size: 52px;
    }
    
    .login-form {
        padding: 30px 25px;
    }
    
    .form-group input {
        padding: 16px 18px;
    }
    
    .btn-login {
        padding: 16px;
        font-size: 15px;
    }
}