        :root {
            --green: #59bd45;
            --green-bright: #72d75c;
            --green-dark: #328f2b;
            --green-soft: rgba(89, 189, 69, 0.13);

            --black: #090b09;
            --charcoal: #141714;
            --surface: #1c201c;
            --surface-raised: #242924;
            --surface-input: #292f29;

            --white: #ffffff;
            --text: #f4f7f3;
            --muted: #a7b0a7;
            --muted-dark: #788178;

            --border: rgba(255, 255, 255, 0.095);
            --border-strong: rgba(255, 255, 255, 0.16);

            --danger: #ffb2b2;
            --danger-border: rgba(255, 101, 101, 0.34);
            --danger-background: rgba(255, 92, 92, 0.09);

            --radius-large: 32px;
            --radius-medium: 18px;
            --radius-small: 13px;

            --shadow-large: 0 34px 100px rgba(0, 0, 0, 0.5);
            --shadow-green: 0 18px 42px rgba(47, 139, 40, 0.3);
        }

        * {
            box-sizing: border-box;
        }

        html {
            min-height: 100%;
            background: var(--black);
        }

        body {
            min-height: 100vh;
            margin: 0;
            color: var(--text);
            font-family:
                Inter,
                ui-sans-serif,
                system-ui,
                -apple-system,
                BlinkMacSystemFont,
                "Segoe UI",
                sans-serif;
            background:
                radial-gradient(circle at 9% 11%,
                    rgba(89, 189, 69, 0.18),
                    transparent 28%),
                radial-gradient(circle at 91% 89%,
                    rgba(89, 189, 69, 0.09),
                    transparent 26%),
                linear-gradient(135deg,
                    #080a08 0%,
                    #141714 48%,
                    #090b09 100%);
        }

        body,
        input,
        button {
            font: inherit;
        }

        a {
            color: inherit;
        }

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

        .login-page {
            min-height: 100vh;
            display: grid;
            place-items: center;
            padding:
                max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
        }

        .login-shell {
            width: min(1180px, 100%);
            min-height: 720px;
            display: grid;
            grid-template-columns:
                minmax(0, 1.08fr) minmax(400px, 0.82fr);
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: var(--radius-large);
            background: rgba(20, 23, 20, 0.88);
            box-shadow: var(--shadow-large);
            backdrop-filter: blur(20px);
        }

        /*
        |--------------------------------------------------------------------------
        | Brand panel
        |--------------------------------------------------------------------------
        */

        .brand-panel {
            position: relative;
            min-width: 0;
            padding: clamp(42px, 6vw, 80px);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            overflow: hidden;
            isolation: isolate;
            background:
                linear-gradient(145deg,
                    rgba(89, 189, 69, 0.09),
                    transparent 55%),
                #101310;
        }

        .brand-panel::before {
            content: "";
            position: absolute;
            z-index: -2;
            width: 520px;
            height: 520px;
            left: -250px;
            bottom: -275px;
            border: 1px solid rgba(89, 189, 69, 0.28);
            border-radius: 50%;
            box-shadow:
                0 0 0 58px rgba(89, 189, 69, 0.045),
                0 0 0 116px rgba(89, 189, 69, 0.024);
        }

        .brand-panel::after {
            content: "";
            position: absolute;
            z-index: -1;
            width: 350px;
            height: 350px;
            top: -155px;
            right: -130px;
            border-radius: 50%;
            background: rgba(89, 189, 69, 0.09);
            filter: blur(2px);
        }

        .brand-main,
        .brand-bottom {
            position: relative;
            z-index: 1;
        }

        .logo {
            width: min(285px, 72%);
            margin-bottom: clamp(52px, 8vh, 90px);
        }

        .logo img {
            display: block;
            width: 100%;
            max-height: 135px;
            object-fit: contain;
            object-position: left center;
        }

        .brand-kicker {
            display: inline-flex;
            align-items: center;
            gap: 11px;
            margin-bottom: 23px;
            color: var(--green);
            font-size: 0.76rem;
            font-weight: 850;
            letter-spacing: 0.18em;
            text-transform: uppercase;
        }

        .brand-kicker::before {
            content: "";
            width: 36px;
            height: 2px;
            border-radius: 999px;
            background: currentColor;
        }

        .brand-panel h1 {
            max-width: 690px;
            margin: 0;
            font-size: clamp(2.8rem, 5.25vw, 5.25rem);
            line-height: 0.98;
            letter-spacing: -0.06em;
        }

        .brand-panel h1 span {
            display: block;
            color: var(--green);
        }

        .brand-description {
            max-width: 610px;
            margin: 28px 0 0;
            color: var(--muted);
            font-size: clamp(1rem, 1.5vw, 1.1rem);
            line-height: 1.75;
        }

        .system-highlights {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 13px;
            margin-top: 40px;
        }

        .system-highlight {
            min-width: 0;
            padding: 18px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.026);
        }

        .system-highlight-icon {
            width: 36px;
            height: 36px;
            margin-bottom: 14px;
            display: grid;
            place-items: center;
            border-radius: 11px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

        .system-highlight svg {
            width: 19px;
            height: 19px;
            stroke: currentColor;
        }

        .system-highlight strong {
            display: block;
            margin-bottom: 5px;
            font-size: 0.9rem;
        }

        .system-highlight span {
            display: block;
            color: var(--muted);
            font-size: 0.78rem;
            line-height: 1.45;
        }

        .brand-bottom {
            margin-top: 50px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            color: var(--muted);
            font-size: 0.8rem;
        }

        .secure-status {
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }

        .secure-dot {
            width: 9px;
            height: 9px;
            flex: 0 0 auto;
            border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 0 7px rgba(89, 189, 69, 0.1);
        }

        /*
        |--------------------------------------------------------------------------
        | Login panel
        |--------------------------------------------------------------------------
        */

        .form-panel {
            min-width: 0;
            padding: clamp(38px, 5.5vw, 70px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            background:
                linear-gradient(180deg,
                    rgba(255, 255, 255, 0.024),
                    transparent),
                var(--surface);
        }

        .mobile-logo {
            display: none;
            width: 200px;
            margin: 0 auto 36px;
        }

        .mobile-logo img {
            display: block;
            width: 100%;
            max-height: 100px;
            object-fit: contain;
        }

        .form-badge {
            width: fit-content;
            margin-bottom: 20px;
            padding: 8px 12px;
            border: 1px solid rgba(89, 189, 69, 0.27);
            border-radius: 999px;
            color: var(--green-bright);
            background: var(--green-soft);
            font-size: 0.72rem;
            font-weight: 850;
            letter-spacing: 0.1em;
            text-transform: uppercase;
        }

        .form-panel h2 {
            margin: 0;
            font-size: clamp(2.15rem, 4vw, 3.35rem);
            line-height: 1.02;
            letter-spacing: -0.05em;
        }

        .form-intro {
            margin: 17px 0 32px;
            color: var(--muted);
            line-height: 1.65;
        }

        .login-alert {
            margin: 0 0 23px;
            padding: 15px 17px;
            border: 1px solid var(--danger-border);
            border-radius: var(--radius-small);
            color: var(--danger);
            background: var(--danger-background);
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .login-form {
            display: grid;
            gap: 20px;
        }

        .field {
            display: grid;
            gap: 9px;
        }

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

        .field label {
            color: var(--text);
            font-size: 0.88rem;
            font-weight: 750;
        }

        .forgotten-link {
            color: var(--green-bright);
            font-size: 0.78rem;
            font-weight: 750;
            text-decoration: none;
        }

        .forgotten-link:hover {
            text-decoration: underline;
            text-underline-offset: 4px;
        }

        .input-wrap {
            position: relative;
        }

        .input-icon {
            position: absolute;
            top: 50%;
            left: 17px;
            width: 20px;
            height: 20px;
            color: var(--muted-dark);
            transform: translateY(-50%);
            pointer-events: none;
            transition: color 160ms ease;
        }

        .input-icon svg {
            display: block;
            width: 100%;
            height: 100%;
            stroke: currentColor;
        }

        .field input {
            width: 100%;
            min-height: 58px;
            padding: 0 54px 0 50px;
            border: 1px solid var(--border);
            border-radius: 14px;
            outline: none;
            color: var(--white);
            background: var(--surface-input);
            caret-color: var(--green);
            transition:
                border-color 160ms ease,
                box-shadow 160ms ease,
                background 160ms ease;
        }

        .field input::placeholder {
            color: #798279;
        }

        .field input:hover {
            border-color: var(--border-strong);
        }

        .field input:focus {
            border-color: var(--green);
            background: #2c332c;
            box-shadow: 0 0 0 4px rgba(89, 189, 69, 0.12);
        }

        .input-wrap:focus-within .input-icon {
            color: var(--green);
        }

        .password-toggle {
            position: absolute;
            top: 50%;
            right: 10px;
            width: 39px;
            height: 39px;
            padding: 0;
            display: grid;
            place-items: center;
            border: 0;
            border-radius: 10px;
            cursor: pointer;
            color: var(--muted);
            background: transparent;
            transform: translateY(-50%);
        }

        .password-toggle:hover,
        .password-toggle:focus-visible {
            color: var(--green-bright);
            background: rgba(255, 255, 255, 0.05);
            outline: none;
        }

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

        .login-button {
            width: 100%;
            min-height: 59px;
            margin-top: 3px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 11px;
            border: 0;
            border-radius: 14px;
            cursor: pointer;
            color: #0c180b;
            background:
                linear-gradient(135deg,
                    var(--green-bright) 0%,
                    var(--green) 54%,
                    var(--green-dark) 100%);
            box-shadow: var(--shadow-green);
            font-weight: 850;
            transition:
                transform 160ms ease,
                box-shadow 160ms ease,
                filter 160ms ease;
        }

        .login-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 22px 48px rgba(47, 139, 40, 0.38);
            filter: brightness(1.04);
        }

        .login-button:active {
            transform: translateY(0);
        }

        .login-button svg {
            width: 19px;
            height: 19px;
            stroke: currentColor;
        }

        .security-message {
            margin: 23px 0 0;
            display: flex;
            align-items: flex-start;
            gap: 11px;
            color: var(--muted);
            font-size: 0.78rem;
            line-height: 1.55;
        }

        .security-message-icon {
            width: 23px;
            height: 23px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border-radius: 50%;
            color: var(--green);
            background: var(--green-soft);
        }

        .security-message-icon svg {
            width: 13px;
            height: 13px;
            stroke: currentColor;
        }

        .creator-credit {
            margin-top: 42px;
            padding-top: 25px;
            border-top: 1px solid var(--border);
            color: var(--muted-dark);
            font-size: 0.76rem;
            line-height: 1.6;
            text-align: center;
        }

        .creator-credit a {
            color: var(--muted);
            font-weight: 750;
            text-decoration: none;
            transition: color 160ms ease;
        }

        .creator-credit a:hover {
            color: var(--green-bright);
        }

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

        @media (max-width: 960px) {
            .login-shell {
                grid-template-columns: 1fr;
                min-height: auto;
            }

            .brand-panel {
                min-height: auto;
                padding: 42px;
            }

            .logo {
                width: 220px;
                margin-bottom: 44px;
            }

            .brand-panel h1 {
                max-width: 760px;
            }

            .brand-description {
                max-width: 760px;
            }

            .brand-bottom {
                margin-top: 40px;
            }

            .form-panel {
                padding: 48px 42px;
            }
        }

        @media (max-width: 680px) {
            .login-page {
                padding: 14px;
                align-items: start;
            }

            .login-shell {
                border-radius: 23px;
            }

            .brand-panel {
                display: none;
            }

            .form-panel {
                min-height: calc(100vh - 28px);
                padding: 35px 24px;
                justify-content: center;
            }

            .mobile-logo {
                display: block;
            }

            .form-badge {
                margin-right: auto;
                margin-left: auto;
            }

            .form-panel h2,
            .form-intro {
                text-align: center;
            }

            .form-panel h2 {
                font-size: 2.15rem;
            }

            .form-intro {
                margin-bottom: 29px;
            }

            .field input,
            .login-button {
                min-height: 60px;
            }

            .creator-credit {
                margin-top: 34px;
            }
        }

        @media (max-width: 390px) {
            .form-panel {
                padding-right: 19px;
                padding-left: 19px;
            }

            .mobile-logo {
                width: 175px;
            }

            .field-label-row {
                align-items: flex-start;
                flex-direction: column;
                gap: 5px;
            }
        }

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

            *,
            *::before,
            *::after {
                scroll-behavior: auto !important;
                transition: none !important;
                animation: none !important;
            }
        }

        /* ==================================================
   CRM APPLICATION LAYOUT
================================================== */

        .app-body {
            min-height: 100vh;
            margin: 0;
            overflow-x: hidden;
            color: var(--text);
            background:
                radial-gradient(circle at 90% 10%,
                    rgba(89, 189, 69, 0.08),
                    transparent 26%),
                #0d100d;
        }

        body.sidebar-open {
            overflow: hidden;
        }

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

        .app-sidebar {
            position: fixed;
            z-index: 1000;
            inset: 0 auto 0 0;
            width: 290px;
            min-height: 100vh;
            padding: 24px 18px 18px;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--border);
            background:
                linear-gradient(180deg,
                    rgba(89, 189, 69, 0.055),
                    transparent 25%),
                #111411;
            box-shadow: 20px 0 60px rgba(0, 0, 0, 0.18);
        }

        .sidebar-top {
            min-height: 76px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 0 8px 18px;
            border-bottom: 1px solid var(--border);
        }

        .sidebar-logo {
            width: 185px;
            display: block;
        }

        .sidebar-logo img {
            display: block;
            width: 100%;
            object-fit: contain;
            object-position: left center;
        }

        .sidebar-close {
            width: 42px;
            height: 42px;
            padding: 0;
            display: none;
            place-items: center;
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            color: var(--muted);
            background: rgba(255, 255, 255, 0.035);
        }

        .sidebar-close:hover {
            color: var(--white);
            border-color: var(--border-strong);
        }

        .sidebar-close svg {
            width: 20px;
            height: 20px;
        }

        .sidebar-system {
            margin: 20px 6px 12px;
            padding: 17px;
            border: 1px solid rgba(89, 189, 69, 0.18);
            border-radius: 16px;
            background:
                linear-gradient(135deg,
                    rgba(89, 189, 69, 0.12),
                    rgba(89, 189, 69, 0.035));
        }

        .sidebar-system-label {
            display: block;
            margin-bottom: 6px;
            color: var(--green-bright);
            font-size: 0.67rem;
            font-weight: 850;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .sidebar-system strong {
            display: block;
            font-size: 0.98rem;
        }

        .sidebar-nav {
            min-height: 0;
            flex: 1;
            padding: 8px 4px 20px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
        }

        .sidebar-nav-heading {
            display: block;
            margin: 24px 12px 9px;
            color: var(--muted-dark);
            font-size: 0.66rem;
            font-weight: 850;
            letter-spacing: 0.15em;
            text-transform: uppercase;
        }

        .sidebar-nav-heading:first-child {
            margin-top: 8px;
        }

        .sidebar-nav-link {
            position: relative;
            min-height: 49px;
            margin: 4px 0;
            padding: 10px 13px;
            display: flex;
            align-items: center;
            gap: 13px;
            border: 1px solid transparent;
            border-radius: 13px;
            color: var(--muted);
            font-size: 0.9rem;
            font-weight: 720;
            text-decoration: none;
            transition:
                color 160ms ease,
                background 160ms ease,
                border-color 160ms ease,
                transform 160ms ease;
        }

        .sidebar-nav-link:hover {
            color: var(--white);
            border-color: var(--border);
            background: rgba(255, 255, 255, 0.04);
            transform: translateX(2px);
        }

        .sidebar-nav-link.is-active {
            color: var(--white);
            border-color: rgba(89, 189, 69, 0.22);
            background:
                linear-gradient(135deg,
                    rgba(89, 189, 69, 0.18),
                    rgba(89, 189, 69, 0.07));
        }

        .sidebar-nav-link.is-active::before {
            content: "";
            position: absolute;
            top: 11px;
            bottom: 11px;
            left: -5px;
            width: 3px;
            border-radius: 999px;
            background: var(--green);
            box-shadow: 0 0 15px rgba(89, 189, 69, 0.65);
        }

        .sidebar-nav-icon {
            width: 33px;
            height: 33px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border-radius: 10px;
            color: var(--muted);
            background: rgba(255, 255, 255, 0.035);
        }

        .sidebar-nav-link.is-active .sidebar-nav-icon,
        .sidebar-nav-link:hover .sidebar-nav-icon {
            color: var(--green-bright);
            background: var(--green-soft);
        }

        .sidebar-nav-icon svg {
            width: 18px;
            height: 18px;
        }

        .sidebar-footer {
            margin-top: auto;
            padding: 17px 6px 0;
            border-top: 1px solid var(--border);
        }

        .sidebar-admin {
            padding: 11px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.025);
        }

        .sidebar-admin-avatar,
        .header-account-avatar {
            width: 42px;
            height: 42px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border: 1px solid rgba(89, 189, 69, 0.2);
            border-radius: 13px;
            color: #0d180c;
            background:
                linear-gradient(135deg,
                    var(--green-bright),
                    var(--green-dark));
            font-size: 0.93rem;
            font-weight: 900;
            box-shadow: 0 10px 24px rgba(47, 139, 40, 0.24);
        }

        .sidebar-admin-details,
        .header-account-details {
            min-width: 0;
        }

        .sidebar-admin-details strong,
        .header-account-details strong {
            display: block;
            overflow: hidden;
            color: var(--white);
            font-size: 0.84rem;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .sidebar-admin-details span,
        .header-account-details span {
            display: block;
            margin-top: 3px;
            color: var(--muted-dark);
            font-size: 0.7rem;
        }

        .sidebar-logout {
            min-height: 44px;
            margin-top: 10px;
            padding: 10px 12px;
            display: flex;
            align-items: center;
            gap: 11px;
            border: 1px solid transparent;
            border-radius: 12px;
            color: var(--muted);
            font-size: 0.82rem;
            font-weight: 750;
            text-decoration: none;
        }

        .sidebar-logout:hover {
            color: #ffbcbc;
            border-color: rgba(255, 111, 111, 0.18);
            background: rgba(255, 91, 91, 0.06);
        }

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

        .sidebar-credit {
            margin-top: 15px;
            color: #697169;
            font-size: 0.64rem;
            line-height: 1.55;
            text-align: center;
        }

        .sidebar-credit a {
            color: #919a91;
            font-weight: 750;
            text-decoration: none;
        }

        .sidebar-credit a:hover {
            color: var(--green-bright);
        }

        .app-main {
            width: calc(100% - 290px);
            min-height: 100vh;
            margin-left: 290px;
            display: flex;
            flex-direction: column;
        }

        .app-header {
            position: sticky;
            z-index: 100;
            top: 0;
            min-height: 94px;
            padding:
                max(18px, env(safe-area-inset-top)) clamp(24px, 4vw, 54px) 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 28px;
            border-bottom: 1px solid var(--border);
            background: rgba(13, 16, 13, 0.86);
            backdrop-filter: blur(20px);
        }

        .app-header-left,
        .app-header-right {
            display: flex;
            align-items: center;
        }

        .app-header-left {
            min-width: 0;
            gap: 16px;
        }

        .app-header-right {
            gap: 22px;
        }

        .mobile-menu-button {
            width: 46px;
            height: 46px;
            padding: 0;
            display: none;
            place-items: center;
            border: 1px solid var(--border);
            border-radius: 13px;
            cursor: pointer;
            color: var(--white);
            background: var(--surface);
        }

        .mobile-menu-button:hover {
            border-color: rgba(89, 189, 69, 0.28);
            background: var(--green-soft);
        }

        .mobile-menu-button svg {
            width: 21px;
            height: 21px;
        }

        .app-page-heading {
            min-width: 0;
        }

        .app-page-heading>span {
            display: block;
            margin-bottom: 4px;
            color: var(--muted-dark);
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.11em;
            text-transform: uppercase;
        }

        .app-page-heading h1 {
            margin: 0;
            overflow: hidden;
            color: var(--white);
            font-size: clamp(1.55rem, 3vw, 2.15rem);
            line-height: 1.05;
            letter-spacing: -0.04em;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .header-date {
            padding-right: 22px;
            border-right: 1px solid var(--border);
            text-align: right;
        }

        .header-date span {
            display: block;
            margin-bottom: 3px;
            color: var(--muted-dark);
            font-size: 0.69rem;
        }

        .header-date strong {
            display: block;
            color: var(--muted);
            font-size: 0.8rem;
        }

        .header-account {
            padding: 7px 9px 7px 7px;
            display: flex;
            align-items: center;
            gap: 11px;
            border: 1px solid transparent;
            border-radius: 14px;
            color: inherit;
            text-decoration: none;
        }

        .header-account:hover {
            border-color: var(--border);
            background: rgba(255, 255, 255, 0.035);
        }

        .header-account-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
        }

        .app-content {
            width: 100%;
            max-width: 1740px;
            margin: 0 auto;
            padding: clamp(24px, 3.5vw, 48px);
            flex: 1;
        }

        .app-footer {
            min-height: 72px;
            padding: 20px clamp(24px, 4vw, 54px);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            border-top: 1px solid var(--border);
            color: var(--muted-dark);
            font-size: 0.72rem;
        }

        .app-footer-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .app-footer-divider {
            width: 3px;
            height: 3px;
            border-radius: 50%;
            background: var(--green);
        }

        .app-footer-right a {
            color: var(--muted);
            font-weight: 750;
            text-decoration: none;
        }

        .app-footer-right a:hover {
            color: var(--green-bright);
        }

        .sidebar-overlay {
            position: fixed;
            z-index: 990;
            inset: 0;
            visibility: hidden;
            opacity: 0;
            background: rgba(0, 0, 0, 0.66);
            backdrop-filter: blur(3px);
            transition:
                opacity 180ms ease,
                visibility 180ms ease;
        }

        .sidebar-overlay.is-visible {
            visibility: visible;
            opacity: 1;
        }


        /* ==================================================
   GENERAL CRM BUTTONS
================================================== */

        .button {
            min-height: 48px;
            padding: 12px 17px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            border: 1px solid transparent;
            border-radius: 13px;
            cursor: pointer;
            font-size: 0.82rem;
            font-weight: 820;
            line-height: 1.2;
            text-align: center;
            text-decoration: none;
            transition:
                transform 160ms ease,
                border-color 160ms ease,
                background 160ms ease,
                box-shadow 160ms ease;
        }

        .button svg {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
        }

        .button-primary {
            color: #0c180b;
            background:
                linear-gradient(135deg,
                    var(--green-bright),
                    var(--green),
                    var(--green-dark));
            box-shadow: 0 14px 30px rgba(47, 139, 40, 0.25);
        }

        .button-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 19px 40px rgba(47, 139, 40, 0.34);
        }

        .button-secondary {
            color: var(--white);
            border-color: var(--border);
            background: rgba(255, 255, 255, 0.04);
        }

        .button-secondary:hover {
            transform: translateY(-2px);
            border-color: rgba(89, 189, 69, 0.25);
            background: var(--green-soft);
        }

        .button-small {
            min-height: 41px;
            padding: 10px 14px;
            color: var(--white);
            border-color: rgba(89, 189, 69, 0.23);
            background: var(--green-soft);
            font-size: 0.76rem;
        }

        .button-small:hover {
            background: rgba(89, 189, 69, 0.2);
        }


        /* ==================================================
   DASHBOARD WELCOME
================================================== */

        .dashboard-welcome {
            position: relative;
            padding: clamp(28px, 4.5vw, 50px);
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 40px;
            overflow: hidden;
            border: 1px solid rgba(89, 189, 69, 0.17);
            border-radius: 27px;
            background:
                radial-gradient(circle at 95% 10%,
                    rgba(89, 189, 69, 0.16),
                    transparent 32%),
                linear-gradient(135deg,
                    rgba(89, 189, 69, 0.095),
                    rgba(255, 255, 255, 0.025)),
                var(--surface);
            box-shadow: 0 22px 65px rgba(0, 0, 0, 0.16);
        }

        .dashboard-welcome::after {
            content: "";
            position: absolute;
            right: -135px;
            bottom: -180px;
            width: 390px;
            height: 390px;
            border: 1px solid rgba(89, 189, 69, 0.14);
            border-radius: 50%;
            box-shadow:
                0 0 0 48px rgba(89, 189, 69, 0.025),
                0 0 0 96px rgba(89, 189, 69, 0.014);
            pointer-events: none;
        }

        .dashboard-welcome-copy,
        .dashboard-welcome-actions {
            position: relative;
            z-index: 1;
        }

        .dashboard-welcome-copy {
            max-width: 760px;
        }

        .dashboard-eyebrow,
        .dashboard-panel-eyebrow {
            display: block;
            margin-bottom: 13px;
            color: var(--green-bright);
            font-size: 0.68rem;
            font-weight: 850;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }

        .dashboard-welcome h2 {
            margin: 0;
            font-size: clamp(2rem, 4vw, 3.8rem);
            line-height: 1;
            letter-spacing: -0.055em;
        }

        .dashboard-welcome p {
            max-width: 680px;
            margin: 19px 0 0;
            color: var(--muted);
            font-size: 0.96rem;
            line-height: 1.7;
        }

        .dashboard-welcome-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            flex-wrap: wrap;
        }


        /* ==================================================
   DASHBOARD STAT CARDS
================================================== */

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

        .dashboard-stat-card {
            position: relative;
            min-width: 0;
            padding: 23px;
            overflow: hidden;
            border: 1px solid var(--border);
            border-radius: 21px;
            background:
                linear-gradient(180deg,
                    rgba(255, 255, 255, 0.028),
                    transparent),
                var(--surface);
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.11);
        }

        .dashboard-stat-card::after {
            content: "";
            position: absolute;
            right: -45px;
            bottom: -60px;
            width: 135px;
            height: 135px;
            border-radius: 50%;
            background: rgba(89, 189, 69, 0.04);
        }

        .dashboard-stat-card-featured {
            border-color: rgba(89, 189, 69, 0.24);
            background:
                linear-gradient(145deg,
                    rgba(89, 189, 69, 0.18),
                    rgba(89, 189, 69, 0.04)),
                var(--surface);
        }

        .dashboard-stat-top {
            position: relative;
            z-index: 1;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .dashboard-stat-icon {
            width: 43px;
            height: 43px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(89, 189, 69, 0.17);
            border-radius: 13px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

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

        .dashboard-stat-status {
            padding: 6px 9px;
            border: 1px solid rgba(89, 189, 69, 0.2);
            border-radius: 999px;
            color: var(--green-bright);
            background: var(--green-soft);
            font-size: 0.63rem;
            font-weight: 850;
            letter-spacing: 0.09em;
            text-transform: uppercase;
        }

        .dashboard-stat-value {
            position: relative;
            z-index: 1;
            display: block;
            color: var(--white);
            font-size: clamp(2.1rem, 4vw, 3rem);
            line-height: 1;
            letter-spacing: -0.055em;
        }

        .dashboard-stat-value small {
            color: var(--green-bright);
            font-size: 0.95rem;
            font-weight: 800;
            letter-spacing: normal;
        }

        .dashboard-stat-label {
            position: relative;
            z-index: 1;
            display: block;
            margin-top: 10px;
            color: var(--white);
            font-size: 0.85rem;
            font-weight: 780;
        }

        .dashboard-stat-card p {
            position: relative;
            z-index: 1;
            margin: 12px 0 0;
            color: var(--muted-dark);
            font-size: 0.74rem;
            line-height: 1.55;
        }


        /* ==================================================
   DASHBOARD PANELS
================================================== */

        .dashboard-grid,
        .dashboard-lower-grid {
            margin-top: 24px;
            display: grid;
            gap: 24px;
        }

        .dashboard-grid {
            grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.6fr);
        }

        .dashboard-lower-grid {
            grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
        }

        .dashboard-panel {
            min-width: 0;
            border: 1px solid var(--border);
            border-radius: 22px;
            background:
                linear-gradient(180deg,
                    rgba(255, 255, 255, 0.024),
                    transparent),
                var(--surface);
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.1);
        }

        .dashboard-panel-header {
            min-height: 90px;
            padding: 22px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            border-bottom: 1px solid var(--border);
        }

        .dashboard-panel-header h3 {
            margin: 0;
            color: var(--white);
            font-size: 1.16rem;
            letter-spacing: -0.025em;
        }

        .dashboard-panel-eyebrow {
            margin-bottom: 7px;
            font-size: 0.62rem;
        }

        .dashboard-panel-header>a {
            color: var(--green-bright);
            font-size: 0.76rem;
            font-weight: 780;
            text-decoration: none;
        }

        .dashboard-panel-header>a:hover {
            text-decoration: underline;
            text-underline-offset: 4px;
        }

        .dashboard-empty-state {
            min-height: 330px;
            padding: 42px 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            text-align: center;
        }

        .dashboard-empty-icon {
            width: 72px;
            height: 72px;
            margin-bottom: 19px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(89, 189, 69, 0.18);
            border-radius: 22px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

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

        .dashboard-empty-state strong {
            display: block;
            font-size: 1rem;
        }

        .dashboard-empty-state p {
            max-width: 440px;
            margin: 10px 0 21px;
            color: var(--muted);
            font-size: 0.82rem;
            line-height: 1.6;
        }

        .dashboard-placeholder {
            min-height: 180px;
            padding: 28px;
            display: flex;
            align-items: center;
            gap: 18px;
        }

        .dashboard-placeholder-icon {
            width: 58px;
            height: 58px;
            flex: 0 0 auto;
            display: grid;
            place-items: center;
            border-radius: 18px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

        .dashboard-placeholder-icon svg {
            width: 28px;
            height: 28px;
        }

        .dashboard-placeholder strong,
        .dashboard-placeholder span {
            display: block;
        }

        .dashboard-placeholder strong {
            margin-bottom: 6px;
            color: var(--white);
        }

        .dashboard-placeholder span {
            color: var(--muted);
            font-size: 0.8rem;
        }


        /* ==================================================
   DASHBOARD QUICK ACTIONS
================================================== */

        .dashboard-quick-actions {
            padding: 12px;
        }

        .dashboard-quick-actions>a {
            min-height: 77px;
            padding: 13px;
            display: grid;
            grid-template-columns: 45px minmax(0, 1fr) 20px;
            align-items: center;
            gap: 13px;
            border: 1px solid transparent;
            border-radius: 15px;
            color: inherit;
            text-decoration: none;
            transition:
                border-color 160ms ease,
                background 160ms ease,
                transform 160ms ease;
        }

        .dashboard-quick-actions>a+a {
            margin-top: 5px;
        }

        .dashboard-quick-actions>a:hover {
            border-color: var(--border);
            background: rgba(255, 255, 255, 0.035);
            transform: translateX(2px);
        }

        .dashboard-quick-icon {
            width: 45px;
            height: 45px;
            display: grid;
            place-items: center;
            border: 1px solid rgba(89, 189, 69, 0.16);
            border-radius: 13px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

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

        .dashboard-quick-actions strong,
        .dashboard-quick-actions small {
            display: block;
        }

        .dashboard-quick-actions strong {
            margin-bottom: 4px;
            color: var(--white);
            font-size: 0.81rem;
        }

        .dashboard-quick-actions small {
            color: var(--muted-dark);
            font-size: 0.7rem;
        }

        .dashboard-quick-arrow {
            width: 18px;
            height: 18px;
            color: var(--muted-dark);
        }

        .dashboard-quick-actions>a:hover .dashboard-quick-arrow {
            color: var(--green-bright);
        }


        /* ==================================================
   DASHBOARD ACTIVITY
================================================== */

        .dashboard-activity-list {
            padding: 10px 23px 20px;
        }

        .dashboard-activity-item {
            position: relative;
            min-height: 66px;
            padding: 15px 0 15px 29px;
            display: flex;
            align-items: center;
        }

        .dashboard-activity-item+.dashboard-activity-item {
            border-top: 1px solid var(--border);
        }

        .dashboard-activity-marker {
            position: absolute;
            left: 2px;
            width: 11px;
            height: 11px;
            border: 3px solid var(--surface);
            border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 0 4px rgba(89, 189, 69, 0.1);
        }

        .dashboard-activity-copy strong,
        .dashboard-activity-copy span {
            display: block;
        }

        .dashboard-activity-copy strong {
            color: var(--text);
            font-size: 0.8rem;
            line-height: 1.5;
        }

        .dashboard-activity-copy span {
            margin-top: 4px;
            color: var(--muted-dark);
            font-size: 0.68rem;
        }

        .dashboard-empty-inline {
            padding: 35px 0 20px;
            color: var(--muted);
            font-size: 0.8rem;
            text-align: center;
        }


        /* ==================================================
   DASHBOARD SUMMARY
================================================== */

        .dashboard-summary-list {
            padding: 12px;
        }

        .dashboard-summary-list a {
            min-height: 61px;
            padding: 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 22px;
            border: 1px solid transparent;
            border-radius: 14px;
            color: inherit;
            text-decoration: none;
        }

        .dashboard-summary-list a+a {
            margin-top: 4px;
        }

        .dashboard-summary-list a:hover {
            border-color: var(--border);
            background: rgba(255, 255, 255, 0.035);
        }

        .dashboard-summary-list span {
            color: var(--muted);
            font-size: 0.78rem;
        }

        .dashboard-summary-list strong {
            color: var(--white);
            font-size: 1rem;
            letter-spacing: -0.025em;
        }


        /* ==================================================
   APPLICATION RESPONSIVE
================================================== */

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

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

        @media (max-width: 1100px) {
            .app-sidebar {
                width: min(310px, calc(100vw - 34px));
                transform: translateX(-105%);
                transition: transform 200ms ease;
            }

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

            .sidebar-close,
            .mobile-menu-button {
                display: grid;
            }

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

        @media (max-width: 820px) {
            .app-header {
                min-height: 84px;
                padding-right: 22px;
                padding-left: 22px;
            }

            .header-date {
                display: none;
            }

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

            .dashboard-welcome-actions {
                width: 100%;
                justify-content: flex-start;
            }

            .app-footer {
                align-items: flex-start;
                flex-direction: column;
                gap: 10px;
            }
        }

        @media (max-width: 640px) {
            .app-header {
                padding-right: 16px;
                padding-left: 16px;
            }

            .app-page-heading>span {
                display: none;
            }

            .app-page-heading h1 {
                font-size: 1.4rem;
            }

            .header-account-details {
                display: none;
            }

            .header-account {
                padding: 0;
            }

            .app-content {
                padding: 18px 14px 28px;
            }

            .dashboard-welcome {
                padding: 25px 20px;
                border-radius: 21px;
            }

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

            .dashboard-welcome p {
                font-size: 0.86rem;
            }

            .dashboard-welcome-actions {
                display: grid;
                grid-template-columns: 1fr;
            }

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

            .dashboard-stats {
                grid-template-columns: 1fr;
                gap: 13px;
            }

            .dashboard-stat-card {
                padding: 20px;
            }

            .dashboard-grid,
            .dashboard-lower-grid {
                margin-top: 16px;
                gap: 16px;
            }

            .dashboard-panel {
                border-radius: 19px;
            }

            .dashboard-panel-header {
                min-height: auto;
                padding: 19px;
                align-items: flex-start;
            }

            .dashboard-panel-header>a {
                white-space: nowrap;
            }

            .dashboard-quick-actions>a {
                grid-template-columns: 42px minmax(0, 1fr) 18px;
                padding-right: 8px;
                padding-left: 8px;
            }

            .dashboard-quick-icon {
                width: 42px;
                height: 42px;
            }

            .app-footer {
                padding: 21px 16px;
                text-align: center;
            }

            .app-footer-left {
                align-items: center;
                flex-direction: column;
                gap: 6px;
                width: 100%;
            }

            .app-footer-divider {
                display: none;
            }

            .app-footer-right {
                width: 100%;
            }
        }

        @media (max-width: 390px) {
            .app-header {
                gap: 8px;
            }

            .mobile-menu-button {
                width: 42px;
                height: 42px;
            }

            .header-account-avatar {
                width: 38px;
                height: 38px;
            }

            .dashboard-panel-header {
                flex-direction: column;
                gap: 10px;
            }

            .dashboard-panel-header>a {
                align-self: flex-start;
            }
        }

        /* ==========================================================
   STAFF MANAGEMENT
========================================================== */

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

        .page-heading-copy h2 {
            margin: 10px 0 8px;
            font-size: 2rem;
        }

        .page-heading-copy p {
            max-width: 620px;
            color: #9da39a;
        }

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

        .staff-summary-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }

        .staff-summary-card {
            background: #181c18;
            border: 1px solid rgba(255, 255, 255, .06);
            border-radius: 18px;
            padding: 24px;
        }

        .staff-summary-label {
            display: block;
            color: #8f968c;
            margin-bottom: 10px;
            font-size: .9rem;
        }

        .staff-summary-card strong {
            display: block;
            font-size: 2rem;
            color: #fff;
        }

        .crm-table-wrap {
            overflow-x: auto;
        }

        .crm-table {
            width: 100%;
            border-collapse: collapse;
        }

        .crm-table thead th {
            text-align: left;
            padding: 18px;
            border-bottom: 1px solid rgba(255, 255, 255, .08);
            color: #8f968c;
            font-weight: 600;
        }

        .crm-table tbody td {
            padding: 20px 18px;
            border-bottom: 1px solid rgba(255, 255, 255, .05);
            vertical-align: middle;
        }

        .crm-table tbody tr:hover {
            background: #171b17;
        }

        .staff-person {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .staff-avatar {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            background: #63c74d;
            color: #071106;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1.1rem;
        }

        .staff-person-copy {
            display: flex;
            flex-direction: column;
        }

        .staff-person-copy strong {
            color: #fff;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .staff-person-copy small {
            color: #8f968c;
            margin-top: 4px;
        }

        .staff-you-label {
            background: #63c74d;
            color: #071106;
            padding: 3px 8px;
            border-radius: 999px;
            font-size: .72rem;
            font-weight: 600;
        }

        .staff-contact {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .staff-contact a {
            color: #fff;
            text-decoration: none;
        }

        .staff-contact span {
            color: #8f968c;
            font-size: .9rem;
        }

        .staff-last-login {
            display: flex;
            flex-direction: column;
        }

        .staff-last-login strong {
            color: #fff;
        }

        .staff-last-login span {
            color: #8f968c;
            font-size: .85rem;
        }

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

        .status-badge-admin {
            background: rgba(99, 199, 77, .15);
            color: #63c74d;
        }

        .status-badge-staff {
            background: rgba(255, 255, 255, .08);
            color: #d6d6d6;
        }

        .status-badge-active {
            background: rgba(99, 199, 77, .15);
            color: #63c74d;
        }

        .status-badge-inactive {
            background: rgba(255, 99, 99, .15);
            color: #ff8c8c;
        }

        .table-action-link {
            color: #63c74d;
            font-weight: 600;
            text-decoration: none;
        }

        .table-action-link:hover {
            text-decoration: underline;
        }

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

        .crm-empty-state-icon {
            width: 90px;
            height: 90px;
            border-radius: 20px;
            background: #171b17;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .crm-empty-state-icon svg {
            width: 42px;
            height: 42px;
        }

        .crm-empty-state strong {
            display: block;
            color: #fff;
            font-size: 1.25rem;
            margin-bottom: 10px;
        }

        .crm-empty-state p {
            color: #8f968c;
            margin-bottom: 24px;
        }

        @media (max-width:1200px) {

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

        }

        @media (max-width:768px) {

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

            .page-heading-row {
                align-items: flex-start;
            }

        }

        /* ==========================================================
   CRM FORMS
========================================================== */

        .crm-form {
            width: 100%;
        }

        .crm-form-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
            gap: 24px;
            align-items: start;
        }

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

        .crm-form-panel {
            overflow: hidden;
        }

        .crm-form-body {
            padding: 24px;
        }

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

        .crm-field {
            min-width: 0;
        }

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

        .crm-field label {
            display: block;
            margin-bottom: 9px;
            color: var(--white);
            font-size: 0.8rem;
            font-weight: 760;
        }

        .crm-field label span {
            color: var(--green-bright);
        }

        .crm-field input,
        .crm-field select,
        .crm-field textarea {
            width: 100%;
            min-height: 50px;
            padding: 12px 14px;
            border: 1px solid var(--border);
            border-radius: 13px;
            outline: none;
            color: var(--white);
            background: rgba(255, 255, 255, 0.035);
            font: inherit;
            transition:
                border-color 160ms ease,
                background 160ms ease,
                box-shadow 160ms ease;
        }

        .crm-field textarea {
            min-height: 130px;
            resize: vertical;
        }

        .crm-field input::placeholder,
        .crm-field textarea::placeholder {
            color: var(--muted-dark);
        }

        .crm-field input:focus,
        .crm-field select:focus,
        .crm-field textarea:focus {
            border-color: rgba(89, 189, 69, 0.56);
            background: rgba(89, 189, 69, 0.045);
            box-shadow: 0 0 0 4px rgba(89, 189, 69, 0.09);
        }

        .crm-field select {
            appearance: none;
            background-image:
                linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                linear-gradient(135deg, var(--muted) 50%, transparent 50%);
            background-position:
                calc(100% - 18px) calc(50% - 2px),
                calc(100% - 13px) calc(50% - 2px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
            cursor: pointer;
        }

        .crm-field select option {
            color: #ffffff;
            background: #171b17;
        }

        .crm-field>small {
            display: block;
            margin-top: 8px;
            color: var(--muted-dark);
            font-size: 0.69rem;
            line-height: 1.5;
        }

        .crm-label-row {
            margin-bottom: 9px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }

        .crm-label-row label {
            margin-bottom: 0;
        }

        .generate-password-button {
            padding: 0;
            border: 0;
            cursor: pointer;
            color: var(--green-bright);
            background: transparent;
            font-size: 0.7rem;
            font-weight: 800;
        }

        .generate-password-button:hover {
            text-decoration: underline;
            text-underline-offset: 4px;
        }

        .crm-password-wrap {
            position: relative;
        }

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

        .crm-password-toggle {
            position: absolute;
            top: 50%;
            right: 8px;
            width: 38px;
            height: 38px;
            padding: 0;
            display: grid;
            place-items: center;
            border: 0;
            border-radius: 10px;
            cursor: pointer;
            color: var(--muted);
            background: transparent;
            transform: translateY(-50%);
        }

        .crm-password-toggle:hover {
            color: var(--green-bright);
            background: var(--green-soft);
        }

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

        .generated-password-box {
            margin-top: 18px;
            padding: 16px;
            border: 1px solid rgba(89, 189, 69, 0.22);
            border-radius: 14px;
            background: rgba(89, 189, 69, 0.07);
        }

        .generated-password-box[hidden] {
            display: none;
        }

        .generated-password-box span,
        .generated-password-box strong {
            display: block;
        }

        .generated-password-box span {
            margin-bottom: 7px;
            color: var(--muted);
            font-size: 0.68rem;
        }

        .generated-password-box strong {
            overflow-wrap: anywhere;
            color: var(--white);
            font-family: monospace;
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .generated-password-box button {
            margin-top: 12px;
            padding: 0;
            border: 0;
            cursor: pointer;
            color: var(--green-bright);
            background: transparent;
            font-size: 0.7rem;
            font-weight: 800;
        }

        .crm-form-note {
            margin: 18px 0 0;
            color: var(--muted-dark);
            font-size: 0.72rem;
            line-height: 1.6;
        }

        .crm-switch-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            cursor: pointer;
        }

        .crm-switch-row>span:first-child {
            min-width: 0;
        }

        .crm-switch-row strong,
        .crm-switch-row small {
            display: block;
        }

        .crm-switch-row strong {
            color: var(--white);
            font-size: 0.81rem;
        }

        .crm-switch-row small {
            margin-top: 5px;
            color: var(--muted-dark);
            font-size: 0.69rem;
            line-height: 1.5;
        }

        .crm-switch {
            position: relative;
            width: 50px;
            height: 28px;
            flex: 0 0 auto;
        }

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

        .crm-switch-control {
            position: absolute;
            inset: 0;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.06);
            transition:
                background 160ms ease,
                border-color 160ms ease;
        }

        .crm-switch-control::after {
            content: "";
            position: absolute;
            top: 4px;
            left: 4px;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--muted);
            transition:
                transform 160ms ease,
                background 160ms ease;
        }

        .crm-switch input:checked+.crm-switch-control {
            border-color: rgba(89, 189, 69, 0.45);
            background: rgba(89, 189, 69, 0.22);
        }

        .crm-switch input:checked+.crm-switch-control::after {
            background: var(--green-bright);
            transform: translateX(22px);
        }

        .crm-switch input:focus-visible+.crm-switch-control {
            box-shadow: 0 0 0 4px rgba(89, 189, 69, 0.1);
        }

        .crm-form-actions {
            margin-top: 24px;
            padding: 20px 0 4px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
        }

        .crm-alert {
            margin-bottom: 24px;
            padding: 16px 18px;
            border-radius: 14px;
            font-size: 0.8rem;
            line-height: 1.55;
        }

        .crm-alert-error {
            border: 1px solid rgba(255, 101, 101, 0.3);
            color: #ffb7b7;
            background: rgba(255, 75, 75, 0.09);
        }

        .crm-alert-success {
            border: 1px solid rgba(89, 189, 69, 0.26);
            color: var(--green-bright);
            background: rgba(89, 189, 69, 0.08);
        }


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

        @media (max-width: 1080px) {
            .crm-form-layout {
                grid-template-columns: 1fr;
            }

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

        @media (max-width: 760px) {

            .crm-form-grid,
            .crm-form-sidebar {
                grid-template-columns: 1fr;
            }

            .crm-field-full {
                grid-column: auto;
            }

            .crm-form-body {
                padding: 19px;
            }

            .crm-form-actions {
                display: grid;
                grid-template-columns: 1fr;
            }

            .crm-form-actions .button {
                width: 100%;
            }
        }

        /* ==========================================================
   CUSTOMER CREATE FORM
========================================================== */

        .customer-form-layout {
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
            gap: 24px;
            align-items: start;
        }

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

        .customer-section-intro {
            margin: 0 0 22px;
            color: var(--muted-dark);
            font-size: 0.76rem;
            line-height: 1.65;
        }

        .customer-checkbox-row {
            margin-top: 18px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            cursor: pointer;
        }

        .customer-checkbox-row input {
            width: 18px;
            height: 18px;
            margin-top: 2px;
            accent-color: var(--green-bright);
            flex: 0 0 auto;
        }

        .customer-checkbox-row>span {
            display: block;
            color: var(--white);
            font-size: 0.76rem;
            line-height: 1.45;
        }

        .customer-checkbox-row strong,
        .customer-checkbox-row small {
            display: block;
        }

        .customer-checkbox-row strong {
            color: var(--white);
            font-size: 0.76rem;
        }

        .customer-checkbox-row small {
            margin-top: 4px;
            color: var(--muted-dark);
            font-size: 0.68rem;
            line-height: 1.5;
        }

        .customer-money-input {
            position: relative;
        }

        .customer-money-input>span {
            position: absolute;
            top: 50%;
            left: 15px;
            color: var(--muted);
            font-weight: 700;
            transform: translateY(-50%);
            pointer-events: none;
        }

        .customer-money-input input {
            padding-left: 34px;
        }

        .customer-save-summary {
            padding: 28px;
            text-align: center;
        }

        .customer-save-summary-icon {
            width: 58px;
            height: 58px;
            margin: 0 auto 17px;
            display: grid;
            place-items: center;
            border-radius: 16px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

        .customer-save-summary-icon svg {
            width: 27px;
            height: 27px;
        }

        .customer-save-summary h3 {
            margin: 0 0 10px;
            color: var(--white);
            font-size: 1rem;
        }

        .customer-save-summary p {
            margin: 0;
            color: var(--muted-dark);
            font-size: 0.72rem;
            line-height: 1.65;
        }

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

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

            .customer-save-summary {
                grid-column: 1 / -1;
            }
        }

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

            .customer-save-summary {
                grid-column: auto;
            }
        }

        /* ==========================================================
   CUSTOMER DIRECTORY
========================================================== */

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

        .customer-list-panel {
            overflow: hidden;
        }

        .customer-list-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }

        .customer-filter-bar {
            display: grid;
            grid-template-columns:
                minmax(260px, 1.6fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) minmax(150px, 0.55fr) auto;
            gap: 14px;
            align-items: end;
            padding: 20px 24px;
            border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.015);
        }

        .customer-search-field {
            position: relative;
        }

        .customer-search-field svg {
            position: absolute;
            top: 50%;
            left: 15px;
            width: 18px;
            height: 18px;
            color: var(--muted-dark);
            transform: translateY(-50%);
            pointer-events: none;
        }

        .customer-search-field input {
            width: 100%;
            min-height: 46px;
            padding: 0 15px 0 44px;
            border: 1px solid var(--border);
            border-radius: 10px;
            outline: none;
            color: var(--white);
            background: var(--surface-dark);
            font: inherit;
            transition:
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease;
        }

        .customer-search-field input::placeholder {
            color: var(--muted-dark);
        }

        .customer-search-field input:focus {
            border-color: var(--green-bright);
            box-shadow: 0 0 0 3px rgba(100, 208, 130, 0.12);
            background: var(--surface);
        }

        .customer-filter-select {
            display: grid;
            gap: 7px;
        }

        .customer-filter-select label {
            color: var(--muted);
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .customer-filter-select select {
            width: 100%;
            min-height: 46px;
            padding: 0 38px 0 13px;
            border: 1px solid var(--border);
            border-radius: 10px;
            outline: none;
            color: var(--white);
            background-color: var(--surface-dark);
            font: inherit;
            cursor: pointer;
        }

        .customer-filter-select select:focus {
            border-color: var(--green-bright);
            box-shadow: 0 0 0 3px rgba(100, 208, 130, 0.12);
        }

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

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

        .customer-card {
            position: relative;
            display: grid;
            grid-template-columns:
                minmax(0, 1fr) minmax(410px, auto) auto;
            gap: 22px;
            align-items: center;
            padding: 20px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background:
                linear-gradient(135deg,
                    rgba(255, 255, 255, 0.025),
                    rgba(255, 255, 255, 0.01)),
                var(--surface-dark);
            transition:
                transform 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
        }

        .customer-card:hover {
            border-color: rgba(100, 208, 130, 0.28);
            box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
            transform: translateY(-1px);
        }

        .customer-card-main {
            min-width: 0;
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }

        .customer-card-avatar {
            width: 50px;
            height: 50px;
            display: grid;
            place-items: center;
            flex: 0 0 50px;
            border: 1px solid rgba(100, 208, 130, 0.18);
            border-radius: 14px;
            color: var(--green-bright);
            background: var(--green-soft);
            font-size: 0.82rem;
            font-weight: 800;
            letter-spacing: 0.04em;
        }

        .customer-card-copy {
            min-width: 0;
            flex: 1;
        }

        .customer-card-title-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 14px;
        }

        .customer-card-title-row h4 {
            margin: 0;
            color: var(--white);
            font-size: 0.94rem;
            line-height: 1.35;
        }

        .customer-card-title-row h4 a {
            color: inherit;
            text-decoration: none;
        }

        .customer-card-title-row h4 a:hover {
            color: var(--green-bright);
        }

        .customer-card-subtitle {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 12px;
            margin-top: 7px;
            color: var(--muted-dark);
            font-size: 0.67rem;
            line-height: 1.45;
        }

        .customer-card-subtitle>span {
            position: relative;
        }

        .customer-card-subtitle>span:not(:last-child)::after {
            content: "";
            position: absolute;
            top: 50%;
            right: -7px;
            width: 3px;
            height: 3px;
            border-radius: 50%;
            background: var(--muted-dark);
            transform: translateY(-50%);
        }

        .customer-inline-label {
            color: var(--green-bright);
            font-weight: 700;
        }

        .customer-warning {
            display: flex;
            align-items: flex-start;
            gap: 9px;
            margin-top: 13px;
            padding: 10px 12px;
            border: 1px solid rgba(245, 180, 70, 0.2);
            border-radius: 9px;
            color: #f6c56f;
            background: rgba(245, 180, 70, 0.07);
            font-size: 0.68rem;
            line-height: 1.5;
        }

        .customer-warning svg {
            width: 16px;
            height: 16px;
            margin-top: 1px;
            flex: 0 0 auto;
        }

        .customer-card-details {
            display: grid;
            grid-template-columns: repeat(4, minmax(120px, 1fr));
            gap: 16px;
            margin-top: 18px;
        }

        .customer-card-details>div,
        .customer-card-meta>div {
            min-width: 0;
        }

        .customer-card-details span,
        .customer-card-meta span {
            display: block;
            margin-bottom: 5px;
            color: var(--muted-dark);
            font-size: 0.61rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .customer-card-details strong,
        .customer-card-meta strong {
            display: block;
            overflow: hidden;
            color: var(--white);
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1.45;
            text-overflow: ellipsis;
        }

        .customer-card-details a {
            color: var(--white);
            text-decoration: none;
        }

        .customer-card-details a:hover {
            color: var(--green-bright);
        }

        .customer-card-meta {
            min-width: 410px;
            display: grid;
            grid-template-columns: repeat(5, minmax(66px, 1fr));
            gap: 16px;
            padding-left: 22px;
            border-left: 1px solid var(--border);
        }

        .customer-card-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .customer-card-actions .button {
            width: 100%;
            min-width: 122px;
            justify-content: center;
            white-space: nowrap;
        }

        .status-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 26px;
            padding: 5px 9px;
            border: 1px solid transparent;
            border-radius: 999px;
            font-size: 0.61rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            line-height: 1;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .status-badge-active {
            border-color: rgba(100, 208, 130, 0.2);
            color: var(--green-bright);
            background: rgba(100, 208, 130, 0.08);
        }

        .status-badge-warning {
            border-color: rgba(245, 180, 70, 0.24);
            color: #f6c56f;
            background: rgba(245, 180, 70, 0.08);
        }

        .status-badge-inactive {
            border-color: rgba(255, 255, 255, 0.1);
            color: var(--muted);
            background: rgba(255, 255, 255, 0.04);
        }


        /* ==========================================================
   CRM EMPTY STATE
========================================================== */

        .crm-empty-state {
            display: grid;
            justify-items: center;
            padding: 70px 24px;
            text-align: center;
        }

        .crm-empty-state-icon {
            width: 64px;
            height: 64px;
            margin-bottom: 18px;
            display: grid;
            place-items: center;
            border-radius: 18px;
            color: var(--green-bright);
            background: var(--green-soft);
        }

        .crm-empty-state-icon svg {
            width: 29px;
            height: 29px;
        }

        .crm-empty-state strong {
            color: var(--white);
            font-size: 1rem;
        }

        .crm-empty-state p {
            max-width: 460px;
            margin: 9px 0 20px;
            color: var(--muted-dark);
            font-size: 0.74rem;
            line-height: 1.65;
        }


        /* ==========================================================
   CRM PAGINATION
========================================================== */

        .crm-pagination {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 19px 24px;
            border-top: 1px solid var(--border);
        }

        .crm-pagination-summary {
            color: var(--muted-dark);
            font-size: 0.68rem;
        }

        .crm-pagination-links {
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .crm-pagination-link {
            min-width: 34px;
            height: 34px;
            padding: 0 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--muted);
            background: var(--surface-dark);
            font-size: 0.68rem;
            font-weight: 700;
            text-decoration: none;
            transition:
                border-color 0.2s ease,
                color 0.2s ease,
                background 0.2s ease;
        }

        .crm-pagination-link:hover {
            border-color: rgba(100, 208, 130, 0.3);
            color: var(--green-bright);
        }

        .crm-pagination-link.is-active {
            border-color: var(--green-bright);
            color: var(--dark);
            background: var(--green-bright);
        }


        /* ==========================================================
   CUSTOMER DIRECTORY RESPONSIVE
========================================================== */

        @media (max-width: 1450px) {
            .customer-card {
                grid-template-columns:
                    minmax(0, 1fr) minmax(360px, auto);
            }

            .customer-card-actions {
                grid-column: 1 / -1;
                flex-direction: row;
                justify-content: flex-end;
                padding-top: 4px;
            }

            .customer-card-actions .button {
                width: auto;
            }
        }

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

            .customer-filter-bar {
                grid-template-columns:
                    minmax(240px, 1fr) repeat(3, minmax(145px, 0.5fr));
            }

            .customer-filter-actions {
                grid-column: 1 / -1;
                justify-content: flex-end;
            }

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

            .customer-card-meta {
                min-width: 0;
                padding: 18px 0 0;
                border-top: 1px solid var(--border);
                border-left: 0;
            }
        }

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

            .customer-search-field {
                grid-column: 1 / -1;
            }

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

            .customer-card-meta {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

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

            .customer-filter-bar {
                grid-template-columns: 1fr;
                padding: 18px;
            }

            .customer-search-field,
            .customer-filter-actions {
                grid-column: auto;
            }

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

            .customer-filter-actions .button {
                width: 100%;
                justify-content: center;
            }

            .customer-card-list {
                padding: 16px;
            }

            .customer-card {
                padding: 17px;
            }

            .customer-card-main {
                display: grid;
            }

            .customer-card-title-row {
                align-items: flex-start;
            }

            .customer-card-details,
            .customer-card-meta {
                grid-template-columns: 1fr;
                gap: 13px;
            }

            .customer-card-actions {
                flex-direction: column;
            }

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

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

            .crm-pagination-links {
                max-width: 100%;
                flex-wrap: wrap;
            }
        }

        /* ==================================================
   CUSTOMER PROFILE
   customers/view.php
================================================== */

        .customer-profile-hero {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            margin-bottom: 22px;
        }

        .customer-profile-identity {
            display: flex;
            align-items: center;
            gap: 18px;
            min-width: 0;
        }

        .customer-profile-avatar {
            width: 68px;
            height: 68px;
            flex: 0 0 68px;
            border-radius: 20px;
            display: grid;
            place-items: center;
            background: var(--primary, #173b2c);
            color: #fff;
            font-size: 22px;
            font-weight: 800;
            letter-spacing: 0.04em;
        }

        .customer-profile-title {
            min-width: 0;
        }

        .customer-profile-title h2 {
            margin: 5px 0 2px;
        }

        .customer-profile-title p {
            margin: 0;
            color: var(--text-muted, #667085);
        }

        .customer-profile-kicker {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            color: var(--text-muted, #667085);
            font-size: 13px;
            font-weight: 700;
        }

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

        .customer-status-badge {
            display: inline-flex;
            align-items: center;
            min-height: 26px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 800;
        }

        .customer-status-active {
            background: #e9f8ef;
            color: #157347;
        }

        .customer-status-on_hold {
            background: #fff4d6;
            color: #8a5a00;
        }

        .customer-status-inactive {
            background: #f2f4f7;
            color: #667085;
        }

        .customer-warning-banner {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            margin-bottom: 22px;
            padding: 18px;
            border: 1px solid #f4c7c7;
            border-radius: 16px;
            background: #fff3f3;
            color: #8a1c1c;
        }

        .customer-warning-banner p {
            margin: 4px 0 0;
        }

        .customer-warning-icon {
            width: 34px;
            height: 34px;
            flex: 0 0 34px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: #c92a2a;
            color: #fff;
            font-weight: 900;
        }

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

        .customer-stat-card {
            padding: 20px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 18px;
            background: #fff;
        }

        .customer-stat-card span,
        .customer-stat-card small {
            display: block;
            color: var(--text-muted, #667085);
        }

        .customer-stat-card strong {
            display: block;
            margin: 8px 0 4px;
            font-size: 25px;
            line-height: 1.1;
        }

        .customer-profile-tabs {
            position: sticky;
            top: 0;
            z-index: 5;
            display: flex;
            gap: 6px;
            overflow-x: auto;
            margin-bottom: 22px;
            padding: 8px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(10px);
        }

        .customer-profile-tabs a {
            flex: 0 0 auto;
            padding: 9px 13px;
            border-radius: 10px;
            color: var(--text-color, #1d2939);
            font-size: 13px;
            font-weight: 750;
            text-decoration: none;
        }

        .customer-profile-tabs a:hover {
            background: var(--surface-soft, #f2f4f7);
        }

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

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

        .customer-profile-panel {
            scroll-margin-top: 90px;
        }

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

        .customer-detail-item {
            min-width: 0;
            padding: 18px 0;
            border-bottom: 1px solid var(--border-color, #eaecf0);
        }

        .customer-detail-item:nth-child(odd) {
            padding-right: 22px;
        }

        .customer-detail-item:nth-child(even) {
            padding-left: 22px;
            border-left: 1px solid var(--border-color, #eaecf0);
        }

        .customer-detail-item span {
            display: block;
            margin-bottom: 5px;
            color: var(--text-muted, #667085);
            font-size: 12px;
            font-weight: 750;
            text-transform: uppercase;
            letter-spacing: 0.045em;
        }

        .customer-detail-item strong,
        .customer-detail-item a {
            overflow-wrap: anywhere;
        }

        .customer-record-list,
        .customer-note-list,
        .customer-address-list {
            display: grid;
            gap: 12px;
            padding: 0 24px 24px;
        }

        .customer-record-card,
        .customer-address-card {
            display: flex;
            justify-content: space-between;
            gap: 20px;
            padding: 17px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 14px;
            background: var(--surface-soft, #fafafa);
        }

        .customer-record-title {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 9px;
        }

        .customer-record-title span {
            padding: 3px 8px;
            border-radius: 999px;
            background: #e9f8ef;
            color: #157347;
            font-size: 11px;
            font-weight: 800;
        }

        .customer-record-card p {
            margin: 4px 0 0;
            color: var(--text-muted, #667085);
        }

        .customer-record-meta {
            display: grid;
            align-content: start;
            justify-items: end;
            gap: 5px;
            text-align: right;
        }

        .customer-address-card {
            display: block;
        }

        .customer-address-card address {
            margin-top: 12px;
            color: var(--text-muted, #475467);
            font-style: normal;
            line-height: 1.65;
        }

        .customer-empty-state,
        .customer-module-placeholder {
            padding: 34px 24px;
            text-align: center;
            color: var(--text-muted, #667085);
        }

        .customer-empty-state p,
        .customer-module-placeholder p {
            max-width: 560px;
            margin: 7px auto 0;
        }

        .customer-empty-state-small {
            padding: 8px 0;
            text-align: left;
        }

        .customer-note-form-wrap {
            padding: 0 24px 20px;
        }

        .customer-note-form {
            padding: 18px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 14px;
            background: var(--surface-soft, #fafafa);
        }

        .customer-note-form-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            margin-top: 13px;
        }

        .customer-note-card {
            padding: 17px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 14px;
            background: #fff;
        }

        .customer-note-card.is-important {
            border-color: #edb5b5;
            background: #fff7f7;
        }

        .customer-note-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
        }

        .customer-note-head time,
        .customer-note-card small {
            color: var(--text-muted, #667085);
            font-size: 12px;
        }

        .customer-note-card p {
            margin: 12px 0;
            line-height: 1.65;
        }

        .customer-activity-list {
            padding: 0 24px 24px;
        }

        .customer-activity-item {
            position: relative;
            display: grid;
            grid-template-columns: 14px minmax(0, 1fr);
            gap: 12px;
            padding: 0 0 20px;
        }

        .customer-activity-item:not(:last-child)::before {
            content: "";
            position: absolute;
            left: 5px;
            top: 13px;
            bottom: 0;
            width: 2px;
            background: var(--border-color, #e4e7ec);
        }

        .customer-activity-dot {
            position: relative;
            z-index: 1;
            width: 12px;
            height: 12px;
            margin-top: 4px;
            border: 3px solid #fff;
            border-radius: 50%;
            background: var(--primary, #173b2c);
            box-shadow: 0 0 0 1px var(--primary, #173b2c);
        }

        .customer-activity-item p {
            margin: 4px 0 0;
            color: var(--text-muted, #667085);
            font-size: 12px;
        }

        .customer-sidebar-body {
            padding: 0 20px 22px;
        }

        .customer-sidebar-name {
            display: block;
            font-size: 17px;
        }

        .customer-sidebar-body>p {
            margin: 4px 0 0;
            color: var(--text-muted, #667085);
        }

        .customer-sidebar-links {
            display: grid;
            gap: 8px;
            margin-top: 17px;
        }

        .customer-sidebar-links a {
            padding: 10px 12px;
            border: 1px solid var(--border-color, #e4e7ec);
            border-radius: 10px;
            text-decoration: none;
        }

        .customer-sidebar-definition {
            display: grid;
            gap: 0;
            margin: 0;
        }

        .customer-sidebar-definition div {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            padding: 13px 0;
            border-bottom: 1px solid var(--border-color, #eaecf0);
        }

        .customer-sidebar-definition div:last-child {
            border-bottom: 0;
        }

        .customer-sidebar-definition dt {
            color: var(--text-muted, #667085);
        }

        .customer-sidebar-definition dd {
            margin: 0;
            font-weight: 750;
            text-align: right;
        }

        .button-small {
            min-height: 38px;
            padding: 8px 12px;
            font-size: 13px;
        }

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

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

        @media (max-width: 850px) {
            .customer-profile-hero {
                align-items: flex-start;
                flex-direction: column;
            }

            .customer-profile-actions {
                justify-content: flex-start;
            }

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

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

        @media (max-width: 620px) {
            .customer-profile-identity {
                align-items: flex-start;
            }

            .customer-profile-avatar {
                width: 54px;
                height: 54px;
                flex-basis: 54px;
                border-radius: 16px;
                font-size: 18px;
            }

            .customer-profile-actions {
                width: 100%;
            }

            .customer-profile-actions .button {
                flex: 1 1 auto;
                text-align: center;
            }

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

            .customer-detail-grid {
                grid-template-columns: 1fr;
                padding: 0 18px 18px;
            }

            .customer-detail-item:nth-child(odd),
            .customer-detail-item:nth-child(even) {
                padding: 15px 0;
                border-left: 0;
            }

            .customer-record-card {
                flex-direction: column;
            }

            .customer-record-meta {
                justify-items: start;
                text-align: left;
            }

            .customer-note-head,
            .customer-note-form-footer {
                align-items: flex-start;
                flex-direction: column;
            }

            .customer-record-list,
            .customer-note-list,
            .customer-address-list,
            .customer-note-form-wrap,
            .customer-activity-list {
                padding-left: 18px;
                padding-right: 18px;
            }
        }

        /* ==================================================
   GREEN WASTE TYPES AND PRICES
================================================== */

        .green-waste-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 390px;
            align-items: start;
            gap: 22px;
        }

        .green-waste-count {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 5px 11px;
            border-radius: 999px;
            background: #eef2f0;
            color: #365548;
            font-size: 12px;
            font-weight: 800;
        }

        .green-waste-table-wrap {
            overflow-x: auto;
        }

        .green-waste-table {
            width: 100%;
            border-collapse: collapse;
        }

        .green-waste-table th,
        .green-waste-table td {
            padding: 15px 16px;
            border-bottom: 1px solid #eaecf0;
            text-align: left;
            vertical-align: middle;
        }

        .green-waste-table th {
            color: #667085;
            background: #fafafa;
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            white-space: nowrap;
        }

        .green-waste-table td {
            font-size: 14px;
        }

        .green-waste-table td:first-child {
            min-width: 210px;
        }

        .green-waste-table td small {
            display: block;
            max-width: 330px;
            margin-top: 4px;
            color: #667085;
            line-height: 1.45;
        }

        .green-waste-table code {
            display: inline-flex;
            padding: 5px 8px;
            border-radius: 7px;
            background: #f2f4f7;
            color: #344054;
            font-size: 12px;
        }

        .green-waste-status {
            display: inline-flex;
            align-items: center;
            min-height: 26px;
            padding: 4px 9px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
        }

        .green-waste-status.is-active {
            background: #e9f8ef;
            color: #157347;
        }

        .green-waste-status.is-inactive {
            background: #f2f4f7;
            color: #667085;
        }

        .green-waste-actions {
            display: flex;
            align-items: center;
            gap: 7px;
        }

        .green-waste-actions form {
            margin: 0;
        }

        .green-waste-form-panel {
            position: sticky;
            top: 20px;
        }

        .green-waste-form {
            display: grid;
            gap: 18px;
            padding: 0 22px 24px;
        }

        .green-waste-form-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            padding-top: 4px;
        }

        .crm-money-input,
        .crm-suffix-input {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            align-items: center;
            overflow: hidden;
            border: 1px solid #d0d5dd;
            border-radius: 10px;
            background: #fff;
        }

        .crm-suffix-input {
            grid-template-columns: minmax(0, 1fr) auto;
        }

        .crm-money-input:focus-within,
        .crm-suffix-input:focus-within {
            border-color: var(--primary, #173b2c);
            box-shadow: 0 0 0 3px rgba(23, 59, 44, 0.12);
        }

        .crm-money-input span,
        .crm-suffix-input span {
            padding: 0 12px;
            color: #667085;
            font-weight: 700;
        }

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

        @media (max-width: 1150px) {
            .green-waste-layout {
                grid-template-columns: 1fr;
            }

            .green-waste-form-panel {
                position: static;
            }
        }

        @media (max-width: 650px) {
            .green-waste-form-actions {
                align-items: stretch;
                flex-direction: column-reverse;
            }

            .green-waste-form-actions .button {
                width: 100%;
                text-align: center;
            }
        }

        .order-view-header {
            display: flex;
            justify-content: space-between;
            gap: 24px;
            align-items: flex-start;
            margin-bottom: 24px;
        }

        .order-view-reference {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            margin-top: 8px;
        }

        .order-view-reference h2 {
            margin: 0;
        }

        .order-status-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            padding: 5px 12px;
            border-radius: 999px;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .order-status-draft {
            color: #4b5563;
            background: #f3f4f6;
            border: 1px solid #d1d5db;
        }

        .order-status-open {
            color: #1d4ed8;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
        }

        .order-status-weighed {
            color: #92400e;
            background: #fffbeb;
            border: 1px solid #fde68a;
        }

        .order-status-completed {
            color: #166534;
            background: #f0fdf4;
            border: 1px solid #bbf7d0;
        }

        .order-status-cancelled {
            color: #991b1b;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        .order-status-default {
            color: #374151;
            background: #f9fafb;
            border: 1px solid #e5e7eb;
        }

        .order-action-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 24px;
        }

        .order-action-disabled {
            opacity: 0.48;
            cursor: not-allowed;
            pointer-events: none;
        }

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

        .order-view-main,
        .order-view-sidebar {
            display: grid;
            gap: 24px;
        }

        .order-summary-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 16px;
            padding: 22px;
        }

        .order-detail-item {
            min-width: 0;
            padding: 16px;
            border: 1px solid var(--border-color, #e5e7eb);
            border-radius: 12px;
            background: #fbfcfa;
        }

        .order-detail-label {
            display: block;
            margin-bottom: 7px;
            color: #667085;
            font-size: 0.76rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .order-detail-value {
            display: block;
            color: #18211b;
            font-size: 0.96rem;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        .order-detail-value-large {
            font-size: 1.2rem;
        }

        .order-pricing-table {
            width: 100%;
            border-collapse: collapse;
        }

        .order-pricing-table th,
        .order-pricing-table td {
            padding: 14px 22px;
            border-bottom: 1px solid #e8ece9;
            text-align: left;
        }

        .order-pricing-table th {
            color: #667085;
            font-size: 0.86rem;
            font-weight: 700;
        }

        .order-pricing-table td {
            text-align: right;
            color: #18211b;
            font-weight: 700;
        }

        .order-pricing-table tr:last-child th,
        .order-pricing-table tr:last-child td {
            border-bottom: 0;
        }

        .order-pricing-table .order-total-row th,
        .order-pricing-table .order-total-row td {
            background: #f5f8f5;
            color: #17351f;
            font-size: 1.06rem;
            font-weight: 900;
        }

        .order-notice {
            margin: 0 22px 20px;
            padding: 14px 16px;
            border-radius: 10px;
            font-size: 0.9rem;
            line-height: 1.55;
        }

        .order-notice-warning {
            color: #7c4a03;
            background: #fffbeb;
            border: 1px solid #fde68a;
        }

        .order-notice-info {
            color: #1e4f78;
            background: #eff8ff;
            border: 1px solid #b9ddf7;
        }

        .order-panel-body {
            padding: 22px;
        }

        .order-address {
            margin: 0;
            white-space: pre-line;
            line-height: 1.7;
        }

        .order-contact-list {
            display: grid;
            gap: 14px;
            margin: 18px 0 0;
            padding: 0;
            list-style: none;
        }

        .order-contact-list li {
            display: grid;
            gap: 3px;
        }

        .order-contact-list span {
            color: #667085;
            font-size: 0.76rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .order-contact-list strong,
        .order-contact-list a {
            color: #18211b;
            overflow-wrap: anywhere;
        }

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

        .order-document-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 15px;
            padding: 15px;
            border: 1px solid #e5e9e6;
            border-radius: 12px;
            background: #fbfcfa;
        }

        .order-document-row strong {
            display: block;
            color: #18211b;
        }

        .order-document-row small {
            display: block;
            margin-top: 3px;
            color: #667085;
        }

        .order-document-state {
            flex: 0 0 auto;
            padding: 5px 9px;
            border-radius: 999px;
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
        }

        .order-document-generated {
            color: #166534;
            background: #dcfce7;
        }

        .order-document-pending {
            color: #6b7280;
            background: #f3f4f6;
        }

        .order-notes {
            margin: 0;
            white-space: pre-wrap;
            line-height: 1.7;
        }

        .order-empty-copy {
            margin: 0;
            color: #667085;
        }

        .order-timeline {
            position: relative;
            display: grid;
            gap: 0;
            padding: 22px;
        }

        .order-timeline-item {
            position: relative;
            display: grid;
            grid-template-columns: 15px minmax(0, 1fr);
            gap: 14px;
            padding-bottom: 22px;
        }

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

        .order-timeline-marker {
            position: relative;
            width: 11px;
            height: 11px;
            margin-top: 5px;
            border: 3px solid #d9e8dc;
            border-radius: 50%;
            background: #245b32;
            box-sizing: content-box;
            z-index: 2;
        }

        .order-timeline-item:not(:last-child) .order-timeline-marker::after {
            position: absolute;
            top: 14px;
            left: 4px;
            width: 2px;
            height: calc(100% + 17px);
            content: "";
            background: #dfe7e1;
        }

        .order-timeline-content h4 {
            margin: 0 0 4px;
            color: #18211b;
            font-size: 0.95rem;
        }

        .order-timeline-content p {
            margin: 0;
            color: #56615a;
            line-height: 1.55;
        }

        .order-timeline-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 12px;
            margin-top: 8px;
            color: #7a847d;
            font-size: 0.78rem;
        }

        .order-record-list {
            display: grid;
            gap: 0;
            margin: 0;
        }

        .order-record-list div {
            display: grid;
            gap: 4px;
            padding: 14px 0;
            border-bottom: 1px solid #e8ece9;
        }

        .order-record-list div:first-child {
            padding-top: 0;
        }

        .order-record-list div:last-child {
            padding-bottom: 0;
            border-bottom: 0;
        }

        .order-record-list dt {
            color: #667085;
            font-size: 0.76rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .order-record-list dd {
            margin: 0;
            color: #18211b;
            font-weight: 700;
            overflow-wrap: anywhere;
        }

        @media (max-width: 1100px) {
            .order-view-layout {
                grid-template-columns: 1fr;
            }

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

        @media (max-width: 760px) {
            .order-view-header {
                flex-direction: column;
            }

            .order-summary-grid {
                grid-template-columns: 1fr;
                padding: 16px;
            }

            .order-pricing-table th,
            .order-pricing-table td {
                padding: 13px 16px;
            }

            .order-view-sidebar {
                grid-template-columns: 1fr;
            }

            .order-action-bar .button {
                justify-content: center;
            }

            .order-document-row {
                align-items: flex-start;
                flex-direction: column;
            }
        }

        /* ==========================================================
   GORSEFIELD LIGHT WORKSPACE THEME
   Keeps the branded navigation dark while making daily CRM
   screens brighter, clearer and easier to use.
========================================================== */

        .app-body {
            --workspace: #f3f6f3;
            --workspace-panel: #ffffff;
            --workspace-panel-soft: #f7f9f7;
            --workspace-text: #172019;
            --workspace-muted: #667168;
            --workspace-subtle: #879188;
            --workspace-border: #dce4dd;
            --workspace-border-strong: #cbd6cd;
            --workspace-shadow: 0 14px 38px rgba(20, 45, 27, 0.08);
            color: var(--workspace-text);
            background: var(--workspace);
        }

        .app-body .app-main {
            background:
                radial-gradient(circle at 92% 3%, rgba(89, 189, 69, 0.10), transparent 25%),
                linear-gradient(180deg, #f8faf8 0%, var(--workspace) 100%);
        }

        /* Keep the navigation and top bar dark and branded. */
        .app-body .app-sidebar {
            color: var(--text);
            background:
                linear-gradient(180deg, rgba(89, 189, 69, 0.075), transparent 28%),
                #111711;
            border-right-color: rgba(255, 255, 255, 0.08);
        }

        .app-body .app-header {
            color: var(--text);
            background: rgba(16, 22, 17, 0.96);
            border-bottom-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 8px 24px rgba(14, 30, 18, 0.10);
        }

        .app-body .app-header .app-page-heading h1,
        .app-body .app-header .header-account-details strong {
            color: #ffffff;
        }

        .app-body .app-header .app-page-heading>span,
        .app-body .app-header .header-date span,
        .app-body .app-header .header-date strong,
        .app-body .app-header .header-account-details span {
            color: #a9b5aa;
        }

        .app-body .app-content {
            color: var(--workspace-text);
        }

        .app-body .app-content h1,
        .app-body .app-content h2,
        .app-body .app-content h3,
        .app-body .app-content h4,
        .app-body .app-content h5,
        .app-body .app-content h6,
        .app-body .app-content strong {
            color: var(--workspace-text);
        }

        .app-body .app-content p,
        .app-body .app-content small,
        .app-body .app-content .page-heading-copy p,
        .app-body .app-content .customer-section-intro,
        .app-body .app-content .crm-form-note {
            color: var(--workspace-muted);
        }

        .app-body .app-footer {
            color: #7a857c;
            border-top-color: var(--workspace-border);
            background: rgba(255, 255, 255, 0.48);
        }

        .app-body .app-footer-right a {
            color: #395c40;
        }

        /* Shared white panels and cards. */
        .app-body .dashboard-welcome,
        .app-body .dashboard-stat-card,
        .app-body .dashboard-panel,
        .app-body .staff-summary-card,
        .app-body .crm-form-panel,
        .app-body .customer-list-panel,
        .app-body .customer-profile-panel,
        .app-body .customer-stat-card,
        .app-body .customer-save-summary,
        .app-body .order-panel,
        .app-body .order-card,
        .app-body .order-filter-panel,
        .app-body .order-summary-card,
        .app-body .crm-panel {
            color: var(--workspace-text);
            border-color: var(--workspace-border);
            background: var(--workspace-panel);
            box-shadow: var(--workspace-shadow);
        }

        .app-body .dashboard-welcome {
            border-color: #cfe1d1;
            background:
                radial-gradient(circle at 95% 10%, rgba(89, 189, 69, 0.16), transparent 32%),
                linear-gradient(135deg, #ffffff 0%, #f3faf3 100%);
        }

        .app-body .dashboard-welcome h2,
        .app-body .dashboard-panel-header h3,
        .app-body .dashboard-stat-value,
        .app-body .dashboard-stat-label,
        .app-body .dashboard-placeholder strong,
        .app-body .dashboard-quick-actions strong,
        .app-body .dashboard-summary-list strong,
        .app-body .crm-empty-state strong,
        .app-body .staff-person-copy strong,
        .app-body .staff-contact a,
        .app-body .staff-last-login strong {
            color: var(--workspace-text);
        }

        .app-body .dashboard-welcome p,
        .app-body .dashboard-stat-card p,
        .app-body .dashboard-empty-state p,
        .app-body .dashboard-placeholder span,
        .app-body .dashboard-quick-actions small,
        .app-body .dashboard-activity-copy span,
        .app-body .dashboard-summary-list span,
        .app-body .crm-empty-state p,
        .app-body .staff-person-copy small,
        .app-body .staff-contact span,
        .app-body .staff-last-login span {
            color: var(--workspace-muted);
        }

        .app-body .dashboard-panel-header,
        .app-body .crm-table thead th,
        .app-body .crm-table tbody td,
        .app-body .dashboard-activity-item+.dashboard-activity-item {
            border-color: var(--workspace-border);
        }

        .app-body .dashboard-quick-actions>a:hover,
        .app-body .dashboard-summary-list a:hover,
        .app-body .crm-table tbody tr:hover {
            background: #f2f7f2;
            border-color: #d3dfd5;
        }

        .app-body .dashboard-activity-marker {
            border-color: #ffffff;
        }

        /* Buttons. */
        .app-body .button-secondary,
        .app-body .button-small,
        .app-body .order-action-disabled {
            color: #29432f;
            border-color: var(--workspace-border-strong);
            background: #ffffff;
            box-shadow: 0 5px 14px rgba(20, 45, 27, 0.05);
        }

        .app-body .button-secondary:hover,
        .app-body .button-small:hover {
            color: #18351e;
            border-color: #9fc7a5;
            background: #edf7ee;
        }

        /* Forms and filter controls. */
        .app-body .crm-field label,
        .app-body .crm-switch-row strong,
        .app-body .customer-checkbox-row>span,
        .app-body .customer-checkbox-row strong,
        .app-body .generated-password-box strong {
            color: var(--workspace-text);
        }

        .app-body .crm-field>small,
        .app-body .crm-switch-row small,
        .app-body .customer-checkbox-row small {
            color: var(--workspace-muted);
        }

        .app-body .crm-field input,
        .app-body .crm-field select,
        .app-body .crm-field textarea,
        .app-body .customer-search-field input,
        .app-body .order-search-input,
        .app-body .order-filter-field input,
        .app-body .order-filter-field select,
        .app-body .order-form input,
        .app-body .order-form select,
        .app-body .order-form textarea,
        .app-body .quick-customer-form input,
        .app-body .quick-customer-form select,
        .app-body .quick-customer-form textarea {
            color: #172019;
            border-color: #ccd7ce;
            background-color: #ffffff;
            box-shadow: inset 0 1px 2px rgba(20, 45, 27, 0.025);
        }

        .app-body .crm-field input::placeholder,
        .app-body .crm-field textarea::placeholder,
        .app-body .customer-search-field input::placeholder,
        .app-body .order-search-input::placeholder,
        .app-body .order-form input::placeholder,
        .app-body .order-form textarea::placeholder {
            color: #919a93;
        }

        .app-body .crm-field input:hover,
        .app-body .crm-field select:hover,
        .app-body .crm-field textarea:hover,
        .app-body .order-form input:hover,
        .app-body .order-form select:hover,
        .app-body .order-form textarea:hover {
            border-color: #aebdb1;
        }

        .app-body .crm-field input:focus,
        .app-body .crm-field select:focus,
        .app-body .crm-field textarea:focus,
        .app-body .customer-search-field input:focus,
        .app-body .order-search-input:focus,
        .app-body .order-filter-field input:focus,
        .app-body .order-filter-field select:focus,
        .app-body .order-form input:focus,
        .app-body .order-form select:focus,
        .app-body .order-form textarea:focus,
        .app-body .quick-customer-form input:focus,
        .app-body .quick-customer-form select:focus,
        .app-body .quick-customer-form textarea:focus {
            color: #172019;
            border-color: #65b969;
            background-color: #ffffff;
            box-shadow: 0 0 0 4px rgba(89, 189, 69, 0.14);
        }

        .app-body .crm-field select option,
        .app-body .order-form select option,
        .app-body .order-filter-field select option,
        .app-body .quick-customer-form select option {
            color: #172019;
            background: #ffffff;
        }

        .app-body .crm-field select,
        .app-body .order-filter-field select,
        .app-body .order-form select,
        .app-body .quick-customer-form select {
            background-image:
                linear-gradient(45deg, transparent 50%, #617064 50%),
                linear-gradient(135deg, #617064 50%, transparent 50%);
        }

        .app-body input[type="date"],
        .app-body input[type="time"],
        .app-body input[type="datetime-local"] {
            color-scheme: light;
        }

        .app-body .crm-switch-control {
            border-color: #c7d2c9;
            background: #e8ede9;
        }

        .app-body .crm-switch-control::after {
            background: #ffffff;
            box-shadow: 0 1px 4px rgba(20, 45, 27, 0.22);
        }

        /* Staff table. */
        .app-body .staff-summary-label,
        .app-body .crm-table thead th {
            color: #68736a;
        }

        .app-body .crm-table {
            color: var(--workspace-text);
            background: #ffffff;
        }

        .app-body .crm-table tbody td {
            color: #263229;
        }

        .app-body .crm-empty-state-icon {
            background: #edf4ee;
        }

        /* Customer directory and profile. */
        .app-body .customer-card,
        .app-body .customer-record-card,
        .app-body .customer-address-card,
        .app-body .customer-note-card,
        .app-body .customer-detail-item,
        .app-body .customer-module-placeholder,
        .app-body .customer-empty-state-small {
            color: var(--workspace-text);
            border-color: var(--workspace-border);
            background: #ffffff;
        }

        .app-body .customer-card:hover,
        .app-body .customer-record-card:hover {
            border-color: #b7d3bc;
            box-shadow: 0 12px 28px rgba(20, 45, 27, 0.08);
        }

        .app-body .customer-card-title-row h3,
        .app-body .customer-detail-item strong,
        .app-body .customer-detail-item a,
        .app-body .customer-record-card strong,
        .app-body .customer-address-card address,
        .app-body .customer-note-card p,
        .app-body .customer-sidebar-name,
        .app-body .customer-sidebar-links a,
        .app-body .customer-sidebar-definition dd,
        .app-body .customer-profile-title h2 {
            color: var(--workspace-text);
        }

        .app-body .customer-card-details,
        .app-body .customer-card-meta,
        .app-body .customer-detail-item span,
        .app-body .customer-record-meta,
        .app-body .customer-note-head time,
        .app-body .customer-note-card small,
        .app-body .customer-sidebar-body>p,
        .app-body .customer-sidebar-definition dt,
        .app-body .customer-profile-title p {
            color: var(--workspace-muted);
        }

        .app-body .customer-profile-tabs {
            border-color: var(--workspace-border);
            background: #ffffff;
        }

        .app-body .customer-profile-tabs a {
            color: #58645b;
        }

        .app-body .customer-profile-tabs a:hover,
        .app-body .customer-profile-tabs a.is-active {
            color: #245b32;
            background: #edf7ee;
        }

        /* Order list. */
        .app-body .order-filter-panel,
        .app-body .orders-filter-panel,
        .app-body .order-list-panel {
            border-color: var(--workspace-border);
            background: #ffffff;
            box-shadow: var(--workspace-shadow);
        }

        .app-body .order-card {
            border-color: #d6e1d8;
            background: #ffffff;
            box-shadow: 0 9px 25px rgba(20, 45, 27, 0.06);
        }

        .app-body .order-card:hover {
            border-color: #a9cfae;
            box-shadow: 0 15px 34px rgba(20, 45, 27, 0.10);
            transform: translateY(-1px);
        }

        .app-body .order-card h2,
        .app-body .order-card h3,
        .app-body .order-card strong,
        .app-body .order-card-value,
        .app-body .order-reference,
        .app-body .order-list-reference {
            color: var(--workspace-text);
        }

        .app-body .order-card p,
        .app-body .order-card small,
        .app-body .order-card-label,
        .app-body .order-card-meta,
        .app-body .order-list-meta {
            color: var(--workspace-muted);
        }

        .app-body .order-card-divider,
        .app-body .order-card hr {
            border-color: var(--workspace-border);
        }

        .app-body .order-card .button-secondary,
        .app-body .order-card .order-view-button {
            color: #204d2a;
            border-color: #c8d7cb;
            background: #f7faf7;
        }

        .app-body .order-card .button-secondary:hover,
        .app-body .order-card .order-view-button:hover {
            border-color: #8fbd96;
            background: #eaf5eb;
        }

        /* View order. */
        .app-body .order-view-reference h2,
        .app-body .order-detail-value,
        .app-body .order-detail-value-large,
        .app-body .order-pricing-table td,
        .app-body .order-contact-list strong,
        .app-body .order-contact-list a,
        .app-body .order-document-row strong,
        .app-body .order-notes,
        .app-body .order-record-list dd {
            color: var(--workspace-text);
        }

        .app-body .order-summary-grid,
        .app-body .order-panel,
        .app-body .order-document-row {
            border-color: var(--workspace-border);
            background: #ffffff;
            box-shadow: var(--workspace-shadow);
        }

        .app-body .order-detail-item {
            border-color: #e2e8e3;
            background: #f8faf8;
        }

        .app-body .order-detail-label,
        .app-body .order-pricing-table th,
        .app-body .order-contact-list span,
        .app-body .order-document-row small,
        .app-body .order-record-list dt,
        .app-body .order-timeline-meta,
        .app-body .order-empty-copy {
            color: var(--workspace-muted);
        }

        .app-body .order-pricing-table th,
        .app-body .order-pricing-table td,
        .app-body .order-pricing-table tr:last-child th,
        .app-body .order-pricing-table tr:last-child td {
            border-color: var(--workspace-border);
        }

        .app-body .order-pricing-table .order-total-row th,
        .app-body .order-pricing-table .order-total-row td {
            color: #16351e;
            background: #edf7ee;
        }

        .app-body .order-address,
        .app-body .order-timeline-content h4,
        .app-body .order-timeline-content p {
            color: var(--workspace-text);
        }

        .app-body .order-notice-info {
            color: #214f68;
            border-color: #bfdae8;
            background: #eef8fd;
        }

        .app-body .order-notice-warning {
            color: #6b4a15;
            border-color: #ead7a7;
            background: #fff9e9;
        }

        /* Alerts and generated password content. */
        .app-body .generated-password-box {
            border-color: #b9d9bd;
            background: #edf7ee;
        }

        .app-body .crm-alert-success {
            color: #205b2b;
            border-color: #b7d9bc;
            background: #edf8ef;
        }

        .app-body .crm-alert-error {
            color: #8b2424;
            border-color: #efc1c1;
            background: #fff2f2;
        }

        /* Modal used by quick customer creation. */
        .app-body .customer-modal,
        .app-body .quick-customer-modal,
        .app-body .modal-card,
        .app-body .crm-modal-card {
            color: var(--workspace-text);
            border-color: var(--workspace-border);
            background: #ffffff;
            box-shadow: 0 28px 80px rgba(10, 30, 16, 0.24);
        }

        .app-body .customer-modal h2,
        .app-body .quick-customer-modal h2,
        .app-body .modal-card h2,
        .app-body .crm-modal-card h2 {
            color: var(--workspace-text);
        }

        /* Mobile polish. */
        @media (max-width: 760px) {
            .app-body .app-content {
                background: transparent;
            }

            .app-body .dashboard-panel,
            .app-body .crm-form-panel,
            .app-body .customer-list-panel,
            .app-body .customer-profile-panel,
            .app-body .order-panel,
            .app-body .order-card,
            .app-body .crm-panel {
                border-radius: 17px;
            }
        }

        /* Extracted from orders/create.php */

        body.order-modal-open {
            overflow: hidden;
        }

        .order-customer-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 8px;
        }

        .order-customer-label-row label {
            margin: 0;
        }

        .order-add-customer-button {
            padding: 0;
            border: 0;
            background: transparent;
            color: #71d55e;
            font: inherit;
            font-size: 0.88rem;
            font-weight: 800;
            cursor: pointer;
        }

        .order-add-customer-button:hover {
            text-decoration: underline;
        }

        .order-customer-search-wrap {
            position: relative;
            margin-bottom: 10px;
        }

        .order-customer-search-wrap input {
            width: 100%;
            padding-right: 46px !important;
        }

        .order-customer-search-icon {
            position: absolute;
            top: 50%;
            right: 16px;
            color: #8c978f;
            font-size: 1.25rem;
            pointer-events: none;
            transform: translateY(-50%);
        }

        .order-customer-select {
            min-height: 190px;
            padding: 6px !important;
            background-image: none !important;
        }

        .order-customer-select option {
            padding: 11px 12px;
            border-radius: 7px;
        }

        .order-customer-select option:checked {
            color: #fff;
            background: #2d702f linear-gradient(0deg, #2d702f 0%, #2d702f 100%);
        }

        .order-modal-backdrop {
            position: fixed;
            z-index: 9999;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 24px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.72);
            backdrop-filter: blur(5px);
        }

        .order-modal-backdrop[hidden] {
            display: none;
        }

        .order-modal {
            width: min(900px, 100%);
            max-height: calc(100vh - 48px);
            overflow-y: auto;
            border: 1px solid rgba(105, 199, 83, 0.28);
            border-radius: 18px;
            background: #101511;
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
        }

        .order-modal-header {
            position: sticky;
            z-index: 2;
            top: 0;
            display: flex;
            justify-content: space-between;
            gap: 20px;
            padding: 24px 26px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            background: #101511;
        }

        .order-modal-header h3 {
            margin: 5px 0 5px;
        }

        .order-modal-header p {
            margin: 0;
            color: #96a099;
        }

        .order-modal-close {
            width: 42px;
            height: 42px;
            flex: 0 0 42px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.04);
            color: #fff;
            font-size: 1.7rem;
            line-height: 1;
            cursor: pointer;
        }

        .order-modal-alert {
            margin: 20px 26px 0;
        }

        .order-quick-customer-form {
            padding: 26px;
        }

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

        .order-modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            margin-top: 24px;
            padding-top: 22px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        @media (max-width: 700px) {
            .order-modal-backdrop {
                padding: 10px;
            }

            .order-modal {
                max-height: calc(100vh - 20px);
            }

            .order-modal-header,
            .order-quick-customer-form {
                padding: 20px;
            }

            .order-quick-checks {
                grid-template-columns: 1fr;
            }

            .order-modal-actions {
                flex-direction: column-reverse;
            }

            .order-modal-actions .button {
                width: 100%;
                justify-content: center;
            }
        }

        /* Temporary order-specific styles.
   Move these into your main CRM stylesheet when you are happy with them. */

        .order-suffix-input {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            overflow: hidden;
            border: 1px solid #d0d5dd;
            border-radius: 10px;
            background: #fff;
        }

        .order-suffix-input:focus-within {
            border-color: var(--primary, #173b2c);
            box-shadow: 0 0 0 3px rgba(23, 59, 44, 0.12);
        }

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

        .order-suffix-input span {
            padding: 0 13px;
            color: #667085;
            font-size: 13px;
            font-weight: 700;
        }

        .order-net-weight {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 18px;
            border-radius: 12px;
            background: #f3f7f4;
        }

        .order-net-weight span {
            color: #475467;
            font-weight: 700;
        }

        .order-net-weight strong {
            color: var(--primary, #173b2c);
            font-size: 22px;
        }

        .order-form-error {
            margin-top: 10px;
            color: #b42318;
            font-weight: 700;
        }

        .order-total-panel {
            overflow: hidden;
        }

        .order-total-body {
            padding: 0 22px 22px;
        }

        .order-total-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 12px 0;
            border-bottom: 1px solid #eaecf0;
            color: #475467;
            font-size: 14px;
        }

        .order-total-row strong {
            color: #101828;
        }

        .order-total-grand {
            margin-top: 8px;
            padding-top: 18px;
            border-bottom: 0;
            color: #101828;
            font-size: 18px;
            font-weight: 800;
        }

        .order-total-grand strong {
            color: var(--primary, #173b2c);
            font-size: 24px;
        }

        /* Extracted from orders/edit.php */

        .order-suffix-input {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            overflow: hidden;
            border: 1px solid #d0d5dd;
            border-radius: 10px;
            background: #fff;
        }

        .order-suffix-input:focus-within {
            border-color: var(--primary, #173b2c);
            box-shadow: 0 0 0 3px rgba(23, 59, 44, 0.12);
        }

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

        .order-suffix-input span {
            padding: 0 13px;
            color: #667085;
            font-size: 13px;
            font-weight: 700;
        }

        .order-net-weight {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 18px;
            border-radius: 12px;
            background: #f3f7f4;
        }

        .order-net-weight span {
            color: #475467;
            font-weight: 700;
        }

        .order-net-weight strong {
            color: var(--primary, #173b2c);
            font-size: 22px;
        }

        .order-form-error {
            margin-top: 10px;
            color: #b42318;
            font-weight: 700;
        }

        .order-total-panel {
            overflow: hidden;
        }

        .order-total-body {
            padding: 0 22px 22px;
        }

        .order-total-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            padding: 12px 0;
            border-bottom: 1px solid #eaecf0;
            color: #475467;
            font-size: 14px;
        }

        .order-total-row strong {
            color: #101828;
        }

        .order-total-grand {
            margin-top: 8px;
            padding-top: 18px;
            border-bottom: 0;
            color: #101828;
            font-size: 18px;
            font-weight: 800;
        }

        .order-total-grand strong {
            color: var(--primary, #173b2c);
            font-size: 24px;
        }

        /* ==========================================================
   GORSEFIELD CRM WORKSPACE DESIGN SYSTEM — JULY 2026
   Final shared overrides. All application pages use this layer.
========================================================== */

        .app-body {
            --workspace-bg: #f3f7f3;
            --workspace-card: #ffffff;
            --workspace-card-soft: #f8faf8;
            --workspace-text: #18221a;
            --workspace-muted: #667169;
            --workspace-faint: #8a958c;
            --workspace-border: #d8e2da;
            --workspace-border-strong: #becdc1;
            --workspace-green: #3aa838;
            --workspace-green-dark: #277e2b;
            --workspace-green-soft: #eaf6ea;
            --workspace-shadow: 0 12px 32px rgba(24, 48, 29, .07);
            color: var(--workspace-text);
            background: var(--workspace-bg);
        }

        .app-body .app-main {
            background:
                radial-gradient(circle at 92% 3%, rgba(89, 189, 69, .10), transparent 24rem),
                var(--workspace-bg);
        }

        .app-body .app-header {
            color: #fff;
            border-bottom-color: rgba(255, 255, 255, .08);
            background: rgba(14, 22, 15, .96);
        }

        .app-body .app-content {
            color: var(--workspace-text);
        }

        .app-body .page-heading-copy h2,
        .app-body .page-heading-copy p,
        .app-body .page-eyebrow,
        .app-body .crm-panel-header h3,
        .app-body .crm-panel-eyebrow {
            color: var(--workspace-text);
        }

        .app-body .page-heading-copy p {
            color: var(--workspace-muted);
        }

        .app-body .page-eyebrow,
        .app-body .crm-panel-eyebrow {
            color: var(--workspace-green-dark);
        }

        .app-body .crm-panel,
        .app-body .dashboard-panel,
        .app-body .crm-form-panel,
        .app-body .staff-summary-card,
        .app-body .customer-list-panel,
        .app-body .customer-profile-panel,
        .app-body .order-panel {
            color: var(--workspace-text);
            border: 1px solid var(--workspace-border);
            background: var(--workspace-card);
            box-shadow: var(--workspace-shadow);
        }

        .app-body .crm-panel-header,
        .app-body .dashboard-panel-header {
            border-color: var(--workspace-border);
        }

        /* Buttons */
        .app-body .button-primary {
            color: #fff;
            background: linear-gradient(135deg, #62cf4d, #3bad37 58%, #27872c);
            box-shadow: 0 12px 26px rgba(44, 151, 48, .22);
        }

        .app-body .button-primary:hover {
            box-shadow: 0 16px 32px rgba(44, 151, 48, .30);
        }

        .app-body .button-secondary,
        .app-body .button-small {
            color: #234d2b;
            border-color: #c5d4c8;
            background: #fff;
        }

        .app-body .button-secondary:hover,
        .app-body .button-small:hover {
            color: #173d20;
            border-color: #8dbb94;
            background: #edf7ee;
        }

        /* Summary cards */
        .app-body .customer-summary-grid,
        .app-body .staff-summary-grid {
            gap: 18px;
        }

        .app-body .staff-summary-card {
            min-width: 0;
            padding: 25px 26px;
            border-radius: 20px;
        }

        .app-body .staff-summary-label,
        .app-body .staff-summary-card small {
            display: block;
            color: var(--workspace-muted);
        }

        .app-body .staff-summary-card strong {
            margin: 8px 0 5px;
            color: var(--workspace-text);
            font-size: clamp(2rem, 3vw, 2.8rem);
            line-height: 1;
        }

        /* Clickable order views */
        .app-body .order-view-tabs {
            margin: 0 0 22px;
            padding: 7px;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 7px;
            border: 1px solid var(--workspace-border);
            border-radius: 17px;
            background: rgba(255, 255, 255, .78);
            box-shadow: 0 8px 24px rgba(24, 48, 29, .05);
        }

        .app-body .order-view-tab {
            min-width: 0;
            min-height: 54px;
            padding: 11px 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            border: 1px solid transparent;
            border-radius: 12px;
            color: #536057;
            text-decoration: none;
            font-size: .82rem;
            font-weight: 800;
        }

        .app-body .order-view-tab strong {
            min-width: 29px;
            height: 29px;
            padding: 0 8px;
            display: inline-grid;
            place-items: center;
            border-radius: 999px;
            color: #39513e;
            background: #edf1ed;
            font-size: .72rem;
        }

        .app-body .order-view-tab:hover {
            color: #235c2d;
            border-color: #c9dbcC;
            background: #f3faf4;
        }

        .app-body .order-view-tab.is-active {
            color: #fff;
            border-color: #349a36;
            background: linear-gradient(135deg, #54c448, #309a34);
            box-shadow: 0 8px 18px rgba(47, 151, 50, .18);
        }

        .app-body .order-view-tab.is-active strong {
            color: #245729;
            background: #fff;
        }

        /* Filters */
        .app-body .customer-filter-bar,
        .app-body .order-filter-bar {
            padding: 22px 24px;
            display: grid;
            grid-template-columns: minmax(280px, 1.5fr) minmax(180px, .65fr) minmax(155px, .5fr) minmax(155px, .5fr);
            gap: 15px;
            align-items: end;
            border-color: var(--workspace-border);
            background: #f8faf8;
        }

        .app-body .customer-search-field,
        .app-body .customer-filter-select {
            min-width: 0;
        }

        .app-body .customer-search-field input,
        .app-body .customer-filter-select input,
        .app-body .customer-filter-select select,
        .app-body .crm-field input,
        .app-body .crm-field select,
        .app-body .crm-field textarea,
        .app-body .order-form input,
        .app-body .order-form select,
        .app-body .order-form textarea,
        .app-body .quick-customer-form input,
        .app-body .quick-customer-form select,
        .app-body .quick-customer-form textarea {
            width: 100%;
            min-height: 50px;
            border: 1px solid #c8d4ca;
            border-radius: 11px;
            outline: 0;
            color: var(--workspace-text);
            background-color: #fff;
            box-shadow: 0 1px 2px rgba(20, 45, 27, .025);
        }

        .app-body .customer-search-field input {
            padding: 0 15px 0 45px;
        }

        .app-body .customer-filter-select input,
        .app-body .customer-filter-select select {
            padding: 0 39px 0 13px;
        }

        .app-body .customer-filter-select label,
        .app-body .crm-field label {
            display: block;
            margin: 0 0 8px;
            color: #59655c;
            font-size: .70rem;
            font-weight: 850;
            letter-spacing: .07em;
            text-transform: uppercase;
        }

        .app-body .customer-search-field svg {
            color: #77837a;
        }

        .app-body .customer-search-field input::placeholder,
        .app-body .crm-field input::placeholder,
        .app-body .crm-field textarea::placeholder {
            color: #8e9990;
        }

        .app-body .customer-filter-select select,
        .app-body .crm-field select,
        .app-body .order-form select,
        .app-body .quick-customer-form select {
            appearance: none;
            background-image:
                linear-gradient(45deg, transparent 50%, #647068 50%),
                linear-gradient(135deg, #647068 50%, transparent 50%);
            background-position:
                calc(100% - 18px) calc(50% - 2px),
                calc(100% - 13px) calc(50% - 2px);
            background-size: 5px 5px, 5px 5px;
            background-repeat: no-repeat;
        }

        .app-body .customer-search-field input:focus,
        .app-body .customer-filter-select input:focus,
        .app-body .customer-filter-select select:focus,
        .app-body .crm-field input:focus,
        .app-body .crm-field select:focus,
        .app-body .crm-field textarea:focus,
        .app-body .order-form input:focus,
        .app-body .order-form select:focus,
        .app-body .order-form textarea:focus {
            color: var(--workspace-text);
            border-color: #62b867;
            background: #fff;
            box-shadow: 0 0 0 4px rgba(72, 173, 76, .12);
        }

        .app-body .customer-filter-actions {
            grid-column: 1 / -1;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .app-body input[type="date"],
        .app-body input[type="time"],
        .app-body input[type="datetime-local"] {
            color-scheme: light;
        }

        /* Order/customer directory cards */
        .app-body .customer-card-list {
            padding: 20px 24px 24px;
            display: grid;
            gap: 14px;
        }

        .app-body .customer-card {
            min-width: 0;
            padding: 20px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(150px, 230px);
            align-items: center;
            gap: 24px;
            color: var(--workspace-text);
            border: 1px solid var(--workspace-border);
            border-radius: 17px;
            background: #fff;
            box-shadow: 0 8px 20px rgba(24, 48, 29, .045);
        }

        .app-body .customer-card:hover {
            border-color: #aed0b3;
            box-shadow: 0 13px 28px rgba(24, 48, 29, .08);
        }

        .app-body .customer-card-main {
            min-width: 0;
            display: flex;
            align-items: flex-start;
            gap: 17px;
        }

        .app-body .customer-card-avatar {
            color: #319f35;
            border-color: #c4dfc8;
            background: #edf8ee;
        }

        .app-body .customer-card-copy,
        .app-body .customer-card-title-row,
        .app-body .customer-detail-grid {
            min-width: 0;
        }

        .app-body .customer-card-title-row h3,
        .app-body .customer-card-title-row h4,
        .app-body .customer-card-title-row h3 a,
        .app-body .customer-card-title-row h4 a,
        .app-body .customer-detail-item strong {
            color: var(--workspace-text);
        }

        .app-body .customer-card-subtitle,
        .app-body .customer-card-meta,
        .app-body .customer-detail-item span {
            color: var(--workspace-muted);
        }

        .app-body .customer-detail-grid {
            margin-top: 17px;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            border: 1px solid #e1e8e2;
            border-radius: 13px;
            overflow: hidden;
            background: #fafcfA;
        }

        .app-body .customer-detail-item {
            min-width: 0;
            padding: 13px 15px;
            border: 0;
            border-right: 1px solid #e1e8e2;
            background: transparent;
        }

        .app-body .customer-detail-item:last-child {
            border-right: 0;
        }

        .app-body .customer-detail-item strong {
            display: block;
            margin-top: 5px;
            overflow-wrap: anywhere;
        }

        .app-body .customer-card-actions .button {
            width: 100%;
        }

        /* Status badges */
        .app-body .status-badge {
            border: 1px solid transparent;
            font-weight: 850;
            letter-spacing: .03em;
            text-transform: uppercase;
        }

        .app-body .status-badge-active {
            color: #21722b;
            border-color: #b6ddb9;
            background: #eaf8ec;
        }

        .app-body .status-badge-warning {
            color: #765116;
            border-color: #ead5a1;
            background: #fff7df;
        }

        .app-body .status-badge-inactive {
            color: #5f6961;
            border-color: #d7ded8;
            background: #f0f3f0;
        }

        /* Tables, profile and order details */
        .app-body .crm-table,
        .app-body .order-pricing-table {
            color: var(--workspace-text);
            background: #fff;
        }

        .app-body .crm-table thead th,
        .app-body .crm-table tbody td,
        .app-body .order-pricing-table th,
        .app-body .order-pricing-table td {
            border-color: var(--workspace-border);
        }

        .app-body .crm-table thead th,
        .app-body .order-pricing-table th {
            color: var(--workspace-muted);
        }

        .app-body .crm-table tbody td,
        .app-body .order-pricing-table td {
            color: var(--workspace-text);
        }

        .app-body .order-summary-grid,
        .app-body .order-document-row,
        .app-body .order-detail-item,
        .app-body .customer-record-card,
        .app-body .customer-address-card,
        .app-body .customer-note-card,
        .app-body .customer-module-placeholder,
        .app-body .customer-empty-state-small {
            color: var(--workspace-text);
            border-color: var(--workspace-border);
            background: #fff;
        }

        .app-body .order-detail-item {
            background: #f8faf8;
        }

        .app-body .order-detail-label,
        .app-body .order-contact-list span,
        .app-body .order-document-row small,
        .app-body .order-record-list dt,
        .app-body .order-timeline-meta {
            color: var(--workspace-muted);
        }

        .app-body .order-detail-value,
        .app-body .order-detail-value-large,
        .app-body .order-contact-list strong,
        .app-body .order-contact-list a,
        .app-body .order-document-row strong,
        .app-body .order-record-list dd,
        .app-body .order-address,
        .app-body .order-notes,
        .app-body .customer-sidebar-definition dd,
        .app-body .customer-sidebar-links a {
            color: var(--workspace-text);
        }

        /* Modals */
        .app-body .customer-modal-backdrop,
        .app-body .quick-customer-backdrop,
        .app-body .crm-modal-backdrop {
            background: rgba(9, 19, 11, .66);
        }

        .app-body .customer-modal,
        .app-body .quick-customer-modal,
        .app-body .modal-card,
        .app-body .crm-modal-card {
            color: var(--workspace-text);
            border-color: var(--workspace-border);
            background: #fff;
        }

        /* Responsive */
        @media (max-width: 1250px) {

            .app-body .customer-filter-bar,
            .app-body .order-filter-bar {
                grid-template-columns: minmax(250px, 1.4fr) repeat(3, minmax(145px, .6fr));
            }

            .app-body .customer-detail-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .app-body .customer-detail-item:nth-child(2) {
                border-right: 0;
            }

            .app-body .customer-detail-item:nth-child(-n+2) {
                border-bottom: 1px solid #e1e8e2;
            }
        }

        @media (max-width: 900px) {
            .app-body .order-view-tabs {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .app-body .customer-filter-bar,
            .app-body .order-filter-bar {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .app-body .customer-search-field {
                grid-column: 1 / -1;
            }

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

            .app-body .customer-card-actions {
                display: flex;
                justify-content: flex-end;
            }

            .app-body .customer-card-actions .button {
                width: auto;
                min-width: 170px;
            }
        }

        @media (max-width: 640px) {

            .app-body .order-view-tabs,
            .app-body .customer-filter-bar,
            .app-body .order-filter-bar,
            .app-body .customer-detail-grid {
                grid-template-columns: 1fr;
            }

            .app-body .order-view-tab {
                min-height: 49px;
            }

            .app-body .customer-filter-bar,
            .app-body .order-filter-bar,
            .app-body .customer-card-list {
                padding: 16px;
            }

            .app-body .customer-filter-actions,
            .app-body .customer-card-actions {
                display: grid;
                grid-template-columns: 1fr;
            }

            .app-body .customer-filter-actions .button,
            .app-body .customer-card-actions .button {
                width: 100%;
            }

            .app-body .customer-card {
                padding: 17px;
            }

            .app-body .customer-card-main {
                gap: 12px;
            }

            .app-body .customer-detail-item,
            .app-body .customer-detail-item:nth-child(2),
            .app-body .customer-detail-item:nth-child(-n+2) {
                border-right: 0;
                border-bottom: 1px solid #e1e8e2;
            }

            .app-body .customer-detail-item:last-child {
                border-bottom: 0;
            }
        }

        /* ========================================================================
   SETTINGS AREA
   ======================================================================== */

        .settings-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 22px;
            padding: 7px;
            border: 1px solid #dce6de;
            border-radius: 14px;
            background: #fff;
            box-shadow: 0 8px 24px rgba(20, 45, 27, 0.05);
        }

        .settings-tabs a {
            display: inline-flex;
            align-items: center;
            min-height: 40px;
            padding: 9px 15px;
            border-radius: 10px;
            color: #526158;
            font-size: 0.9rem;
            font-weight: 700;
            text-decoration: none;
        }

        .settings-tabs a:hover {
            color: #204d2a;
            background: #f2f7f3;
        }

        .settings-tabs a.is-active {
            color: #fff;
            background: #245b32;
        }

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

        .settings-section {
            overflow: visible;
        }

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

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

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

        .settings-form .crm-field small {
            display: block;
            margin-top: 7px;
            color: #718078;
            font-size: 0.82rem;
            line-height: 1.5;
        }

        .settings-logo-preview {
            display: grid;
            gap: 8px;
        }

        .settings-logo-preview>span {
            color: #314039;
            font-size: 0.9rem;
            font-weight: 700;
        }

        .settings-logo-preview>div {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 116px;
            padding: 18px;
            border: 1px dashed #cbd9ce;
            border-radius: 12px;
            background: #f7faf7;
        }

        .settings-logo-preview img {
            display: block;
            max-width: 220px;
            max-height: 80px;
            object-fit: contain;
        }

        .settings-save-bar {
            position: sticky;
            z-index: 5;
            bottom: 16px;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            padding: 14px;
            border: 1px solid #d6e1d8;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.96);
            box-shadow: 0 15px 36px rgba(20, 45, 27, 0.12);
            backdrop-filter: blur(8px);
        }

        .settings-save-bar button:disabled {
            cursor: not-allowed;
            opacity: 0.55;
        }

        @media (max-width: 760px) {
            .settings-grid-two {
                grid-template-columns: 1fr;
            }

            .settings-grid-full {
                grid-column: auto;
            }

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

            .settings-tabs a {
                justify-content: center;
                text-align: center;
            }

            .settings-save-bar {
                bottom: 8px;
            }
        }

        @media (max-width: 460px) {
            .settings-tabs {
                grid-template-columns: 1fr;
            }

            .settings-save-bar {
                display: grid;
                grid-template-columns: 1fr 1fr;
            }

            .settings-save-bar .button {
                justify-content: center;
            }
        }

        /* ==========================================================
   SETTINGS
========================================================== */

        .settings-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin: 0 0 28px;
        }

        .settings-tabs a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 18px;
            border-radius: 10px;
            background: #fff;
            border: 1px solid #d9e3ef;
            color: #334155;
            font-weight: 600;
            text-decoration: none;
            transition: .2s;
        }

        .settings-tabs a:hover {
            background: #f8fafc;
            border-color: #0f766e;
            color: #0f766e;
        }

        .settings-tabs a.is-active {
            background: #0f766e;
            border-color: #0f766e;
            color: #fff;
        }

        .settings-form {
            display: flex;
            flex-direction: column;
            gap: 28px;
        }

        .settings-section {
            overflow: hidden;
        }

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

        .settings-grid-two {
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        }

        .form-field {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-field label {
            font-weight: 700;
            color: #1e293b;
        }

        .form-field input,
        .form-field select,
        .form-field textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid #d6dde6;
            border-radius: 10px;
            background: #fff;
            color: #1e293b;
            font: inherit;
            transition: .2s;
        }

        .form-field textarea {
            resize: vertical;
            min-height: 120px;
        }

        .form-field input:focus,
        .form-field select:focus,
        .form-field textarea:focus {
            outline: none;
            border-color: #0f766e;
            box-shadow: 0 0 0 3px rgba(15, 118, 110, .15);
        }

        .form-field small {
            color: #64748b;
            font-size: .86rem;
        }

        .input-with-suffix {
            display: flex;
        }

        .input-with-suffix input {
            border-radius: 10px 0 0 10px;
            border-right: none;
        }

        .input-with-suffix span {
            min-width: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f1f5f9;
            border: 1px solid #d6dde6;
            border-left: none;
            border-radius: 0 10px 10px 0;
            font-weight: 600;
            color: #475569;
        }

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

        @media (max-width:768px) {

            .settings-tabs {
                flex-direction: column;
            }

            .settings-tabs a {
                width: 100%;
            }

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

            .settings-form-actions {
                justify-content: stretch;
            }

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

        }

        .order-document-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .order-document-controls {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 10px;
        }

        .button-small {
            min-height: auto;
            padding: 8px 12px;
            font-size: .82rem;
        }

        @media (max-width:640px) {

            .order-document-row {
                align-items: flex-start;
                flex-direction: column;
            }

            .order-document-controls {
                width: 100%;
                justify-content: flex-start;
            }

        }

        /* =========================================================
   EMAIL DOCUMENTS PAGE
========================================================= */

        .crm-form {
            width: 100%;
        }

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

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 9px;
        }

        .form-group-full {
            grid-column: 1 / -1;
        }

        .form-group label {
            font-size: .78rem;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
            color: #233326;
        }

        .field-optional {
            margin-left: 5px;
            font-size: .68rem;
            font-weight: 600;
            letter-spacing: 0;
            text-transform: none;
            color: #78827a;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            border: 1px solid #d4ddd5;
            border-radius: 12px;
            background: #ffffff;
            color: #19251b;
            font: inherit;
            font-size: .95rem;
            line-height: 1.5;
            outline: none;
            transition:
                border-color .2s ease,
                box-shadow .2s ease,
                background-color .2s ease;
            box-sizing: border-box;
        }

        .form-group input {
            min-height: 48px;
            padding: 11px 14px;
        }

        .form-group textarea {
            min-height: 310px;
            padding: 14px;
            resize: vertical;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: #49ad3a;
            box-shadow: 0 0 0 4px rgba(73, 173, 58, .12);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: #9aa39c;
        }

        .form-help {
            display: block;
            margin-top: -2px;
            color: #778179;
            font-size: .78rem;
            line-height: 1.45;
        }

        .form-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 26px;
            padding-top: 22px;
            border-top: 1px solid #e4eae4;
        }

        /* Document choices */

        .order-document-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 16px;
            border: 1px solid #dfe6df;
            border-radius: 14px;
            background: #ffffff;
        }

        label.order-document-row {
            cursor: pointer;
        }

        label.order-document-row:hover {
            border-color: #b8ceb9;
            background: #fbfdfb;
        }

        .order-document-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }

        .order-document-info strong {
            color: #19251b;
        }

        .order-document-info small {
            color: #778179;
            line-height: 1.4;
        }

        .order-document-row input[type="checkbox"] {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
            accent-color: #37a72f;
        }

        .order-document-row input[type="checkbox"]:disabled {
            cursor: not-allowed;
            opacity: .45;
        }

        .order-document-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        /* Email page layout refinement */

        .order-view-layout {
            align-items: start;
        }

        .order-view-main {
            min-width: 0;
        }

        .order-view-sidebar {
            min-width: 0;
        }

        .order-panel-body {
            padding: 24px;
        }

        .crm-panel-header {
            padding: 22px 24px;
        }

        /* Responsive */

        @media (max-width:1000px) {

            .order-view-layout {
                grid-template-columns: 1fr;
            }

        }

        @media (max-width:700px) {

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

            .form-group-full {
                grid-column: auto;
            }

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

            .form-actions .button {
                width: 100%;
                justify-content: center;
            }

            .order-document-row {
                align-items: flex-start;
            }

        }

        .order-document-email-meta {
            color: #5f6f63;
            font-size: .75rem;
            line-height: 1.4;
        }

        .order-signature-list {
            display: grid;
            gap: 18px;
        }

        .order-signature-record {
            display: grid;
            gap: 8px;
            min-width: 0;
        }

        .order-signature-record+.order-signature-record {
            padding-top: 18px;
            border-top: 1px solid #dfe7df;
        }

        .order-signature-record-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .order-signature-preview {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 105px;
            padding: 12px;
            overflow: hidden;
            border: 1px solid #d7e0d7;
            border-radius: 12px;
            background: #fff;
        }

        .order-signature-preview img {
            display: block;
            width: 100%;
            max-height: 100px;
            object-fit: contain;
        }

        .order-signature-record small {
            display: block;
            overflow-wrap: anywhere;
            color: #657267;
        }

        @media (max-width: 760px) {
            .order-signature-record-head {
                align-items: flex-start;
                flex-direction: column;
            }
        }

        .orders-page-heading {
            margin-bottom: 24px;
        }

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

        .orders-summary-card {
            min-width: 0;
            padding: 20px;
            border: 1px solid #d8e3d8;
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 10px 30px rgba(18, 47, 25, 0.05);
        }

        .orders-summary-card span,
        .orders-summary-card small {
            display: block;
            color: #667368;
        }

        .orders-summary-card span {
            margin-bottom: 7px;
            font-size: 12px;
            font-weight: 800;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .orders-summary-card strong {
            display: block;
            margin-bottom: 4px;
            color: #17231b;
            font-size: 28px;
            line-height: 1.1;
            overflow-wrap: anywhere;
        }

        .orders-tabs {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 20px;
            padding: 8px;
            border: 1px solid #d8e3d8;
            border-radius: 18px;
            background: #fff;
        }

        .orders-tab {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
            padding: 14px 16px;
            border-radius: 13px;
            color: #435046;
            text-decoration: none;
            font-weight: 800;
        }

        .orders-tab strong {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 30px;
            height: 30px;
            padding: 0 8px;
            border-radius: 999px;
            background: #eef4ee;
            color: #27352b;
            font-size: 12px;
        }

        .orders-tab.is-active {
            background: linear-gradient(135deg, #55ce49, #28a938);
            color: #fff;
            box-shadow: 0 10px 24px rgba(52, 179, 61, .22);
        }

        .orders-tab.is-active strong {
            background: #fff;
            color: #1e6e29;
        }

        .orders-panel {
            overflow: hidden;
        }

        .orders-panel-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 20px;
            padding: 24px 26px;
            border-bottom: 1px solid #e2e9e2;
        }

        .orders-filter-form {
            display: grid;
            grid-template-columns: minmax(280px, 2.2fr) minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(180px, 1fr) auto;
            gap: 14px;
            align-items: end;
            padding: 22px 26px;
            border-bottom: 1px solid #e2e9e2;
            background: #f8faf8;
        }

        .orders-filter-field {
            min-width: 0;
        }

        .orders-filter-field label {
            display: block;
            margin-bottom: 7px;
            color: #647067;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .orders-search-wrap {
            position: relative;
        }

        .orders-search-wrap svg {
            position: absolute;
            top: 50%;
            left: 15px;
            width: 19px;
            height: 19px;
            transform: translateY(-50%);
            color: #748177;
            pointer-events: none;
        }

        .orders-filter-field input,
        .orders-filter-field select {
            width: 100%;
            height: 50px;
            padding: 0 14px;
            border: 1px solid #cfdacf;
            border-radius: 13px;
            background: #fff;
            color: #17231b;
            font: inherit;
        }

        .orders-search-wrap input {
            padding-left: 46px;
        }

        .orders-filter-actions {
            display: flex;
            gap: 10px;
            white-space: nowrap;
        }

        .orders-list {
            display: grid;
            gap: 16px;
            padding: 22px 26px 26px;
        }

        .order-list-card {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 24px;
            align-items: center;
            min-width: 0;
            padding: 20px;
            border: 1px solid #cfe0cf;
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 8px 24px rgba(18, 47, 25, .04);
        }

        .order-list-card-main {
            display: grid;
            grid-template-columns: 54px minmax(0, 1fr);
            gap: 16px;
            min-width: 0;
        }

        .order-list-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 54px;
            height: 54px;
            border: 1px solid #b9d9b9;
            border-radius: 15px;
            background: #eef8ee;
            color: #2c9f39;
        }

        .order-list-icon svg {
            width: 29px;
            height: 29px;
        }

        .order-list-content {
            min-width: 0;
        }

        .order-list-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 14px;
        }

        .order-list-title h4 {
            margin: 0 0 5px;
            font-size: 18px;
            line-height: 1.2;
        }

        .order-list-title h4 a {
            color: #17231b;
            text-decoration: none;
        }

        .order-list-subtitle {
            display: flex;
            flex-wrap: wrap;
            gap: 7px 13px;
            color: #68756b;
            font-size: 13px;
        }

        .order-list-subtitle span:not(:last-child)::after {
            content: "•";
            margin-left: 13px;
            color: #a4afa6;
        }

        .order-list-details {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            overflow: hidden;
            border: 1px solid #dce5dc;
            border-radius: 14px;
            background: #fbfcfb;
        }

        .order-list-detail {
            min-width: 0;
            padding: 14px 16px;
        }

        .order-list-detail+.order-list-detail {
            border-left: 1px solid #dce5dc;
        }

        .order-list-detail span {
            display: block;
            margin-bottom: 5px;
            color: #69766c;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: .06em;
            text-transform: uppercase;
        }

        .order-list-detail strong {
            display: block;
            color: #17231b;
            font-size: 15px;
            line-height: 1.3;
            overflow-wrap: anywhere;
        }

        .order-list-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 13px;
        }

        .order-meta-pill {
            display: inline-flex;
            align-items: center;
            min-height: 27px;
            padding: 4px 9px;
            border-radius: 999px;
            background: #eef3ee;
            color: #566358;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: .04em;
            text-transform: uppercase;
        }

        .order-meta-pill.is-warning {
            background: #fff4d7;
            color: #8a6100;
        }

        .order-meta-pill.is-success {
            background: #e8f7e9;
            color: #24732e;
        }

        .order-list-actions {
            display: grid;
            gap: 10px;
            min-width: 150px;
        }

        .order-list-actions .button {
            width: 100%;
            justify-content: center;
        }

        .orders-empty {
            padding: 52px 24px;
            text-align: center;
        }

        .orders-pagination {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 0 26px 26px;
        }

        @media (max-width: 1250px) {
            .orders-filter-form {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .orders-filter-actions {
                grid-column: span 3;
                justify-content: flex-end;
            }
        }

        @media (max-width: 980px) {

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

            .order-list-card {
                grid-template-columns: 1fr;
            }

            .order-list-actions {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 760px) {

            .orders-summary-grid,
            .orders-tabs,
            .orders-filter-form {
                grid-template-columns: 1fr;
            }

            .orders-panel-header {
                padding: 20px;
            }

            .orders-filter-form,
            .orders-list {
                padding: 18px;
            }

            .orders-filter-actions {
                grid-column: auto;
                display: grid;
                grid-template-columns: 1fr;
            }

            .orders-filter-actions .button {
                width: 100%;
                justify-content: center;
            }

            .order-list-card {
                padding: 16px;
            }

            .order-list-card-main {
                grid-template-columns: 1fr;
            }

            .order-list-icon {
                width: 48px;
                height: 48px;
            }

            .order-list-top {
                flex-direction: column;
            }

            .order-list-details {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .order-list-detail:nth-child(3) {
                border-left: 0;
                border-top: 1px solid #dce5dc;
            }

            .order-list-detail:nth-child(4) {
                border-top: 1px solid #dce5dc;
            }

            .order-list-actions {
                grid-template-columns: 1fr;
            }

            .orders-pagination {
                align-items: stretch;
                flex-direction: column;
                padding: 0 18px 18px;
            }
        }

        @media (max-width: 480px) {
            .orders-summary-grid {
                grid-template-columns: 1fr;
            }

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

            .order-list-details {
                grid-template-columns: 1fr;
            }

            .order-list-detail+.order-list-detail,
            .order-list-detail:nth-child(3),
            .order-list-detail:nth-child(4) {
                border-left: 0;
                border-top: 1px solid #dce5dc;
            }
        }

        /* ==========================================================
   Reports filter panel
   ========================================================== */

        .reports-filter-panel {
            margin-bottom: 24px;
        }

        .reports-filter-panel .crm-panel-header {
            padding-bottom: 12px;
        }

        .reports-filter-form {
            display: grid;
            grid-template-columns:
                minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(180px, 1fr) minmax(200px, 1.2fr) auto;
            gap: 14px;
            align-items: end;
            padding: 6px 24px 24px;
        }

        .reports-filter-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
            min-width: 0;
        }

        .reports-filter-field label {
            margin: 0;
            color: var(--muted, #687268);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .reports-filter-field input,
        .reports-filter-field select {
            width: 100%;
            min-height: 44px;
            padding: 10px 12px;
            border: 1px solid var(--border, #d8e2d6);
            border-radius: 9px;
            background: #fff;
            color: var(--heading, #142119);
        }

        .reports-filter-actions {
            display: flex;
            gap: 10px;
            align-items: stretch;
        }

        .reports-filter-actions .button {
            min-height: 44px;
            white-space: nowrap;
        }

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

            .reports-filter-actions {
                grid-column: 1 / -1;
            }
        }

        @media (max-width: 700px) {
            .reports-filter-form {
                grid-template-columns: 1fr;
                padding: 8px 16px 18px;
            }

            .reports-filter-actions {
                display: grid;
                grid-template-columns: 1fr;
            }

            .reports-filter-actions .button {
                width: 100%;
                justify-content: center;
            }
        }

        /* =========================================================
   WasteFlowOS standalone system pages
   ========================================================= */

        .system-page-body {
            min-height: 100vh;
            margin: 0;
            color: #f4f6f2;
            background:
                radial-gradient(circle at top left,
                    rgba(118, 151, 85, 0.14),
                    transparent 34rem),
                radial-gradient(circle at bottom right,
                    rgba(181, 137, 64, 0.1),
                    transparent 30rem),
                #101310;
        }

        .system-page-body,
        .system-page-body *,
        .system-page-body *::before,
        .system-page-body *::after {
            box-sizing: border-box;
        }

        .system-page {
            min-height: 100vh;
            display: grid;
            place-items: center;
            padding:
                max(28px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
        }

        .system-page-card {
            width: min(100%, 620px);
            padding: clamp(28px, 5vw, 52px);
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 24px;
            background: rgba(24, 29, 24, 0.92);
            box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        .system-page-logo {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 28px;
        }

        .system-page-logo img {
            display: block;
            width: auto;
            max-width: min(230px, 72vw);
            max-height: 82px;
            object-fit: contain;
        }

        .system-page-status {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 30px;
            margin-bottom: 20px;
            padding: 6px 12px;
            border: 1px solid rgba(175, 205, 139, 0.2);
            border-radius: 999px;
            color: #c9ddb2;
            background: rgba(118, 151, 85, 0.1);
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .system-page-icon {
            width: 72px;
            height: 72px;
            display: grid;
            place-items: center;
            margin: 0 auto 22px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 22px;
            color: #c9ddb2;
            background: rgba(255, 255, 255, 0.04);
        }

        .system-page-icon svg {
            width: 34px;
            height: 34px;
        }

        .system-page-card h1 {
            margin: 0;
            color: #ffffff;
            font-size: clamp(30px, 5vw, 46px);
            line-height: 1.08;
            letter-spacing: -0.035em;
        }

        .system-page-card>p {
            max-width: 520px;
            margin: 18px auto 0;
            color: rgba(244, 246, 242, 0.72);
            font-size: 16px;
            line-height: 1.7;
        }

        .system-page-actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
            margin-top: 30px;
        }

        .system-page-button {
            min-height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 11px 18px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            color: #f4f6f2;
            background: rgba(255, 255, 255, 0.04);
            font: inherit;
            font-size: 14px;
            font-weight: 750;
            line-height: 1.2;
            text-decoration: none;
            transition:
                transform 160ms ease,
                border-color 160ms ease,
                background 160ms ease;
        }

        .system-page-button:hover {
            transform: translateY(-1px);
            border-color: rgba(255, 255, 255, 0.24);
            background: rgba(255, 255, 255, 0.08);
        }

        .system-page-button--primary {
            border-color: #8fac6c;
            color: #101310;
            background: #b8d394;
        }

        .system-page-button--primary:hover {
            border-color: #c7dfa9;
            background: #c7dfa9;
        }

        .system-page-button:focus-visible,
        .system-page-logo:focus-visible {
            outline: 3px solid rgba(184, 211, 148, 0.4);
            outline-offset: 4px;
        }

        .system-page-help {
            margin-top: 30px;
            padding-top: 22px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            color: rgba(244, 246, 242, 0.42);
            font-size: 12px;
            letter-spacing: 0.04em;
        }

        /* =========================================================
   WasteFlowOS in-app error pages
   ========================================================= */

        .app-error-panel {
            width: min(100%, 760px);
            margin: clamp(20px, 5vw, 64px) auto;
            padding: clamp(26px, 5vw, 48px);
            text-align: center;
            border: 1px solid var(--border, #d8e2d6);
            border-radius: 18px;
            background: #ffffff;
            box-shadow: 0 18px 50px rgba(20, 33, 25, 0.08);
        }

        .app-error-panel__icon {
            width: 72px;
            height: 72px;
            display: grid;
            place-items: center;
            margin: 0 auto 18px;
            border: 1px solid #dbe7d7;
            border-radius: 20px;
            color: #54733e;
            background: #f2f7ef;
        }

        .app-error-panel__icon svg {
            width: 34px;
            height: 34px;
        }

        .app-error-panel__status {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 28px;
            margin-bottom: 16px;
            padding: 5px 11px;
            border: 1px solid #dbe7d7;
            border-radius: 999px;
            color: #54733e;
            background: #f6faf4;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.11em;
            text-transform: uppercase;
        }

        .app-error-panel h2 {
            max-width: 620px;
            margin: 0 auto;
            color: var(--heading, #142119);
            font-size: clamp(28px, 4vw, 42px);
            line-height: 1.12;
            letter-spacing: -0.03em;
        }

        .app-error-panel__intro {
            max-width: 590px;
            margin: 16px auto 0;
            color: var(--muted, #687268);
            font-size: 16px;
            line-height: 1.7;
        }

        .access-summary {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            max-width: 560px;
            margin: 28px auto 0;
            text-align: left;
        }

        .access-summary__item {
            padding: 16px;
            border: 1px solid var(--border, #d8e2d6);
            border-radius: 12px;
            background: #f8faf7;
        }

        .access-summary__item span,
        .access-summary__item strong {
            display: block;
        }

        .access-summary__item span {
            margin-bottom: 5px;
            color: var(--muted, #687268);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.07em;
            text-transform: uppercase;
        }

        .access-summary__item strong {
            color: var(--heading, #142119);
            font-size: 15px;
        }

        .app-error-panel__help {
            max-width: 590px;
            margin: 20px auto 0;
            color: var(--muted, #687268);
            font-size: 14px;
            line-height: 1.65;
        }

        .app-error-panel__actions {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-top: 28px;
        }

        @media (max-width: 640px) {
            .system-page-card {
                border-radius: 18px;
            }

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

            .system-page-button {
                width: 100%;
            }

            .app-error-panel {
                margin: 10px auto;
                padding: 24px 18px;
                border-radius: 14px;
            }

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

            .app-error-panel__actions {
                display: grid;
                grid-template-columns: 1fr;
            }

            .app-error-panel__actions .button {
                width: 100%;
                justify-content: center;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .system-page-button {
                transition: none;
            }
        }