:root {
    --bg-gradient: radial-gradient(circle at 50% 50%, #0d1b12 0%, #050a07 100%);
    --bg-card: rgba(13, 27, 18, 0.75);           
    --primary-green: #10b981;     /* Verde institucional brillante */
    --emerald-dark: #059669;      
    --text-white: #ffffff;
    --text-gray: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: #050a07;
    background-image: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
                        radial-gradient(circle at 10% 80%, rgba(5, 150, 105, 0.06) 0%, transparent 40%);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(5, 10, 7, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(82, 106, 173, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    flex-wrap: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* LOGOTIPO CIRCULAR LIMPIO */
.logo img {
    height: 42px;
    width: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-green);
    background: transparent;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.logo span {
    color: var(--primary-green);
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

nav {
    display: block;
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-wrap: nowrap;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-block;
    white-space: nowrap;
}

nav ul li a:hover, 
nav ul li a.active {
    color: var(--text-white);
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.app-layout {
    display: flex;
    flex: 1;
    padding-top: 73px;
}

.sidebar-panel {
    width: 260px;
    background: rgba(5, 10, 7, 0.6);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    margin: 4px 10px;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--primary-green);
    padding-left: 25px;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 10, 7, 0) 100%);
    color: var(--primary-green);
    font-weight: bold;
    border-left: 4px solid var(--primary-green);
}

main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.welcome-text {
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    color: var(--text-white);
}

.welcome-text h1 span {
    color: var(--primary-green);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.welcome-text h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-white);
}

.welcome-text h2 span {
    color: #38bdf8;
}

.welcome-text p {
    color: var(--text-gray);
    font-size: 1rem;
    max-width: 600px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-card h4 {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 5px;
}

.metric-card .subtext {
    font-size: 0.85rem;
}

.metric-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px);
}

.text-cyan { color: var(--primary-green) !important; font-weight: bold; }
.text-purple { color: #38bdf8 !important; font-weight: bold; }
.text-orange { color: #fbbf24 !important; font-weight: bold; }

.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); 
    backdrop-filter: blur(6px); 
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #0b130f; 
    border: 2px solid var(--primary-green); 
    padding: 30px;
    border-radius: 14px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0px 0px 30px rgba(16, 185, 129, 0.25);
    color: var(--text-white);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ef4444;
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--primary-green);
}

.modal-content p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.4;
}

.modal-content input[type="password"] {
    width: 100%;
    padding: 12px;
    background-color: #050a07;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.modal-content input[type="password"]:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-green);
    color: #050a07;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.modal-content button:hover {
    background-color: #059669;
    color: white;
}

@media screen and (max-width: 768px) {
    header {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
        position: static;
    }
    .app-layout {
        flex-direction: column; 
        padding-top: 10px;
    }
    main {
        padding: 20px 15px;
    }
}