   <style>
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f3f4f6;
    color: #111827;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 248px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 18px 12px;
    position: fixed;
    height: 100vh;
    border-right: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 36px;
    letter-spacing: .2px;
}

.logo span {
    color: #60a5fa;
}

.nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 12px;
}

.nav-title {
    font-size: 11px;
    color: #9ca3af;
    margin: 22px 0 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d1d5db;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 15px;
    transition: background .15s ease, color .15s ease;
}

.nav a:hover {
    background: #1f2937;
    color: #fff;
}

.nav a.active {
    background: #1d4ed8;
    color: #fff;
    font-weight: 600;
}

/* MAIN */
.main {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 32px;
}

/* TOPBAR */
.topbar {
    background: #fff;
    padding: 24px 28px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    margin-bottom: 26px;
}

.topbar h1 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}

.topbar p {
    margin-top: 4px;
    color: #6b7280;
    font-size: 15px;
}

.user-box {
    background: #ecfdf5;
    color: #047857;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #a7f3d0;
}

/* KPI CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.card h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 14px;
    font-weight: 600;
}

.card .value {
    font-size: 34px;
    font-weight: 700;
    color: #111827;
}

/* MODULE */
.modules {
    background: #fff;
    border-radius: 12px;
    padding: 26px;
    border: 1px solid #e5e7eb;
}

.modules h2 {
    font-size: 22px;
    margin-bottom: 22px;
    color: #111827;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.module {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: #111827;
    background: #fff;
    transition: border .15s ease, background .15s ease, transform .15s ease;
}

.module:hover {
    border-color: #2563eb;
    background: #f8fafc;
    transform: translateY(-2px);
}

.module strong {
    display: block;
    font-size: 17px;
    margin-bottom: 8px;
    font-weight: 700;
}

.module p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 800px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .layout {
        flex-direction: column;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }
}
.sidebar-search {
    margin-bottom: 14px;
}

.sidebar-search input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    border: 1px solid #374151;
    background: #0f172a;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.sidebar-search input::placeholder {
    color: #9ca3af;
}

.sidebar-search input:focus {
    border-color: #3b82f6;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.quick-actions a {
    text-align: center;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 9px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.quick-actions a:hover {
    background: #1d4ed8;
}

.nav {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding-right: 4px;
}

.nav::-webkit-scrollbar {
    width: 6px;
}

.nav::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 99px;
}

.nav a.hidden {
    display: none;
}
.sidebar {
    width: 248px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 18px 12px;
    position: fixed;
    height: 100vh;
    border-right: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
}

.sidebar-head {
    margin-bottom: 16px;
    padding: 0 2px;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2px;
    margin-bottom: 2px;
}

.logo span {
    color: #60a5fa;
}

.sidebar-subtitle {
    font-size: 11px;
    color: #9ca3af;
}

.sidebar-search {
    margin-bottom: 10px;
}

.sidebar-search input {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0b1220;
    color: #fff;
    font-size: 12px;
    outline: none;
}

.sidebar-search input::placeholder {
    color: #94a3b8;
}

.sidebar-search input:focus {
    border-color: #3b82f6;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 10px;
}

.quick-actions a {
    text-align: center;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 8px 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.quick-actions a:hover {
    background: #1d4ed8;
}

.sidebar-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 10px;
}

.sidebar-info div {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 8px;
}

.sidebar-info strong {
    display: block;
    font-size: 15px;
    line-height: 1;
}

.sidebar-info span {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

.nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.nav::-webkit-scrollbar {
    width: 5px;
}

.nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 99px;
}

.nav-group {
    margin-bottom: 8px;
}

.nav-title {
    width: 100%;
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 10px;
    margin: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: left;
    cursor: pointer;
    padding: 4px 6px;
}

.nav-title::after {
    content: "▾";
    float: right;
    color: #64748b;
}

.nav-group.collapsed a {
    display: none;
}

.nav-group.collapsed .nav-title::after {
    content: "▸";
}

.nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #d1d5db;
    text-decoration: none;
    padding: 8px 9px;
    border-radius: 7px;
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 1.2;
    transition: background .15s ease, color .15s ease;
}

.nav a span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav a:hover {
    background: #1f2937;
    color: #fff;
}

.nav a.active {
    background: #1d4ed8;
    color: #fff;
    font-weight: 700;
}

.nav a.hidden {
    display: none;
}

.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid #1f2937;
    padding-top: 8px;
    margin-top: 8px;
}

.sidebar-footer a {
    display: block;
    color: #fecaca;
    text-decoration: none;
    background: #1f2937;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
}

.sidebar-footer a:hover {
    background: #7f1d1d;
    color: #fff;
}
@media (max-height: 760px) {
    .sidebar {
        padding: 12px 10px;
    }

    .sidebar-info {
        display: none;
    }

    .nav a {
        padding: 7px 8px;
        font-size: 12.5px;
    }

    .nav-title {
        margin: 5px 0 3px;
    }

    .sidebar-footer a {
        padding: 8px 9px;
        font-size: 12.5px;
    }
}
    </style>