@import url("dashboard.css?v=6");
@import url("machine.css?v=3");
@import url("billing.css?v=3");
@import url("rc-twenty-one-bridge.css?v=3");
@import url("support-security.css?v=3");
@import url("auth.css?v=5");

/* Public design-token contract. Reseller branding adapters may set the
   --brand-* inputs; end-client preferences select theme/density through the
   data attributes without changing component CSS. */
:root {
    --wl-primary: var(--brand-primary, #4f46e5);
    --wl-primary-hover: var(--brand-primary-dark, #3730a3);
    --wl-on-primary: var(--brand-on-primary, #fff);
    --wl-primary-soft: #eef2ff;
    --wl-surface: #fff;
    --wl-surface-raised: #fff;
    --wl-surface-subtle: #f7f9fc;
    --wl-surface-muted: #eef2f6;
    --wl-text: #162033;
    --wl-muted: #667085;
    --wl-border: #e2e7ef;
    --wl-border-strong: #cbd5e1;
    --wl-success: #067647;
    --wl-warning: #b54708;
    --wl-danger: #b42318;
    --wl-info: #026aa2;
    --wl-radius-sm: .55rem;
    --wl-radius: .8rem;
    --wl-radius-lg: 1.1rem;
    --wl-shadow-sm: 0 7px 22px rgba(15, 23, 42, .055);
    --wl-shadow-md: 0 16px 40px rgba(15, 23, 42, .09);
    --wl-focus-ring: 0 0 0 3px color-mix(in srgb, var(--wl-primary) 22%, transparent);
    --wl-shell-gap: 1.25rem;
    --wl-control-height: 42px;
}

.wl-shell[data-wl-theme="dark"] {
    --wl-primary-soft: color-mix(in srgb, var(--wl-primary) 18%, #111827);
    --wl-surface: #111827;
    --wl-surface-raised: #172033;
    --wl-surface-subtle: #0b1220;
    --wl-surface-muted: #202b3d;
    --wl-text: #f1f5f9;
    --wl-muted: #a5b4c7;
    --wl-border: #2d3a4f;
    --wl-border-strong: #475569;
    color-scheme: dark;
}

.wl-shell[data-wl-density="compact"] {
    --wl-shell-gap: .85rem;
    --wl-control-height: 36px;
}

body {
    color: var(--wl-text);
    background: var(--wl-surface-subtle);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wl-shell { min-width: 0; color: var(--wl-text); }
.wl-shell *, .wl-shell *::before, .wl-shell *::after { box-sizing: border-box; }
.wl-shell a { color: var(--wl-primary); text-underline-offset: .16em; }
.wl-shell a:hover { color: var(--wl-primary-hover); }
.wl-shell a.btn-primary,
.wl-shell a.btn-primary:hover,
.wl-shell a.btn-primary:focus { color: var(--wl-on-primary); }
.wl-shell :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid transparent; box-shadow: var(--wl-focus-ring); }

.btn-primary,
.badge-primary { border-color: var(--wl-primary); color: var(--wl-on-primary); background-color: var(--wl-primary); }
.btn-primary:hover,
.btn-primary:focus { border-color: var(--wl-primary-hover); color: var(--wl-on-primary); background-color: var(--wl-primary-hover); }
.btn-outline-primary { border-color: var(--wl-primary); color: var(--wl-primary); }
.btn-outline-primary:hover,
.btn-outline-primary:focus { border-color: var(--wl-primary); color: var(--wl-on-primary); background: var(--wl-primary); }

.wl-app-header {
    position: relative;
    z-index: 1100;
    overflow: visible;
    color: var(--wl-text);
    background: color-mix(in srgb, var(--wl-surface-raised) 96%, transparent);
}
.wl-app-header .wl-appbar {
    position: relative;
    min-height: 72px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--wl-border);
    background: color-mix(in srgb, var(--wl-surface-raised) 96%, transparent);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06);
    backdrop-filter: blur(16px);
}
.wl-appbar__inner { position: relative; display: flex; flex-wrap: nowrap; gap: 1.25rem; min-height: 72px; }
.wl-app-header .wl-appbar__brand {
    display: flex;
    flex: 0 1 190px;
    align-items: center;
    min-width: 110px;
    max-width: 190px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--wl-text);
    font-size: 1rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wl-app-header .wl-appbar__brand .logo-img { width: auto; max-width: 100%; height: 40px; object-fit: contain; object-position: left center; }
.wl-appbar__navigation { align-self: stretch; min-width: 0; }
.wl-appbar__primary { align-items: stretch; min-width: 0; height: 100%; }
.wl-appbar__primary > li { display: flex !important; align-items: stretch; }
.wl-appbar__primary > li > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .8rem !important;
    border-bottom: 2px solid transparent;
    color: var(--wl-muted);
    font-size: .84rem;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}
.wl-appbar__primary > li > a:hover,
.wl-appbar__primary > li > a:focus,
.wl-appbar__primary > li.active > a { border-bottom-color: var(--wl-primary); color: var(--wl-text); }
.wl-appbar__actions { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; margin-left: auto; }
.wl-appbar__create,
.wl-appbar__create.btn-primary {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .55rem .9rem;
    border: 1px solid color-mix(in srgb, var(--wl-primary) 24%, var(--wl-border));
    border-radius: .65rem;
    color: var(--wl-primary);
    background: color-mix(in srgb, var(--wl-primary) 9%, var(--wl-surface-raised));
    box-shadow: none;
    font-size: .8rem;
    font-weight: 750;
    white-space: nowrap;
}
.wl-appbar__create:hover,
.wl-appbar__create:focus,
.wl-appbar__create.btn-primary:hover,
.wl-appbar__create.btn-primary:focus {
    border-color: color-mix(in srgb, var(--wl-primary) 38%, var(--wl-border));
    color: var(--wl-primary-hover);
    background: color-mix(in srgb, var(--wl-primary) 15%, var(--wl-surface-raised));
    box-shadow: var(--wl-focus-ring);
}
.wl-appbar__icon-button {
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: .65rem;
    color: var(--wl-muted);
    background: transparent;
}
.wl-appbar__icon-button:hover,
.wl-appbar__icon-button:focus { border-color: var(--wl-border); color: var(--wl-primary); background: var(--wl-surface-subtle); }
.wl-appbar__badge {
    position: absolute;
    top: 3px;
    right: 2px;
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid var(--wl-surface-raised);
    border-radius: 999px;
    color: #fff;
    background: var(--wl-danger);
    font-size: .58rem;
    font-weight: 800;
    line-height: 1;
}
.wl-appbar__account { align-items: center; margin-left: .1rem; }
.wl-appbar__account > li > a {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    min-height: 42px;
    padding: .45rem .75rem !important;
    border: 1px solid var(--wl-border);
    border-radius: .65rem;
    color: var(--wl-text);
    background: var(--wl-surface-raised);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.wl-appbar__account > li > a:hover,
.wl-appbar__account > li > a:focus { border-color: color-mix(in srgb, var(--wl-primary) 35%, var(--wl-border)); color: var(--wl-primary); }
.wl-appbar__toggle { display: none; }
.wl-app-header .dropdown-menu {
    z-index: 1250;
    min-width: 220px;
    margin-top: .55rem;
    padding: .45rem;
    border: 1px solid var(--wl-border);
    border-radius: .8rem;
    background: var(--wl-surface-raised);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
}
.wl-app-header .dropdown-menu .dropdown-item { border-radius: .5rem; }
.wl-app-header .dropdown-menu .dropdown-item > a { display: block; padding: .55rem .65rem !important; color: var(--wl-text); font-size: .8rem; text-decoration: none; }
.wl-app-header .dropdown-menu .dropdown-item:hover,
.wl-app-header .dropdown-menu .dropdown-item:focus-within { background: var(--wl-surface-subtle); }
.wl-context-breadcrumb { position: relative; z-index: 2; min-height: 38px; border-bottom: 1px solid var(--wl-border); background: var(--wl-surface-raised); }
.wl-context-breadcrumb .breadcrumb { min-height: 38px; margin: 0; padding-block: .55rem; font-size: .72rem; }
#main-body { position: relative; z-index: 1; }
body > .popover { z-index: 1300; }

.wl-brand-mark {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: .72rem;
    color: var(--wl-on-primary);
    background: linear-gradient(145deg, var(--wl-primary), var(--wl-primary-hover));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--wl-primary) 24%, transparent);
    font-size: 1rem;
    font-weight: 800;
}

