/* =========================================================
   ATRANS INCENTIVE — GLOBAL THEME
========================================================= */

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --line: #e5e7eb;

    --atrans-deep-teal: #067983;
    --atrans-bright-teal: #29A3B6;
    --atrans-dark-teal: #104355;
    --atrans-white: #F2F5F2;
    --atrans-charcoal: #091315;
    --atrans-royal-blue: #1D86E7;
    --atrans-navy: #123B63;
    --atrans-lime-green: #B8D632;
    --atrans-fresh-green: #8FD02F;
    --atrans-silver: #C8CCD0;
    --atrans-graphite: #5A6B6C;
    --atrans-asphalt: #3A474E;
    --atrans-blue-gray: #A3CBD1;

    --danger: #b91c1c;
    --warn: #b45309;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Inter, Arial, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);

    background:
        linear-gradient(
            135deg,
            #dff7fb 0%,
            #eef9ef 35%,
            #f4fbff 100%
        );
}

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================================
   MAIN LAYOUT
========================================================= */

.shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--line);
}

.topbar .nav {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    flex-wrap: nowrap;
}


/* =========================================================
   BRAND
========================================================= */

.top-brand {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--atrans-charcoal);
    font-weight: 800;

    flex-shrink: 0;
}

.top-brand img {
    width: auto;
    height: 34px;
    max-width: 44px;
    object-fit: contain;

    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;

    font-size: 18px;
    font-weight: 800;
    line-height: 1;

    white-space: nowrap;
}

.brand-line {
    display: block;
}


/* =========================================================
   NAVIGATION
========================================================= */

.links {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;
    flex-wrap: nowrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 9px 12px;
    border-radius: 10px;

    color: #4b5563;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.nav-link:hover {
    background: #eef7f3;
    color: var(--atrans-deep-teal);
}

.nav-link.active {
    background: #e8f4f2;
    color: var(--atrans-deep-teal);
}

.nav-icon {
    display: none;

    width: 21px;
    height: 21px;
}

.logout-form {
    display: flex;
    margin: 0;
}

.linkbtn {
    border: 0;
    background: transparent;

    cursor: pointer;

    font: inherit;
    color: inherit;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin: 18px 0 20px;
}

.hero h1 {
    margin: 0 0 5px;

    font-size: 30px;
}


/* =========================================================
   TEXT
========================================================= */

.muted {
    color: var(--muted);
    line-height: 1.5;
}


/* =========================================================
   GRID / CARD
========================================================= */

.grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.card {
    background: var(--card);

    border: 1px solid var(--line);
    border-radius: 18px;

    padding: 18px;

    box-shadow: 0 8px 24px rgba(30, 41, 59, 0.04);
}

.metric {
    margin-top: 6px;

    font-size: 30px;
    font-weight: 800;
}


/* =========================================================
   STATUS PILLS
========================================================= */

.pill {
    display: inline-flex;

    padding: 6px 10px;

    border-radius: 999px;

    background: var(--atrans-blue-gray);
    color: var(--atrans-dark-teal);

    font-weight: 700;
    font-size: 12px;
}

.pill.pending {
    background: var(--atrans-silver);
    color: var(--atrans-asphalt);
}

.pill.approved {
    background: var(--atrans-fresh-green);
    color: var(--atrans-charcoal);
}


/* =========================================================
   LIST / KPI ITEMS
========================================================= */

.list {
    display: grid;
    gap: 14px;
}

.item {
    background: #ffffff;

    border: 1px solid var(--line);
    border-radius: 16px;

    padding: 16px;
}

