/* Dashboard Styles - Bloomberg/Inesion Theme */
:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-sidebar: #0f0f0f;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #00ff9d;
    /* Oramix Green */
    --accent-hover: #00cc7a;
    --danger-color: #ff4d4d;
    --success-color: #00ff9d;
    --border-color: #333;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- Login Page Specific --- */
body.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a2a22 0%, #000 100%);
    overflow-y: auto;
}

.login-container {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.login-logo-img {
    max-width: 280px;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-logo-img {
    max-width: 280px;
    height: auto;
    display: block;
    /* 3D Transform Settings */
    transform-style: preserve-3d;
    animation: float3d 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

/* Container to hold the sparkle and perspective */
.logo-wrapper-3d {
    perspective: 1000px;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    overflow: hidden;
    /* Contains the sparkle */
    border-radius: 10px;
    /* Optional, helps sparkle edge */
    padding: 10px;
}

/* Sparkle/Gloss Effect */
.logo-wrapper-3d::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: sparkle 5s infinite;
    pointer-events: none;
}

/* Secondary Branding (INESION) */
.inesion-brand-container {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.inesion-logo-sub {
    max-width: 150px;
    height: auto;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.inesion-text-sub {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

/* Animations */
@keyframes float3d {

    0%,
    100% {
        transform: translateY(0) rotateX(0deg);
    }

    50% {
        transform: translateY(-8px) rotateX(5deg);
    }
}

@keyframes sparkle {
    0% {
        left: -150%;
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    50% {
        left: 150%;
        opacity: 0;
    }

    100% {
        left: 150%;
        opacity: 0;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    background-color: var(--accent-hover);
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.error-msg {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: none;
}

/* --- Dashboard Layout --- */
.sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent-color);
}

.nav-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
    background-color: var(--bg-dark);
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--accent-color);
}

/* --- Widgets & Cards --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
}

.card-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.card-change {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--danger-color);
}

/* --- Table Styles --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ... previous CSS ... */

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.logout-link {
    margin-top: 2rem;
    color: var(--danger-color) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow: auto;
    }

    .sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
        box-sizing: border-box;
    }

    .sidebar-header {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    /* Hide nav by default on mobile */
    #side-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        animation: slideDown 0.3s ease-out;
    }

    /* Show nav when active */
    #side-nav.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        border-left: none;
        border-bottom: 1px solid #333;
    }

    .nav-link:hover,
    .nav-link.active {
        border-left: none;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .logout-link {
        margin-top: 0.5rem;
        /* Less space on mobile */
    }

    .main-content {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}