/* ============================================================
   EHSIA – assets/css/layout.css
   Main container, header, menu bars, content areas
   ============================================================ */

/* ── Logo watermarks ──────────────────────────────────────── */
.logo, .logo2 {
    position: fixed; top: -50px; width: 300px; height: 300px;
    z-index: 9999; pointer-events: none;
    background-image: none; background-size: contain;
    background-repeat: no-repeat; background-position: center;
}
.logo  { left: 80px; }
.logo2 { top: -99px; right: 10px; width: 400px; height: 400px; }

/* ── Main Container ───────────────────────────────────────── */
.container {
    max-width: 1920px; width: 100%; margin: 0 auto;
    background: rgba(255,255,255,0.95);
    border-radius: 12px; box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    aspect-ratio: 16/9;
    min-height: 85vh; max-height: calc(100vh - 20px);
    display: flex; flex-direction: column; overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ── Header ───────────────────────────────────────────────── */
.header {
    background: var(--gradient-primary); color: var(--white);
    padding: 8px 20px; text-align: center;
    border-radius: 12px 12px 0 0;
    position: relative; overflow: hidden;
    border-bottom: 2px solid var(--primary-dark);
}
.header::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.3;
}
.header-content { display: flex; align-items: center; gap: 20px; position: relative; z-index: 2; }
.header-text    { flex: 1; }
.header-text h1 { font-size: 1.8em; margin-bottom: 8px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); font-weight: 700; }
.header-text p  { font-size: 1em; opacity: 0.9; font-weight: 500; }

/* ── Menu Bars ────────────────────────────────────────────── */
.main-menu, .sub-menu {
    background: var(--light); padding: 10px;
    display: flex; justify-content: space-between;
    align-items: center; gap: 10px; flex-wrap: wrap;
}
.main-menu { border-bottom: 2px solid var(--primary); }
.main-menu-buttons {
    display: flex; gap: 10px; flex-wrap: wrap;
    flex-grow: 1; justify-content: center;
}
.form-group { margin-bottom: 0; }
.action-dropdown {
    background: var(--action-bg) !important;
    border: 2px solid var(--info) !important;
    padding: 6px; border-radius: 4px;
}

/* ── Content Panels ───────────────────────────────────────── */
.main-content {
    display: none; flex: 1; overflow-y: hidden; padding: 0;
    background-color: #f0f4f8; flex-direction: column;
}
.main-content.active { display: flex; }
.sub-content        { display: none; flex-grow: 1; padding: 15px; overflow-y: auto; }
.sub-content.active { display: block; }

/* ── EHSIA Dashboard Grid ─────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 20px; height: 100%; padding: 20px;
}
.ehsia-dashboard-card {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 20px; box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.ehsia-dashboard-card h2 {
    color: var(--primary); font-size: 1.3em;
    font-weight: 700; margin-bottom: 20px; text-align: center;
}
.chart-canvas-container {
    flex: 1; position: relative; min-height: 0;
}
.ehsia-dashboard-card .chart-canvas-container { flex-grow: 1; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 15px; gap: 15px;
    }
    .ehsia-dashboard-card h2 { font-size: 1.1em; margin-bottom: 15px; }
}
