:root {
    --navy: #0b1f3a;
    --navy-2: #102a4c;
    --blue: #2563eb;
    --blue-2: #3b82f6;
    --cyan: #20c8d8;
    --teal: #14b8a6;
    --bg: #f5f8fe;
    --panel: #fff;
    --line: #e5eaf2;
    --text: #132238;
    --muted: #6b7b91;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
    --shadow: 0 18px 50px rgba(16, 42, 76, .09);
    --radius: 18px;
    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}

* {
    box-sizing: border-box
}

html {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text)
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text)
}

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

img {
    max-width: 100%;
    display: block
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -.04em;
    margin-bottom: 8px
}

h2 {
    letter-spacing: -.025em
}

p {
    color: var(--muted);
    line-height: 1.65
}

.eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: var(--blue);
    margin-bottom: 8px
}

.eyebrow-light {
    display: inline-block;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
    color: #9eeaf2;
    margin-bottom: 12px
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #eef4ff;
    border: 1px solid #dbe7fb;
    padding: 4px 7px;
    border-radius: 8px;
    color: #274060
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 12px 17px;
    font-weight: 750;
    transition: .2s ease;
    background: #fff;
    color: var(--text)
}

.button:hover {
    transform: translateY(-1px)
}

.button-primary {
    background: linear-gradient(135deg, var(--blue), #2f7df4);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .2)
}

.button-secondary {
    border-color: var(--line);
    background: #fff
}

.button-soft {
    background: #eef5ff;
    color: #1d4ed8
}

.button-small {
    padding: 9px 13px;
    font-size: .86rem
}

.button-block {
    width: 100%
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid
}

.alert-error {
    background: #fff5f5;
    border-color: #fecaca;
    color: #991b1b
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 26px rgba(16, 42, 76, .045)
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 24px
}

.page-heading p {
    margin-bottom: 0;
    max-width: 760px
}

.page-heading-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 0
}

.panel-head h2 {
    margin-bottom: 0
}

.panel-head a {
    font-size: .88rem;
    color: var(--blue);
    font-weight: 700
}

.empty-state {
    text-align: center;
    padding: 46px 22px
}

.empty-state>span {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #edf4ff;
    color: var(--blue);
    font-size: 1.4rem
}

.empty-state strong {
    display: block;
    margin-bottom: 5px
}

.empty-state p {
    margin-bottom: 18px
}

.simple-list {
    padding: 10px 16px 18px
}

.simple-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 9px;
    border-bottom: 1px solid #eef1f5
}

.simple-row:last-child {
    border-bottom: 0
}

.simple-row>div {
    min-width: 0;
    flex: 1
}

.simple-row strong {
    display: block;
    font-size: .93rem
}

.simple-row span:not(.colour-dot):not(.status) {
    display: block;
    color: var(--muted);
    font-size: .82rem;
    margin-top: 4px
}

.colour-dot {
    width: 10px;
    height: 38px;
    border-radius: 999px;
    background: var(--dot, #2563eb);
    flex: 0 0 10px
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: .74rem !important;
    font-weight: 800;
    white-space: nowrap
}

.status-approved {
    background: #ecfdf3;
    color: #15803d
}

.status-pending {
    background: #fff7ed;
    color: #b45309
}

.status-declined {
    background: #fef2f2;
    color: #b91c1c
}

.form-stack {
    display: grid;
    gap: 16px
}

.form-stack label,
.field-grid label,
.full-field {
    display: grid;
    gap: 7px;
    font-size: .84rem;
    font-weight: 700;
    color: #334155
}

.form-stack input,
.field-grid input,
.field-grid select,
.field-grid textarea,
.table-search,
.copy-field input {
    width: 100%;
    border: 1px solid #dce3ed;
    background: #fff;
    border-radius: 12px;
    padding: 12px 13px;
    color: var(--text);
    outline: none;
    transition: .18s
}

.form-stack input:focus,
.field-grid input:focus,
.field-grid select:focus,
.field-grid textarea:focus,
.table-search:focus,
.copy-field input:focus {
    border-color: #8bb7ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .08)
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px
}

.field-grid label small {
    font-weight: 500;
    color: var(--muted)
}

.full-field {
    grid-column: 1/-1
}

.input-suffix {
    display: flex;
    border: 1px solid #dce3ed;
    border-radius: 12px;
    overflow: hidden;
    background: #fff
}

.input-suffix input {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important
}

.input-suffix span {
    display: grid;
    place-items: center;
    padding: 0 13px;
    border-left: 1px solid #e5eaf2;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 22px
}

.section-title>span {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #eaf2ff;
    color: var(--blue);
    font-weight: 800
}

.section-title h2 {
    font-size: 1.1rem;
    margin: 0 0 4px
}

.section-title p {
    font-size: .86rem;
    margin: 0
}

.placeholder-panel {
    padding: 50px;
    text-align: center
}

.placeholder-panel>span {
    display: inline-block;
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--blue);
    font-size: .75rem;
    font-weight: 800;
    padding: 7px 11px;
    margin-bottom: 15px
}

