:root{
    --green:#2c7a2c;
    --green-light:#e8f5e9;
    --green-soft:#66bb6a;
    --text:#1f2937;
    --muted:#667085;
    --bg:#f4f6f9;
    --card:#ffffff;
    --border:#e5e7eb;
}

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

body{
    font-family:Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

.app-layout{
    display:flex;
    min-height:100vh;
}

/* SIDEBAR */

.app-sidebar{
    width:260px;
    height:100vh;
    position:fixed;
    top:0;
    left:0;
    background:#ffffff;
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
    box-shadow:2px 0 10px rgba(0,0,0,0.04);
    z-index:100;
}

.sidebar-logo{
    display:block;
    padding:28px 18px 24px;
    text-decoration:none;
    border-bottom:1px solid var(--border);
    overflow:hidden;
}

.word-logo{
    font-family:Georgia, "Times New Roman", serif;
    font-size:40px;
    font-weight:900;
    line-height:0.9;
    letter-spacing:-4px;
    color:#1f6b2a;
    white-space:nowrap;
}

/* NAVIGATION */

.sidebar-nav{
    flex:1;
    padding:18px 14px;
    display:flex;
    flex-direction:column;
}

.sidebar-link{
    display:block;
    width:100%;
    padding:13px 14px;
    margin-bottom:6px;
    border-radius:10px;
    color:var(--text);
    text-decoration:none;
    font-weight:600;
    transition:0.2s;
}

.sidebar-link:hover{
    background:var(--green-light);
    color:var(--green);
}

.sidebar-link.active{
    background:var(--green);
    color:#ffffff;
}

/* PROFILE */

.sidebar-profile{
    padding:16px 14px;
    border-top:1px solid var(--border);
}

.profile-name{
    font-weight:bold;
    margin-bottom:10px;
    color:var(--text);
}

.sidebar-profile a{
    display:block;
    width:100%;
    padding:10px 12px;
    border-radius:8px;
    color:var(--text);
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.sidebar-profile a:hover{
    background:var(--green-light);
    color:var(--green);
}

.logout-link{
    color:#b00020 !important;
    margin-top:10px;
    border-top:1px solid var(--border);
    padding-top:14px !important;
}

/* MAIN CONTENT */

.app-main{
    margin-left:260px;
    width:calc(100% - 260px);
    min-height:100vh;
}

.app-content{
    padding:35px;
}

/* TYPOGRAPHY */

h1{
    margin-bottom:6px;
    font-size:36px;
}

.subtitle{
    color:var(--muted);
    margin-bottom:30px;
}

.section-title{
    margin-top:35px;
    margin-bottom:15px;
    color:var(--green);
    font-size:22px;
}

/* KPI GRID */

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

.kpi-card{
    background:var(--card);
    padding:22px;
    border-radius:16px;
    border-left:5px solid var(--green);
    box-shadow:0 2px 8px rgba(0,0,0,0.06);
}

.kpi-label{
    color:var(--muted);
    font-size:14px;
}

.kpi-number{
    font-size:36px;
    font-weight:bold;
    margin-top:10px;
    color:var(--green);
}

.kpi-note{
    font-size:13px;
    color:var(--muted);
    margin-top:8px;
}

/* CHARTS */

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

.chart-card{
    background:var(--card);
    padding:20px;
    border-radius:16px;
    box-shadow:0 2px 8px rgba(0,0,0,0.06);
}

.chart-title{
    font-weight:bold;
    margin-bottom:12px;
    display:flex;
    align-items:center;
    gap:8px;
}

.info-icon{
    font-size:13px;
    color:var(--muted);
    cursor:pointer;
}

/* FORMS */

.container{
    display:flex;
    gap:30px;
}

.form-box,
.table-box{
    background:var(--card);
    padding:25px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
}

.form-box{
    width:400px;
}

.table-box{
    flex:1;
    overflow:auto;
}

input,
select,
textarea{
    width:100%;
    padding:12px;
    margin-bottom:12px;
    border:1px solid var(--border);
    border-radius:6px;
}

textarea{
    height:90px;
}

button{
    background:var(--green);
    color:white;
    border:none;
    padding:12px 20px;
    border-radius:6px;
    cursor:pointer;
}

/* TABLES */

table{
    width:100%;
    border-collapse:collapse;
    font-size:14px;
}

th,
td{
    border-bottom:1px solid var(--border);
    padding:10px;
    text-align:left;
    vertical-align:top;
}

th{
    background:#fafafa;
}

/* BADGES */

.badge{
    display:inline-block;
    padding:4px 8px;
    border-radius:20px;
    background:var(--green-light);
    color:var(--green);
    font-size:12px;
    font-weight:bold;
}

.suspended{
    background:#fff3cd;
    color:#9a6700;
}

.small{
    font-size:12px;
    color:var(--muted);
    margin-top:6px;
}

/* ACTIONS */

.actions a{
    display:inline-block;
    margin-right:8px;
    color:var(--green);
    text-decoration:none;
    font-weight:bold;
}

.actions .delete{
    color:#b00020;
}

/* RESPONSIVE */

@media(max-width:900px){

    .app-sidebar{
        width:100%;
        height:auto;
        position:relative;
    }

    .app-main{
        margin-left:0;
        width:100%;
    }

    .chart-grid,
    .kpi-grid{
        grid-template-columns:1fr;
    }
}

/* SETTINGS SUBMENU */

.sidebar-group{
    margin-bottom:6px;
}

.sidebar-group-title{
    cursor:default;
}

.sidebar-submenu{
    display:flex;
    flex-direction:column;
    padding-left:14px;
    margin-top:-2px;
    margin-bottom:8px;
}

.sidebar-sublink{
    display:block;
    padding:9px 14px;
    margin-bottom:4px;
    border-radius:8px;
    color:var(--muted);
    text-decoration:none;
    font-size:14px;
    font-weight:600;
}

.sidebar-sublink:hover{
    background:var(--green-light);
    color:var(--green);
}

.sidebar-sublink.active{
    background:var(--green-light);
    color:var(--green);
}

/* SETTINGS SUBMENU OPEN / CLOSED */

.sidebar-submenu.submenu-closed{
    display:none;
}

.sidebar-submenu.submenu-open{
    display:flex;
    flex-direction:column;
}

/* FIX SETTINGS BUTTON BEHAVIOR */

button.sidebar-link{
    text-align:left;
    font-family:Arial, sans-serif;
    font-size:inherit;
    border:none;
    background:transparent;
    color:var(--text);
}

button.sidebar-link:hover{
    background:var(--green-light);
    color:var(--green);
}

button.sidebar-link.active{
    background:var(--green);
    color:#ffffff;
}