.wl-tenant-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1.35rem clamp(1rem, 4vw, 2rem);
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-lg) var(--wl-radius-lg) 0 0;
    background: var(--wl-surface-raised);
}
.wl-tenant-footer__links { display: flex; align-items: center; gap: .8rem; }
.wl-tenant-footer__links { flex-wrap: wrap; justify-content: flex-end; gap: .65rem 1.1rem; }
.wl-tenant-footer__links a { color: var(--wl-muted); font-size: .84rem; font-weight: 600; text-decoration: none; }
.wl-tenant-footer__links a:hover,
.wl-tenant-footer__links a:focus { color: var(--wl-primary); text-decoration: underline; }

/* Keep the parent footer (including any license-required attribution) visible,
   while aligning its native surface and typography with this portal shell. */
#footer {
    margin-top: 0;
    border-top: 1px solid var(--wl-border);
    color: var(--wl-muted);
    background: var(--wl-surface-subtle);
    font-size: .84rem;
}
#footer .container { max-width: 1140px; }
#footer a { color: var(--wl-primary); font-weight: 650; text-decoration: none; }
#footer a:hover,
#footer a:focus { color: var(--wl-primary-hover); text-decoration: underline; }
#footer .btn,
#footer button {
    min-height: 38px;
    border-color: var(--wl-border);
    border-radius: var(--wl-radius-sm);
    color: var(--wl-text);
    background: var(--wl-surface-raised);
    box-shadow: none;
    font-size: .82rem;
    font-weight: 650;
}
#footer .dropdown-menu {
    border-color: var(--wl-border);
    border-radius: var(--wl-radius);
    background: var(--wl-surface-raised);
    box-shadow: var(--wl-shadow-md);
}
#footer .dropdown-menu a { display: block; padding: .5rem .7rem; color: var(--wl-text); font-weight: 600; }

