/* =========================================================
   ACTIONS TRACKER V7 ENTERPRISE UI - COMPACT
========================================================= */

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

html,
body{
    width:100%;
    height:100%;
    font-family:Segoe UI, Arial, sans-serif;
    background:#eef2f8;
    color:#0f172a;
}

.app-shell{
    display:flex;
    width:100%;
    min-height:100vh;
}

/* SIDEBAR */

.sidebar{
    width:260px;
    min-width:260px;
    background:linear-gradient(180deg,#02142f 0%,#041b42 100%);
    color:white;
    display:flex;
    flex-direction:column;
    padding:20px 16px;
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    overflow-y:auto;
    box-shadow:0 0 24px rgba(0,0,0,0.22);
    z-index:100;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:26px;
}

.brand-logo{
    width:48px;
    height:48px;
    border-radius:16px;
    background:linear-gradient(135deg,#2563eb,#4f8cff);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:800;
}

.brand-text h1{
    font-size:16px;
    font-weight:800;
    line-height:1.2;
}

.brand-text p{
    font-size:12px;
    opacity:0.8;
    margin-top:3px;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.menu a{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:white;
    padding:12px 14px;
    border-radius:15px;
    transition:0.2s;
    font-size:14px;
    font-weight:600;
}

.menu a:hover{
    background:rgba(255,255,255,0.08);
}

.menu a.active{
    background:linear-gradient(90deg,#1f5eff,#356fff);
    box-shadow:0 8px 18px rgba(37,99,235,0.28);
}

.menu-icon{
    font-size:20px;
}

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

.footer-title{
    font-size:13px;
    font-weight:700;
}

.footer-subtitle{
    margin-top:5px;
    font-size:12px;
    opacity:0.7;
    line-height:1.4;
}

/* MAIN */

.main{
    flex:1;
    margin-left:260px;
    min-height:100vh;
}

/* TOPBAR */

.topbar{
    height:85px;
    background:white;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 28px;
    border-bottom:1px solid #dfe7f2;
}

.topbar h2{
    font-size:28px;
    font-weight:800;
}

.topbar p{
    margin-top:4px;
    font-size:15px;
    color:#64748b;
}

.topbar-badge{
    background:#dbeafe;
    color:#2563eb;
    padding:9px 16px;
    border-radius:14px;
    font-weight:800;
    font-size:13px;
}

/* CONTENT */

.content{
    padding:20px;
    overflow-x:auto;
}

/* SECTION */

.section{
    background:white;
    border-radius:18px;
    padding:22px;
    margin-bottom:20px;
    box-shadow:0 6px 18px rgba(15,23,42,0.05);
}

.section h2{
    font-size:20px;
    font-weight:800;
    margin-bottom:18px;
}

/* GRID */

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:18px;
}

.filter-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

/* KPI */

.kpi-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
    gap:18px;
    margin-bottom:22px;
}

.kpi{
    background:white;
    border-radius:18px;
    padding:22px;
    border-left:6px solid #2f6bff;
    box-shadow:0 6px 16px rgba(15,23,42,0.05);
}

.kpi h3{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.7px;
    color:#64748b;
    margin-bottom:12px;
}

.kpi .value{
    font-size:42px;
    font-weight:800;
}

/* COLORS */

.blue{ color:#2563eb; }
.green{ color:#16a34a; }
.red{ color:#dc2626; }
.orange{ color:#f59e0b; }

/* INPUTS */

label{
    display:block;
    margin-bottom:7px;
    font-weight:700;
    font-size:14px;
}

input,
select{
    width:100%;
    height:46px;
    border:1px solid #d7e0ee;
    border-radius:14px;
    padding:0 14px;
    font-size:14px;
    background:white;
    transition:0.2s;
}

input:focus,
select:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,0.12);
}

/* BUTTONS */

button,
.btn{
    height:46px;
    border:none;
    border-radius:14px;
    padding:0 22px;
    background:linear-gradient(90deg,#2563eb,#4f84ff);
    color:white;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:0.2s;
    box-shadow:0 8px 18px rgba(37,99,235,0.25);
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

button:hover,
.btn:hover{
    transform:translateY(-1px);
}

/* IMPORT CARDS */

.import-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:18px;
    margin-bottom:22px;
}

.import-card{
    background:white;
    border-radius:18px;
    padding:22px;
    box-shadow:0 6px 16px rgba(15,23,42,0.05);
    border:1px solid #e2e8f0;
}

.import-card h2{
    font-size:18px;
    margin-bottom:7px;
}

.import-card p{
    color:#64748b;
    font-size:13px;
    margin-bottom:15px;
    line-height:1.4;
}

.import-icon{
    width:42px;
    height:42px;
    border-radius:14px;
    background:#dbeafe;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    margin-bottom:14px;
}

/* TABLES */

.table-wrap{
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    border-radius:16px;
    scrollbar-width:thin;
    scrollbar-color:#2f6bff #dfe6f4;
}

.table-wrap::-webkit-scrollbar{
    height:12px;
}

.table-wrap::-webkit-scrollbar-track{
    background:#dfe6f4;
    border-radius:20px;
}

.table-wrap::-webkit-scrollbar-thumb{
    background:linear-gradient(90deg,#2f6bff,#4f84ff);
    border-radius:20px;
}

.table-wrap::-webkit-scrollbar-thumb:hover{
    background:#1f5cff;
}

table{
    width:max-content;
    min-width:1200px;
    border-collapse:collapse;
    background:white;
}

thead{
    background:#eff4fb;
}

thead th{
    position:sticky;
    top:0;
    z-index:5;
    text-align:left;
    padding:12px 14px;
    font-size:12px;
    font-weight:800;
    color:#475569;
    border-bottom:1px solid #dfe7f2;
    white-space:nowrap;
}

tbody td{
    padding:11px 14px;
    border-bottom:1px solid #edf2f7;
    font-size:13px;
    white-space:nowrap;
}

tbody tr:hover{
    background:#f8fbff;
}

/* BADGES */

.badge-ok,
.badge-ko,
.badge-warning{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:62px;
    height:28px;
    padding:0 12px;
    border-radius:999px;
    font-weight:800;
    font-size:11px;
}

.badge-ok{
    background:#dcfce7;
    color:#15803d;
}

.badge-ko{
    background:#fee2e2;
    color:#dc2626;
}

.badge-warning{
    background:#fef3c7;
    color:#f59e0b;
}

/* PROGRESS */

.progress{
    width:100%;
    height:18px;
    background:#e2e8f0;
    border-radius:999px;
    overflow:hidden;
    margin-top:10px;
}

.progress-fill{
    height:100%;
    background:linear-gradient(90deg,#16a34a,#22c55e);
    border-radius:999px;
}

/* ALERTS */

.error-box{
    border-left:6px solid #dc2626;
    background:#fff1f2;
}

.error-box h2{
    color:#b91c1c;
}

.success-box{
    border-left:6px solid #16a34a;
    background:#f0fdf4;
}

.success-box h2{
    color:#15803d;
}

/* CHARTS */

.chart-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:18px;
    margin-bottom:22px;
}

canvas{
    max-height:280px;
}

/* RESPONSIVE */

@media(max-width:1200px){
    .sidebar{
        width:240px;
        min-width:240px;
    }

    .main{
        margin-left:240px;
    }

    .topbar h2{
        font-size:24px;
    }

    .kpi .value{
        font-size:34px;
    }
}

@media(max-width:900px){
    .sidebar{
        position:relative;
        width:100%;
        min-width:100%;
        height:auto;
    }

    .app-shell{
        flex-direction:column;
    }

    .main{
        margin-left:0;
    }

    .topbar{
        flex-direction:column;
        align-items:flex-start;
        height:auto;
        gap:12px;
        padding:18px;
    }

    .content{
        padding:16px;
    }

    .kpi .value{
        font-size:32px;
    }
}