/*
 * AutoFollow design system on top of Bootstrap 5.3.
 *
 *  1. Fonts                 7. Forms
 *  2. Tokens                8. Tables, pager, card layout on small screens
 *  3. Base                  9. Badges, chips, plates
 *  4. Layout               10. Dashboard
 *  5. Buttons              11. Detail lists, alerts, empty states
 *  6. Panels               12. Page specifics (Settings, import, login, account)
 */

/* 1. Fonts: Inter (SIL Open Font License, web/fonts/inter/OFL.txt), served from this app. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter/inter-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens. Neutrals lean slightly towards the petrol brand colour. */
:root {
    --af-brand: #0F5A73;
    --af-brand-700: #0B4557;
    --af-brand-800: #08323F;
    --af-brand-50: #EDF5F8;
    --af-brand-100: #D6E8EE;
    --af-brand-200: #AFD0DB;

    --af-ink: #142029;
    --af-ink-2: #36434F;
    --af-muted: #5F6D7B;
    --af-subtle: #8A96A2;

    --af-bg: #F3F6F8;
    --af-surface: #FFFFFF;
    --af-surface-2: #F7F9FA;
    --af-border: #E1E7EC;
    --af-border-strong: #CBD4DC;
    --af-row-line: #EDF1F4;

    --af-danger: #B42318;
    --af-radius: 12px;
    --af-radius-sm: 8px;
    --af-shadow-sm: 0 1px 2px rgba(20, 32, 41, .05);
    --af-shadow: 0 1px 2px rgba(20, 32, 41, .05), 0 4px 14px rgba(20, 32, 41, .06);
    --af-focus-ring: 0 0 0 3px rgba(15, 90, 115, .22);
    --af-nav-height: 64px;

    /* Bootstrap */
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-body-line-height: 1.55;
    --bs-body-color: var(--af-ink);
    --bs-body-color-rgb: 20, 32, 41;
    /* Bootstrap paints inputs, menus and the pager with this; the page itself gets --af-bg on body */
    --bs-body-bg: #FFFFFF;
    --bs-body-bg-rgb: 255, 255, 255;
    --bs-emphasis-color: var(--af-ink);
    --bs-secondary-color: var(--af-muted);
    --bs-border-color: var(--af-border);
    --bs-border-radius: .5rem;
    --bs-border-radius-sm: .375rem;
    --bs-border-radius-lg: .75rem;
    --bs-primary: #0F5A73;
    --bs-primary-rgb: 15, 90, 115;
    --bs-primary-text-emphasis: #0B4557;
    --bs-primary-bg-subtle: #EDF5F8;
    --bs-primary-border-subtle: #C4DDE5;
    --bs-link-color: #0F5A73;
    --bs-link-color-rgb: 15, 90, 115;
    --bs-link-hover-color: #0B4557;
    --bs-link-hover-color-rgb: 11, 69, 87;
    --bs-success-text-emphasis: #1D6B35;
    --bs-success-bg-subtle: #EAF6EE;
    --bs-success-border-subtle: #C6E5CF;
    --bs-warning-text-emphasis: #7A4A00;
    --bs-warning-bg-subtle: #FEF6E4;
    --bs-warning-border-subtle: #F4DDA8;
    --bs-danger-text-emphasis: #9B2420;
    --bs-danger-bg-subtle: #FDEDEC;
    --bs-danger-border-subtle: #F3CBC8;
    --bs-info-text-emphasis: #0B4557;
    --bs-info-bg-subtle: #EDF5F8;
    --bs-info-border-subtle: #C4DDE5;
}

/* 3. Base */
body {
    background: var(--af-bg);
    color: var(--af-ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    color: var(--af-ink);
    font-weight: 700;
    letter-spacing: -.015em;
    text-wrap: balance;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.text-muted {
    color: var(--af-muted) !important;
}

.tabular {
    font-variant-numeric: tabular-nums;
}

::selection {
    background: var(--af-brand-100);
}

:focus-visible {
    outline: 2px solid var(--af-brand);
    outline-offset: 2px;
}

/* 4. Layout */
.app-container {
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 992px) {
    .app-container {
        padding-left: max(2rem, env(safe-area-inset-left));
        padding-right: max(2rem, env(safe-area-inset-right));
    }
}

.app-main {
    padding-block: 1.5rem 3rem;
}

@media (min-width: 992px) {
    .app-main {
        padding-block: 2rem 3.5rem;
    }
}

/* Navbar: white bar, petrol accents */
.navbar-af {
    --bs-navbar-padding-y: 0;
    --bs-navbar-color: var(--af-ink-2);
    --bs-navbar-hover-color: var(--af-ink);
    --bs-navbar-active-color: var(--af-brand);
    --bs-navbar-nav-link-padding-x: .75rem;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--af-border);
    min-height: var(--af-nav-height);
    backdrop-filter: saturate(1.4) blur(8px);
}

.navbar-af .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-right: 1.5rem;
    padding-block: .75rem;
    color: var(--af-ink);
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: linear-gradient(140deg, #157A99 0%, var(--af-brand) 55%, var(--af-brand-700) 100%);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15), 0 1px 2px rgba(15, 90, 115, .35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.brand-text small {
    font-size: .7rem;
    font-weight: 500;
    color: var(--af-muted);
    letter-spacing: .01em;
}

.navbar-af .navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: .125rem 0;
    border-radius: var(--af-radius-sm);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
}

