:root {
    --color-canvas: #f5f7fc;
    --color-surface: #ffffff;
    --color-surface-muted: #f8fafc;
    --color-text: #171b3b;
    --color-text-muted: #64748b;
    --color-border: #e2e7f2;
    --color-primary: #c2410c;
    --color-primary-hover: #9a3412;
    --color-sidebar: #17193d;
    --color-sidebar-muted: #9ca3af;
    --radius-control: 8px;
    --radius-card: 12px;
    --shadow-card: 0 1px 2px rgb(15 23 42 / 4%), 0 8px 24px rgb(15 23 42 / 3%);
    --sidebar-width: 238px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--color-canvas);
    color: var(--color-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-primary-hover);
}

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

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgb(194 65 12 / 28%);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    transform: translateY(-150%);
    border-radius: 6px;
    background: #fff;
    padding: 10px 14px;
    color: var(--color-text);
    box-shadow: var(--shadow-card);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.app-sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--color-sidebar);
    color: #e5e7eb;
    scrollbar-color: #475569 transparent;
    scrollbar-width: thin;
}

.app-sidebar::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #475569;
}

.app-brand {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgb(255 255 255 / 8%);
    color: #fff;
}

.app-brand:hover {
    color: #fff;
}

.app-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 10px;
    background: #c2410c;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.app-brand-copy,
.app-user-copy {
    display: grid;
    min-width: 0;
}

.app-brand-copy strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-brand-copy small,
.app-user-copy small {
    overflow: hidden;
    color: var(--color-sidebar-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 14px 12px 20px;
}

.app-nav-heading {
    margin: 16px 10px 5px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.app-nav-heading:first-child {
    margin-top: 2px;
}

.app-nav-heading-platform {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 10%);
}

.app-nav-link {
    display: flex;
    min-height: 37px;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 8px 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

.app-nav-link:hover {
    background: rgb(255 255 255 / 7%);
    color: #fff;
}

.app-nav-link.is-active {
    border-color: rgb(251 146 60 / 35%);
    background: rgb(194 65 12 / 24%);
    color: #fff;
}

.app-nav-disclosure {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.app-nav-disclosure-summary {
    cursor: pointer;
    list-style: none;
}

.app-nav-disclosure-summary::-webkit-details-marker {
    display: none;
}

.app-nav-disclosure-chevron {
    margin-left: auto;
    color: #94a3b8;
    font-size: 11px;
}

.app-nav-disclosure[open] .app-nav-disclosure-chevron {
    transform: rotate(180deg);
}

.app-nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 12px;
    border-left: 1px solid rgb(255 255 255 / 12%);
    padding-left: 8px;
}

.app-nav-sub-link {
    display: flex;
    min-height: 31px;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    border-radius: 6px;
    padding: 6px 8px;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.3;
}

.app-nav-sub-link:hover,
.app-nav-sub-link.is-active {
    background: rgb(255 255 255 / 7%);
    color: #fff;
}

.app-nav-sub-link-nested {
    min-height: 28px;
    margin-left: 9px;
    padding-left: 10px;
    color: #aab4ca;
    font-size: 10px;
}

.app-nav-subheading {
    margin: 8px 8px 3px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-nav-vendor-status {
    flex: 0 0 auto;
    color: #a5b4fc;
    font-size: 9px;
    white-space: nowrap;
}

.app-sidebar-footer {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    border-top: 1px solid rgb(255 255 255 / 9%);
    background: var(--color-sidebar);
    padding: 12px;
}

.app-user-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 3px 4px 12px;
}

.app-user-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: #334155;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
}

.app-user-copy strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-logout {
    width: 100%;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 7px;
    background: transparent;
    padding: 8px 10px;
    color: #cbd5e1;
    text-align: left;
    font-size: 12px;
    transition: background-color .15s ease, color .15s ease;
}

.app-logout:hover {
    background: rgb(255 255 255 / 7%);
    color: #fff;
}

.app-main {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
    margin-left: var(--sidebar-width);
}

.app-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    background: rgb(255 255 255 / 94%);
    padding: 0 32px;
    backdrop-filter: blur(12px);
}

