:root {
    --mai-teal: #2aa4b3;
    --mai-teal-dark: #167d89;
    --mai-red: #b83232;
    --mai-black: #090909;
    --mai-gray: #8f8f93;
    --mai-bg: #f4f7f8;
    --mai-soft: #e8f7f9;
}

* {
    box-sizing: border-box
}

body {
    font-family: "Cairo","Segoe UI",Tahoma,Arial,sans-serif;
    background: var(--mai-bg);
    color: #172327;
    min-height: 100vh
}

a {
    text-decoration: none
}

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

.app-sidebar {
    width: 286px;
    background: linear-gradient(180deg,#050505,#12181a);
    color: #fff;
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    padding: 22px;
    display: flex;
    flex-direction: column;
    z-index: 20
}

.brand-box {
    background: #fff;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 24px;
    box-shadow: 0 18px 45px rgba(0,0,0,.28)
}

    .brand-box img {
        display: block;
        max-width: 100%;
        margin: auto
    }

.side-nav {
    gap: 8px
}

    .side-nav .nav-link {
        color: rgba(255,255,255,.8);
        border-radius: 16px;
        padding: 12px 14px;
        font-weight: 700
    }

        .side-nav .nav-link:hover, .side-nav .nav-link.active {
            background: rgba(42,164,179,.18);
            color: #fff
        }

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

.app-main {
    margin-inline-start: 286px;
    width: calc(100% - 286px);
    padding: 26px
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    background: #fff;
    border-radius: 26px;
    padding: 22px 24px;
    box-shadow: 0 10px 35px rgba(20,42,48,.06);
    border: 1px solid #edf2f3
}

    .topbar h1 {
        font-size: 1.55rem;
        margin: 0;
        font-weight: 900;
        color: #152529
    }

.eyebrow {
    color: var(--mai-teal);
    font-weight: 900;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: .78rem
}

.btn-mai {
    background: linear-gradient(135deg,var(--mai-teal),var(--mai-teal-dark));
    border-color: var(--mai-teal);
    color: #fff !important;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(42,164,179,.24)
}

    .btn-mai:hover {
        filter: brightness(.95);
        color: #fff
    }

.btn-outline-mai, .btn-outline-mai:visited {
    color: var(--mai-teal-dark);
    border-color: var(--mai-teal);
    border-radius: 14px;
    font-weight: 800
}

    .btn-outline-mai:hover {
        background: var(--mai-teal);
        color: #fff
    }

.panel {
    background: #fff;
    border: 1px solid #e8eff1;
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 14px 40px rgba(20,42,48,.06)
}

.panel-title {
    font-size: 1.08rem;
    font-weight: 900;
    color: #14282d;
    margin-bottom: 16px
}

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

.kpi-card {
    background: #fff;
    border-radius: 24px;
    padding: 18px;
    border: 1px solid #e9eff1;
    box-shadow: 0 12px 30px rgba(20,42,48,.05);
    position: relative;
    overflow: hidden
}

    .kpi-card:before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 0;
        width: 7px;
        height: 100%;
        background: linear-gradient(var(--mai-teal),var(--mai-red))
    }

    .kpi-card span {
        display: block;
        color: #758388;
        font-size: .86rem;
        font-weight: 800
    }

    .kpi-card strong {
        display: block;
        font-size: 1.5rem;
        color: #16282d;
        margin-top: 6px
    }

.summary-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
    gap: 12px
}

    .summary-ribbon div {
        background: linear-gradient(135deg,#fff,#f6fdfe);
        border: 1px solid #dceff2;
        border-radius: 20px;
        padding: 14px
    }

    .summary-ribbon span {
        display: block;
        color: #697a80;
        font-size: .78rem;
        font-weight: 800
    }

    .summary-ribbon strong {
        font-size: 1.25rem;
        color: var(--mai-teal-dark)
    }

.wizard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 18px
}

.wizard-nav {
    background: #fff;
    border: 1px solid #e8eff1;
    border-radius: 24px;
    padding: 12px;
    height: max-content;
    position: sticky;
    top: 20px
}

    .wizard-nav button {
        display: block;
        width: 100%;
        border: 0;
        background: transparent;
        text-align: right;
        padding: 12px 14px;
        border-radius: 14px;
        margin-bottom: 4px;
        font-weight: 800;
        color: #52666b
    }

        .wizard-nav button.active, .wizard-nav button:hover {
            background: var(--mai-soft);
            color: var(--mai-teal-dark)
        }

.wizard-content {
    background: #fff;
    border: 1px solid #e8eff1;
    border-radius: 26px;
    padding: 22px;
    box-shadow: 0 14px 40px rgba(20,42,48,.06)
}