.navbar-af .navbar-nav .nav-link .bi {
    font-size: 1rem;
    color: var(--af-subtle);
}

.navbar-af .navbar-nav .nav-link:hover {
    background: var(--af-surface-2);
}

.navbar-af .navbar-nav .nav-link.active {
    background: var(--af-brand-50);
    color: var(--af-brand);
    font-weight: 600;
}

.navbar-af .navbar-nav .nav-link.active .bi {
    color: var(--af-brand);
}

.navbar-af .nav-badge {
    min-width: 1.25rem;
    padding: .15rem .4rem;
    border-radius: 999px;
    background: #F5B83D;
    color: #3D2600;
    font-size: .7rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.navbar-af .navbar-toggler {
    border: 1px solid var(--af-border);
    padding: .4rem .55rem;
}

.navbar-af .navbar-toggler:focus {
    box-shadow: var(--af-focus-ring);
}

.navbar-af .dropdown-menu {
    --bs-dropdown-link-active-bg: var(--af-brand);
    --bs-dropdown-link-hover-bg: var(--af-surface-2);
    --bs-dropdown-border-color: var(--af-border);
    --bs-dropdown-border-radius: var(--af-radius);
    --bs-dropdown-padding-y: .4rem;
    --bs-dropdown-font-size: .9rem;
    min-width: 15rem;
    box-shadow: var(--af-shadow);
}

.navbar-af .dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem;
}

.navbar-af .dropdown-item .bi {
    color: var(--af-muted);
}

.navbar-af .dropdown-item.active .bi,
.navbar-af .dropdown-item:active .bi {
    color: inherit;
}

.user-menu-head {
    padding: .5rem 1rem .6rem;
    font-size: .8rem;
    color: var(--af-muted);
    line-height: 1.35;
}

.user-menu-head strong {
    display: block;
    color: var(--af-ink);
    font-size: .9rem;
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: none;
    border-radius: 50%;
    background: var(--af-brand-100);
    color: var(--af-brand-700);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.15rem;
}

@media (max-width: 991.98px) {
    .navbar-af .navbar-collapse {
        padding: .5rem 0 1rem;
        border-top: 1px solid var(--af-border);
    }

    .navbar-af .navbar-nav .nav-link {
        width: 100%;
        padding: .6rem .75rem;
    }

    .navbar-af .btn-add {
        width: 100%;
        margin: .5rem 0;
    }
}

/* Page header: title and subtitle on the left, actions on the right */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .75rem;
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.25;
}

.page-subtitle {
    margin: .35rem 0 0;
    color: var(--af-muted);
    font-size: .9rem;
}

.page-subtitle .sep {
    margin: 0 .4rem;
    color: var(--af-border-strong);
}

.page-header .actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

@media (max-width: 575.98px) {
    .page-header h1 {
        font-size: 1.35rem;
    }

    .page-header .actions {
        width: 100%;
    }

    .page-header .actions > .btn {
        flex: 1 1 auto;
    }
}

.breadcrumb {
    --bs-breadcrumb-divider: "›";
    --bs-breadcrumb-margin-bottom: .75rem;
    --bs-breadcrumb-item-padding-x: .45rem;
    --bs-breadcrumb-divider-color: var(--af-subtle);
    --bs-breadcrumb-item-active-color: var(--af-muted);
    font-size: .8125rem;
}

.breadcrumb a {
    color: var(--af-muted);
}

.breadcrumb a:hover {
    color: var(--af-brand);
}

.app-footer {
    border-top: 1px solid var(--af-border);
    background: var(--af-surface);
    padding-block: 1rem;
    font-size: .8rem;
    color: var(--af-muted);
}