.eupopup-container {
    right: 1rem !important;
    bottom: 1rem !important;
    left: auto !important;
    width: min(560px, calc(100vw - 2rem)) !important;
    padding: 1rem !important;
    border: 1px solid var(--wl-border) !important;
    border-radius: var(--wl-radius) !important;
    color: var(--wl-text) !important;
    background: var(--wl-surface-raised) !important;
    box-shadow: var(--wl-shadow-md) !important;
    font-size: .82rem !important;
    line-height: 1.45 !important;
}
.eupopup-body p { margin: 0 0 .55rem !important; }
.eupopup-body p:last-child { margin-bottom: 0 !important; }
.eupopup-button,
.eupopup-closebutton {
    border-radius: var(--wl-radius-sm) !important;
    color: var(--wl-on-primary) !important;
    background: var(--wl-primary) !important;
    font-weight: 700 !important;
}
.eupopup-closebutton { top: .35rem !important; right: .5rem !important; color: var(--wl-muted) !important; background: transparent !important; }
.eupopup-button_2 { color: var(--wl-primary) !important; font-weight: 700; }

.wl-home { display: grid; gap: clamp(2.5rem, 7vw, 5rem); padding: .75rem 0 3rem; }
.wl-eyebrow { display: inline-block; margin-bottom: .75rem; color: var(--wl-primary); font-size: .75rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.wl-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    min-height: 480px;
    padding: clamp(2rem, 5vw, 4.5rem);
    overflow: hidden;
    border: 1px solid var(--wl-border);
    border-radius: clamp(1.1rem, 3vw, 1.75rem);
    background:
        radial-gradient(circle at 82% 15%, color-mix(in srgb, var(--wl-primary) 15%, transparent), transparent 34%),
        linear-gradient(145deg, var(--wl-surface-raised), var(--wl-surface-subtle));
    box-shadow: var(--wl-shadow-md);
    isolation: isolate;
}
.wl-hero::after { position: absolute; z-index: -1; right: -7%; bottom: -30%; width: 420px; height: 420px; border: 1px solid color-mix(in srgb, var(--wl-primary) 15%, transparent); border-radius: 50%; content: ""; }
.wl-hero__content { position: relative; z-index: 2; min-width: 0; }
.wl-hero h1 { max-width: 15ch; margin: 0; font-size: clamp(2.4rem, 6vw, 4.65rem); font-weight: 780; letter-spacing: -.055em; line-height: .98; }
.wl-hero__description { max-width: 58ch; margin: 1.25rem 0 0; color: var(--wl-muted); font-size: clamp(1rem, 2vw, 1.14rem); line-height: 1.65; }
.wl-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.wl-hero__actions .btn { display: inline-flex; gap: .55rem; align-items: center; min-height: 48px; border-radius: .7rem; font-size: .93rem; font-weight: 650; }