.item h3 {
    margin: 0 0 5px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.money {
    color: var(--atrans-deep-teal);

    font-size: 20px;
    font-weight: 800;
}


/* =========================================================
   FORM
========================================================= */

.stack {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.label {
    margin-top: 4px;

    color: #0f172a;

    font-size: 14px;
    font-weight: 700;
}

.formgrid {
    display: grid;
    grid-template-columns: 1fr 150px;

    gap: 10px;

    margin-top: 14px;
}

.input,
.select,
.textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d6dbe3;
    border-radius: 12px;

    outline: none;

    font: inherit;

    background: #ffffff;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--atrans-bright-teal);

    box-shadow:
        0 0 0 4px rgba(41, 163, 182, 0.12);
}

.textarea {
    min-height: 75px;

    resize: vertical;
}


/* =========================================================
   PASSWORD
========================================================= */

.password-wrap {
    position: relative;

    display: flex;
    align-items: center;
}

.password-wrap .input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;

    right: 14px;
    top: 50%;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.password-toggle img {
    display: block;

    width: 22px;
    height: 22px;

    opacity: 0.72;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 16px;

    border: 0;
    border-radius: 12px;

    background:
        linear-gradient(
            90deg,
            #29A3B6 0%,
            #1D86E7 48%,
            #8FD02F 100%
        );

    color: #ffffff;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(29, 134, 231, 0.16);

    transition:
        transform 0.18s ease,
        opacity 0.18s ease,
        background 0.18s ease;
}

.btn:hover {
    opacity: 0.96;

    transform: translateY(-1px);
}

.btn.full,
.full {
    width: 100%;
}

.btn.secondary {
    background: #eef2f7;
    color: #263248;

    box-shadow: none;
}

.btn.danger {
    background: var(--danger);
}


/* DETAIL */

.btn.btn-detail {
    min-height: 34px;

    padding: 8px 14px;

    border: 1px solid var(--atrans-blue-gray);
    border-radius: 10px;

    background: #EAF4F6;

    color: var(--atrans-dark-teal);

    font-size: 14px;
    line-height: 1;

    box-shadow: none;
}

.btn.btn-detail:hover {
    background: #DCECEF;

    color: var(--atrans-charcoal);
}


/* APPROVE */

.btn.btn-approve {
    min-height: 34px;

    padding: 8px 14px;

    border: 1px solid var(--atrans-lime-green);
    border-radius: 10px;

    background: #EEF6E3;

    color: #486118;

    font-size: 14px;
    line-height: 1;

    box-shadow: none;
}

.btn.btn-approve:hover {
    background: #E1EFCB;

    color: var(--atrans-charcoal);
}


/* APPROVE ALL */

.btn.btn-approve-all {
    background: var(--atrans-deep-teal);

    color: var(--atrans-white);

    border: 1px solid var(--atrans-deep-teal);

    box-shadow:
        0 6px 18px rgba(6, 121, 131, 0.16);
}

.btn.btn-approve-all:hover {
    background: var(--atrans-dark-teal);

    border-color: var(--atrans-dark-teal);
}


/* =========================================================
   SAVE ALL BUTTON
========================================================= */

.save-all-container {
    position: sticky;

    bottom: 20px;

    z-index: 20;

    display: flex;
    justify-content: center;

    margin-top: 24px;

    padding: 10px;
}

.save-all-btn {
    width: 100%;
    max-width: 520px;

    padding: 16px 22px;

    border-radius: 16px;

    font-size: 16px;
    font-weight: 800;

    background:
        linear-gradient(
            90deg,
            #29A3B6 0%,
            #1D86E7 45%,
            #8FD02F 100%
        );

    box-shadow:
        0 12px 30px rgba(18, 163, 216, 0.24);
}


/* =========================================================
   ALERTS
========================================================= */

.alert {
    margin-bottom: 14px;

    padding: 12px 14px;

    border-radius: 12px;
}

.alert.ok {
    background: #ecfdf5;
    color: #065f46;
}

.alert.err {
    background: #fef2f2;
    color: #b91c1c;

    border: 1px solid #fecaca;
}


/* =========================================================
   TABLE
========================================================= */

.tablewrap {
    overflow: auto;
}

.table {
    width: 100%;

    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;

    border-bottom: 1px solid var(--line);

    text-align: left;

    white-space: nowrap;
}

.table th {
    color: var(--muted);

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 0.05em;
}


/* =========================================================
   LOGIN
========================================================= */

.login-page,
.loginwrap {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.loginbox {
    width: 100%;
    max-width: 560px;

    padding: 34px;

    background: #ffffff;

    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 24px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.08);
}

.loginbox h1 {
    margin: 0 0 8px;

    color: #0f172a;

    font-size: 28px;
    font-weight: 800;
}

.brand-wrap {
    display: flex;
    align-items: center;

    gap: 18px;

    margin-bottom: 22px;
}

.brand-logo {
    width: 74px;
    height: 74px;

    object-fit: contain;
}

.footerNote {
    margin-top: 20px;

    color: #6b7280;

    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 700px) {

    .master-form-grid {
        grid-template-columns: 1fr !important;
    }

    .master-form-grid > * {
        grid-column: auto !important;
    }

    .tier-row {
        grid-template-columns: 1fr !important;
    }
}


/* =========================================================
   TABLET / MOBILE
========================================================= */

@media (max-width: 800px) {

    .shell {
        padding: 16px;
    }

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

    .hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .formgrid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   MOBILE NAVIGATION
========================================================= */

@media (max-width: 768px) {

    .topbar .nav {
        padding: 12px 16px;

        align-items: center;

        gap: 8px;
    }

    .top-brand {
        gap: 8px;

        min-width: 0;

        flex-shrink: 0;
    }

    .top-brand img {
        width: auto;
        height: 38px;
        max-width: 46px;
    }

    .brand-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;

        gap: 1px;

        font-size: 17px;
        line-height: 1.05;

        white-space: nowrap;
    }

    .links {
        margin-left: auto;

        gap: 4px;

        flex-shrink: 0;
    }

    .nav-text {
        display: none;
    }

    .nav-icon {
        display: block;

        width: 24px;
        height: 24px;
    }

    .nav-link {
        width: 44px;
        min-width: 44px;
        height: 44px;

        padding: 0;

        border-radius: 12px;
    }

    .save-all-container {
        bottom: 12px;

        padding: 8px 0;
    }

    .save-all-btn {
        max-width: none;
    }
}


/* =========================================================
   SMALL MOBILE — 320 / 360px
========================================================= */

@media (max-width: 360px) {

    .topbar .nav {
        padding-left: 12px;
        padding-right: 12px;

        gap: 5px;
    }

    .top-brand {
        gap: 6px;
    }

    .top-brand img {
        height: 36px;
        max-width: 42px;
    }

    .brand-text {
        font-size: 15px;
    }

    .links {
        gap: 2px;
    }

    .nav-link {
        width: 40px;
        min-width: 40px;
        height: 40px;
    }

    .nav-icon {
        width: 23px;
        height: 23px;
    }
}

.btn-delete {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff1f1;
    color: #b42318;
    border: 1px solid #f2b8b5;
    border-radius: 10px;
}

.btn-delete:hover {
    background: #ffe4e2;
    border-color: #e58d88;
}

.btn-delete .nav-icon {
    width: 18px;
    height: 18px;
}

.btn-delete {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1f1;
    color: #b42318;
    border: 1px solid #f2b8b5;
    border-radius: 10px;
}

.btn-delete:hover {
    background: #ffe4e2;
    border-color: #e58d88;
}

.btn-delete svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ARROW ICONS master insentif */
.select-custom-arrow {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding-right: 52px;
}

.select-arrow {
    position: absolute;

    right: 18px;
    top: 50%;

    transform: translateY(-50%);

    pointer-events: none;

    font-size: 12px;
    color: #5A6B6C;
}