/* 5. Buttons */
.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-font-size: .875rem;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-border-radius: var(--af-radius-sm);
    --bs-btn-focus-box-shadow: var(--af-focus-ring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-sm {
    --bs-btn-font-size: .8125rem;
    --bs-btn-padding-x: .7rem;
    --bs-btn-padding-y: .35rem;
    --bs-btn-border-radius: 7px;
    gap: .35rem;
}

.btn-primary {
    --bs-btn-bg: var(--af-brand);
    --bs-btn-border-color: var(--af-brand);
    --bs-btn-hover-bg: var(--af-brand-700);
    --bs-btn-hover-border-color: var(--af-brand-700);
    --bs-btn-active-bg: var(--af-brand-800);
    --bs-btn-active-border-color: var(--af-brand-800);
    --bs-btn-disabled-bg: var(--af-brand);
    --bs-btn-disabled-border-color: var(--af-brand);
    box-shadow: 0 1px 2px rgba(15, 90, 115, .25);
}

/* Secondary actions: white with a neutral border */
.btn-outline-secondary,
.btn-outline-primary {
    --bs-btn-color: var(--af-ink-2);
    --bs-btn-bg: var(--af-surface);
    --bs-btn-border-color: var(--af-border-strong);
    --bs-btn-hover-color: var(--af-ink);
    --bs-btn-hover-bg: var(--af-surface-2);
    --bs-btn-hover-border-color: #B8C3CD;
    --bs-btn-active-color: var(--af-ink);
    --bs-btn-active-bg: #EEF2F5;
    --bs-btn-active-border-color: #B8C3CD;
    box-shadow: var(--af-shadow-sm);
}

.btn-outline-secondary .bi,
.btn-outline-primary .bi {
    color: var(--af-muted);
}

.btn-export .bi {
    color: #1D7A45;
}

.btn-outline-danger {
    --bs-btn-color: var(--af-danger);
    --bs-btn-bg: var(--af-surface);
    --bs-btn-border-color: #EBC4C0;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--af-danger);
    --bs-btn-hover-border-color: var(--af-danger);
    --bs-btn-active-bg: #912018;
    --bs-btn-active-border-color: #912018;
    box-shadow: var(--af-shadow-sm);
}

.btn-outline-success {
    --bs-btn-color: #1D6B35;
    --bs-btn-bg: var(--af-surface);
    --bs-btn-border-color: #BFE0C9;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1D7A3C;
    --bs-btn-hover-border-color: #1D7A3C;
    box-shadow: var(--af-shadow-sm);
}

.btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--af-border-strong);
}

.btn-link {
    --bs-btn-color: var(--af-muted);
    --bs-btn-hover-color: var(--af-brand);
    --bs-btn-font-weight: 500;
}

/* Square icon-only buttons (row actions, ordering) */
.btn-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--af-muted);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.btn-icon:hover {
    background: var(--af-brand-50);
    color: var(--af-brand);
    text-decoration: none;
}

.btn-icon[title="Delete"]:hover,
.btn-icon.btn-icon-danger:hover {
    background: var(--bs-danger-bg-subtle);
    color: var(--af-danger);
}

/* 6. Panels */
.panel {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    box-shadow: var(--af-shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .panel {
        padding: 1.5rem;
    }
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
}

.panel-title,
.section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -.005em;
    color: var(--af-ink);
}

.panel-head .panel-title {
    margin: 0;
}

.panel-title .bi,
.section-title .bi {
    color: var(--af-brand);
    font-size: 1.05rem;
}

.panel-desc {
    margin: -.6rem 0 1.1rem;
    color: var(--af-muted);
    font-size: .85rem;
}

.panel-link {
    font-size: .85rem;
    font-weight: 600;
}

.panel-foot {
    margin: 1rem -1.25rem -1.25rem;
    padding: .85rem 1.25rem;
    border-top: 1px solid var(--af-row-line);
    background: var(--af-surface-2);
    border-radius: 0 0 var(--af-radius) var(--af-radius);
    font-size: .85rem;
}

@media (min-width: 768px) {
    .panel-foot {
        margin: 1.25rem -1.5rem -1.5rem;
        padding: .85rem 1.5rem;
    }
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

/* 7. Forms */
.form-label {
    margin-bottom: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--af-ink-2);
}

.required > .form-label::after {
    content: " *";
    color: var(--af-danger);
}

.form-control,
.form-select {
    min-height: 2.5rem;
    border-color: var(--af-border-strong);
    border-radius: var(--af-radius-sm);
    font-size: .9rem;
    color: var(--af-ink);
    box-shadow: var(--af-shadow-sm);
}

textarea.form-control {
    min-height: 5rem;
}

