/* ============================================================
   Gestione Isole — stili globali
   ============================================================ */

:root {
    --sidebar-width: 240px;
    --sidebar-bg:    #1a2e1a;
    --sidebar-hover: #2d4a2d;
    --accent:        #198754;
}

/* ---------- Layout ---------- */

body {
    font-size: .9rem;
}

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

/* ---------- Sidebar ---------- */

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #cfe2cf;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    letter-spacing: .02em;
}

.sidebar-brand small {
    display: block;
    font-weight: 400;
    font-size: .72rem;
    color: #8eb88e;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: .5rem 0;
}

.sidebar-nav .nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6a8c6a;
    padding: 1rem 1rem .25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem;
    color: #b8d4b8;
    text-decoration: none;
    border-radius: 0;
    transition: background .15s, color .15s;
    font-size: .875rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--sidebar-hover);
    color: #fff;
}

.sidebar-nav a .icon {
    width: 18px;
    text-align: center;
    opacity: .8;
}

.sidebar-footer {
    padding: .75rem 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: .78rem;
    color: #6a8c6a;
}

/* ---------- Main content ---------- */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f4f6f4;
    min-height: 100vh;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar .page-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.page-body {
    padding: 1.5rem;
    flex: 1;
}

/* ---------- Stat cards ---------- */

.stat-card {
    border: none;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: .15rem;
}

.stat-card .stat-label {
    font-size: .78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---------- Tables ---------- */

.table-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    overflow: hidden;
}

.table-card .table {
    margin: 0;
}

.table-card .table th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
    border-top: none;
    background: #f8f9fa;
}

/* ---------- Login ---------- */

.login-logo svg {
    filter: drop-shadow(0 2px 4px rgba(25,135,84,.3));
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
}
