/*
|--------------------------------------------------------------------------
| ServiceFlowOS global styles
|--------------------------------------------------------------------------
*/

:root {
    --colour-navy-950: #08131e;
    --colour-navy-900: #0d1b29;
    --colour-navy-850: #102132;
    --colour-navy-800: #152a3e;
    --colour-navy-700: #203a50;

    --colour-blue-600: #1e74d8;
    --colour-blue-500: #2f8cff;
    --colour-blue-100: #e9f3ff;

    --colour-slate-900: #182230;
    --colour-slate-700: #344054;
    --colour-slate-600: #475467;
    --colour-slate-500: #667085;
    --colour-slate-400: #98a2b3;
    --colour-slate-300: #d0d5dd;
    --colour-slate-200: #e4e7ec;
    --colour-slate-100: #f2f4f7;
    --colour-slate-50: #f8fafc;

    --colour-white: #ffffff;

    --colour-success: #067647;
    --colour-success-bg: #ecfdf3;
    --colour-success-border: #abefc6;

    --colour-warning: #b54708;
    --colour-warning-bg: #fffaeb;
    --colour-warning-border: #fedf89;

    --colour-error: #b42318;
    --colour-error-bg: #fef3f2;
    --colour-error-border: #fecdca;

    --shadow-sm:
        0 1px 2px rgba(16, 24, 40, 0.05);

    --shadow-md:
        0 8px 24px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 24px 60px rgba(15, 23, 42, 0.16);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-body:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/*
|--------------------------------------------------------------------------
| Reset
|--------------------------------------------------------------------------
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: var(--font-body);
    color: var(--colour-slate-900);
    background: var(--colour-slate-50);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

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

button {
    border: 0;
}

/*
|--------------------------------------------------------------------------
| Authentication layout
|--------------------------------------------------------------------------
*/

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.auth-layout {
    display: grid;
    grid-template-columns:
        minmax(420px, 46%) minmax(480px, 54%);
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    overflow: hidden;
    padding:
        max(40px, env(safe-area-inset-top)) 52px max(32px, env(safe-area-inset-bottom));
    color: var(--colour-white);
    background:
        radial-gradient(circle at 8% 8%,
            rgba(47, 140, 255, 0.24),
            transparent 34%),
        radial-gradient(circle at 90% 88%,
            rgba(47, 140, 255, 0.13),
            transparent 38%),
        linear-gradient(145deg,
            var(--colour-navy-950),
            var(--colour-navy-850));
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -170px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -160px;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.auth-brand-panel-inner,
.auth-brand-footer {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.auth-brand-logo {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.2);
}

.auth-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-fallback {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 15px;
    color: var(--colour-white);
    background: var(--colour-blue-500);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow:
        0 12px 26px rgba(47, 140, 255, 0.24);
}

.auth-brand-name {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.auth-brand-name strong {
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.auth-brand-name small {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    line-height: 1.4;
}

.auth-brand-copy {
    max-width: 610px;
    margin-top: clamp(64px, 11vh, 140px);
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #8bc1ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.auth-eyebrow::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.auth-eyebrow-dark {
    color: var(--colour-blue-600);
}

.auth-brand-copy h1 {
    max-width: 660px;
    margin: 0;
    font-size: clamp(38px, 4vw, 64px);
    font-weight: 700;
    letter-spacing: -0.052em;
    line-height: 1.02;
}

.auth-brand-copy p {
    max-width: 610px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 17px;
    line-height: 1.75;
}

.auth-feature-grid {
    display: grid;
    gap: 12px;
    max-width: 610px;
    margin-top: 42px;
}

.auth-feature-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 76px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(10px);
}

.auth-feature-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    color: #8bc1ff;
    background: rgba(47, 140, 255, 0.13);
}

.auth-feature-icon svg {
    width: 20px;
    height: 20px;
}

.auth-feature-card div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-feature-card strong {
    font-size: 14px;
    line-height: 1.3;
}

.auth-feature-card span:last-child {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    line-height: 1.5;
}

.auth-brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    line-height: 1.5;
}

/*
|--------------------------------------------------------------------------
| Authentication form panel
|--------------------------------------------------------------------------
*/

.auth-form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding:
        max(40px, env(safe-area-inset-top)) clamp(34px, 7vw, 110px) max(40px, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 100% 0,
            rgba(47, 140, 255, 0.06),
            transparent 30%),
        var(--colour-white);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 480px;
}

.auth-form-heading {
    margin-bottom: 32px;
}

