@import url('../fonts/outfit.css');

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

body {
    font-family: 'Outfit', sans-serif;
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    display: none; /* Oculto por defecto hasta que JS confirme sesión */
    width: 100%;
    max-width: 1240px;
    min-height: 650px;
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.55);
}

body.authorized .container {
    display: flex !important;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LEFT SIDE PANEL (CLONE OF LOGIN LEFT PANEL) */
.dashboard-panel-left {
    width: 350px;
    background: linear-gradient(150deg, #1a1040 0%, #2d1b6b 40%, #1e3a8a 100%);
    padding: 50px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    color: white;
}

.dashboard-panel-left::before {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(232,150,26,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -60px; right: -100px;
    z-index: 1;
}

.dashboard-panel-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(123,63,160,0.2) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -80px; left: -60px;
    z-index: 1;
}

.panel-left-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-logo {
    max-width: 190px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.panel-left-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #f1f5f9;
}

.panel-left-content > p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 30px;
    line-height: 1.6;
}

.panel-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
}

.feature i {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
}

.feature:nth-child(1) i { background: rgba(123,63,160,0.4); color: #c084fc; }
.feature:nth-child(2) i { background: rgba(30,109,191,0.4); color: #60a5fa; }
.feature:nth-child(3) i { background: rgba(232,150,26,0.3); color: #fbbf24; }

/* RIGHT SIDE PANEL (WORKSPACE AREA) */
.dashboard-panel-right {
    flex: 1;
    background: #ffffff;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-wrapper {
    display: flex;
    flex-direction: column;
}

.menu-item {
    text-decoration: none;
    color: inherit;
    padding: 1.8rem 1.4rem 1.4rem;
    background: #ffffff;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    height: 100%;
}

.menu-item .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.2rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Exquisite color gradients for circles to echo the login buttons */
.theme-indigo .icon-circle { background: rgba(123,63,160,0.12); color: #7b3fa0; }
.theme-emerald .icon-circle { background: rgba(30,109,191,0.12); color: #1e6dbf; }
.theme-blue .icon-circle { background: rgba(232,150,26,0.1); color: #e8961a; }
.theme-violet .icon-circle { background: rgba(123,63,160,0.12); color: #7b3fa0; }
.theme-rose .icon-circle { background: rgba(30,109,191,0.12); color: #1e6dbf; }

.menu-item h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.menu-item p {
    margin: 0 0 0.5rem 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
    flex-grow: 1;
}

/* Premium Login Gradient Action Buttons */
.card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
    background: linear-gradient(135deg, #7b3fa0 0%, #1e6dbf 60%, #e8961a 100%);
    box-shadow: 0 4px 12px rgba(123,63,160,0.25);
    transition: all 0.3s;
}

/* Hover States matching login styles */
.menu-item:hover {
    transform: translateY(-6px);
    border-color: #7b3fa0;
    box-shadow: 0 15px 30px rgba(123,63,160,0.08);
}

.menu-item:hover .icon-circle {
    transform: scale(1.1);
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(123,63,160,0.35);
}

.card-btn:active {
    transform: translateY(0);
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        max-width: 550px;
        min-height: auto;
    }
    .dashboard-panel-left {
        width: 100%;
        padding: 40px;
    }
    .dashboard-panel-right {
        padding: 40px;
    }
    .menu-grid {
        grid-template-columns: 1fr;
    }
}