.form-control::placeholder {
    color: var(--af-subtle);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #4E8FA5;
    box-shadow: var(--af-focus-ring);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--af-surface-2);
}

.form-text,
.hint-block {
    margin-top: .3rem;
    font-size: .78rem;
    color: var(--af-muted);
}

.invalid-feedback {
    font-size: .8rem;
}

.form-check-input {
    border-color: var(--af-border-strong);
}

.form-check-input:checked {
    background-color: var(--af-brand);
    border-color: var(--af-brand);
}

.form-switch .form-check-input {
    width: 2.4em;
    height: 1.3em;
    margin-top: .1em;
    cursor: pointer;
}

.form-switch .form-check-label {
    font-weight: 500;
    cursor: pointer;
}

.form-switch {
    min-height: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 .6rem;
    padding-left: 0;
}

.form-switch .form-check-input {
    float: none;
    margin-left: 0;
}

.form-switch .invalid-feedback,
.form-switch .form-text {
    width: 100%;
}

/* Search box with an icon inside */
.input-icon {
    position: relative;
}

.input-icon > .bi {
    position: absolute;
    left: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--af-subtle);
    pointer-events: none;
}

.input-icon > .form-control {
    padding-left: 2.25rem;
}

/* Grouped fields inside a form panel */
.field-group {
    padding-top: 1rem;
    border-top: 1px dashed var(--af-border);
}

/* Save / Cancel stay reachable at the bottom of long forms */
.form-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: -.25rem;
    padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--af-bg) 75%, rgba(243, 246, 248, 0));
}

@media (max-width: 575.98px) {
    .form-footer > .btn {
        flex: 1 1 auto;
    }
}

/* Filters */
.filter-panel {
    padding: 1rem 1.25rem;
}

.filter-panel .form-label {
    font-size: .75rem;
    color: var(--af-muted);
    margin-bottom: .25rem;
}

.filter-panel .mb-3 {
    margin-bottom: 0 !important;
}

.filter-more {
    margin-top: .75rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--af-border);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
}

.filter-actions .btn-toggle-more .count {
    min-width: 1.25rem;
    padding: .05rem .4rem;
    border-radius: 999px;
    background: var(--af-brand);
    color: #fff;
    font-size: .7rem;
}

.filter-actions .btn-toggle-more .bi-chevron-down {
    transition: transform .2s;
}

.filter-actions .btn-toggle-more[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* 8. Tables */
.table-panel {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    box-shadow: var(--af-shadow-sm);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.table-panel > .panel-head {
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--af-border);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(15, 90, 115, .035);
    --bs-table-border-color: var(--af-row-line);
    margin-bottom: 0;
    font-size: .875rem;
}

.table > thead th {
    padding: .7rem .75rem;
    background: var(--af-surface-2);
    border-bottom: 1px solid var(--af-border);
    color: var(--af-muted);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.table > thead th a {
    color: inherit;
    text-decoration: none;
}

.table > thead th a:hover {
    color: var(--af-brand);
}

.table > thead th a.asc::after,
.table > thead th a.desc::after {
    display: inline-block;
    margin-left: .3rem;
    color: var(--af-brand);
    font-size: .8rem;
}

.table > thead th a.asc::after {
    content: "↑";
}

.table > thead th a.desc::after {
    content: "↓";
}

.table > tbody > tr > td {
    padding: .7rem .75rem;
    vertical-align: middle;
}

.table > thead th:first-child,
.table > tbody > tr > td:first-child {
    padding-left: 1.25rem;
}

.table > thead th:last-child,
.table > tbody > tr > td:last-child {
    padding-right: 1rem;
}

.table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.table .nowrap,
.table td.nowrap,
.table th.nowrap {
    white-space: nowrap;
}

.table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cell-sub {
    display: block;
    margin-top: .15rem;
    color: var(--af-muted);
    font-size: .8rem;
    white-space: nowrap;
}

.ro-link {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--af-brand);
    white-space: nowrap;
}

/* Remarks shrink to the space left and show at most two lines (full text in the title tooltip) */
.remarks-cell {
    min-width: 8rem;
    max-width: 16rem;
    color: var(--af-ink-2);
    font-size: .825rem;
}

.remarks-cell .truncate {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.col-customer {
    min-width: 9rem;
}

.col-delivery .text-muted {
    display: block;
    font-size: .8rem;
}

/* Action icons stay visible at the right edge while a wide table scrolls */
.table .col-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .table-responsive .table .col-actions {
        position: sticky;
        right: 0;
        background: var(--af-surface);
        box-shadow: inset 1px 0 0 var(--af-row-line);
    }

    .table-responsive .table > thead th.col-actions {
        background: var(--af-surface-2);
    }
}

.grid-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--af-border);
    background: var(--af-surface-2);
    font-size: .8125rem;
    color: var(--af-muted);
}