.auth-form-heading h2 {
    margin: 0;
    color: var(--colour-slate-900);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.auth-form-heading p {
    margin: 14px 0 0;
    color: var(--colour-slate-500);
    font-size: 15px;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 22px;
}

.form-group {
    display: grid;
    gap: 9px;
}

.form-group label,
.form-label-row label {
    color: var(--colour-slate-700);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.form-label-row a {
    color: var(--colour-blue-600);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.form-label-row a:hover {
    text-decoration: underline;
}

.form-control-wrap {
    position: relative;
}

.form-control-wrap input {
    width: 100%;
    min-height: 56px;
    padding:
        13px 48px 13px 48px;
    border: 1px solid var(--colour-slate-300);
    border-radius: 13px;
    outline: none;
    color: var(--colour-slate-900);
    background: var(--colour-white);
    font-size: 15px;
    line-height: 1.4;
    box-shadow: var(--shadow-sm);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.form-control-wrap input::placeholder {
    color: var(--colour-slate-400);
}

.form-control-wrap input:hover {
    border-color: #b9c0ca;
}

.form-control-wrap input:focus {
    border-color: var(--colour-blue-500);
    box-shadow:
        0 0 0 4px rgba(47, 140, 255, 0.12);
}

.form-control-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 1;
    width: 19px;
    height: 19px;
    color: var(--colour-slate-400);
    pointer-events: none;
    transform: translateY(-50%);
}

.form-control-icon svg {
    width: 100%;
    height: 100%;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    cursor: pointer;
    color: var(--colour-slate-500);
    background: transparent;
    transform: translateY(-50%);
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

.password-toggle:hover {
    color: var(--colour-slate-900);
    background: var(--colour-slate-100);
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(47, 140, 255, 0.2);
    outline-offset: 1px;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-toggle-hide {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-show {
    display: none;
}

.password-toggle[aria-pressed="true"] .password-toggle-hide {
    display: block;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 57px;
    width: 100%;
    margin-top: 2px;
    padding: 14px 20px;
    border-radius: 13px;
    cursor: pointer;
    color: var(--colour-white);
    background:
        linear-gradient(135deg,
            var(--colour-blue-500),
            var(--colour-blue-600));
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    box-shadow:
        0 14px 28px rgba(30, 116, 216, 0.22);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.auth-submit:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow:
        0 18px 34px rgba(30, 116, 216, 0.27);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 4px solid rgba(47, 140, 255, 0.2);
    outline-offset: 3px;
}

.auth-submit svg {
    width: 19px;
    height: 19px;
}

.auth-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    color: var(--colour-slate-500);
    font-size: 11px;
    line-height: 1.5;
}

.auth-security-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--colour-success);
}

/*
|--------------------------------------------------------------------------
| Alerts
|--------------------------------------------------------------------------
*/

.auth-alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
}

.auth-alert ul {
    margin: 0;
    padding-left: 19px;
}

.auth-alert-success {
    border-color: var(--colour-success-border);
    color: var(--colour-success);
    background: var(--colour-success-bg);
}

.auth-alert-warning {
    border-color: var(--colour-warning-border);
    color: var(--colour-warning);
    background: var(--colour-warning-bg);
}

.auth-alert-error {
    border-color: var(--colour-error-border);
    color: var(--colour-error);
    background: var(--colour-error-bg);
}

.auth-alert-info {
    border-color: #b2ddff;
    color: #175cd3;
    background: #eff8ff;
}

/*
|--------------------------------------------------------------------------
| Mobile-only brand elements
|--------------------------------------------------------------------------
*/

.auth-mobile-brand,
.auth-mobile-footer {
    display: none;
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {
    .auth-layout {
        grid-template-columns:
            minmax(360px, 42%) minmax(430px, 58%);
    }

    .auth-brand-panel {
        padding-right: 36px;
        padding-left: 36px;
    }

    .auth-brand-copy {
        margin-top: 72px;
    }

    .auth-brand-copy h1 {
        font-size: clamp(34px, 4.6vw, 48px);
    }

    .auth-feature-card span:last-child {
        display: none;
    }

    .auth-feature-card {
        min-height: 64px;
    }

    .auth-form-panel {
        padding-right: 46px;
        padding-left: 46px;
    }
}

/*
|--------------------------------------------------------------------------
| Mobile and portrait tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 820px) {
    .auth-layout {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100vh;
        min-height: 100dvh;
        padding:
            max(22px, env(safe-area-inset-top)) 22px max(20px, env(safe-area-inset-bottom));
        background:
            radial-gradient(circle at 100% 0,
                rgba(47, 140, 255, 0.08),
                transparent 33%),
            linear-gradient(180deg,
                #ffffff,
                #f8fafc);
    }

    .auth-mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        max-width: 520px;
        margin: 0 auto 34px;
    }

    .auth-mobile-brand img {
        width: 62px;
        height: 62px;
        flex: 0 0 62px;
        padding: 7px;
        object-fit: contain;
        border: 1px solid var(--colour-slate-200);
        border-radius: 15px;
        background: var(--colour-white);
        box-shadow: var(--shadow-md);
    }

    .auth-mobile-brand div {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .auth-mobile-brand strong {
        color: var(--colour-slate-900);
        font-size: 18px;
        letter-spacing: -0.02em;
    }

    .auth-mobile-brand span {
        color: var(--colour-slate-500);
        font-size: 11px;
    }

    .auth-form-wrapper {
        max-width: 520px;
        margin: auto;
        padding: 30px;
        border: 1px solid var(--colour-slate-200);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--shadow-lg);
    }

    .auth-form-heading {
        margin-bottom: 28px;
    }

    .auth-form-heading h2 {
        font-size: 38px;
    }

    .auth-mobile-footer {
        display: block;
        width: 100%;
        max-width: 520px;
        margin: 28px auto 0;
        color: var(--colour-slate-400);
        font-size: 10px;
        text-align: center;
    }
}

/*
|--------------------------------------------------------------------------
| Small mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 520px) {
    .auth-form-panel {
        padding-right: 16px;
        padding-left: 16px;
    }

    .auth-mobile-brand {
        margin-bottom: 24px;
    }

    .auth-mobile-brand img {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .auth-form-wrapper {
        width: 100%;
        padding: 24px 20px;
        border-radius: 18px;
        box-shadow:
            0 15px 40px rgba(15, 23, 42, 0.11);
    }

    .auth-form-heading h2 {
        font-size: 34px;
    }

    .auth-form-heading p {
        font-size: 14px;
    }

    .auth-eyebrow {
        margin-bottom: 14px;
        font-size: 10px;
    }

    .form-control-wrap input {
        min-height: 56px;
        font-size: 16px;
    }

    .auth-submit {
        min-height: 58px;
    }
}

/*
|--------------------------------------------------------------------------
| Very small or short screens
|--------------------------------------------------------------------------
*/

@media (max-height: 720px) and (min-width: 821px) {
    .auth-brand-panel {
        padding-top: 26px;
        padding-bottom: 24px;
    }

    .auth-brand-copy {
        margin-top: 34px;
    }

    .auth-brand-copy h1 {
        font-size: 40px;
    }

    .auth-brand-copy p {
        margin-top: 16px;
    }

    .auth-feature-grid {
        margin-top: 24px;
    }

    .auth-feature-card {
        min-height: 58px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .auth-brand-footer {
        margin-top: 28px;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/*
|--------------------------------------------------------------------------
| Authentication secondary actions
|--------------------------------------------------------------------------
*/

.auth-submit-link {
    text-decoration: none;
}

.auth-submit-link svg:first-child {
    order: -1;
}

.auth-secondary-action {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.auth-secondary-action a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--colour-slate-600);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.auth-secondary-action a:hover {
    color: var(--colour-blue-600);
}

.auth-secondary-action svg {
    width: 17px;
    height: 17px;
}

/*
|--------------------------------------------------------------------------
| Password requirements
|--------------------------------------------------------------------------
*/

.password-requirements {
    margin-top: -8px;
    padding: 15px 17px;
    border: 1px solid var(--colour-slate-200);
    border-radius: 12px;
    color: var(--colour-slate-600);
    background: var(--colour-slate-50);
    font-size: 12px;
    line-height: 1.6;
}

.password-requirements strong {
    display: block;
    margin-bottom: 7px;
    color: var(--colour-slate-700);
    font-size: 12px;
}

.password-requirements ul {
    display: grid;
    gap: 3px;
    margin: 0;
    padding-left: 18px;
}

.auth-brand-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.auth-brand-footer a:hover {
    color: rgba(255, 255, 255, 0.78);
}

/*
|--------------------------------------------------------------------------
| ServiceFlowOS authenticated layout
|--------------------------------------------------------------------------
*/

.admin-page {
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background: #f4f6f9;
}

.admin-page,
.admin-page button,
.admin-page input,
.admin-page select,
.admin-page textarea {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    width: 280px;
    color: #ffffff;
    background:
        linear-gradient(180deg,
            var(--company-primary, #102132),
            #0b1722);
    box-shadow: 18px 0 50px rgba(5, 15, 25, 0.08);
}

.admin-sidebar-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 18px 18px 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.admin-sidebar-logo,
.admin-sidebar-logo-fallback {
    display: grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
}

.admin-sidebar-logo img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    box-sizing: border-box;
    object-fit: contain;
}

.admin-sidebar-logo-fallback {
    color: var(--company-primary, #102132);
    font-size: 16px;
    font-weight: 900;
}

.admin-sidebar-brand-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.admin-sidebar-brand-copy strong {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-brand-copy small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    line-height: 1.25;
}

.admin-sidebar-close {
    display: none;
    width: 38px;
    height: 38px;
    margin-left: auto;
    padding: 9px;
    border: 0;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.admin-sidebar-close svg {
    display: block;
    width: 100%;
    height: 100%;
}

.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
}

.admin-nav-heading {
    display: block;
    padding: 18px 12px 8px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.admin-nav-heading:first-child {
    padding-top: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    margin: 3px 0;
    padding: 9px 12px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.admin-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
}

.admin-nav-link.is-active {
    color: #ffffff;
    background: var(--company-accent, #1e74d8);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13);
}

.admin-nav-icon {
    display: grid;
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    place-items: center;
}

.admin-nav-icon svg {
    width: 20px;
    height: 20px;
}

.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-sidebar-user,
.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar-user {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.admin-user-avatar {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--company-accent, #1e74d8);
    font-size: 12px;
    font-weight: 900;
}

.admin-sidebar-user div,
.admin-topbar-user div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-sidebar-user strong,
.admin-topbar-user strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-user span:not(.admin-user-avatar),
.admin-topbar-user span:not(.admin-user-avatar) {
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
}

.admin-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-sidebar-logout:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
}

.admin-sidebar-logout svg {
    width: 17px;
    height: 17px;
}

.admin-powered-by {
    display: block;
    margin-top: 13px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

.admin-powered-by:hover {
    color: rgba(255, 255, 255, 0.72);
}

.admin-main {
    display: flex;
    min-height: 100vh;
    margin-left: 280px;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #e5e9ef;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.admin-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    margin-right: 14px;
    padding: 10px;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    color: #344054;
    background: #ffffff;
    cursor: pointer;
}

.admin-menu-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

.admin-topbar-copy {
    display: grid;
    gap: 2px;
}

.admin-topbar-copy span {
    color: #98a2b3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-topbar-copy strong {
    color: #1d2939;
    font-size: 13px;
}

.admin-topbar-user {
    margin-left: auto;
}

.admin-topbar-user span:not(.admin-user-avatar) {
    color: #667085;
}

.admin-content {
    flex: 1;
    width: min(100%, 1450px);
    margin: 0 auto;
    padding: 34px 34px 50px;
    box-sizing: border-box;
}

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

.admin-page-eyebrow,
.settings-card-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--company-accent, #1e74d8);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.admin-page-heading h1 {
    margin: 0;
    color: #101828;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.admin-page-heading p {
    max-width: 720px;
    margin: 10px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.65;
}

.admin-main-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 19px 34px;
    border-top: 1px solid #e5e9ef;
    color: #98a2b3;
    background: #ffffff;
    font-size: 10px;
}

.admin-main-footer a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.admin-main-footer a:hover {
    color: var(--company-accent, #1e74d8);
}

.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: none;
    background: rgba(9, 18, 28, 0.55);
    backdrop-filter: blur(3px);
}

/*
|--------------------------------------------------------------------------
| Settings navigation
|--------------------------------------------------------------------------
*/

.settings-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid #e1e7ee;
    border-radius: 12px;
    background: #ffffff;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.settings-tabs a {
    flex: 0 0 auto;
    padding: 10px 17px;
    border-radius: 8px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.settings-tabs a:hover {
    color: #344054;
    background: #f5f7fa;
}

.settings-tabs a.is-active {
    color: #ffffff;
    background: var(--company-accent, #1e74d8);
}

/*
|--------------------------------------------------------------------------
| Settings forms
|--------------------------------------------------------------------------
*/

.settings-form {
    display: grid;
    gap: 22px;
}

.settings-card {
    overflow: hidden;
    border: 1px solid #e1e7ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 9px 28px rgba(16, 24, 40, 0.04);
}

.settings-card-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 27px;
    border-bottom: 1px solid #edf0f4;
    background: #fbfcfd;
}

.settings-card-heading h2 {
    margin: 0;
    color: #101828;
    font-size: 19px;
    line-height: 1.25;
}

.settings-card-heading p {
    max-width: 720px;
    margin: 7px 0 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.6;
}

.settings-grid {
    display: grid;
    gap: 22px 24px;
    padding: 27px;
}

.settings-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-field {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

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

.settings-field label {
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.settings-field label span {
    color: #d92d20;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d6dde6;
    border-radius: 9px;
    outline: none;
    color: #172033;
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.settings-field input,
.settings-field select {
    min-height: 47px;
    padding: 10px 13px;
}

.settings-field textarea {
    min-height: 120px;
    padding: 12px 13px;
    resize: vertical;
}

.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus {
    border-color: var(--company-accent, #1e74d8);
    box-shadow:
        0 0 0 4px color-mix(in srgb,
            var(--company-accent, #1e74d8) 12%,
            transparent);
}

.settings-field input[type="file"] {
    padding: 8px;
}

.settings-field input[type="file"]::file-selector-button {
    min-height: 31px;
    margin-right: 11px;
    padding: 6px 11px;
    border: 0;
    border-radius: 7px;
    color: #344054;
    background: #eef2f6;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.settings-field small {
    color: #98a2b3;
    font-size: 10px;
    line-height: 1.55;
}

.settings-branding-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 27px;
    padding: 27px;
}

.settings-branding-layout .settings-grid {
    padding: 0;
}

.settings-logo-preview {
    display: grid;
    align-content: start;
    gap: 9px;
}

.settings-logo-preview>span {
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.settings-logo-preview-box {
    display: grid;
    min-height: 170px;
    padding: 22px;
    place-items: center;
    border: 1px dashed #cfd8e3;
    border-radius: 12px;
    background:
        linear-gradient(45deg, #f7f9fb 25%, transparent 25%),
        linear-gradient(-45deg, #f7f9fb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f7f9fb 75%),
        linear-gradient(-45deg, transparent 75%, #f7f9fb 75%);
    background-position:
        0 0,
        0 8px,
        8px -8px,
        -8px 0;
    background-size: 16px 16px;
}

.settings-logo-preview-box img {
    display: block;
    max-width: 100%;
    max-height: 125px;
    object-fit: contain;
}

.settings-logo-preview-box strong {
    color: #98a2b3;
    font-size: 12px;
}

.settings-colour-control {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 9px;
}

.settings-colour-picker {
    width: 52px !important;
    padding: 4px !important;
    cursor: pointer;
}

.settings-save-bar {
    position: sticky;
    bottom: 18px;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px;
    border: 1px solid #dce3eb;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 42px rgba(16, 24, 40, 0.14);
    backdrop-filter: blur(16px);
}

.settings-save-bar>div {
    display: grid;
    gap: 3px;
}

.settings-save-bar strong {
    color: #101828;
    font-size: 13px;
}

.settings-save-bar span {
    font-size: 10px;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 45px;
    padding: 10px 17px;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.admin-button svg {
    width: 17px;
    height: 17px;
}

.admin-button-primary {
    color: #ffffff;
    background: var(--company-accent, #1e74d8);
    box-shadow:
        0 9px 20px color-mix(in srgb,
            var(--company-accent, #1e74d8) 22%,
            transparent);
}

.admin-button-primary:hover {
    filter: brightness(0.92);
}

/*
|--------------------------------------------------------------------------
| Admin alerts
|--------------------------------------------------------------------------
*/

.admin-alert {
    margin-bottom: 20px;
    padding: 15px 17px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.admin-alert strong {
    display: block;
    margin-bottom: 4px;
}

.admin-alert ul {
    margin: 5px 0 0;
    padding-left: 19px;
}

.admin-alert-success {
    border: 1px solid #a9ddbc;
    color: #17663a;
    background: #effbf3;
}

.admin-alert-error {
    border: 1px solid #efb1b1;
    color: #9f2727;
    background: #fff1f1;
}

.admin-alert-warning {
    border: 1px solid #ebd08f;
    color: #815f12;
    background: #fff9e6;
}

/*
|--------------------------------------------------------------------------
| Dashboard placeholders
|--------------------------------------------------------------------------
*/

.dashboard-welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 22px;
    padding: 27px;
    border: 1px solid #e1e7ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 9px 28px rgba(16, 24, 40, 0.04);
}

.dashboard-welcome-card h2 {
    margin: 0;
    color: #101828;
    font-size: 23px;
}

.dashboard-welcome-card p {
    max-width: 720px;
    margin: 8px 0 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.65;
}

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

.dashboard-stat-card {
    display: grid;
    gap: 6px;
    padding: 22px;
    border: 1px solid #e1e7ee;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.035);
}

.dashboard-stat-card>span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-stat-card strong {
    color: #101828;
    font-size: 29px;
    letter-spacing: -0.04em;
}

.dashboard-stat-card small {
    color: #98a2b3;
    font-size: 10px;
}

/*
|--------------------------------------------------------------------------
| Responsive admin layout
|--------------------------------------------------------------------------
*/

@media (max-width: 1180px) {

    .settings-grid-three,
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-sidebar {
        width: min(86vw, 300px);
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .admin-sidebar-is-open {
        overflow: hidden;
    }

    .admin-sidebar-is-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-is-open .admin-sidebar-overlay {
        display: block;
    }

    .admin-sidebar-close,
    .admin-menu-button {
        display: block;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar {
        padding: 0 20px;
    }

    .admin-content {
        padding: 28px 20px 45px;
    }

    .admin-main-footer {
        padding: 18px 20px;
    }

    .settings-branding-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .admin-topbar-user div {
        display: none;
    }

    .admin-content {
        padding: 24px 14px 40px;
    }

    .admin-page-heading {
        margin-bottom: 20px;
    }

    .admin-page-heading h1 {
        font-size: 28px;
    }

    .settings-grid-two,
    .settings-grid-three,
    .dashboard-stat-grid {
        grid-template-columns: 1fr;
    }

    .settings-card-heading,
    .settings-grid,
    .settings-branding-layout {
        padding: 20px;
    }

    .settings-branding-layout {
        grid-template-columns: 1fr;
    }

    .settings-logo-preview-box {
        min-height: 140px;
    }

    .settings-save-bar {
        bottom: 10px;
        align-items: stretch;
        flex-direction: column;
    }

    .settings-save-bar .admin-button {
        width: 100%;
    }

    .dashboard-welcome-card {
        align-items: stretch;
        flex-direction: column;
        padding: 22px;
    }

    .dashboard-welcome-card .admin-button {
        width: 100%;
        box-sizing: border-box;
    }

    .admin-main-footer {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }
}

/*
|--------------------------------------------------------------------------
| Document settings
|--------------------------------------------------------------------------
*/

.document-sequence-list {
    display: grid;
    gap: 18px;
    padding: 27px;
}

.document-sequence-card {
    overflow: hidden;
    border: 1px solid #e1e7ee;
    border-radius: 13px;
    background: #ffffff;
}

.document-sequence-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #e9edf2;
    background: #f8fafc;
}

.document-sequence-heading>div {
    display: grid;
    gap: 5px;
}

.document-sequence-heading>div>span {
    color: #667085;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.document-sequence-heading strong {
    color: #101828;
    font-size: 19px;
    line-height: 1.25;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.document-preview-label {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    color: #667085;
    background: #ffffff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.document-sequence-fields {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.5fr) minmax(130px, 0.7fr) minmax(170px, 0.9fr) minmax(220px, 1.2fr);
    gap: 20px;
    padding: 20px;
}

.document-placeholder-help {
    margin: 0 27px 27px;
    padding: 17px 19px;
    border: 1px solid #dce5ef;
    border-radius: 11px;
    color: #667085;
    background: #f8fafc;
    font-size: 11px;
    line-height: 1.6;
}

.document-placeholder-help>strong {
    display: block;
    margin-bottom: 9px;
    color: #344054;
    font-size: 11px;
}

.document-placeholder-help>div {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 9px;
}

.document-placeholder-help>div>span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border: 1px solid #e0e6ed;
    border-radius: 7px;
    background: #ffffff;
}

.document-placeholder-help p {
    margin: 0;
}

.document-placeholder-help code {
    color: var(--company-accent, #1e74d8);
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 10px;
    font-weight: 800;
}

.settings-field-label {
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.settings-switch-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 47px;
    padding: 9px 12px;
    box-sizing: border-box;
    border: 1px solid #d6dde6;
    border-radius: 9px;
    color: #475467;
    background: #ffffff;
    cursor: pointer;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.settings-switch-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-switch {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #cfd7e1;
    transition: background 160ms ease;
}

.settings-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(16, 24, 40, 0.22);
    content: "";
    transition: transform 160ms ease;
}

.settings-switch-row input:checked+.settings-switch {
    background: var(--company-accent, #1e74d8);
}

.settings-switch-row input:checked+.settings-switch::after {
    transform: translateX(18px);
}

.settings-switch-row input:focus-visible+.settings-switch {
    outline: 3px solid color-mix(in srgb,
            var(--company-accent, #1e74d8) 20%,
            transparent);
    outline-offset: 2px;
}

.settings-input-suffix {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: hidden;
    border: 1px solid #d6dde6;
    border-radius: 9px;
    background: #ffffff;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.settings-input-suffix:focus-within {
    border-color: var(--company-accent, #1e74d8);
    box-shadow:
        0 0 0 4px color-mix(in srgb,
            var(--company-accent, #1e74d8) 12%,
            transparent);
}

.settings-input-suffix input {
    min-height: 45px;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.settings-input-suffix>span {
    display: flex;
    align-items: center;
    padding: 0 13px;
    border-left: 1px solid #e1e6ec;
    color: #667085;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1250px) {
    .document-sequence-fields {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .document-sequence-list {
        padding: 20px;
    }

    .document-sequence-heading {
        align-items: flex-start;
        flex-direction: column-reverse;
        padding: 17px;
    }

    .document-sequence-heading strong {
        font-size: 17px;
    }

    .document-sequence-fields {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .document-placeholder-help {
        margin: 0 20px 20px;
    }
}

.page-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px
}

.page-action-buttons {
    display: flex;
    gap: 10px
}

/* ==========================================================================
   Customers
   ========================================================================== */

.page-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.customer-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.customer-search-form input[type="search"],
.customer-search-form input[type="text"],
.customer-search-form select {
    min-width: 180px;
    padding: 12px 15px;
    border: 1px solid #d8dee7;
    border-radius: 10px;
    background: #fff;
    font-size: .95rem;
    transition: .2s;
}

.customer-search-form input:focus,
.customer-search-form select:focus {
    outline: none;
    border-color: var(--company-primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, .12);
}

.customer-list-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e6ebf2;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.customer-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    border-bottom: 1px solid #edf1f5;
    flex-wrap: wrap;
}

.customer-list-heading strong {
    display: block;
    font-size: 1.2rem;
    color: #111827;
}

.customer-list-heading span {
    color: #6b7280;
    font-size: .92rem;
}

.customer-table-wrap {
    overflow: auto;
}

.customer-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.customer-table thead {
    background: #f8fafc;
}

.customer-table th {
    text-align: left;
    padding: 16px 22px;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
    font-weight: 700;
}

.customer-table td {
    padding: 18px 22px;
    border-top: 1px solid #edf1f5;
    vertical-align: top;
}

.customer-table tbody tr {
    transition: .2s;
}

.customer-table tbody tr:hover {
    background: #f9fbfd;
}

.customer-name-link {
    display: block;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 4px;
}

.customer-name-link:hover {
    color: var(--company-primary);
}

.customer-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--company-primary);
    font-size: .72rem;
    font-weight: 600;
    margin-top: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    gap: 6px;
}

.status-active {
    background: #ecfdf3;
    color: #067647;
}

.status-archived {
    background: #fef3f2;
    color: #b42318;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: .2s;
}

.table-action-link:hover {
    background: var(--company-primary);
    color: #fff;
}

.empty-state {
    padding: 70px 30px;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 22px;
}

/* Pagination */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dce3ec;
    color: #374151;
    font-weight: 600;
    transition: .2s;
}

.pagination a:hover {
    background: var(--company-primary);
    color: #fff;
    border-color: var(--company-primary);
}

.pagination a.is-active {
    background: var(--company-primary);
    color: #fff;
    border-color: var(--company-primary);
}

/* Customer Form */

.customer-form {
    display: grid;
    gap: 24px;
}

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.customer-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.customer-card h3 {
    margin: 0 0 20px;
    font-size: 1.1rem;
}

.customer-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.customer-card input,
.customer-card textarea,
.customer-card select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8dee7;
    border-radius: 10px;
    font-size: .95rem;
    transition: .2s;
    background: #fff;
}

.customer-card textarea {
    min-height: 130px;
    resize: vertical;
}

.customer-card input:focus,
.customer-card textarea:focus,
.customer-card select:focus {
    outline: none;
    border-color: var(--company-primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, .12);
}

.customer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Customer Profile */

.customer-profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
}

.customer-sidebar {
    display: grid;
    gap: 20px;
}

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

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #edf1f5;
    padding-bottom: 10px;
}

.info-row strong {
    color: #111827;
}

.customer-timeline {
    display: grid;
    gap: 16px;
}

.timeline-item {
    border-left: 3px solid var(--company-primary);
    padding-left: 18px;
}

.timeline-item time {
    display: block;
    color: #6b7280;
    font-size: .8rem;
    margin-bottom: 4px;
}

/* Mobile */

@media (max-width:992px) {

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

}

@media (max-width:768px) {

    .page-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .customer-search-form {
        flex-direction: column;
    }

    .customer-search-form input,
    .customer-search-form select {
        width: 100%;
    }

    .customer-list-heading {
        flex-direction: column;
        align-items: flex-start;
    }

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

}

/* ==========================================================================
   Staff management
   ========================================================================== */

.staff-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 24px;
}

.staff-summary-card {
    position: relative;
    display: grid;
    gap: 9px;
    min-width: 0;
    overflow: hidden;
    padding: 22px;
    border: 1px solid var(--colour-slate-200);
    border-radius: 14px;
    background: var(--colour-white);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
}

.staff-summary-card::after {
    content: "";
    position: absolute;
    top: -28px;
    right: -28px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: color-mix(in srgb,
            var(--company-accent, #1e74d8) 10%,
            transparent);
    pointer-events: none;
}

.staff-summary-card span {
    position: relative;
    z-index: 1;
    color: var(--colour-slate-500);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.staff-summary-card strong {
    position: relative;
    z-index: 1;
    color: var(--colour-slate-900);
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Staff directory card */

.staff-filter-form {
    display: grid;
    grid-template-columns:
        minmax(260px, 1fr) minmax(145px, 175px) minmax(170px, 205px) minmax(180px, 220px) auto auto;
    gap: 11px;
    align-items: center;
    padding: 19px 22px;
    border-bottom: 1px solid #edf0f4;
    background: #fbfcfd;
}

.staff-filter-form>div {
    min-width: 0;
}

.staff-filter-search {
    min-width: 0;
}

.staff-filter-form input,
.staff-filter-form select {
    width: 100%;
    min-width: 0;
    min-height: 45px;
    padding: 10px 13px;
    border: 1px solid #d6dde6;
    border-radius: 9px;
    outline: none;
    color: var(--colour-slate-900);
    background: var(--colour-white);
    font: inherit;
    font-size: 12px;
    box-shadow: var(--shadow-sm);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.staff-filter-form input::placeholder {
    color: var(--colour-slate-400);
}

.staff-filter-form input:hover,
.staff-filter-form select:hover {
    border-color: #b9c2ce;
}

.staff-filter-form input:focus,
.staff-filter-form select:focus {
    border-color: var(--company-accent, #1e74d8);
    box-shadow:
        0 0 0 4px color-mix(in srgb,
            var(--company-accent, #1e74d8) 12%,
            transparent);
}

.staff-filter-form .admin-button {
    min-height: 45px;
    white-space: nowrap;
}

/* Staff table */

.staff-table {
    min-width: 1080px;
}

.staff-table th:last-child,
.staff-table td:last-child {
    text-align: right;
}

.staff-table td {
    vertical-align: middle;
}

.staff-email-link {
    display: block;
    width: fit-content;
    max-width: 270px;
    overflow: hidden;
    margin-top: 4px;
    color: var(--company-accent, #1e74d8);
    font-size: 11px;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-email-link:hover {
    text-decoration: underline;
}

.staff-job-title {
    display: block;
    margin-top: 5px;
    color: var(--colour-slate-400);
    font-size: 10px;
    line-height: 1.4;
}

.staff-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
}

/* Role badges */

.staff-role-badge,
.staff-invitation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 27px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1;
    white-space: nowrap;
}

.staff-role-admin {
    color: #6941c6;
    background: #f4f3ff;
}

.staff-role-manager {
    color: #175cd3;
    background: #eff8ff;
}

.staff-role-staff {
    color: #475467;
    background: #f2f4f7;
}

/* Invitation badges */

.staff-invitation-badge {
    gap: 6px;
}

.staff-invitation-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
}

.staff-invitation-pending {
    color: #b54708;
    background: #fffaeb;
}

.staff-invitation-accepted {
    color: #067647;
    background: #ecfdf3;
}

.staff-invitation-expired {
    color: #b42318;
    background: #fef3f2;
}

.staff-invitation-revoked {
    color: #475467;
    background: #f2f4f7;
}

.staff-invitation-none {
    border: 1px solid var(--colour-slate-200);
    color: var(--colour-slate-500);
    background: var(--colour-slate-50);
}

.staff-invitation-meta {
    display: block;
    margin-top: 6px;
    color: var(--colour-slate-400);
    font-size: 9px;
    line-height: 1.45;
}

/* Screen-reader utility */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Responsive staff management */

@media (max-width: 1240px) {
    .staff-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-filter-search {
        grid-column: 1 / -1;
    }

    .staff-filter-form .admin-button {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .staff-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .staff-summary-card {
        padding: 19px;
    }

    .staff-summary-card strong {
        font-size: 26px;
    }

    .staff-filter-form {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .staff-filter-search {
        grid-column: auto;
    }

    .staff-table-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Staff create page
   ========================================================================== */

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 2px;
}

.settings-field-error {
    display: block;
    margin-top: 2px;
    color: var(--colour-error);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.staff-role-information {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    grid-column: 1 / -1;
}

.staff-role-information article {
    padding: 18px;
    border: 1px solid var(--colour-slate-200);
    border-radius: 12px;
    background: var(--colour-slate-50);
}

.staff-role-information strong {
    display: block;
    margin-bottom: 6px;
    color: var(--colour-slate-900);
    font-size: 12px;
}

.staff-role-information p {
    margin: 0;
    color: var(--colour-slate-500);
    font-size: 11px;
    line-height: 1.6;
}

.staff-invitation-explainer {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    border: 1px solid #b2ddff;
    border-radius: 12px;
    color: #175cd3;
    background: #eff8ff;
}

.staff-invitation-explainer-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 11px;
    background: rgba(23, 92, 211, 0.1);
}

.staff-invitation-explainer-icon svg {
    width: 21px;
    height: 21px;
}

.staff-invitation-explainer strong {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
}

.staff-invitation-explainer p {
    margin: 0;
    color: #475467;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 760px) {
    .staff-role-information {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-actions .admin-button {
        width: 100%;
    }

    .staff-invitation-explainer {
        flex-direction: column;
    }
}

/* ==========================================================================
   Staff profile page
   ========================================================================== */

.staff-view-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.staff-view-actions form {
    margin: 0;
}

.admin-button-danger {
    color: #ffffff;
    background: var(--colour-error);
    box-shadow:
        0 9px 20px rgba(180, 35, 24, 0.2);
}

.admin-button-danger:hover {
    filter: brightness(0.92);
}

/* Main profile layout */

.staff-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
    gap: 22px;
    align-items: start;
}

.staff-profile-main,
.staff-profile-sidebar {
    display: grid;
    gap: 22px;
}

/* Staff details */

.staff-detail-list {
    display: grid;
    padding: 6px 27px 18px;
}

.staff-detail-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1.35fr);
    gap: 24px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #edf0f4;
}

.staff-detail-row:last-child {
    border-bottom: 0;
}

.staff-detail-row>span {
    color: var(--colour-slate-500);
    font-size: 11px;
    font-weight: 700;
}

.staff-detail-row>strong {
    min-width: 0;
    color: var(--colour-slate-900);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.staff-detail-row a {
    color: var(--company-accent, #1e74d8);
    text-decoration: none;
}

.staff-detail-row a:hover {
    text-decoration: underline;
}

/* Invitation history */

.staff-invitation-history {
    display: grid;
}

.staff-invitation-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 20px 27px;
    border-bottom: 1px solid #edf0f4;
}

.staff-invitation-history-item:last-child {
    border-bottom: 0;
}

.staff-invitation-history-item>div:first-child {
    display: grid;
    justify-items: start;
    gap: 7px;
    min-width: 0;
}

.staff-invitation-history-item strong {
    color: var(--colour-slate-900);
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.staff-invitation-history-item small {
    color: var(--colour-slate-500);
    font-size: 10px;
    line-height: 1.5;
}

.staff-invitation-history-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    color: var(--colour-slate-500);
    font-size: 10px;
    text-align: right;
}

.staff-invitation-history-meta form {
    margin: 0;
}

.staff-invitation-history-meta .table-action-link {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.staff-view-empty-state {
    padding: 44px 27px;
}

/* Account summary sidebar */

.staff-account-summary {
    display: grid;
    padding: 4px 27px 18px;
}

.staff-account-summary>div {
    display: grid;
    gap: 6px;
    padding: 17px 0;
    border-bottom: 1px solid #edf0f4;
}

.staff-account-summary>div:last-child {
    border-bottom: 0;
}

.staff-account-summary span {
    color: var(--colour-slate-500);
    font-size: 10px;
    font-weight: 700;
}

.staff-account-summary strong {
    color: var(--colour-slate-900);
    font-size: 12px;
    line-height: 1.5;
}

.staff-resend-card-body {
    padding: 22px 27px 27px;
}

.staff-resend-card-body .admin-button {
    width: 100%;
}

/* Responsive */

@media (max-width: 1050px) {
    .staff-profile-grid {
        grid-template-columns: 1fr;
    }

    .staff-profile-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .staff-view-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .staff-view-actions .admin-button,
    .staff-view-actions form,
    .staff-view-actions form .admin-button {
        width: 100%;
    }

    .staff-profile-sidebar {
        grid-template-columns: 1fr;
    }

    .staff-detail-row {
        grid-template-columns: 1fr;
        gap: 7px;
        align-items: start;
    }

    .staff-detail-row>strong {
        text-align: left;
    }

    .staff-invitation-history-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .staff-invitation-history-meta {
        justify-content: space-between;
        text-align: left;
    }
}

@media (max-width: 520px) {

    .staff-detail-list,
    .staff-account-summary {
        padding-right: 20px;
        padding-left: 20px;
    }

    .staff-invitation-history-item {
        padding-right: 20px;
        padding-left: 20px;
    }

    .staff-invitation-history-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .staff-invitation-history-meta .table-action-link {
        width: 100%;
    }

    .staff-resend-card-body {
        padding: 20px;
    }
}

/*
|--------------------------------------------------------------------------
| ServiceFlowOS Dashboard
|--------------------------------------------------------------------------
*/

.dashboard-section {
    margin-top: 34px;
}

.dashboard-section-heading,
.dashboard-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.dashboard-section-heading h2,
.dashboard-panel-heading h2 {
    margin: 4px 0 0;
    color: #111827;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.admin-section-eyebrow {
    display: block;
    color: #1672e5;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dashboard-section-caption {
    color: #8290a5;
    font-size: 0.78rem;
}

/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.dashboard-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    align-items: center;
    gap: 52px;
    min-height: 285px;
    padding: 42px 44px;
    border: 1px solid #dce4ef;
    border-radius: 26px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 249, 255, 0.96));
    box-shadow:
        0 22px 65px rgba(15, 31, 57, 0.08);
}

.dashboard-hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.dashboard-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image:
        linear-gradient(rgba(18, 55, 99, 0.7) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(18, 55, 99, 0.7) 1px,
            transparent 1px);
    background-size: 38px 38px;
    mask-image:
        linear-gradient(to right,
            transparent,
            black);
}

.dashboard-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.dashboard-hero-orb-one {
    top: -150px;
    right: -80px;
    width: 430px;
    height: 430px;
    background: rgba(39, 117, 229, 0.17);
}

.dashboard-hero-orb-two {
    right: 260px;
    bottom: -260px;
    width: 440px;
    height: 440px;
    background: rgba(111, 78, 246, 0.11);
}

.dashboard-hero-copy {
    max-width: 770px;
}

.dashboard-hero-copy h2 {
    margin: 10px 0 14px;
    color: #111827;
    font-size: clamp(2rem, 3vw, 3.15rem);
    line-height: 1.03;
    letter-spacing: -0.055em;
}

.dashboard-hero-copy>p {
    max-width: 690px;
    margin: 0;
    color: #66758c;
    font-size: 0.98rem;
    line-height: 1.75;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 25px;
}

.dashboard-hero-actions .admin-button svg {
    width: 18px;
    height: 18px;
}

.dashboard-hero-status {
    position: relative;
    display: grid;
    gap: 14px;
    padding: 23px;
    border: 1px solid rgba(26, 95, 183, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        0 18px 45px rgba(17, 41, 73, 0.08);
    backdrop-filter: blur(18px);
}

.dashboard-system-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(31, 182, 123, 0.09);
    color: #16865e;
    font-size: 0.7rem;
    font-weight: 800;
}

.dashboard-system-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25b77d;
    box-shadow:
        0 0 0 5px rgba(37, 183, 125, 0.12);
}

.dashboard-hero-date {
    display: grid;
    gap: 2px;
    padding: 4px 2px 13px;
    border-bottom: 1px solid #e4eaf2;
}

.dashboard-hero-date small {
    color: #8591a4;
    font-size: 0.7rem;
}

.dashboard-hero-date strong {
    color: #172033;
    font-size: 0.97rem;
}

.dashboard-settings-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px;
    border-radius: 14px;
    background: #edf5ff;
    color: #1769cc;
    transition:
        background 200ms ease,
        transform 200ms ease;
}

.dashboard-settings-link:hover {
    background: #e3f0ff;
    transform: translateY(-2px);
}

.dashboard-settings-link span {
    display: grid;
    gap: 2px;
}

.dashboard-settings-link small {
    color: #72839a;
    font-size: 0.65rem;
}

.dashboard-settings-link strong {
    font-size: 0.78rem;
}

.dashboard-settings-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/*
|--------------------------------------------------------------------------
| Statistics
|--------------------------------------------------------------------------
*/

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

.dashboard-stat-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 205px;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid #dde5ef;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 14px 38px rgba(18, 40, 69, 0.055);
    transition:
        border-color 220ms ease,
        box-shadow 220ms ease,
        transform 220ms ease;
}

.dashboard-stat-card::before {
    position: absolute;
    top: -70px;
    right: -60px;
    z-index: -1;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    content: "";
    opacity: 0.12;
}

.dashboard-stat-card-blue::before {
    background: #2680e8;
}

.dashboard-stat-card-purple::before {
    background: #7b61ef;
}

.dashboard-stat-card-cyan::before {
    background: #2bb8d6;
}

.dashboard-stat-card-green::before {
    background: #28b678;
}

.dashboard-stat-card:hover {
    border-color: rgba(39, 119, 224, 0.28);
    box-shadow:
        0 22px 55px rgba(18, 40, 69, 0.11);
    transform: translateY(-5px);
}

.dashboard-stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dashboard-stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #edf5ff;
    color: #2477d9;
}

.dashboard-stat-icon svg {
    width: 23px;
    height: 23px;
}

.dashboard-stat-arrow {
    width: 18px;
    height: 18px;
    color: #9ba8b9;
    transition:
        color 200ms ease,
        transform 200ms ease;
}

.dashboard-stat-card:hover .dashboard-stat-arrow {
    color: #2377da;
    transform: translateX(4px);
}

.dashboard-stat-label {
    color: #66758a;
    font-size: 0.76rem;
    font-weight: 700;
}

.dashboard-stat-value {
    display: block;
    margin: 5px 0 2px;
    color: #111827;
    font-size: 2rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.dashboard-stat-description {
    color: #8794a7;
    font-size: 0.72rem;
}

.dashboard-stat-trend {
    margin-top: auto;
    padding-top: 18px;
    color: #5b6b80;
    font-size: 0.69rem;
    font-weight: 600;
}

/*
|--------------------------------------------------------------------------
| Panels
|--------------------------------------------------------------------------
*/

.dashboard-primary-grid,
.dashboard-secondary-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.dashboard-primary-grid {
    grid-template-columns:
        minmax(0, 1.18fr) minmax(340px, 0.82fr);
}

.dashboard-secondary-grid {
    grid-template-columns:
        minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.dashboard-panel {
    overflow: hidden;
    padding: 27px;
    border: 1px solid #dde5ef;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 15px 42px rgba(18, 40, 69, 0.055);
}

.dashboard-panel-heading-row {
    align-items: center;
}

.dashboard-panel-heading-row>a {
    color: #2677d9;
    font-size: 0.75rem;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| Quick actions
|--------------------------------------------------------------------------
*/

.dashboard-quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-quick-action {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 14px;
    border: 1px solid #e1e7ef;
    border-radius: 16px;
    background: #fbfcfe;
    transition:
        border-color 200ms ease,
        background 200ms ease,
        transform 200ms ease;
}

.dashboard-quick-action:hover {
    border-color: rgba(37, 119, 219, 0.24);
    background: #f4f9ff;
    transform: translateY(-3px);
}

.dashboard-quick-action-icon {
    width: 43px;
    height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eaf4ff;
    color: #2074d6;
}

.dashboard-quick-action-icon svg {
    width: 22px;
    height: 22px;
}

.dashboard-quick-action-copy {
    display: grid;
    gap: 2px;
}

.dashboard-quick-action-copy strong {
    color: #172033;
    font-size: 0.79rem;
}

.dashboard-quick-action-copy small {
    color: #8995a7;
    font-size: 0.67rem;
}

.dashboard-quick-action-arrow {
    width: 17px;
    height: 17px;
    color: #9ca9b8;
    transition: transform 200ms ease;
}

.dashboard-quick-action:hover .dashboard-quick-action-arrow {
    transform: translateX(4px);
}

/*
|--------------------------------------------------------------------------
| Workflow
|--------------------------------------------------------------------------
*/

.dashboard-workflow {
    display: grid;
    gap: 5px;
}

.dashboard-workflow-step {
    display: grid;
    grid-template-columns: 35px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}

.dashboard-workflow-step:last-child {
    border-bottom: 0;
}

.dashboard-workflow-number {
    color: #2476d8;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.dashboard-workflow-copy {
    display: grid;
    gap: 2px;
}

.dashboard-workflow-copy strong {
    color: #182135;
    font-size: 0.78rem;
}

.dashboard-workflow-copy small {
    color: #8995a7;
    font-size: 0.66rem;
}

.dashboard-workflow-value {
    min-width: 34px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #eef5fe;
    color: #236fcb;
    font-size: 0.71rem;
    font-weight: 800;
    text-align: center;
}

.dashboard-workflow-progress {
    height: 7px;
    overflow: hidden;
    margin-top: 18px;
    border-radius: 999px;
    background: #edf1f6;
}

.dashboard-workflow-progress span {
    width: 10%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background:
        linear-gradient(90deg,
            #2478dc,
            #7463ef);
}

.dashboard-workflow-help {
    margin: 10px 0 0;
    color: #8a96a8;
    font-size: 0.67rem;
    line-height: 1.6;
}

/*
|--------------------------------------------------------------------------
| Empty states
|--------------------------------------------------------------------------
*/

.dashboard-empty-state {
    min-height: 285px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 30px;
    border: 1px dashed #dfe6ee;
    border-radius: 17px;
    background:
        linear-gradient(145deg,
            #fbfcfe,
            #f7faff);
    text-align: center;
}

.dashboard-empty-state-compact {
    min-height: 285px;
}

.dashboard-empty-state-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 17px;
    background: #ebf4ff;
    color: #2475d4;
}

.dashboard-empty-state-icon svg {
    width: 26px;
    height: 26px;
}

.dashboard-empty-state h3 {
    margin: 0 0 7px;
    color: #172033;
    font-size: 1rem;
}

.dashboard-empty-state p {
    max-width: 390px;
    margin: 0 0 20px;
    color: #7d8a9e;
    font-size: 0.76rem;
    line-height: 1.65;
}

/*
|--------------------------------------------------------------------------
| App banner
|--------------------------------------------------------------------------
*/

.dashboard-app-banner {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
    padding: 28px 30px;
    border: 1px solid #dce4ef;
    border-radius: 22px;
    background:
        radial-gradient(circle at 88% 10%,
            rgba(40, 119, 226, 0.14),
            transparent 31%),
        linear-gradient(135deg,
            #ffffff,
            #f5f9ff);
    box-shadow:
        0 16px 45px rgba(18, 40, 69, 0.06);
}

.dashboard-app-banner-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid #d9e2ed;
    border-radius: 19px;
    background: #ffffff;
    box-shadow:
        0 12px 30px rgba(25, 57, 99, 0.1);
}

.dashboard-app-banner-icon img {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    object-fit: cover;
}

.dashboard-app-banner-copy h2 {
    margin: 4px 0 7px;
    color: #141d2f;
    font-size: 1.35rem;
    letter-spacing: -0.035em;
}

.dashboard-app-banner-copy p {
    max-width: 670px;
    margin: 0;
    color: #738197;
    font-size: 0.76rem;
}

/*
|--------------------------------------------------------------------------
| Responsive dashboard
|--------------------------------------------------------------------------
*/

@media (max-width: 1250px) {
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-primary-grid,
    .dashboard-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 34px;
    }

    .dashboard-hero-status {
        max-width: 520px;
    }

    .dashboard-app-banner {
        grid-template-columns: auto 1fr;
    }

    .dashboard-app-banner>.admin-button {
        grid-column: 1 / -1;
        width: fit-content;
    }
}

@media (max-width: 680px) {
    .dashboard-hero {
        min-height: 0;
        padding: 27px 22px;
        border-radius: 20px;
    }

    .dashboard-hero-copy h2 {
        font-size: 2rem;
    }

    .dashboard-hero-actions {
        display: grid;
    }

    .dashboard-hero-actions .admin-button {
        width: 100%;
    }

    .dashboard-stat-grid,
    .dashboard-quick-action-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-card {
        min-height: 180px;
    }

    .dashboard-panel {
        padding: 22px;
        border-radius: 18px;
    }

    .dashboard-app-banner {
        grid-template-columns: 1fr;
        justify-items: start;
        padding: 24px 22px;
    }

    .dashboard-app-banner>.admin-button {
        grid-column: auto;
        width: 100%;
    }
}

/* ==========================================================================
   Customer type cards
   ========================================================================== */

.customer-type-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.customer-type-fieldset legend {
    margin: 0;
    padding: 0;
    color: var(--colour-slate-900, #152033);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.customer-type-intro {
    margin: 6px 0 16px;
    color: var(--colour-slate-500, #6c778a);
    font-size: 12px;
    line-height: 1.6;
}

.customer-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.customer-type-card {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.customer-type-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.customer-type-card-inner {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 24px;
    gap: 15px;
    align-items: center;
    min-height: 118px;
    padding: 20px;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(15, 34, 58, 0.04);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.customer-type-card:hover .customer-type-card-inner {
    border-color: var(--company-accent, #2677d8);
    box-shadow: 0 10px 24px rgba(15, 34, 58, 0.08);
    transform: translateY(-2px);
}

.customer-type-card-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    color: var(--company-accent, #2677d8);
    background: rgba(38, 119, 216, 0.09);
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.customer-type-card-icon svg {
    width: 25px;
    height: 25px;
}

.customer-type-card-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.customer-type-card-copy strong {
    color: var(--colour-slate-900, #152033);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.customer-type-card-copy small {
    color: var(--colour-slate-500, #6c778a);
    font-size: 11px;
    line-height: 1.55;
}

.customer-type-card-check {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--colour-slate-300, #c8d1dd);
    border-radius: 50%;
    color: transparent;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.customer-type-card-check svg {
    width: 13px;
    height: 13px;
}

.customer-type-card input:checked+.customer-type-card-inner {
    border-color: var(--company-accent, #2677d8);
    background:
        linear-gradient(135deg,
            rgba(38, 119, 216, 0.07),
            rgba(38, 119, 216, 0.02));
    box-shadow:
        0 0 0 3px rgba(38, 119, 216, 0.1),
        0 12px 30px rgba(15, 34, 58, 0.08);
}

.customer-type-card input:checked+.customer-type-card-inner .customer-type-card-icon {
    color: #ffffff;
    background: var(--company-accent, #2677d8);
}

.customer-type-card input:checked+.customer-type-card-inner .customer-type-card-check {
    border-color: var(--company-accent, #2677d8);
    color: #ffffff;
    background: var(--company-accent, #2677d8);
    transform: scale(1.05);
}

.customer-type-card input:focus-visible+.customer-type-card-inner {
    outline: 3px solid rgba(38, 119, 216, 0.22);
    outline-offset: 3px;
}

/* Business name animation */

[data-business-field] {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

[data-business-field][hidden] {
    display: none !important;
}

/* Responsive */

@media (max-width: 760px) {
    .customer-type-options {
        grid-template-columns: 1fr;
    }

    .customer-type-card-inner {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .customer-type-card-inner {
        grid-template-columns: 44px minmax(0, 1fr) 22px;
        gap: 12px;
        padding: 16px;
    }

    .customer-type-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .customer-type-card-icon svg {
        width: 22px;
        height: 22px;
    }
}


/* ==========================================================================
   Customer profile page
   ========================================================================== */

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

/* ==========================================================================
   Customer profile hero
   ========================================================================== */

.customer-profile-statuses {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.customer-profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--colour-slate-200, #e1e7ef);
}

.customer-profile-summary-item {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 20px 24px;
    border-right: 1px solid var(--colour-slate-200, #e1e7ef);
}

.customer-profile-summary-item:last-child {
    border-right: 0;
}

.customer-profile-summary-item span {
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.customer-profile-summary-item strong,
.customer-profile-summary-item a {
    min-width: 0;
    color: var(--colour-slate-900, #142033);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.customer-profile-summary-item a {
    color: var(--company-accent, #2879db);
    text-decoration: none;
}

.customer-profile-summary-item a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Main customer profile layout
   ========================================================================== */

.customer-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.customer-profile-main,
.customer-sidebar {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.customer-sidebar {
    position: sticky;
    top: 96px;
}

/* ==========================================================================
   Customer information blocks
   ========================================================================== */

.customer-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 24px;
}

.customer-detail-block {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 14px;
    background: #ffffff;
}

.customer-detail-block h3 {
    margin: 0;
    padding: 16px 18px;
    border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
    color: var(--colour-slate-900, #142033);
    background: var(--colour-slate-50, #f8fafc);
    font-size: 13px;
    font-weight: 800;
}

.customer-detail-list {
    display: grid;
    margin: 0;
}

.customer-detail-list>div {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(0, 1.35fr);
    gap: 16px;
    align-items: start;
    padding: 14px 18px;
    border-bottom: 1px solid var(--colour-slate-100, #edf1f6);
}

.customer-detail-list>div:last-child {
    border-bottom: 0;
}

.customer-detail-list dt {
    margin: 0;
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.customer-detail-list dd {
    min-width: 0;
    margin: 0;
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.customer-detail-list dd a {
    color: var(--company-accent, #2879db);
    text-decoration: none;
}

.customer-detail-list dd a:hover {
    text-decoration: underline;
}

.customer-detail-list-compact>div {
    grid-template-columns: 110px minmax(0, 1fr);
    padding: 13px 0;
}

.customer-detail-list-compact {
    padding: 4px 20px 18px;
}

/* ==========================================================================
   Contacts and sites
   ========================================================================== */

.customer-card-list {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.customer-record-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(17, 34, 58, 0.04);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.customer-record-card:hover {
    border-color: rgba(40, 121, 219, 0.45);
    box-shadow: 0 10px 24px rgba(17, 34, 58, 0.08);
    transform: translateY(-1px);
}

.customer-record-card-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.customer-record-card-heading h3 {
    margin: 0;
    color: var(--colour-slate-900, #142033);
    font-size: 14px;
    font-weight: 800;
}

.customer-record-card-heading p {
    margin: 5px 0 0;
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
    line-height: 1.55;
}

.customer-record-badges {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.customer-record-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 13px;
    border-top: 1px solid var(--colour-slate-100, #edf1f6);
    color: var(--colour-slate-600, #5f6d82);
    font-size: 11px;
}

.customer-record-meta a {
    color: var(--company-accent, #2879db);
    font-weight: 700;
    text-decoration: none;
}

.customer-record-meta a:hover {
    text-decoration: underline;
}

.customer-type-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid rgba(40, 121, 219, 0.18);
    border-radius: 999px;
    color: var(--company-accent, #2879db);
    background: rgba(40, 121, 219, 0.08);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==========================================================================
   Customer notes
   ========================================================================== */

.customer-legacy-note {
    margin: 20px 20px 0;
    padding: 17px 18px;
    border: 1px solid #f6d89a;
    border-radius: 13px;
    background: #fff9eb;
}

.customer-legacy-note strong {
    display: block;
    margin-bottom: 6px;
    color: #8a5b00;
    font-size: 11px;
    font-weight: 800;
}

.customer-legacy-note p {
    margin: 0;
    color: #74552a;
    font-size: 11px;
    line-height: 1.65;
}

.customer-note-list {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.customer-note-card {
    display: grid;
    gap: 10px;
    padding: 17px 18px;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 14px;
    background: #ffffff;
}

.customer-note-card-heading {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.customer-note-card-heading strong {
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 800;
}

.customer-note-card-heading span {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
}

.customer-note-card p {
    margin: 0;
    color: var(--colour-slate-700, #3c4a5f);
    font-size: 11px;
    line-height: 1.7;
}

/* ==========================================================================
   Customer sidebar
   ========================================================================== */

.customer-address {
    display: block;
    padding: 4px 20px 20px;
    color: var(--colour-slate-700, #3c4a5f);
    font-size: 12px;
    font-style: normal;
    line-height: 1.75;
}

.customer-muted-copy {
    margin: 0;
    padding: 4px 20px 20px;
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
    line-height: 1.65;
}

/* ==========================================================================
   Activity timeline
   ========================================================================== */

.customer-timeline {
    position: relative;
    display: grid;
    gap: 0;
    padding: 4px 20px 20px;
}

.customer-timeline::before {
    position: absolute;
    top: 10px;
    bottom: 24px;
    left: 25px;
    width: 2px;
    border-radius: 999px;
    background: var(--colour-slate-200, #e1e7ef);
    content: "";
}

.timeline-item {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 0 0 20px 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    position: absolute;
    top: 3px;
    left: -1px;
    width: 10px;
    height: 10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--company-accent, #2879db);
    box-shadow: 0 0 0 1px rgba(40, 121, 219, 0.2);
    content: "";
}

.timeline-item time {
    color: var(--colour-slate-500, #728096);
    font-size: 9px;
    font-weight: 700;
}

.timeline-item strong {
    color: var(--colour-slate-900, #142033);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
}

.timeline-item span {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
}

/* ==========================================================================
   Compact empty states
   ========================================================================== */

.customer-empty-state-compact {
    margin: 20px;
    padding: 28px 20px;
    border: 1px dashed var(--colour-slate-300, #cad3df);
    border-radius: 14px;
    background: var(--colour-slate-50, #f8fafc);
    text-align: center;
}

.customer-empty-state-compact h3 {
    margin: 0 0 6px;
    color: var(--colour-slate-900, #142033);
    font-size: 13px;
    font-weight: 800;
}

.customer-empty-state-compact p {
    max-width: 430px;
    margin: 0 auto;
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
    line-height: 1.6;
}

/* ==========================================================================
   Customer tabs
   ========================================================================== */

.settings-tabs {
    overflow-x: auto;
    scrollbar-width: thin;
}

.settings-tabs a {
    white-space: nowrap;
}

/* ==========================================================================
   Responsive customer profile
   ========================================================================== */

@media (max-width: 1180px) {
    .customer-profile-grid {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .customer-profile-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-profile-summary-item:nth-child(2) {
        border-right: 0;
    }

    .customer-profile-summary-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
    }
}

@media (max-width: 900px) {
    .customer-profile-grid {
        grid-template-columns: 1fr;
    }

    .customer-sidebar {
        position: static;
    }

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

@media (max-width: 680px) {
    .customer-profile-summary-grid {
        grid-template-columns: 1fr;
    }

    .customer-profile-summary-item {
        border-right: 0;
        border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
    }

    .customer-profile-summary-item:last-child {
        border-bottom: 0;
    }

    .customer-detail-grid {
        gap: 16px;
        padding: 16px;
    }

    .customer-detail-list>div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .customer-record-card-heading,
    .customer-note-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-record-badges {
        justify-content: flex-start;
    }

    .page-actions-row {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-actions,
    .customer-actions .admin-button {
        width: 100%;
    }

    .customer-actions .admin-button {
        justify-content: center;
    }
}

/* ==========================================================================
   Customer directory
   ========================================================================== */

.customer-search-form {
    display: grid;
    grid-template-columns:
        minmax(240px, 1.8fr) minmax(180px, 0.8fr) minmax(170px, 0.8fr) auto;
    gap: 12px;
    align-items: center;
    flex: 1;
    max-width: 900px;
}

.customer-search-form input,
.customer-search-form select,
.customer-list-heading select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 10px;
    color: var(--colour-slate-900, #142033);
    background: #ffffff;
    font: inherit;
    font-size: 12px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.customer-search-form input:focus,
.customer-search-form select:focus,
.customer-list-heading select:focus {
    border-color: var(--company-accent, #2879db);
    box-shadow: 0 0 0 3px rgba(40, 121, 219, 0.12);
}

.customer-search-form .admin-button {
    min-height: 44px;
    justify-content: center;
}

.customer-list-card {
    overflow: hidden;
    padding: 0;
}

.customer-list-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
}

.customer-list-heading>div {
    display: grid;
    gap: 4px;
}

.customer-list-heading strong {
    color: var(--colour-slate-900, #142033);
    font-size: 17px;
    font-weight: 800;
}

.customer-list-heading span {
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
}

.customer-list-heading form {
    min-width: 150px;
}

.customer-list-heading select {
    min-height: 38px;
}

.customer-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.customer-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.customer-table thead {
    background: var(--colour-slate-50, #f7f9fc);
}

.customer-table th {
    padding: 15px 20px;
    border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--colour-slate-100, #edf1f6);
    color: var(--colour-slate-700, #344054);
    font-size: 12px;
    line-height: 1.5;
    vertical-align: middle;
}

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

.customer-table tbody tr {
    transition: background-color 0.18s ease;
}

.customer-table tbody tr:hover {
    background: rgba(40, 121, 219, 0.025);
}

.customer-table-primary {
    display: grid;
    gap: 8px;
    min-width: 190px;
}

.customer-name-link {
    color: var(--colour-slate-900, #142033);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}

.customer-name-link:hover {
    color: var(--company-accent, #2879db);
}

.customer-table-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.customer-reference {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    font-weight: 700;
}

.customer-contact-cell {
    display: grid;
    gap: 3px;
    min-width: 210px;
}

.customer-contact-cell strong {
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 800;
}

.customer-contact-cell a {
    max-width: 260px;
    overflow: hidden;
    color: var(--company-accent, #2879db);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-contact-cell a:hover {
    text-decoration: underline;
}

.customer-contact-cell span {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
}

.customer-table .status-badge {
    white-space: nowrap;
}

.customer-table td:last-child {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.customer-table .table-action-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 9px;
    color: var(--colour-slate-700, #344054);
    background: var(--colour-slate-50, #f7f9fc);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background-color 0.2s ease;
}

.customer-table .table-action-link:hover {
    border-color: var(--company-accent, #2879db);
    color: var(--company-accent, #2879db);
    background: rgba(40, 121, 219, 0.06);
}

/* Customer type pill */

.customer-table .customer-type-badge {
    min-height: 22px;
    padding: 3px 8px;
    font-size: 8px;
}

/* Pagination */

.pagination {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 9px;
    color: var(--colour-slate-600, #5f6d82);
    background: #ffffff;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.pagination a:hover,
.pagination a.is-active {
    border-color: var(--company-accent, #2879db);
    color: #ffffff;
    background: var(--company-accent, #2879db);
}

/* Responsive */

@media (max-width: 1050px) {
    .customer-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .customer-search-form .admin-button {
        width: 100%;
    }
}

@media (max-width: 680px) {
    .customer-search-form {
        grid-template-columns: 1fr;
    }

    .customer-list-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-list-heading form {
        width: 100%;
    }

    .page-actions-row>.admin-button-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Items & Services directory
   ========================================================================== */

.catalogue-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.catalogue-summary-card {
    display: grid;
    gap: 5px;
    padding: 20px;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(17, 34, 58, 0.04);
}

.catalogue-summary-card span {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalogue-summary-card strong {
    color: var(--colour-slate-900, #142033);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.catalogue-summary-card small {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    line-height: 1.5;
}

.catalogue-search-form {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.7fr) minmax(150px, 0.8fr) minmax(160px, 0.9fr) minmax(140px, 0.7fr) auto;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.catalogue-search-form input,
.catalogue-search-form select,
.catalogue-list-heading select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 10px;
    color: var(--colour-slate-900, #142033);
    background: #ffffff;
    font: inherit;
    font-size: 12px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.catalogue-search-form input:focus,
.catalogue-search-form select:focus,
.catalogue-list-heading select:focus {
    border-color: var(--company-accent, #2879db);
    box-shadow: 0 0 0 3px rgba(40, 121, 219, 0.12);
}

.catalogue-search-form .admin-button {
    min-height: 44px;
    justify-content: center;
}

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

.catalogue-list-card {
    overflow: hidden;
    padding: 0;
}

.catalogue-list-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
}

.catalogue-list-heading>div {
    display: grid;
    gap: 4px;
}

.catalogue-list-heading strong {
    color: var(--colour-slate-900, #142033);
    font-size: 17px;
    font-weight: 800;
}

.catalogue-list-heading span {
    color: var(--colour-slate-500, #728096);
    font-size: 11px;
}

.catalogue-list-heading form {
    min-width: 170px;
}

.catalogue-list-heading select {
    min-height: 38px;
}

.catalogue-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.catalogue-table {
    width: 100%;
    min-width: 1020px;
    border-collapse: collapse;
}

.catalogue-table thead {
    background: var(--colour-slate-50, #f7f9fc);
}

.catalogue-table th {
    padding: 15px 20px;
    border-bottom: 1px solid var(--colour-slate-200, #e1e7ef);
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.catalogue-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--colour-slate-100, #edf1f6);
    color: var(--colour-slate-700, #344054);
    font-size: 12px;
    line-height: 1.5;
    vertical-align: middle;
}

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

.catalogue-table tbody tr {
    transition: background-color 0.18s ease;
}

.catalogue-table tbody tr:hover {
    background: rgba(40, 121, 219, 0.025);
}

.catalogue-item-primary {
    display: grid;
    gap: 7px;
    min-width: 230px;
}

.catalogue-item-name {
    color: var(--colour-slate-900, #142033);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.catalogue-item-name:hover {
    color: var(--company-accent, #2879db);
}

.catalogue-item-primary p {
    max-width: 420px;
    margin: 0;
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    line-height: 1.55;
}

.catalogue-item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.catalogue-item-code {
    color: var(--colour-slate-500, #728096);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.catalogue-type-badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.catalogue-type-service {
    color: #175cd3;
    background: #eff8ff;
}

.catalogue-type-product {
    color: #6941c6;
    background: #f4f3ff;
}

.catalogue-type-labour {
    color: #027a48;
    background: #ecfdf3;
}

.catalogue-type-material {
    color: #b54708;
    background: #fffaeb;
}

.catalogue-type-fee {
    color: #c11574;
    background: #fdf2fa;
}

.catalogue-type-other {
    color: #475467;
    background: #f2f4f7;
}

.catalogue-price-cell {
    display: grid;
    gap: 3px;
    min-width: 100px;
}

.catalogue-price-cell strong {
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 800;
}

.catalogue-price-cell span {
    color: var(--colour-slate-500, #728096);
    font-size: 9px;
}

.catalogue-table td:last-child {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.catalogue-empty-state {
    padding: 54px 24px;
}

.catalogue-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 16px;
    color: var(--company-accent, #2879db);
    background: rgba(40, 121, 219, 0.08);
}

.catalogue-empty-icon svg {
    width: 26px;
    height: 26px;
}

@media (max-width: 1200px) {
    .catalogue-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalogue-search-form .admin-button {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .catalogue-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-actions-row {
        align-items: stretch;
        flex-direction: column;
    }

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

@media (max-width: 600px) {

    .catalogue-summary-grid,
    .catalogue-search-form {
        grid-template-columns: 1fr;
    }

    .catalogue-page-actions {
        flex-direction: column;
    }

    .catalogue-page-actions .admin-button {
        width: 100%;
        justify-content: center;
    }

    .catalogue-list-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .catalogue-list-heading form {
        width: 100%;
    }
}

/* ==========================================================================
   Items & Services create/edit form
   ========================================================================== */

.catalogue-item-form {
    display: grid;
    gap: 22px;
}

.required-marker {
    color: #d92d20;
}

.catalogue-type-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.catalogue-type-option {
    display: flex;
    min-height: 94px;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--colour-slate-200, #dfe5ed);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease,
        background-color 0.18s ease;
}

.catalogue-type-option:hover {
    transform: translateY(-1px);
    border-color: rgba(40, 121, 219, 0.45);
    box-shadow: 0 8px 20px rgba(17, 34, 58, 0.06);
}

.catalogue-type-option.is-selected {
    border-color: var(--company-accent, #2879db);
    background: rgba(40, 121, 219, 0.045);
    box-shadow: 0 0 0 3px rgba(40, 121, 219, 0.1);
}

.catalogue-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.catalogue-type-option-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--company-accent, #2879db);
    background: rgba(40, 121, 219, 0.08);
}

.catalogue-type-option-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.catalogue-type-option>span:last-child {
    display: grid;
    gap: 4px;
}

.catalogue-type-option strong {
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 800;
}

.catalogue-type-option small {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    line-height: 1.45;
}

.catalogue-money-input,
.catalogue-percentage-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--colour-slate-200, #dce3ec);
    border-radius: 10px;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.catalogue-money-input:focus-within,
.catalogue-percentage-input:focus-within {
    border-color: var(--company-accent, #2879db);
    box-shadow: 0 0 0 3px rgba(40, 121, 219, 0.12);
}

.catalogue-money-input>span,
.catalogue-percentage-input>span {
    display: grid;
    min-width: 42px;
    min-height: 44px;
    place-items: center;
    color: var(--colour-slate-500, #728096);
    background: var(--colour-slate-50, #f7f9fc);
    font-size: 12px;
    font-weight: 800;
}

.catalogue-money-input input,
.catalogue-percentage-input input {
    min-width: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.catalogue-switch-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 17px 18px;
    border: 1px solid var(--colour-slate-200, #dfe5ed);
    border-radius: 12px;
    background: var(--colour-slate-50, #f8fafc);
    cursor: pointer;
}

.catalogue-switch-row>span:first-child {
    display: grid;
    gap: 4px;
}

.catalogue-switch-row strong {
    color: var(--colour-slate-900, #142033);
    font-size: 12px;
    font-weight: 800;
}

.catalogue-switch-row small {
    color: var(--colour-slate-500, #728096);
    font-size: 10px;
    line-height: 1.5;
}

.catalogue-switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
}

.catalogue-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.catalogue-switch>span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cfd7e3;
    transition: background-color 0.18s ease;
}

.catalogue-switch>span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 34, 58, 0.2);
    content: '';
    transition: transform 0.18s ease;
}

.catalogue-switch input:checked+span {
    background: var(--company-accent, #2879db);
}

.catalogue-switch input:checked+span::after {
    transform: translateX(20px);
}

.catalogue-switch input:focus-visible+span {
    outline: 3px solid rgba(40, 121, 219, 0.2);
    outline-offset: 2px;
}

.catalogue-price-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.catalogue-price-preview>div {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 11px;
    background: #ffffff;
}

.catalogue-price-preview span {
    color: var(--colour-slate-500, #728096);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalogue-price-preview strong {
    color: var(--colour-slate-900, #142033);
    font-size: 18px;
    font-weight: 800;
}

.catalogue-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--colour-slate-200, #e1e7ef);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -8px 28px rgba(17, 34, 58, 0.06);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .catalogue-type-selector {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .catalogue-type-selector,
    .catalogue-price-preview {
        grid-template-columns: 1fr;
    }

    .catalogue-switch-row {
        align-items: flex-start;
    }

    .catalogue-form-actions {
        position: static;
        flex-direction: column-reverse;
    }

    .catalogue-form-actions .admin-button {
        width: 100%;
        justify-content: center;
    }
}


/* --------------------------------------------------------------------------
   Items & Services: view, edit and category management
   -------------------------------------------------------------------------- */
.catalogue-view-actions>div,
.catalogue-category-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.catalogue-inline-form {
    display: inline-flex;
    margin: 0;
}

.catalogue-record-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
}

.catalogue-record-hero h2 {
    margin: 14px 0 6px;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.catalogue-record-hero p {
    max-width: 760px;
    margin-bottom: 0;
    white-space: normal;
}

.catalogue-record-code {
    color: var(--colour-slate-500, #64748b);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.catalogue-record-price {
    min-width: 240px;
    padding: 22px;
    border-radius: 16px;
    background: var(--colour-slate-50, #f8fafc);
    text-align: right;
}

.catalogue-record-price span,
.catalogue-record-price small {
    display: block;
    color: var(--colour-slate-500, #64748b);
}

.catalogue-record-price strong {
    display: block;
    margin: 7px 0;
    font-size: 2rem;
}

.catalogue-detail-grid,
.catalogue-category-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.catalogue-category-layout {
    grid-template-columns: minmax(300px, .78fr) minmax(0, 1.45fr);
    align-items: start;
}

.catalogue-detail-list {
    margin: 0;
}

.catalogue-detail-list>div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--colour-slate-200, #e2e8f0);
}

.catalogue-detail-list>div:last-child {
    border-bottom: 0;
}

.catalogue-detail-list dt {
    color: var(--colour-slate-500, #64748b);
}

.catalogue-detail-list dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}

.catalogue-audit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
}

.catalogue-category-list {
    display: grid;
}

.catalogue-category-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
    border-bottom: 1px solid var(--colour-slate-200, #e2e8f0);
}

.catalogue-category-row:first-child {
    padding-top: 0;
}

.catalogue-category-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.catalogue-category-row p {
    margin: 7px 0;
    color: var(--colour-slate-600, #475569);
}

.catalogue-category-row small {
    color: var(--colour-slate-500, #64748b);
}

.catalogue-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.catalogue-category-title strong {
    font-size: 1.02rem;
}

.catalogue-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

@media (max-width: 900px) {

    .catalogue-record-hero,
    .catalogue-category-row {
        flex-direction: column;
    }

    .catalogue-record-price {
        width: 100%;
        text-align: left;
    }

    .catalogue-detail-grid,
    .catalogue-category-layout,
    .catalogue-audit-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Item categories page
   ========================================================================== */

.catalogue-categories-layout {
    display: grid;
    grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.catalogue-category-form-card,
.catalogue-category-list-card {
    overflow: hidden;
}

.catalogue-category-form-card .settings-card-heading,
.catalogue-category-list-card .settings-card-heading {
    padding: 24px;
    margin: 0;
    border-bottom: 1px solid #e6eaf0;
}

.catalogue-category-form {
    padding: 24px;
}

.catalogue-category-form .settings-field {
    margin-bottom: 20px;
}

.catalogue-category-form .settings-field:last-of-type {
    margin-bottom: 0;
}

.catalogue-category-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #182033;
}

.catalogue-category-form input[type="text"],
.catalogue-category-form input[type="number"],
.catalogue-category-form textarea {
    width: 100%;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #fff;
    padding: 13px 14px;
    font: inherit;
    color: #182033;
    box-sizing: border-box;
}

.catalogue-category-form textarea {
    min-height: 120px;
    max-height: 220px;
    resize: vertical;
}

.catalogue-category-form input:focus,
.catalogue-category-form textarea:focus {
    outline: none;
    border-color: #2d7fe5;
    box-shadow: 0 0 0 3px rgba(45, 127, 229, 0.12);
}

.catalogue-category-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1px solid #e4e8ef;
    border-radius: 12px;
    background: #f8fafc;
}

.catalogue-category-toggle-row strong {
    display: block;
    margin-bottom: 3px;
}

.catalogue-category-toggle-row small {
    display: block;
    color: #718096;
}

.catalogue-category-form-actions {
    margin-top: 20px;
}

.catalogue-category-form-actions .admin-button {
    width: auto;
    min-width: 130px;
}

.catalogue-category-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalogue-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e6eaf0;
}

.catalogue-category-row:last-child {
    border-bottom: 0;
}

.catalogue-category-row-main {
    min-width: 0;
}

.catalogue-category-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.catalogue-category-title-row strong {
    font-size: 16px;
    color: #182033;
}

.catalogue-category-row p {
    margin: 0 0 6px;
    color: #516078;
    line-height: 1.5;
}

.catalogue-category-meta {
    color: #718096;
    font-size: 13px;
}

.catalogue-category-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.catalogue-category-actions .admin-button {
    padding: 10px 14px;
}

.catalogue-category-action-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 10px 4px;
    font: inherit;
    color: #4b5565;
    cursor: pointer;
}

.catalogue-category-action-link:hover {
    color: #182033;
}

.catalogue-category-action-link.is-danger:hover {
    color: #c0392b;
}

@media (max-width: 1050px) {
    .catalogue-categories-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .catalogue-category-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .catalogue-category-actions {
        justify-content: flex-start;
    }

    .catalogue-category-form,
    .catalogue-category-form-card .settings-card-heading,
    .catalogue-category-list-card .settings-card-heading,
    .catalogue-category-row {
        padding-left: 18px;
        padding-right: 18px;
    }
}

.catalogue-category-list-card {
    min-width: 0;
}

.catalogue-category-list {
    width: 100%;
}

.catalogue-category-actions form {
    margin: 0;
}

.catalogue-category-form-card .admin-alert {
    margin: 20px 24px 0;
}