.wizard-section {
    display: none
}

    .wizard-section.active {
        display: block
    }

.form-control, .form-select {
    border-radius: 13px;
    border-color: #dfe8eb;
    min-height: 42px
}

    .form-control:focus, .form-select:focus {
        border-color: var(--mai-teal);
        box-shadow: 0 0 0 .22rem rgba(42,164,179,.14)
    }

.editable-table thead th {
    background: #f2fbfc;
    color: #254148;
    font-size: .84rem;
    white-space: nowrap
}

.editable-table td {
    vertical-align: middle
}

.editable-table input, .editable-table select {
    min-width: 110px
}

.allowances {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 130px
}

.row-total {
    font-weight: 900;
    color: var(--mai-teal-dark);
    white-space: nowrap
}

.group-row td {
    background: #0d1b1f !important;
    color: #fff !important;
    font-weight: 900
}

.indicator-table input {
    min-width: 120px
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px
}

    .review-grid div {
        background: #f7fbfc;
        border: 1px solid #e1eff2;
        border-radius: 20px;
        padding: 18px
    }

    .review-grid span {
        display: block;
        color: #697a80;
        font-weight: 800
    }

    .review-grid strong {
        display: block;
        color: #14282d;
        font-size: 1.55rem;
        margin-top: 5px
    }

.sticky-actions {
    position: sticky;
    bottom: 14px;
    margin-top: 18px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(10px);
    border: 1px solid #e2eff2;
    border-radius: 22px;
    padding: 12px;
    display: flex;
    gap: 8px;
    box-shadow: 0 12px 30px rgba(20,42,48,.12);
    z-index: 10
}

.login-page {
    background: #000;
    min-height: 100vh
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 60% 20%,rgba(42,164,179,.28),transparent 30%),radial-gradient(circle at 35% 75%,rgba(184,50,50,.18),transparent 26%),#050505
}

.login-card {
    width: min(460px,92vw);
    background: rgba(255,255,255,.97);
    border-radius: 34px;
    padding: 32px;
    box-shadow: 0 25px 90px rgba(0,0,0,.45);
    text-align: center
}

.login-logo {
    background: #fff;
    border-radius: 28px;
    padding: 18px;
    margin-bottom: 20px
}

    .login-logo img {
        max-width: 260px;
        width: 100%
    }

.login-card h2 {
    font-weight: 900;
    color: #11252a
}

.login-card p {
    color: #78878a
}

.report-actions {
    margin-bottom: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.report-page {
    background: #fff;
    border-radius: 26px;
    padding: 34px;
    box-shadow: 0 14px 45px rgba(20,42,48,.08)
}

.report-cover {
    text-align: center;
    border-bottom: 4px solid var(--mai-teal);
    padding: 20px 0 34px;
    margin-bottom: 28px
}

    .report-cover img {
        max-width: 240px;
        background: #000;
        border-radius: 20px;
        padding: 12px
    }

    .report-cover h1 {
        font-weight: 900;
        margin-top: 20px
    }

    .report-cover h2 {
        color: var(--mai-teal-dark);
        font-weight: 900
    }

.report-section {
    margin-bottom: 28px
}

    .report-section h3 {
        font-weight: 900;
        border-right: 6px solid var(--mai-teal);
        padding-right: 12px;
        margin-bottom: 14px
    }

.table {
    --bs-table-hover-bg: #f4fbfc
}

.dataTables_wrapper .dt-search input {
    border-radius: 12px;
    border: 1px solid #dfe8eb;
    padding: 8px 12px;
    margin-right: 8px
}

.dataTables_wrapper .dt-length select {
    border-radius: 12px;
    border: 1px solid #dfe8eb;
    padding: 4px 18px
}

@media(max-width:1100px) {
    .app-sidebar {
        position: relative;
        width: 100%;
        inset: auto
    }

    .app-shell {
        display: block
    }

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

    .kpi-grid, .summary-ribbon {
        grid-template-columns: repeat(2,1fr)
    }

    .wizard-layout {
        grid-template-columns: 1fr
    }

    .wizard-nav {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2,1fr);
        gap: 6px
    }

    .review-grid {
        grid-template-columns: 1fr
    }
}

@media print {
    .app-sidebar, .topbar, .sticky-actions, .report-actions, .no-print {
        display: none !important
    }

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

    .report-page {
        box-shadow: none;
        border-radius: 0;
        padding: 0
    }

    .panel {
        box-shadow: none
    }

    .table {
        font-size: 12px
    }

    body {
        background: #fff
    }
}