.grid-footer b {
    color: var(--af-ink);
    font-weight: 600;
}

.page-size {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.page-size a,
.page-size .active {
    margin-left: .1rem;
    padding: .15rem .5rem;
    border-radius: 6px;
    color: var(--af-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.page-size a:hover {
    background: var(--af-surface);
    color: var(--af-brand);
}

.page-size .active {
    background: var(--af-brand-50);
    color: var(--af-brand);
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--af-muted);
}

/* Pager */
.pagination {
    --bs-pagination-color: var(--af-ink-2);
    --bs-pagination-bg: var(--af-surface);
    --bs-pagination-border-color: var(--af-border);
    --bs-pagination-hover-color: var(--af-brand);
    --bs-pagination-hover-bg: var(--af-brand-50);
    --bs-pagination-hover-border-color: var(--af-border);
    --bs-pagination-focus-box-shadow: var(--af-focus-ring);
    --bs-pagination-active-bg: var(--af-brand);
    --bs-pagination-active-border-color: var(--af-brand);
    --bs-pagination-disabled-color: var(--af-subtle);
    --bs-pagination-disabled-bg: var(--af-surface);
    --bs-pagination-font-size: .8125rem;
    --bs-pagination-padding-x: .7rem;
    --bs-pagination-padding-y: .35rem;
    margin: 0;
    gap: .25rem;
}

.pagination .page-link {
    min-width: 2rem;
    border-radius: 7px !important;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
}

.pagination .page-item:not(:first-child) .page-link {
    margin-left: 0;
}

/*
 * Card layout: below 992px each table row of a `.table-cards` table becomes a card.
 * Cells are labelled from `data-label` (components/grid/DataColumn.php). Optional cell roles:
 *   .cell-title  first line, bold, no label     .cell-badge  top right, no label
 *   .cell-plain  full width, no label           .col-actions bottom row of buttons
 */
@media (max-width: 991.98px) {
    .table-panel:has(.table-cards) {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .table-panel:has(.table-cards) > .panel-head {
        padding: 0 0 .75rem;
        border: 0;
    }

    .table-panel:has(.table-cards) .grid-footer {
        margin-top: .25rem;
        border: 1px solid var(--af-border);
        border-radius: var(--af-radius);
        background: var(--af-surface);
    }

    .table-responsive:has(> .table-cards) {
        overflow: visible;
    }

    .table-cards,
    .table-cards > tbody {
        display: block;
    }

    .table-cards > thead {
        display: none;
    }

    .table-cards > tbody {
        display: grid;
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .table-cards > tbody > tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .1rem .75rem;
        padding: .9rem 1rem .75rem;
        background: var(--af-surface);
        border: 1px solid var(--af-border);
        border-radius: var(--af-radius);
        box-shadow: var(--af-shadow-sm);
    }

    .table-cards > tbody > tr > td {
        grid-column: 1 / -1;
        display: block;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: .3rem 0;
        border: 0;
        text-align: right;
        white-space: normal;
    }

    /* A cell that only says "–" carries nothing on a card */
    .table-cards > tbody > tr > td:has(> .empty-value:only-child) {
        display: none;
    }

    .table-cards > tbody > tr > td:first-child,
    .table-cards > tbody > tr > td:last-child {
        padding-left: 0;
        padding-right: 0;
    }

    .table-cards > tbody > tr > td::before {
        content: attr(data-label);
        float: left;
        margin-right: 1rem;
        padding-top: .1rem;
        color: var(--af-muted);
        font-size: .78rem;
        font-weight: 500;
        text-align: left;
    }

    .table-cards > tbody > tr > td[data-label=""]::before,
    .table-cards > tbody > tr > td:not([data-label])::before {
        display: none;
    }

    .table-cards > tbody > tr > td.cell-title {
        order: -2;
        grid-column: 1;
        padding: 0 0 .4rem;
        font-size: 1rem;
        text-align: left;
    }

    .table-cards > tbody > tr > td.cell-badge {
        order: -1;
        grid-column: 2;
        padding: 0 0 .4rem;
    }

    .table-cards > tbody > tr > td.cell-title::before,
    .table-cards > tbody > tr > td.cell-badge::before,
    .table-cards > tbody > tr > td.cell-plain::before {
        display: none;
    }

    .table-cards > tbody > tr > td.cell-plain {
        text-align: left;
    }

    .table-cards > tbody > tr > td.col-actions {
        display: flex;
        width: auto;
        justify-content: flex-end;
        gap: .25rem;
        margin-top: .35rem;
        padding-top: .5rem;
        border-top: 1px solid var(--af-row-line);
        position: static;
        box-shadow: none;
    }

    .table-cards > tbody > tr > td:empty {
        display: none;
    }

    .table-cards .cell-sub {
        display: inline;
        margin: 0 0 0 .35rem;
    }

    .table-cards .remarks-cell .truncate,
    .table-cards .col-delivery .text-muted {
        display: inline;
    }

    .table-cards .col-delivery .text-muted {
        margin-left: .35rem;
    }

    .table-cards > tbody > tr > td[colspan] {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (min-width: 640px) and (max-width: 991.98px) {
    .table-cards > tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-cards > tbody > tr:only-child {
        grid-column: 1 / -1;
    }
}

/* 9. Badges, chips, plates */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    padding: .2em .7em .2em .6em;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
    vertical-align: middle;
}

.status-badge::before {
    content: "";
    width: .45em;
    height: .45em;
    flex: none;
    border-radius: 50%;
    background: currentColor;
}

.status-grey { background: #EEF1F4; border-color: #E0E5EA; color: #46515D; }
.status-blue { background: #EAF1FC; border-color: #D2E1F7; color: #1F58A6; }
.status-amber { background: #FEF4E2; border-color: #F6E0B4; color: #875000; }
.status-teal { background: #E4F4F4; border-color: #C9E7E7; color: #0A676A; }
.status-green { background: #E8F5EC; border-color: #C9E6D2; color: #1C6A35; }
.status-red { background: #FCECEB; border-color: #F3CECB; color: #A3261F; }

/* No status yet: outlined, with an empty dot */
.status-none { background: var(--af-surface); border: 1px dashed #AEB8C2; color: var(--af-muted); }
.status-none::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* An option left empty by an import (e.g. "No job type"), to be filled in later */
.value-missing { color: var(--af-muted); font-style: italic; }

a:hover > .status-badge {
    filter: brightness(.97);
}

.option-flag {
    display: inline-block;
    margin-left: .3rem;
    padding: .05rem .4rem;
    border-radius: 5px;
    background: #EEF1F4;
    color: var(--af-muted);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    vertical-align: .1em;
}

.option-flag-review {
    background: #FEF4E2;
    color: #875000;
}

.chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: .1rem .45rem;
    border-radius: 6px;
    background: var(--af-brand-50);
    color: var(--af-brand-700);
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Reg No as a number plate */
.plate {
    display: inline-flex;
    align-items: center;
    padding: .12rem .5rem;
    border: 1px solid #B9C4CE;
    border-radius: 5px;
    background: #fff;
    box-shadow: inset 0 -2px 0 rgba(20, 32, 41, .05);
    color: var(--af-ink);
    font-size: .8rem;
    font-weight: 650;
    letter-spacing: .06em;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}

a.plate-link:hover {
    border-color: var(--af-brand);
    color: var(--af-brand);
    text-decoration: none;
}

.plate-lg {
    padding: .2rem .7rem;
    font-size: 1rem;
}

.flag-yes {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    color: #1C6A35;
}

.flag-no {
    color: var(--af-subtle);
}

.count-pill {
    display: inline-block;
    min-width: 1.5rem;
    padding: .05rem .45rem;
    border-radius: 999px;
    background: #EEF1F4;
    color: var(--af-ink-2);
    font-size: .75rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* 10. Dashboard */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
    padding: 1rem 1.1rem 1.05rem;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    box-shadow: var(--af-shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.stat-card:hover,
.stat-card:focus-visible {
    border-color: var(--af-brand-200);
    box-shadow: var(--af-shadow);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

.stat-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .35rem;
}

.stat-icon {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: none;
    border-radius: 9px;
    font-size: 1rem;
}

.tone-brand { background: var(--af-brand-50); color: var(--af-brand); }
.tone-amber { background: #FEF4E2; color: #A35F00; }
.tone-green { background: #E8F5EC; color: #1C6A35; }
.tone-blue { background: #EAF1FC; color: #1F58A6; }
.tone-grey { background: #EEF1F4; color: #46515D; }

.stat-label {
    min-width: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--af-ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--af-ink);
}

.stat-note {
    font-size: .78rem;
    color: var(--af-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Two tiles per row on phones: let labels wrap rather than cut them off */
@media (max-width: 575.98px) {
    .stat-card {
        padding: .85rem .9rem;
    }

    .stat-label,
    .stat-note {
        white-space: normal;
        line-height: 1.3;
    }

    .stat-head {
        align-items: flex-start;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Open jobs by status: one bar per status, single hue, value as text */
.bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bar-list li + li {
    border-top: 1px solid var(--af-row-line);
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr) 2.75rem;
    align-items: center;
    gap: .9rem;
    padding: .55rem .35rem;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.bar-row:hover {
    background: var(--af-surface-2);
    text-decoration: none;
    color: inherit;
}

.bar-track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--af-brand-50);
    overflow: hidden;
}

.bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    min-width: 4px;
    border-radius: 4px;
    background: var(--af-brand);
}

.bar-fill.is-zero {
    display: none;
}

.bar-value {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bar-value.is-zero {
    color: var(--af-subtle);
    font-weight: 500;
}

.delivered-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
}

.delivered-line a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: inherit;
    text-decoration: none;
}

.delivered-line strong {
    font-variant-numeric: tabular-nums;
}

.days-open {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 11. Detail lists */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1.1rem 1.5rem;
    margin: 0;
}

.detail-item {
    min-width: 0;
}

.detail-item dt {
    margin-bottom: .2rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--af-muted);
}

.detail-item dd {
    margin: 0;
    font-size: .925rem;
    font-weight: 500;
    color: var(--af-ink);
    overflow-wrap: anywhere;
}

.detail-item dd .not-set {
    color: var(--af-subtle);
    font-weight: 400;
}

.detail-block {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px dashed var(--af-border);
}

.detail-block .label {
    margin-bottom: .3rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--af-muted);
}

.detail-block p {
    margin: 0;
    white-space: pre-line;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.5rem;
    font-size: .8rem;
    color: var(--af-muted);
}

.record-meta strong {
    color: var(--af-ink-2);
    font-weight: 600;
}

/* Alerts and flash messages */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    border-radius: var(--af-radius-sm);
    font-size: .9rem;
    box-shadow: var(--af-shadow-sm);
}

.alert > .bi {
    flex: none;
    margin-top: .1rem;
    font-size: 1.05rem;
}

.alert > .alert-body {
    flex: 1 1 auto;
    min-width: 0;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert .alert-link {
    font-weight: 600;
}

/* Empty states and the error page */
.empty-card {
    max-width: 34rem;
    margin: 2rem auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 16px;
    background: var(--af-brand-50);
    color: var(--af-brand);
    font-size: 1.6rem;
}

.empty-card h1 {
    font-size: 1.35rem;
}

.empty-card .form-actions {
    justify-content: center;
}

/* 12. Settings */
.settings-tabs {
    display: flex;
    gap: .25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--af-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .9rem;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--af-muted);
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    text-decoration: none;
}

.settings-tabs a:hover {
    color: var(--af-ink);
}

.settings-tabs a.active {
    border-bottom-color: var(--af-brand);
    color: var(--af-brand);
}

.settings-tabs .badge-review {
    min-width: 1.25rem;
    padding: .1rem .4rem;
    border-radius: 999px;
    background: #F5B83D;
    color: #3D2600;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    padding: .2rem;
    gap: .15rem;
    border: 1px solid var(--af-border);
    border-radius: 10px;
    background: var(--af-surface);
    box-shadow: var(--af-shadow-sm);
}

.segmented a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    border-radius: 7px;
    color: var(--af-muted);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
}

.segmented a:hover {
    color: var(--af-ink);
    background: var(--af-surface-2);
}

.segmented a.active {
    background: var(--af-brand);
    color: #fff;
}

.segmented .n {
    font-variant-numeric: tabular-nums;
    opacity: .75;
    font-weight: 500;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.table-options .col-order {
    width: 1%;
    white-space: nowrap;
}

.table-options .col-used {
    padding-right: 1.5rem;
}

.table-options .option-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: .35rem;
}

@media (max-width: 991.98px) {
    .table-options .option-actions {
        flex-wrap: wrap;
    }
}

.order-buttons {
    display: inline-flex;
    gap: .1rem;
}

.order-buttons form {
    display: inline;
}

.color-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .9rem;
}

.color-choices label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
}

/* Import */
.file-drop {
    position: relative;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--af-border-strong);
    border-radius: var(--af-radius);
    background: var(--af-surface-2);
    text-align: center;
    transition: border-color .15s, background-color .15s;
}

.file-drop:hover,
.file-drop:focus-within {
    border-color: var(--af-brand);
    background: var(--af-brand-50);
}

.file-drop .file-drop-icon {
    display: block;
    margin-bottom: .5rem;
    font-size: 1.75rem;
    color: var(--af-brand);
}

.file-drop .form-control {
    max-width: 26rem;
    margin: .75rem auto 0;
    background: var(--af-surface);
}

.import-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: .75rem;
}

.import-figures > div {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .8rem 1rem;
    background: var(--af-surface-2);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius-sm);
}

.import-figures strong {
    font-size: 1.4rem;
    font-weight: 650;
    line-height: 1.2;
}

.import-figures span {
    font-size: .78rem;
    color: var(--af-muted);
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .65rem;
}

.steps li {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: .6rem;
    font-size: .875rem;
    color: var(--af-ink-2);
}

.steps li > .bi {
    color: var(--af-brand);
    font-size: 1rem;
    line-height: 1.4;
}

.column-list {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}

.column-list code {
    padding: .1rem .4rem;
    border-radius: 5px;
    background: var(--af-surface-2);
    border: 1px solid var(--af-border);
    color: var(--af-ink-2);
    font-size: .75rem;
}

/* Import progress: replaces the upload form while the file uploads and the rows are imported (import-form.js) */
.import-progress {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--af-brand-100);
    border-radius: var(--af-radius);
    background: var(--af-brand-50);
}

.import-progress:focus {
    outline: none;
}

.import-progress-file {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.import-progress-file > .bi {
    flex: none;
    font-size: 1.6rem;
    color: var(--af-brand);
}

.import-progress-file > div {
    min-width: 0;
}

.import-progress-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.import-progress-size,
.import-progress-note {
    margin: 0;
    font-size: .8rem;
    color: var(--af-muted);
}

.import-steps {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .9rem;
}

.import-steps li {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .6rem;
    color: var(--af-subtle);
}

.import-steps li[data-state="active"] {
    color: var(--af-ink);
    font-weight: 600;
}

.import-steps li[data-state="done"] {
    color: var(--af-ink-2);
}

.import-step-icon {
    display: inline-flex;
    justify-content: center;
}

/* Each step shows one icon: a circle (to do), a spinner (running) or a tick (done) */
.import-step-icon .state-active,
.import-step-icon .state-done,
[data-state="active"] .import-step-icon .state-pending,
[data-state="done"] .import-step-icon .state-pending {
    display: none;
}

[data-state="active"] .import-step-icon .state-active,
[data-state="done"] .import-step-icon .state-done {
    display: inline-block;
}

.import-step-icon .state-active {
    --bs-spinner-width: .95rem;
    --bs-spinner-height: .95rem;
    --bs-spinner-border-width: .15em;
    color: var(--af-brand);
}

.import-step-icon .state-done {
    color: #1C6A35;
}

.import-step-value {
    font-size: .82rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--af-muted);
}

.import-progress .progress {
    --bs-progress-height: .5rem;
    --bs-progress-bg: var(--af-surface);
    --bs-progress-bar-bg: var(--af-brand);
    box-shadow: inset 0 0 0 1px var(--af-brand-100);
}

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    background: var(--af-bg);
}

@media (min-width: 992px) {
    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.login-aside {
    display: none;
    position: relative;
    overflow: hidden;
    padding: 3rem;
    background: radial-gradient(120% 90% at 0% 0%, #157A99 0%, var(--af-brand) 45%, var(--af-brand-800) 100%);
    color: #fff;
}

@media (min-width: 992px) {
    .login-aside {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.login-aside::after {
    content: "";
    position: absolute;
    right: -6rem;
    bottom: -6rem;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    border: 48px solid rgba(255, 255, 255, .06);
}

.login-aside .brand-mark {
    background: rgba(255, 255, 255, .14);
    box-shadow: none;
}

.login-aside h2 {
    max-width: 26rem;
    margin: 0 0 1rem;
    color: #fff;
    font-size: 2rem;
    line-height: 1.2;
}

.login-aside p,
.login-aside li {
    color: rgba(255, 255, 255, .82);
}

.login-aside ul {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    gap: .7rem;
}

.login-aside li {
    display: flex;
    gap: .6rem;
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem max(1rem, env(safe-area-inset-right)) 2rem max(1rem, env(safe-area-inset-left));
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card .panel {
    padding: 2rem;
    box-shadow: var(--af-shadow);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.75rem;
}

.login-card h1 {
    margin: 0 0 .35rem;
    font-size: 1.5rem;
}

/* Account */
.profile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.profile-head .name {
    font-size: 1.1rem;
    font-weight: 650;
}

.profile-head .meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .6rem;
    color: var(--af-muted);
    font-size: .85rem;
}
