:root {
    --brand-dark: #131a2b;
    --brand-primary: #3d5afe;
    --brand-primary-light: #6b83ff;
    --sidebar-width: 250px;
    --topbar-height: 60px;
    --bg-soft: #f4f6fb;
}

* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

body {
    background: var(--bg-soft);
    margin: 0;
}

#app-wrapper { min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--brand-dark);
    color: #cfd6e8;
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
    z-index: 1000;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1.25rem 1.25rem;
    font-weight: 700;
    color: #fff;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand i { color: var(--brand-primary-light); font-size: 1.4rem; }
.sidebar-brand small { display: block; font-weight: 400; font-size: .68rem; color: #8a93ad; }

.sidebar-nav { padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: .25rem; }

.sidebar-section-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7492;
    padding: .9rem .9rem .25rem;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .9rem;
    border-radius: 10px;
    color: #b7bfd6;
    text-decoration: none;
    font-size: .92rem;
    transition: all .15s ease;
}
.sidebar-link i { width: 18px; text-align: center; opacity: .85; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    color: #fff;
    box-shadow: 0 4px 10px rgba(61,90,254,0.35);
}

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e6e9f2;
    position: sticky;
    top: 0;
    z-index: 900;
}
.page-title { color: #1b2233; font-weight: 600; }

.main-content { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Cards / Stat widgets ---- */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    border: 1px solid #eceffa;
    box-shadow: 0 2px 10px rgba(20,30,60,0.03);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card .icon-box {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}
.stat-card .value { font-size: 1.5rem; font-weight: 700; color: #1b2233; }
.stat-card .label { color: #8a93ad; font-size: .8rem; }

.bg-icon-blue { background: linear-gradient(135deg,#3d5afe,#6b83ff); }
.bg-icon-green { background: linear-gradient(135deg,#12b886,#38d9a9); }
.bg-icon-orange { background: linear-gradient(135deg,#f76707,#ffa94d); }
.bg-icon-purple { background: linear-gradient(135deg,#7048e8,#a389f4); }

.card, .table-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eceffa;
    box-shadow: 0 2px 10px rgba(20,30,60,0.03);
}

.file-row:hover { background: #f7f9fe; }
.file-icon-php { color: #6f42c1; }
.file-icon-folder { color: #f7b955; }

.CodeMirror {
    height: 65vh;
    border-radius: 10px;
    border: 1px solid #e0e4ef;
    font-size: 14px;
}

.badge-soft-primary { background: #e8ecff; color: #3d5afe; }
.badge-soft-danger { background: #ffe3e3; color: #e03131; }
.badge-soft-success { background: #dbf9ee; color: #12b886; }

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        height: 100vh;
    }
    .sidebar.show { transform: translateX(0); }
}
