/* Variables de Diseño Moderno Ingesilv */
:root {
    --primary: #1b4332;
    --primary-light: #2d6a4f;
    --secondary: #40916c;
    --accent: #95d5b2;
    --fresh-bg: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px 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);
    --radius: 16px;
}

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

body.intranet-body {
    background-color: var(--fresh-bg);
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-logo {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    height: 32px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}

.nav-item {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link i {
    width: 20px;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-link.active {
    background: var(--secondary);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    max-width: calc(1440px - var(--sidebar-width));
    width: 100%;
}

.dashboard-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-title h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Cards & Layout */
.glass-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f1f5f9;
    color: var(--primary);
}

.kpi-data .kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-data .kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Tabs / Sections */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Professional Team Cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.team-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.team-avatar-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.team-role {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: opacity 0.2s;
}

.btn-whatsapp:hover {
    opacity: 0.9;
}

/* Productive Table */
.productive-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

.productive-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid #e2e8f0;
}

.productive-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.productive-table tr:last-child td {
    border-bottom: none;
}

.row-label {
    font-weight: 600;
    color: var(--primary);
}

/* Croquis */
.croquis-container {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.croquis-img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

/* Footer Replicated */
.intranet-footer {
    margin-top: 4rem;
    background: #f1f5f9;
    border-radius: var(--radius);
    padding: 3rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-brand .logo {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links h4, .footer-form h4 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.footer-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-form input, .footer-form textarea {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Semaphore Icon */
.semaphore-img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-left: 8px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