.wl-hero__visual { position: relative; display: grid; place-items: center; min-height: 320px; }
.wl-hero__glow { position: absolute; width: 72%; aspect-ratio: 1; border-radius: 50%; background: var(--wl-primary); opacity: .13; filter: blur(42px); }
.wl-hero__console { position: relative; display: grid; align-content: center; justify-items: center; width: min(100%, 360px); min-height: 265px; padding: 3.25rem 2rem 2rem; border: 1px solid color-mix(in srgb, var(--wl-primary) 22%, var(--wl-border)); border-radius: 1.2rem; background: color-mix(in srgb, var(--wl-surface-raised) 90%, transparent); box-shadow: 0 28px 64px rgba(15, 23, 42, .16); backdrop-filter: blur(16px); transform: perspective(900px) rotateY(-4deg) rotateX(2deg); }
.wl-hero__console-bar { position: absolute; top: 0; right: 0; left: 0; display: flex; gap: .35rem; padding: .85rem 1rem; border-bottom: 1px solid var(--wl-border); }
.wl-hero__console-bar i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--wl-border-strong); }
.wl-hero__console img { max-width: 75%; max-height: 78px; object-fit: contain; }
.wl-hero__monogram { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 1.2rem; color: var(--wl-on-primary); background: var(--wl-primary); font-size: 2rem; font-weight: 800; }
.wl-hero__pulse { width: .5rem; height: .5rem; margin: 1.4rem 0 .75rem; border-radius: 50%; background: var(--wl-success); box-shadow: 0 0 0 6px color-mix(in srgb, var(--wl-success) 15%, transparent); }
.wl-hero__line { width: 48%; height: .4rem; margin-top: .55rem; border-radius: 999px; background: var(--wl-border); }
.wl-hero__line--wide { width: 72%; }