.app-topbar-start,
.app-breadcrumbs {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.app-breadcrumbs {
    color: var(--color-text-muted);
    font-size: 12px;
}

.app-breadcrumbs strong {
    overflow: hidden;
    color: #334155;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-divider {
    color: #cbd5e1;
}

.app-topbar-account {
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-menu-toggle,
.app-sidebar-backdrop {
    display: none;
}

.app-content {
    width: 100%;
    max-width: 1480px;
    min-width: 0;
    flex: 1;
    margin: 0 auto;
    padding: 32px;
}

.app-content h1 {
    margin: 0;
    color: #111827;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -.035em;
    line-height: 1.25;
}

.app-content h2 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.35;
}

.app-content h3 {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.app-content p {
    line-height: 1.55;
}

.app-content .text-gray-500,
.app-content .text-gray-600 {
    color: var(--color-text-muted);
}

.app-content .text-orange-700 {
    color: var(--color-primary);
}

.app-content .text-orange-700:hover {
    color: var(--color-primary-hover);
}

.app-content .page-heading,
.app-content > .flex.justify-between {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-heading {
    min-height: 64px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.page-description {
    margin: 7px 0 0;
    color: var(--color-text-muted);
    font-size: 13px;
}

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

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.button-primary,
.app-content .bg-orange-700 {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.button-primary:hover,
.app-content .bg-orange-700:hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
    color: #fff;
}

.button-secondary,
.app-content .bg-gray-200 {
    border-color: #d7deea;
    background: #fff;
    color: #334155;
}

.button-secondary:hover,
.app-content .bg-gray-200:hover {
    background: #f8fafc;
    color: #0f172a;
}

.app-content button,
.app-content a[class*="bg-orange-"],
.app-content a[class*="bg-gray-"] {
    border-radius: var(--radius-control);
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.app-content .bg-red-600,
.app-content .bg-red-700 {
    color: #fff;
}

.app-content .bg-red-600:hover,
.app-content .bg-red-700:hover {
    background: #b91c1c;
}

.app-flash {
    margin-bottom: 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 11px 14px;
    font-size: 13px;
}

.app-flash-success,
.app-content .bg-green-100 {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.app-flash-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.app-content .bg-red-100 {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.app-content .bg-yellow-100 {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.app-content .bg-gray-100 {
    border-color: #e2e8f0;
    background: #f1f5f9;
    color: #475569;
}

.app-content .bg-blue-100 {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.app-content .bg-white.shadow,
.app-content .bg-white.shadow-sm,
.app-content .bg-white.rounded-lg,
.app-content .surface-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.app-content .shadow {
    box-shadow: var(--shadow-card);
}

.app-content .rounded-lg {
    border-radius: var(--radius-card);
}

.app-content .rounded {
    border-radius: var(--radius-control);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: 17px 18px;
    box-shadow: var(--shadow-card);
}

.metric-label {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.metric-value {
    margin-top: 10px;
    color: #111827;
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.metric-value-currency {
    font-size: 23px;
}

.metric-note {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.surface-card {
    min-width: 0;
    padding: 19px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading p {
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.text-link {
    flex: 0 0 auto;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
}

.text-link:hover {
    color: var(--color-primary-hover);
}

.chart-container {
    position: relative;
    height: 236px;
}

.quick-actions-list {
    display: grid;
    gap: 2px;
}

.quick-actions-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef2f7;
    padding: 11px 2px;
    color: #334155;
    font-size: 12px;
    font-weight: 500;
}

.quick-actions-list a:last-child {
    border-bottom: 0;
}

.quick-actions-list a span:last-child {
    color: #94a3b8;
    font-size: 16px;
    transition: transform .15s ease;
}

.quick-actions-list a:hover {
    color: var(--color-primary);
}

.quick-actions-list a:hover span:last-child {
    transform: translateX(2px);
}

.dashboard-table-card {
    padding-bottom: 8px;
}

.empty-state {
    display: grid;
    min-height: 160px;
    place-content: center;
    gap: 6px;
    color: var(--color-text-muted);
    text-align: center;
}

.empty-state strong {
    color: #334155;
    font-size: 13px;
}

.empty-state span {
    font-size: 12px;
}

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

.table-scroll,
.app-content .overflow-hidden:has(table) {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.app-content table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    color: #334155;
    font-size: 12px;
}

.app-content thead {
    background: #f8fafc;
    color: #64748b;
}

.app-content th {
    position: sticky;
    z-index: 1;
    top: 0;
    border-bottom: 1px solid var(--color-border);
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .055em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-content td {
    border-bottom: 1px solid #edf1f6;
    padding: 10px 14px;
    vertical-align: middle;
}

.app-content tbody tr:last-child td {
    border-bottom: 0;
}

.app-content tbody tr:hover {
    background: #fafbff;
}

.app-content .text-right {
    text-align: right;
}

.numeric-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.empty-table-cell {
    padding: 28px 16px !important;
    color: #94a3b8;
    text-align: center;
}

.status-badge,
.app-content span.rounded.text-xs {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f1f5f9;
    padding: 2px 8px;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.status-paid,
.app-content .bg-green-100.text-green-700,
.app-content .bg-green-100.text-green-800 {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.status-unpaid,
.status-overdue,
.status-blocked,
.status-unreachable,
.app-content .bg-red-100.text-red-700 {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.status-partially-paid,
.status-pending,
.status-suspended,
.app-content .bg-yellow-100.text-yellow-700 {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.status-active,
.status-open,
.app-content .bg-blue-100.text-blue-700 {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.app-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.app-content select,
.app-content textarea,
.app-public-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.app-public-shell select,
.app-public-shell textarea,
.portal-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.portal-content select,
.portal-content textarea,
.portal-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.portal-page select,
.portal-page textarea {
    max-width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-control);
    background-color: #fff;
    padding: 8px 11px;
    color: #1e293b;
    font-size: 13px;
    box-shadow: 0 1px 1px rgb(15 23 42 / 2%);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.app-content textarea,
.app-public-shell textarea,
.portal-content textarea,
.portal-page textarea {
    min-height: 96px;
    resize: vertical;
}

.app-content input:focus,
.app-content select:focus,
.app-content textarea:focus,
.app-public-shell input:focus,
.app-public-shell select:focus,
.app-public-shell textarea:focus,
.portal-content input:focus,
.portal-content select:focus,
.portal-content textarea:focus,
.portal-page input:focus,
.portal-page select:focus,
.portal-page textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgb(99 102 241 / 13%);
    outline: 0;
}

.app-content input[type="checkbox"],
.app-content input[type="radio"],
.app-public-shell input[type="checkbox"],
.app-public-shell input[type="radio"],
.portal-content input[type="checkbox"],
.portal-content input[type="radio"],
.portal-page input[type="checkbox"],
.portal-page input[type="radio"] {
    accent-color: var(--color-primary);
}

.app-content label,
.app-public-shell label,
.portal-content label,
.portal-page label {
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.app-content form .grid.grid-cols-2 {
    row-gap: 17px;
    column-gap: 18px;
}

.app-content .divide-y > :not([hidden]) ~ :not([hidden]) {
    border-color: #edf1f6;
}

.app-content .pagination,
.app-content nav[role="navigation"] {
    color: var(--color-text-muted);
    font-size: 12px;
}

.app-content nav[role="navigation"] a,
.app-content nav[role="navigation"] span {
    border-radius: 6px;
}

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

.app-public-shell > .min-h-screen.flex.items-center.justify-center {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 15% 10%, rgb(99 102 241 / 8%), transparent 32%),
        var(--color-canvas);
    padding: 24px;
}

.app-public-shell .max-w-sm.bg-white,
.app-public-shell .max-w-md.bg-white {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 18px 50px rgb(15 23 42 / 8%);
}

.app-public-shell h1 {
    color: #111827;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -.03em;
}

.app-public-shell button.bg-orange-700,
.portal-page button.bg-orange-700,
.portal-content button.bg-orange-700 {
    min-height: 40px;
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.app-public-shell button.bg-orange-700:hover,
.portal-page button.bg-orange-700:hover,
.portal-content button.bg-orange-700:hover {
    background: var(--color-primary-hover);
}

.portal-body {
    min-height: 100vh;
    background: var(--color-canvas);
}

.portal-topbar {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    padding: 10px max(22px, calc((100vw - 1120px) / 2));
}

.portal-brand {
    color: #1e293b;
    font-size: 14px;
    font-weight: 650;
}

.portal-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.portal-links a,
.portal-links button {
    border: 0;
    background: transparent;
    padding: 4px 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.portal-links a:hover,
.portal-links button:hover {
    color: var(--color-primary);
}

.portal-content {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 30px 24px 48px;
}

.portal-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 15% 10%, rgb(99 102 241 / 8%), transparent 32%),
        var(--color-canvas);
    padding: 24px;
}

.portal-page > .w-full.max-w-sm,
.portal-page > .portal-card {
    width: min(100%, 410px);
    margin: 7vh auto 0;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    padding: 30px;
    box-shadow: 0 18px 50px rgb(15 23 42 / 8%);
}

.portal-page h1,
.portal-page h2 {
    color: #111827;
}

.portal-content .bg-white.shadow,
.portal-content .bg-white.rounded-lg,
.portal-page .bg-white.shadow,
.portal-page .bg-white.rounded-lg {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.portal-content .overflow-hidden:has(table),
.portal-page .overflow-hidden:has(table) {
    overflow-x: auto !important;
}

.portal-content table,
.portal-page table {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.portal-content td,
.portal-content th,
.portal-page td,
.portal-page th {
    border-bottom: 1px solid #edf1f6;
    padding: 10px 13px;
    text-align: left;
}

.portal-content th,
.portal-page th {
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-content {
        padding: 26px 24px;
    }

    .app-topbar {
        padding: 0 24px;
    }
}

@media (max-width: 820px) {
    .app-sidebar {
        z-index: 50;
        width: min(290px, calc(100vw - 48px));
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 16px 0 40px rgb(15 23 42 / 18%);
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    .app-sidebar-backdrop {
        position: fixed;
        z-index: 45;
        inset: 0;
        display: none;
        border: 0;
        background: rgb(15 23 42 / 48%);
        opacity: 0;
        transition: opacity .2s ease;
    }

    body.sidebar-open .app-sidebar-backdrop {
        display: block;
        opacity: 1;
    }

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

    .app-menu-toggle {
        display: inline-flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
        padding: 0;
    }

    .menu-lines {
        display: grid;
        gap: 4px;
    }

    .menu-lines span {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 2px;
        background: #334155;
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-content .grid.grid-cols-3,
    .app-content .grid.grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-content {
        padding: 24px 20px;
    }

    .app-topbar {
        min-height: 58px;
        padding: 0 20px;
    }
}

@media (max-width: 600px) {
    .app-content {
        padding: 20px 14px 32px;
    }

    .app-topbar {
        padding: 0 14px;
    }

    .app-topbar-account {
        max-width: 110px;
        font-size: 11px;
    }

    .app-breadcrumbs {
        gap: 7px;
        font-size: 11px;
    }

    .app-content h1 {
        font-size: 22px;
    }

    .app-content .page-heading,
    .app-content > .flex.justify-between {
        flex-direction: column;
        align-items: stretch;
        gap: 13px;
        margin-bottom: 18px;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .button {
        flex: 1;
    }

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

    .metric-card {
        padding: 13px;
    }

    .metric-value {
        font-size: 23px;
    }

    .metric-value-currency {
        font-size: 19px;
    }

    .surface-card {
        padding: 15px;
    }

    .chart-container {
        height: 190px;
    }

    .app-content form .grid.grid-cols-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-content .grid.grid-cols-2,
    .app-content .grid.grid-cols-3,
    .app-content .grid.grid-cols-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-content .grid.grid-cols-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-content form .col-span-2 {
        grid-column: auto;
    }

    .app-content form.flex,
    .portal-content form.flex {
        flex-wrap: wrap;
    }

    .portal-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 13px 16px;
    }

    .portal-links {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .portal-content {
        padding: 22px 14px 36px;
    }

    .portal-page {
        padding: 14px;
    }

    .app-public-shell .max-w-sm.bg-white,
    .app-public-shell .max-w-md.bg-white,
    .portal-page > .w-full.max-w-sm,
    .portal-page > .portal-card {
        padding: 22px;
    }
}

@media (max-width: 380px) {
    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

.app-sidebar {
    background: linear-gradient(180deg, #1d214b 0%, #17193d 56%, #141632 100%);
}

.app-brand {
    min-height: 68px;
    gap: 10px;
    padding: 12px 15px;
}

.app-brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
}

.app-brand-mark svg {
    width: 32px;
    height: 32px;
    overflow: visible;
    stroke: #ff9a19;
    stroke-width: 3;
    stroke-linecap: round;
}

.app-brand-mark circle {
    fill: #ff9a19;
    stroke: none;
}

.app-brand-copy strong {
    font-size: 13px;
}

.app-brand-copy small {
    color: #b7bddc;
    font-size: 10px;
}

.app-sidebar-nav {
    gap: 2px;
    padding: 10px 9px 18px;
}

.app-nav-heading {
    margin: 14px 10px 4px;
    color: #a7add0;
    font-size: 9px;
    letter-spacing: .12em;
}

.app-nav-link {
    min-height: 34px;
    gap: 10px;
    border-radius: 7px;
    padding: 7px 9px;
    color: #e0e3f2;
    font-size: 11.5px;
    font-weight: 500;
}

.app-nav-link:hover {
    background: rgb(255 255 255 / 9%);
}

.app-nav-link.is-active {
    border-color: rgb(174 153 255 / 18%);
    background: linear-gradient(100deg, #633be0, #5230c6);
    box-shadow: 0 4px 12px rgb(69 36 188 / 24%);
}

.app-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.app-sidebar-footer {
    border-color: rgb(255 255 255 / 12%);
    background: #17193d;
    padding: 11px 10px;
}

.app-user-avatar,
.app-topbar-avatar {
    background: #6845d9;
    color: #fff;
}

.app-main {
    background:
        radial-gradient(ellipse at 86% 0, rgb(99 102 241 / 5%), transparent 25%),
        var(--color-canvas);
}

.app-topbar {
    min-height: 58px;
    gap: 16px;
    border-bottom-color: #e7eaf3;
    padding: 0 20px;
}

.app-topbar-start {
    flex: 0 0 auto;
}

.app-breadcrumbs {
    font-size: 11px;
}

.app-topbar-search {
    position: relative;
    display: flex;
    width: min(100%, 410px);
    min-width: 160px;
    flex: 1 1 250px;
    align-items: center;
}

.app-topbar-search .app-icon {
    position: absolute;
    left: 12px;
    color: #7882a3;
    pointer-events: none;
}

.app-topbar-search input {
    width: 100%;
    min-height: 36px;
    border: 1px solid #e6e9f3;
    border-radius: 999px;
    background: #f4f6fd;
    padding: 7px 14px 7px 38px;
    color: #283052;
    font-size: 11px;
    outline: none;
}

.app-topbar-search input::placeholder {
    color: #8c94ad;
}

.app-topbar-search input:focus {
    border-color: #b8a6f5;
    background: #fff;
    box-shadow: 0 0 0 3px rgb(86 51 212 / 10%);
}

.app-topbar-end,
.portal-topbar-account {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.app-topbar-notifications {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #6b7391;
}

.app-topbar-notifications:hover {
    border-color: #e5e8f2;
    background: #f7f8fc;
    color: var(--color-primary);
}

.app-topbar-account {
    display: grid;
    max-width: 150px;
    gap: 1px;
    color: #283052;
    font-size: 11px;
}

.app-topbar-account strong {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-account small {
    overflow: hidden;
    color: #7a829d;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.app-content {
    max-width: 1700px;
    padding: 20px;
}

.app-content h1 {
    color: #171b3b;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.035em;
}

.page-heading {
    min-height: 54px;
    margin-bottom: 15px !important;
}

.dashboard-welcome .page-description {
    margin-top: 3px;
    font-size: 11px;
}

.dashboard-welcome .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
}

.dashboard-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.dashboard-metrics .metric-card {
    min-height: 105px;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgb(35 48 89 / 4%);
}

.metric-card-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.metric-card-heading .metric-label {
    min-width: 0;
    color: #3d4564;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.metric-icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--metric-tint, #eff4ff);
    color: var(--metric-color, #3974ee);
}

.metric-icon .app-icon {
    width: 15px;
    height: 15px;
}

.metric-accent-blue { --metric-color: #3478f6; --metric-tint: #eaf2ff; }
.metric-accent-green { --metric-color: #0eae75; --metric-tint: #e6f8f1; }
.metric-accent-violet { --metric-color: #7242e8; --metric-tint: #f0ebff; }
.metric-accent-orange { --metric-color: #f08a16; --metric-tint: #fff2df; }
.metric-accent-red { --metric-color: #ef4b57; --metric-tint: #fff0f1; }

.dashboard-metrics .metric-value {
    margin-top: 6px;
    font-size: 22px;
    letter-spacing: -.035em;
}

.dashboard-metrics .metric-value-currency {
    font-size: 16px;
    letter-spacing: -.02em;
}

.dashboard-metrics .metric-note {
    margin-top: 4px;
    color: #8991a9;
    font-size: 9px;
    line-height: 1.3;
}

.dashboard-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.05fr) minmax(230px, 1.05fr) minmax(210px, .9fr);
    gap: 11px;
    margin-bottom: 12px;
}

.dashboard-overview-grid .surface-card,
.dashboard-lists-grid .surface-card {
    border-color: #e7eaf3;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 8px rgb(35 48 89 / 4%);
}

.dashboard-overview-grid .section-heading,
.dashboard-lists-grid .section-heading,
.dashboard-invoices-card .section-heading {
    align-items: center;
    margin-bottom: 10px;
}

.dashboard-overview-grid .section-heading h2,
.dashboard-lists-grid .section-heading h2,
.dashboard-invoices-card .section-heading h2 {
    color: #242949;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-overview-grid .section-heading p,
.dashboard-lists-grid .section-heading p,
.dashboard-invoices-card .section-heading p {
    margin-top: 2px;
    font-size: 9px;
}

.dashboard-overview-grid .text-link,
.dashboard-lists-grid .text-link,
.dashboard-invoices-card .text-link {
    font-size: 10px;
}

.dashboard-overview-grid .chart-container {
    height: 188px;
}

.dashboard-overview-grid .compact-empty-state {
    min-height: 155px;
}

.subscription-chart-layout {
    display: flex;
    min-height: 176px;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 24px);
}

.subscription-donut {
    position: relative;
    width: min(154px, 52%);
    height: 154px;
    flex: 0 0 auto;
}

.subscription-donut-total {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: none;
}

.subscription-donut-total strong {
    color: #212747;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.subscription-donut-total span {
    margin-top: 3px;
    color: #7c849d;
    font-size: 9px;
}

.subscription-legend {
    display: grid;
    min-width: 94px;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.subscription-legend li {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    color: #59617e;
    font-size: 9px;
}

.subscription-legend strong {
    color: #292f4e;
    font-size: 9px;
    font-weight: 700;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.legend-active { background: #10b981; }
.legend-pending { background: #f59e0b; }
.legend-expired { background: #ef4444; }
.legend-cancelled { background: #818cf8; }

.dashboard-quick-actions {
    gap: 0;
}

.dashboard-quick-actions a {
    min-height: 34px;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid #edf0f7;
    border-radius: 7px;
    margin-bottom: 5px;
    padding: 5px 7px;
    color: #37405f;
    font-size: 9px;
}

.dashboard-quick-actions a:last-child {
    margin-bottom: 0;
}

.dashboard-quick-actions a span:last-child {
    margin-left: auto;
    font-size: 15px;
}

.action-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 6px;
}

.action-icon .app-icon {
    width: 13px;
    height: 13px;
}

.action-blue { background: #eaf2ff; color: #3478f6; }
.action-orange { background: #fff2df; color: #ee8b16; }
.action-violet { background: #f0ebff; color: #7242e8; }
.action-green { background: #e6f8f1; color: #0eae75; }

.dashboard-lists-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, .9fr);
    gap: 11px;
    margin-bottom: 12px;
}

.dashboard-lists-grid .surface-card,
.dashboard-invoices-card {
    padding-bottom: 8px;
}

.dashboard-data-table {
    min-width: 650px !important;
    font-size: 10px !important;
}

.dashboard-data-table th,
.dashboard-invoices-card th {
    padding: 8px 9px;
    font-size: 8px;
}

.dashboard-data-table td,
.dashboard-invoices-card td {
    padding: 8px 9px;
}

.customer-name-link {
    display: block;
    color: #29304f;
    font-size: 10px;
    font-weight: 600;
}

.table-subtext {
    display: block;
    margin-top: 1px;
    color: #9299ae;
    font-size: 8px;
}

.dashboard-data-table .status-badge,
.dashboard-invoices-card .status-badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 8px;
}

.top-packages-list {
    display: grid;
    gap: 13px;
    padding-top: 3px;
}

.package-row-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #303756;
    font-size: 9px;
}

.package-row-heading strong {
    font-weight: 600;
}

.package-row-heading span {
    color: #59617f;
    font-weight: 600;
}

.package-progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    margin-top: 5px;
    background: #edf0f8;
}

.package-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.package-color-0 { background: #653be0; }
.package-color-1 { background: #f59e0b; }
.package-color-2 { background: #10b981; }
.package-color-3 { background: #3974ee; }

.package-row-total {
    margin-top: 3px;
    color: #8a91a8;
    font-size: 8px;
}

.dashboard-invoices-card {
    margin-top: 0;
}

.portal-body {
    background: var(--color-canvas);
}

.portal-shell .app-sidebar {
    background: linear-gradient(180deg, #1d214b 0%, #17193d 56%, #141632 100%);
}

.portal-sidebar .app-sidebar-nav {
    flex: 1;
}

.portal-sidebar .app-nav-heading {
    margin-top: 8px;
}

.portal-topbar-account {
    gap: 12px;
}

.portal-account-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #737c98;
    font-size: 10px;
    font-weight: 600;
}

.portal-account-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #aab1c5;
}

.portal-account-status.is-active > span {
    background: #23c477;
    box-shadow: 0 0 0 3px rgb(35 196 119 / 12%);
}

.portal-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 12px;
}

.portal-metric-grid .metric-card {
    min-height: 96px;
    border-radius: 10px;
    padding: 13px;
    box-shadow: 0 2px 8px rgb(35 48 89 / 4%);
}

.portal-metric-grid .metric-label {
    color: #56607c;
    font-size: 9px;
}

.portal-metric-value {
    overflow: hidden;
    margin-top: 7px;
    color: #202648;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-metric-grid .metric-note {
    margin-top: 4px;
    font-size: 8px;
}

.portal-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.05fr) minmax(210px, .8fr);
    gap: 11px;
    margin-bottom: 12px;
}

.portal-dashboard-grid .surface-card,
.portal-tickets-card {
    border-color: #e7eaf3;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 8px rgb(35 48 89 / 4%);
}

.portal-dashboard-grid .section-heading,
.portal-tickets-card .section-heading {
    align-items: center;
    margin-bottom: 10px;
}

.portal-dashboard-grid .section-heading h2,
.portal-tickets-card .section-heading h2 {
    color: #242949;
    font-size: 12px;
    font-weight: 700;
}

.portal-dashboard-grid .section-heading p,
.portal-tickets-card .section-heading p {
    margin-top: 2px;
    font-size: 9px;
}

.portal-dashboard-grid .text-link,
.portal-tickets-card .text-link {
    font-size: 9px;
}

.portal-usage-chart {
    height: 190px;
}

.usage-unit {
    border: 1px solid #e6e9f2;
    border-radius: 6px;
    padding: 3px 7px;
    color: #626b8a;
    font-size: 8px;
    font-weight: 600;
}

.portal-activity-list {
    display: grid;
}

.portal-activity-item {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto 8px;
    align-items: center;
    gap: 7px;
    min-height: 47px;
    border-bottom: 1px solid #edf0f6;
    color: #343c5b;
}

.portal-activity-item:last-child {
    border-bottom: 0;
}

.activity-status-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
}

.activity-status-icon .app-icon {
    width: 13px;
    height: 13px;
}

.activity-status-success {
    background: #e5f8ee;
    color: #12a76e;
}

.activity-status-pending {
    background: #edf3ff;
    color: #3974ee;
}

.portal-activity-copy {
    display: grid;
    min-width: 0;
}

.portal-activity-copy strong {
    overflow: hidden;
    color: #343b59;
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-activity-copy small {
    color: #9299ad;
    font-size: 8px;
}

.portal-activity-amount {
    color: #323a59;
    font-size: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.portal-activity-chevron {
    color: #8e96ad;
    font-size: 15px;
}

.portal-action-list {
    display: grid;
    gap: 6px;
}

.portal-action-list a {
    display: flex;
    min-height: 34px;
    align-items: center;
    gap: 7px;
    border: 1px solid #edf0f7;
    border-radius: 7px;
    padding: 5px 7px;
    color: #343c5a;
    font-size: 9px;
    font-weight: 600;
}

.portal-action-list a span:last-child {
    margin-left: auto;
    color: #838ba4;
    font-size: 15px;
}

.portal-ticket-list {
    display: grid;
}

.portal-ticket-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 90px 10px;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-bottom: 1px solid #edf0f6;
    color: #333b59;
}

.portal-ticket-row:last-child {
    border-bottom: 0;
}

.portal-ticket-title {
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-ticket-row .status-badge {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 8px;
}

.portal-ticket-date {
    color: #8991a8;
    font-size: 8px;
    text-align: right;
}

.portal-empty-state {
    min-height: 75px;
}

@media (max-width: 1200px) {
    .dashboard-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-overview-grid {
        grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr);
    }

    .dashboard-overview-grid .quick-actions-card {
        grid-column: 1 / -1;
    }

    .dashboard-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
    }

    .portal-dashboard-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    }

    .portal-quick-actions {
        grid-column: 1 / -1;
    }

    .portal-action-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .app-topbar-search {
        display: none;
    }

    .dashboard-metrics,
    .portal-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-overview-grid,
    .dashboard-lists-grid,
    .portal-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-overview-grid .quick-actions-card,
    .portal-quick-actions {
        grid-column: auto;
    }

    .dashboard-quick-actions,
    .portal-action-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-tickets-card {
        overflow: hidden;
    }
}

@media (max-width: 600px) {
    .app-topbar-end {
        gap: 6px;
    }

    .app-topbar-account {
        display: none;
    }

    .app-topbar-notifications {
        width: 30px;
        height: 30px;
    }

    .app-topbar {
        gap: 8px;
    }

    .app-topbar-start {
        gap: 8px;
    }

    .dashboard-welcome {
        gap: 8px;
    }

    .dashboard-welcome .page-actions {
        gap: 6px;
    }

    .dashboard-welcome .page-actions .button {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 10px;
    }

    .dashboard-metrics .metric-card {
        min-height: 96px;
        padding: 10px;
    }

    .dashboard-metrics .metric-value {
        font-size: 19px;
    }

    .dashboard-metrics .metric-value-currency {
        font-size: 14px;
    }

    .subscription-chart-layout {
        justify-content: space-around;
    }

    .subscription-donut {
        width: 140px;
        height: 140px;
    }

    .portal-account-status {
        font-size: 9px;
    }

    .portal-ticket-row {
        grid-template-columns: minmax(0, 1fr) auto 10px;
    }

    .portal-ticket-date {
        display: none;
    }
}

@media (max-width: 380px) {
    .dashboard-metrics .metric-card-heading .metric-label {
        font-size: 9px;
    }

    .metric-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }
}

.portal-login-brand {
    display: flex;
    width: min(410px, 100%);
    align-items: center;
    gap: 9px;
    margin: 5vh auto 12px;
    color: #242949;
}

.portal-login-brand:hover {
    color: #242949;
}

.portal-login-brand .app-brand-mark {
    display: grid;
}

.portal-login-brand > span:last-child {
    display: grid;
}

.portal-login-brand strong {
    font-size: 13px;
    line-height: 1.3;
}

.portal-login-brand small {
    color: #75809d;
    font-size: 10px;
}

.portal-login-main {
    width: min(410px, 100%);
    margin: 0 auto;
}

.portal-login-main .max-w-sm.bg-white {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid #e6e9f2;
    border-radius: 12px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 16px 40px rgb(22 31 68 / 8%);
}

.network-integrations-section,
.network-inventory-section {
    margin-top: 12px;
}

.network-integrations-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.network-integration-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid #e8ebf3;
    border-radius: 9px;
    background: #fff;
    padding: 12px;
}

.network-integration-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.network-integration-heading h3 {
    margin: 0;
    color: #29304f;
    font-size: 11px;
    font-weight: 700;
}

.network-status-pill {
    display: inline-flex;
    min-height: 19px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.network-status-partial {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.network-status-coming-soon {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.network-integration-card p {
    margin: 9px 0 0;
    color: #68718b;
    font-size: 9px;
    line-height: 1.5;
}

.network-integration-card .network-capability-note {
    margin-top: 4px;
    color: #969db0;
}

.network-integration-footer {
    margin-top: auto;
    padding-top: 11px;
    font-size: 9px;
}

.network-inventory-heading {
    align-items: center;
}

.network-inventory-filter {
    display: flex;
    align-items: center;
    gap: 7px;
}

.network-inventory-filter select {
    min-width: 165px;
    min-height: 33px;
    border: 1px solid #e2e7f0;
    border-radius: 6px;
    background: #fff;
    padding: 5px 8px;
    color: #3c4563;
    font-size: 9px;
}

.network-inventory-filter .button {
    min-height: 33px;
    padding: 6px 9px;
    font-size: 9px;
}

.network-table-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.network-table-actions button {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.network-pagination {
    padding-top: 12px;
}

.network-configuration-note {
    margin-bottom: 16px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #eef2ff;
    padding: 11px 13px;
    color: #454c77;
    font-size: 11px;
    line-height: 1.5;
}

.network-configuration-note strong {
    display: block;
    margin-bottom: 2px;
    color: #353d69;
}

@media (max-width: 1200px) {
    .network-integrations-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .network-integrations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .network-inventory-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .network-integrations-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .network-inventory-filter {
        width: 100%;
        flex-wrap: wrap;
    }

    .network-inventory-filter select {
        flex: 1 1 150px;
    }
}

.installation-wizard {
    width: min(100%, 980px);
    margin: 0 auto;
}

.installation-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.installation-progress-step {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: #8991a7;
    font-size: 10px;
    font-weight: 600;
}

.installation-progress-link {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.installation-progress-link:hover {
    color: #4338ca;
}

.installation-progress-link:focus-visible {
    border-radius: 6px;
    outline: 2px solid #5146dc;
    outline-offset: 3px;
}

.installation-progress-step.is-locked {
    cursor: not-allowed;
    opacity: .7;
}

.installation-progress-number {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border: 1px solid #dfe4ef;
    border-radius: 50%;
    background: #fff;
    color: #7e879c;
    font-size: 10px;
}

.installation-progress-step.is-current {
    color: #4338ca;
}

.installation-progress-step.is-current .installation-progress-number {
    border-color: #5146dc;
    background: #5146dc;
    color: #fff;
    box-shadow: 0 0 0 4px rgb(81 70 220 / 10%);
}

.installation-progress-step.is-complete {
    color: #16835d;
}

.installation-progress-step.is-complete .installation-progress-number {
    border-color: #b7ebd3;
    background: #e8fbf2;
    color: #12845a;
}

.wizard-progress-hint {
    margin: -4px 0 14px;
    color: #66708a;
    font-size: 12px;
}

.installation-step-card {
    border: 1px solid #e6e9f2;
    border-radius: 13px;
    background: #fff;
    padding: clamp(18px, 3vw, 32px);
    box-shadow: 0 12px 32px rgb(28 38 76 / 5%);
}

.wizard-step-heading {
    margin-bottom: 22px;
}

.wizard-step-kicker {
    color: #5b52d5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.wizard-step-heading h2 {
    margin: 5px 0 6px;
    color: #232b49;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.wizard-step-heading p {
    max-width: 670px;
    margin: 0;
    color: #737c94;
    font-size: 11px;
    line-height: 1.6;
}

.wizard-field {
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.wizard-field > label,
.wizard-field legend {
    display: block;
    margin-bottom: 8px;
    color: #343c59;
    font-size: 11px;
    font-weight: 700;
}

.wizard-field > label span,
.wizard-field legend span {
    color: #d34f58;
}

.wizard-field input[type="text"] {
    width: min(100%, 560px);
    min-height: 43px;
    border: 1px solid #dfe4ee;
    border-radius: 7px;
    padding: 10px 12px;
    color: #29314e;
    font-size: 12px;
}

.wizard-field input[type="text"]:focus {
    border-color: #7068e4;
    outline: 3px solid rgb(112 104 228 / 13%);
}

.wizard-field-hint {
    display: block;
    margin-top: 6px;
    color: #8189a0;
    font-size: 9px;
    line-height: 1.5;
}

.wizard-ssid-field[hidden] {
    display: none;
}

.wizard-ssid-field {
    width: min(100%, 560px);
    border: 1px solid #e8ebf3;
    border-radius: 8px;
    background: #fafaff;
    padding: 13px;
}

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

.wizard-choice-card {
    position: relative;
    display: flex;
    min-height: 105px;
    align-items: center;
    gap: 14px;
    border: 1px solid #e3e7f0;
    border-radius: 9px;
    background: #fff;
    padding: 15px 44px 15px 15px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.wizard-choice-card:has(input:checked) {
    border-color: #7b73e8;
    background: #f7f6ff;
    box-shadow: 0 0 0 3px rgb(96 86 220 / 9%);
}

.wizard-choice-card input[type="radio"] {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 17px;
    height: 17px;
    accent-color: #554bd6;
}

.wizard-choice-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 12px;
    background: #eeedff;
    color: #554bd6;
}

.wizard-choice-icon svg {
    width: 33px;
    height: 33px;
}

.wizard-choice-icon-ethernet {
    background: #e8f4ff;
    color: #3376ba;
}

.wizard-choice-copy {
    display: grid;
    gap: 4px;
}

.wizard-choice-copy strong {
    color: #303855;
    font-size: 12px;
}

.wizard-choice-copy small {
    color: #8189a0;
    font-size: 10px;
}

.wizard-field-error {
    display: block;
    margin-top: 6px;
    color: #b4232b;
    font-size: 10px;
}

.installation-step-card .app-flash {
    margin-bottom: 18px;
}

.installation-step-card .app-flash ul {
    margin: 0;
    padding-left: 18px;
}

.wizard-step-heading + .wizard-split-layout {
    margin-top: 2px;
}

.wizard-split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, .85fr);
    align-items: center;
    gap: 24px;
}

.wizard-instruction-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wizard-instruction-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.wizard-instruction-list li > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 50%;
    background: #f0efff;
    color: #554bd6;
    font-size: 10px;
    font-weight: 700;
}

.wizard-instruction-list li > div {
    display: grid;
    gap: 3px;
    padding-top: 2px;
}

.wizard-instruction-list strong {
    color: #343c59;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.4;
}

.wizard-instruction-list small {
    color: #8189a0;
    font-size: 10px;
    line-height: 1.45;
}

.wizard-illustration-card {
    border: 1px solid #e7eaf4;
    border-radius: 10px;
    background: linear-gradient(145deg, #f8f9ff, #f1f4ff);
    padding: 15px;
}

.wizard-router-illustration {
    display: block;
    width: 100%;
    max-height: 190px;
    margin: 0 auto 8px;
}

.wizard-illustration-card > strong {
    display: block;
    color: #303855;
    font-size: 11px;
}

.wizard-illustration-card p {
    margin: 5px 0 0;
    color: #747d95;
    font-size: 9px;
    line-height: 1.55;
}

.wizard-warning,
.wizard-info-note {
    margin-top: 18px;
    border: 1px solid #f5d496;
    border-radius: 8px;
    background: #fff9eb;
    padding: 11px 13px;
    color: #7d5a19;
    font-size: 10px;
    line-height: 1.55;
}

.wizard-warning strong,
.wizard-info-note strong {
    display: block;
    margin-bottom: 2px;
    color: #754d0e;
    font-size: 10px;
}

.wizard-info-note {
    border-color: #d9e3f7;
    background: #f5f8ff;
    color: #54627d;
}

.wizard-info-note strong {
    color: #3d4c6c;
}

.wizard-confirmation-saved {
    margin: 15px 0 0;
    color: #16835d;
    font-size: 10px;
    font-weight: 700;
}

.isp-cable-diagram {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 4px 0 22px;
    border: 1px solid #e7eaf3;
    border-radius: 10px;
    background: #f9faff;
    padding: 18px;
}

.isp-diagram-device {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.isp-diagram-icon {
    display: grid;
    width: 62px;
    height: 54px;
    place-items: center;
    border-radius: 12px;
    background: #eeedff;
    color: #5147ce;
}

.isp-diagram-icon svg {
    width: 48px;
    height: 39px;
}

.isp-icon-cloud {
    background: #e8f4ff;
    color: #3779bb;
}

.isp-diagram-device strong {
    color: #303855;
    font-size: 11px;
}

.isp-diagram-device small {
    color: #8089a1;
    font-size: 9px;
}

.isp-diagram-arrow {
    color: #6773aa;
    font-size: 27px;
    text-align: center;
}

.wizard-instruction-list-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 20px;
}

.wizard-instruction-list-compact li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.winbox-guide {
    border: 1px solid #e5e9f2;
    border-radius: 9px;
    background: #fafbff;
    padding: 14px;
}

.winbox-guide-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e9ecf4;
    padding-bottom: 12px;
}

.winbox-guide-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #e8eeff;
    color: #4559b8;
    font-size: 16px;
    font-weight: 800;
}

.winbox-guide-header > div {
    display: grid;
    gap: 2px;
}

.winbox-guide-header strong {
    color: #303855;
    font-size: 11px;
}

.winbox-guide-header small {
    color: #8189a0;
    font-size: 9px;
}

.wizard-review-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid #edf0f5;
}

.wizard-review-list > div {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf0f5;
    padding: 9px 12px 9px 0;
}

.wizard-review-list dt {
    color: #747d94;
    font-size: 10px;
}

.wizard-review-list dd {
    margin: 0;
    color: #303855;
    font-size: 10px;
    font-weight: 650;
    text-align: right;
}

.wizard-review-check {
    color: #16835d;
}

.wizard-ready-message {
    margin-top: 18px;
    border: 1px solid #b9ead1;
    border-radius: 8px;
    background: #effbf5;
    padding: 14px;
    color: #18764f;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.wizard-scope-note {
    margin: 10px 0 0;
    color: #828aa0;
    font-size: 9px;
    line-height: 1.5;
    text-align: center;
}

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 25px;
    border-top: 1px solid #edf0f5;
    padding-top: 17px;
}

.wizard-actions-end {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.wizard-actions .button {
    min-height: 37px;
    padding: 8px 13px;
    font-size: 10px;
}

.wizard-actions .button:disabled {
    border-color: #e4e7ef;
    background: #f0f2f6;
    color: #a0a6b5;
    cursor: not-allowed;
}

.wizard-finished-label {
    align-self: center;
    color: #16835d;
    font-size: 10px;
    font-weight: 700;
}

.wizard-enrollment-note {
    margin-bottom: 20px;
}

.wizard-command-panel,
.wizard-command-empty {
    margin-top: 20px;
    border: 1px solid #e2e7f2;
    border-radius: 10px;
    background: #fafbff;
    padding: 16px;
}

.wizard-command-heading,
.wizard-command-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wizard-command-heading strong,
.wizard-command-empty > strong {
    display: block;
    color: #303855;
    font-size: 11px;
}

.wizard-command-heading small {
    display: block;
    margin-top: 4px;
    color: #8189a0;
    font-size: 9px;
}

.wizard-command-panel textarea {
    display: block;
    width: 100%;
    min-height: 92px;
    margin-top: 14px;
    border: 1px solid #dfe4ef;
    border-radius: 7px;
    background: #fff;
    padding: 10px;
    color: #303855;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    line-height: 1.55;
    resize: vertical;
}

.wizard-command-actions {
    margin-top: 10px;
}

.wizard-command-actions > span,
.wizard-command-empty p,
.wizard-command-warning {
    color: #737c94;
    font-size: 9px;
    line-height: 1.5;
}

.wizard-command-actions .button {
    flex-shrink: 0;
}

.wizard-command-empty > p {
    margin: 6px 0 14px;
}

.wizard-command-empty form {
    margin: 0;
}

.wizard-command-warning {
    margin: 10px 0 0 !important;
    border-left: 3px solid #e7aa3b;
    padding-left: 9px;
    color: #795b20 !important;
}

.wizard-regenerate-form {
    margin-top: 10px;
    text-align: right;
}

.wizard-regenerate-form .text-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: #5146ca;
    font: inherit;
    font-size: 9px;
    cursor: pointer;
}

.wizard-configuration-form {
    margin-top: 20px;
}

.wizard-device-ports {
    margin: 12px 0 0;
    color: #53617f;
    font-size: 10px;
    font-weight: 650;
}

.wizard-port-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px;
}

.wizard-port-option {
    display: flex;
    min-height: 60px;
    align-items: center;
    gap: 10px;
    border: 1px solid #e3e7f0;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    cursor: pointer;
}

.wizard-port-option input {
    width: 16px;
    height: 16px;
    accent-color: #554bd6;
}

.wizard-port-option strong,
.wizard-port-option small {
    display: block;
}

.wizard-port-option strong {
    color: #303855;
    font-size: 10px;
}

.wizard-port-option small {
    margin-top: 3px;
    color: #8189a0;
    font-size: 8px;
}

.wizard-port-option.is-wan-port {
    border-color: #dce5f6;
    background: #f5f8ff;
    cursor: not-allowed;
}

.wizard-configuration-section {
    margin-top: 22px;
    border-top: 1px solid #edf0f5;
    padding-top: 19px;
}

.wizard-configuration-section .wizard-step-heading {
    margin-bottom: 14px;
}

.wizard-configuration-section .wizard-step-heading h3 {
    margin: 0 0 5px;
    color: #303855;
    font-size: 13px;
}

.wizard-configuration-section .wizard-review-list {
    border-top: 0;
}

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

.wizard-configuration-grid .wizard-field input[type="text"] {
    width: 100%;
}

.wizard-local-domain-input {
    display: flex;
    align-items: center;
}

.wizard-local-domain-input input {
    min-width: 0;
    border-radius: 0 !important;
}

.wizard-local-domain-input > span {
    min-height: 43px;
    display: flex;
    align-items: center;
    border: 1px solid #dfe4ee;
    background: #f5f6fa;
    padding: 0 11px;
    color: #68728c;
    font-size: 11px;
}

.wizard-local-domain-input > span:first-child {
    border-right: 0;
    border-radius: 7px 0 0 7px;
}

.wizard-local-domain-input > span:last-child {
    border-left: 0;
    border-radius: 0 7px 7px 0;
}

.wizard-hotspot-enable {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    border: 1px solid #dcefe5;
    border-radius: 8px;
    background: #f4fbf7;
    padding: 12px;
    cursor: pointer;
}

.wizard-hotspot-enable input {
    width: 17px;
    height: 17px;
    accent-color: #16835d;
}

.wizard-hotspot-enable strong,
.wizard-hotspot-enable small {
    display: block;
}

.wizard-hotspot-enable strong {
    color: #303855;
    font-size: 10px;
}

.wizard-hotspot-enable small {
    margin-top: 3px;
    color: #8189a0;
    font-size: 8px;
}

.wizard-dns-field input[type="text"] {
    margin-bottom: 7px;
}

.wizard-credentials-panel {
    margin-top: 18px;
    border: 1px solid #f1d899;
    border-radius: 9px;
    background: #fff9eb;
    padding: 14px;
}

.wizard-credentials-panel > strong {
    color: #694d15;
    font-size: 11px;
}

.wizard-credentials-panel > p {
    margin: 5px 0 12px;
    color: #795b20;
    font-size: 9px;
    line-height: 1.5;
}

.wizard-credentials-panel dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.wizard-credentials-panel dl > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wizard-credentials-panel dt {
    color: #795b20;
    font-size: 9px;
}

.wizard-credentials-panel dd {
    margin: 0;
    color: #303855;
    font-size: 10px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.wizard-credentials-panel code {
    font-family: Consolas, "Courier New", monospace;
}

@media (max-width: 820px) {
    .installation-progress {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .installation-progress-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 8px;
    }

    .installation-progress-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .wizard-split-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .wizard-illustration-card {
        display: grid;
        grid-template-columns: minmax(140px, .8fr) minmax(0, 1.2fr);
        align-items: center;
        column-gap: 12px;
    }

    .wizard-router-illustration {
        grid-row: span 2;
        margin-bottom: 0;
    }
}

@media (max-width: 600px) {
    .installation-progress {
        gap: 4px;
    }

    .installation-progress-step {
        align-items: center;
        text-align: center;
    }

    .installation-progress-step > span:last-child {
        font-size: 7px;
        line-height: 1.2;
    }

    .installation-progress-link {
        align-items: center;
    }

    .installation-progress-link > span:last-child {
        font-size: 7px;
        line-height: 1.2;
    }

    .wizard-choice-grid,
    .wizard-instruction-list-compact,
    .wizard-review-list,
    .wizard-configuration-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wizard-instruction-list-compact li:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .wizard-illustration-card {
        display: block;
    }

    .wizard-router-illustration {
        max-width: 300px;
    }

    .isp-cable-diagram {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .isp-diagram-arrow {
        transform: rotate(90deg);
    }

    .wizard-actions,
    .wizard-actions-end {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .wizard-command-heading,
    .wizard-command-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .wizard-command-actions .button {
        justify-content: center;
        width: 100%;
    }

    .wizard-regenerate-form {
        text-align: center;
    }

    .wizard-actions > .button,
    .wizard-actions-end .button {
        justify-content: center;
        width: 100%;
    }

    .wizard-actions-end {
        width: 100%;
    }

    .wizard-finished-label {
        text-align: center;
    }
}
