* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f6f9;
    color: #172033;
}

.client-topbar {
    height: 68px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    color: white;
    background: linear-gradient(to right, #001f3f, #8B0000);
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.client-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 800;
}

.client-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 3px;
}

.client-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.client-top-actions a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
}

.client-top-actions a:hover {
    background: rgba(255,255,255,0.16);
}

.client-top-actions .logout {
    background: #ffd15c;
    color: #1f2937;
}

.client-sidebar {
    width: 260px;
    position: fixed;
    top: 68px;
    left: 0;
    bottom: 0;
    z-index: 900;
    padding: 20px 14px;
    background: #0a1f44;
    overflow-y: auto;
    box-shadow: 6px 0 24px rgba(15,23,42,0.12);
}

.client-menu-title {
    color: #a7b4c8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 4px 10px 12px;
}

.client-menu {
    display: grid;
    gap: 8px;
}

.client-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border-left: 4px solid transparent;
    font-weight: 700;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.client-menu a:hover,
.client-menu a.active {
    background: linear-gradient(to right, #8B0000, #001f3f);
    border-left-color: #ffd15c;
    transform: translateX(3px);
}

.nav-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    border-radius: 8px;
    background: rgba(255,255,255,0.14);
    font-size: 12px;
    font-weight: 900;
}

.main {
    margin-left: 260px !important;
    margin-top: 68px;
    padding: 30px;
    min-height: calc(100vh - 68px);
}

.header,
body > .sidebar {
    display: none !important;
}

.card,
.form-box,
.container,
.box {
    border: 1px solid #e4e9f2;
    box-shadow: 0 10px 24px rgba(15,23,42,0.08) !important;
}

body > .box {
    margin-top: 108px;
}

@media (min-width: 861px) {
    body > .box {
        width: min(720px, calc(100vw - 340px));
        margin-left: calc(260px + ((100vw - 260px - min(720px, calc(100vw - 340px))) / 2));
        margin-right: auto;
    }
}

button,
.download {
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.download:hover {
    transform: translateY(-2px);
}
.client-menu-toggle{display:none;border:1px solid rgba(255,255,255,.3);background:white;color:#061a33;border-radius:8px;padding:11px 14px;font-weight:900;min-height:46px}

@media (max-width: 860px) {
    .client-topbar {
        height: auto;
        min-height: 68px;
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 16px;
    }

    .client-sidebar {
        position: static;
        width: 100%;
        margin-top: 104px;
        padding: 12px;
    }

    .client-menu {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .main {
        margin-left: 0 !important;
        margin-top: 0;
        padding: 18px;
    }

    body > .box {
        width: calc(100% - 24px);
        margin: 18px auto;
    }
}

@media (max-width: 560px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .client-topbar {
        position: static;
        padding: 12px;
        gap: 12px;
    }

    .client-brand {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .client-top-actions {
        width: 100%;
        display: none;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .client-top-actions.open{display:grid}
    .client-menu-toggle{display:block;width:100%}

    .client-top-actions a {
        display: block;
        width: 100%;
        text-align: center;
        background: rgba(255,255,255,0.1);
    }

    .client-sidebar {
        display:none;
        margin-top:0;
        padding:10px;
        border-bottom:4px solid #d8a31a;
    }
    .client-sidebar.open{display:block}

    .client-menu {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 14px;
    }

    .card,
    .form-box,
    .container,
    .box {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
        border-radius: 8px;
    }

    .row {
        row-gap: 12px;
    }

    button,
    .btn,
    .download,
    input[type="submit"] {
        width: 100%;
        display: block;
        white-space: normal;
        text-align: center;
        margin-bottom: 8px;
    }

    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 680px;
    }
}