.wl-feature-section { display: grid; gap: 1.25rem; }
.wl-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.wl-section-heading h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.15rem); letter-spacing: -.035em; }
.wl-section-heading .wl-eyebrow { margin-bottom: .4rem; }
.wl-text-link { flex: 0 0 auto; font-size: .88rem; font-weight: 650; }
.wl-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.wl-feature { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; min-height: 132px; padding: 1.25rem; border: 1px solid var(--wl-border); border-radius: var(--wl-radius-lg); color: var(--wl-text) !important; background: var(--wl-surface-raised); box-shadow: var(--wl-shadow-sm); text-decoration: none !important; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.wl-feature:hover { border-color: color-mix(in srgb, var(--wl-primary) 32%, var(--wl-border)); box-shadow: var(--wl-shadow-md); transform: translateY(-3px); }
.wl-feature__icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .8rem; color: var(--wl-primary); background: var(--wl-primary-soft); }
.wl-feature__icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.wl-feature__body { display: grid; gap: .35rem; min-width: 0; }
.wl-feature__body strong { font-size: .95rem; }
.wl-feature__body > span { display: -webkit-box; overflow: hidden; color: var(--wl-muted); font-size: .8rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wl-feature__arrow { color: var(--wl-primary); transition: transform .2s ease; }
.wl-feature:hover .wl-feature__arrow { transform: translateX(3px); }

.card, .panel, .list-group-item, .table-container { border-color: var(--wl-border); border-radius: var(--wl-radius); }
.card, .panel { box-shadow: var(--wl-shadow-sm); }
.form-control, .custom-select { min-height: var(--wl-control-height); border-color: var(--wl-border-strong); border-radius: var(--wl-radius-sm); }
.form-control:focus, .custom-select:focus { border-color: var(--wl-primary); box-shadow: var(--wl-focus-ring); }

/* Twenty-One compatibility: long ticket subjects remain inside the reseller
   sidebar card at desktop and narrow viewports. */
.sidebar .card-sidebar .list-group-item,
.sidebar .card-sidebar .sidebar-menu-item-wrapper,
.sidebar .card-sidebar .sidebar-menu-item-label,
.sidebar .card-sidebar .recent-ticket { min-width: 0; max-width: 100%; }
.sidebar .card-sidebar .recent-ticket .truncate { overflow: hidden; overflow-wrap: anywhere; text-overflow: ellipsis; white-space: normal; word-break: break-word; }

@media (max-width: 1199.98px) {
    .wl-appbar__inner { gap: .75rem; }
    .wl-appbar__navigation {
        position: absolute;
        z-index: 1220;
        top: 100%;
        right: 0;
        left: 0;
        align-self: auto;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        border: 1px solid var(--wl-border);
        border-top: 0;
        border-radius: 0 0 .9rem .9rem;
        background: var(--wl-surface-raised);
        box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
    }
    .wl-appbar__navigation:not(.show) { display: none; }
    .wl-appbar__navigation.show { display: block; }
    .wl-appbar__primary { display: grid; height: auto; padding: .65rem; }
    .wl-appbar__primary > li { display: block !important; }
    .wl-appbar__primary > li > a { min-height: 44px; padding: .65rem .75rem !important; border: 0; border-radius: .55rem; }
    .wl-appbar__primary > li > a:hover,
    .wl-appbar__primary > li > a:focus { background: var(--wl-surface-subtle); }
    .wl-appbar__primary .dropdown-menu { position: static; margin: .2rem 0 .45rem; box-shadow: none; }
    .wl-appbar__toggle { display: inline-grid; }
}

@media (max-width: 991.98px) {
    .wl-hero { grid-template-columns: 1fr; min-height: 0; }
    .wl-hero h1 { max-width: 18ch; }
    .wl-hero__visual { min-height: 270px; }
    .wl-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .wl-app-header .wl-appbar__brand { flex: 1 1 168px; min-width: 138px; max-width: min(48vw, 190px); }
    .wl-app-header .wl-appbar__brand .logo-img { height: 40px; }
    .wl-appbar__account > li > a { min-width: 82px; padding: 0 .65rem !important; overflow: visible; font-size: .82rem; justify-content: center; }
    .wl-appbar__account > li > a i { margin: 0 !important; font-size: .95rem; }
    .wl-appbar__account .dropdown-menu { font-size: 1rem; }
    .wl-home { gap: 2.5rem; padding-top: 0; }
    .wl-hero { gap: 1.5rem; padding: 1.5rem; border-radius: 1rem; }
    .wl-hero h1 { font-size: clamp(2.15rem, 12vw, 3.25rem); }
    .wl-hero__visual { min-height: 220px; }
    .wl-hero__console { width: min(88%, 340px); min-height: 205px; transform: none; }
    .wl-section-heading { align-items: flex-start; }
    #tableServicesList_wrapper,
    #tableTicketsList_wrapper,
    #tableInvoicesList_wrapper,
    #tableQuotesList_wrapper,
    #tableServicesList_wrapper .listtable,
    #tableTicketsList_wrapper .listtable,
    #tableInvoicesList_wrapper .listtable,
    #tableQuotesList_wrapper .listtable { max-width: 100%; min-width: 0; overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
    .invoice-container table.table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .wl-tenant-footer { align-items: flex-start; flex-direction: column; }
    .wl-tenant-footer__links { justify-content: flex-start; }
}

@media (max-width: 479.98px) {
    .wl-app-header .wl-appbar__brand { flex-basis: 150px; min-width: 132px; max-width: 44vw; }
    .wl-app-header .wl-appbar__brand .logo-img { height: 38px; }
    .wl-appbar__inner { gap: .3rem; }
    .wl-appbar__actions { gap: .2rem; }
    .wl-appbar__create { width: 42px; padding: 0; }
    .wl-appbar__create span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
    .wl-hero__actions { display: grid; }
    .wl-hero__actions .btn { justify-content: center; width: 100%; }
    .wl-hero__visual { display: none; }
    .wl-section-heading { display: grid; }
    .wl-feature { grid-template-columns: auto minmax(0, 1fr); min-height: 116px; padding: 1rem; }
    .wl-feature__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (prefers-contrast: more) {
    :root { --wl-border: #94a3b8; --wl-border-strong: #64748b; }
    .wl-feature, .wl-hero, .wl-metric, .wl-panel { box-shadow: none; }
}