/* ==========================================================================
   Error pages
   ========================================================================== */

.error-page {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 260px);
    padding: 30px 0 60px;
}

.error-page__content {
    width: 100%;
    max-width: 820px;
}

.error-page .eyebrow {
    display: block;
    margin-bottom: 14px;
}

.error-page h1 {
    max-width: 760px;
    margin: 0;
    color: #132238;
    font-size: 3rem;
    line-height: 1.05;
    letter-spacing: -.045em;
}

.error-page p {
    max-width: 650px;
    margin: 18px 0 0;
    color: #71839a;
    font-size: 1.05rem;
    line-height: 1.7;
}

.error-page__actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}


@media(max-width:700px) {

    .error-page {
        align-items: flex-start;
        min-height: auto;
        padding: 30px 0 50px;
    }

    .error-page h1 {
        font-size: 2.15rem;
    }

    .error-page p {
        font-size: 1rem;
    }

    .error-page__actions,
    .error-page__actions .button {
        width: 100%;
    }

    .error-page__actions .button {
        justify-content: center;
    }
}

/* ==========================================================================
   Install Fleetley
   ========================================================================== */

.sidebar-install {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 12px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.sidebar-install:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
}

.sidebar-install:active {
    transform: translateY(1px);
}

.sidebar-install__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .09);
    color: #7dd3fc;
    font-size: 1rem;
    font-weight: 800;
}

.sidebar-install[hidden] {
    display: none !important;
}


/* ==========================================================================
   Install instructions
   ========================================================================== */

.install-help[hidden] {
    display: none !important;
}

.install-help {
    position: fixed;
    inset: 0;
    z-index: 999999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.install-help__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 23, 43, .55);
    backdrop-filter: blur(4px);
}

.install-help__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 30px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 35, 65, .24);
}

.install-help__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #f3f6fb;
    color: #132238;
    font-size: 1.45rem;
    cursor: pointer;
}

.install-help__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: 15px;
    background: #f3f7ff;
}

.install-help__icon img {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.install-help h2 {
    margin: 0;
    color: #132238;
    font-size: 1.6rem;
    letter-spacing: -.03em;
}

.install-help p {
    margin: 10px 0 0;
    color: #71839a;
    line-height: 1.6;
}

.install-help ol {
    margin: 22px 0 0;
    padding-left: 22px;
    color: #3d526c;
}

.install-help li {
    margin: 10px 0;
    line-height: 1.5;
}

.install-help-open {
    overflow: hidden;
}


@media(max-width:600px) {

    .install-help {
        align-items: flex-end;
        padding: 12px;
    }

    .install-help__panel {
        max-width: none;
        padding: 26px 22px;
        border-radius: 22px;
    }

}

/* ==========================================================================
   Mobile sidebar scrolling
   ========================================================================== */

@media (max-width: 900px) {

    /*
    |--------------------------------------------------------------------------
    | Lock the page behind the open menu
    |--------------------------------------------------------------------------
    */

    body.menu-open {
        overflow: hidden;
        height: 100dvh;
        touch-action: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Allow the sidebar itself to scroll
    |--------------------------------------------------------------------------
    */

    .sidebar {
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }


    /*
    |--------------------------------------------------------------------------
    | Keep all sidebar sections reachable
    |--------------------------------------------------------------------------
    */

    .sidebar-brand,
    .sidebar-readonly-note,
    .sidebar-nav,
    .sidebar-bottom {
        flex-shrink: 0;
    }

    .sidebar-bottom {
        margin-top: auto;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }


    /*
    |--------------------------------------------------------------------------
    | Stop overlay/page scroll chaining
    |--------------------------------------------------------------------------
    */

    .sidebar-overlay {
        overscroll-behavior: none;
        touch-action: none;
    }

}


/* ==========================================================================
   Small-screen polish
   ========================================================================== */

@media (max-width: 600px) {

    .sidebar-install {
        min-height: 50px;
    }

}