﻿/* =========================
   ROOT THEME
========================= */
:root {
    --primary: #4f46e5;
    --primary-soft: #eef2ff;
    --bg: #f8fafc;
    --sidebar-bg: #111827;
    --sidebar-text: #9ca3af;
    --sidebar-active: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
}

/* =========================
   ROOT LAYOUT
========================= */
body {
    margin: 0;
    background: var(--bg);
    font-family: 'Segoe UI', sans-serif;
}

.iam-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================
   SIDEBAR
========================= */
.iam-layout-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

/* HEADER */
.iam-sidebar-header {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* MENU */
.iam-sidebar-menu {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

/* ITEM */
.iam-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
    font-size: 14px;
}

    /* ICON */
    .iam-menu-item i {
        font-size: 16px;
        width: 18px;
        text-align: center;
    }

    /* HOVER */
    .iam-menu-item:hover {
        background: rgba(255,255,255,0.05);
        color: white;
    }

    /* ACTIVE */
    .iam-menu-item.active {
        background: var(--primary);
        color: white;
        font-weight: 600;
    }

/* =========================
   MAIN AREA
========================= */
.iam-layout-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* =========================
   HEADER
========================= */
.iam-layout-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    background: white;
    border-bottom: 1px solid var(--border);
}

/* =========================
   CONTENT
========================= */
.iam-layout-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================
   SECTION
========================= */
.iam-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* =========================
   GRID
========================= */
.iam-grid {
    display: grid;
    gap: 20px;
}

.iam-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.iam-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.iam-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.iam-grid-auto {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* =========================
   SPLIT
========================= */
.iam-split {
    display: flex;
    gap: 20px;
}

.iam-split-left {
    flex: 2;
}

.iam-split-right {
    flex: 1;
}

/* =========================
   STACK / INLINE
========================= */
.iam-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iam-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   SCROLL
========================= */
.iam-scroll {
    overflow-y: auto;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {

    .iam-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .iam-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .iam-layout {
        flex-direction: column;
    }

    .iam-layout-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .iam-layout-header {
        height: auto;
        padding: 10px;
    }

    .iam-layout-content {
        padding: 15px;
    }

    .iam-grid-2,
    .iam-grid-3,
    .iam-grid-4 {
        grid-template-columns: 1fr;
    }

    .iam-split {
        flex-direction: column;
    }
}
