:root {
    --navy-950: #07131f;
    --navy-900: #0b1d2a;
    --navy-850: #102634;
    --navy-800: #153344;
    --cyan-600: #087f83;
    --cyan-500: #0a9a9f;
    --mint-400: #7ae2cf;
    --mint-300: #9beddd;
    --blue-500: #1686ff;
    --green-500: #16a36a;
    --amber-500: #f59e0b;
    --red-500: #dc3545;
    --slate-900: #17212b;
    --slate-700: #465564;
    --slate-500: #708090;
    --slate-300: #cbd5df;
    --slate-200: #e2e8ef;
    --slate-100: #f1f5f8;
    --slate-50: #f7fafc;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(11, 29, 42, 0.06);
    --shadow-md: 0 14px 38px rgba(11, 29, 42, 0.11);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-900);
    background: var(--slate-50);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.auth-body {
    background:
        radial-gradient(circle at 15% 15%, rgba(122, 226, 207, 0.18), transparent 32%),
        linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.05fr) minmax(420px, 0.95fr);
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 54px 64px;
    color: var(--white);
}

.auth-brand::after {
    position: absolute;
    right: -120px;
    bottom: -150px;
    width: 430px;
    height: 430px;
    content: "";
    border: 1px solid rgba(122, 226, 207, 0.23);
    border-radius: 50%;
    box-shadow:
        0 0 0 55px rgba(122, 226, 207, 0.05),
        0 0 0 110px rgba(122, 226, 207, 0.03);
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 15px;
    color: var(--navy-950);
    background: var(--mint-400);
    font-size: 25px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(122, 226, 207, 0.18);
}

.brand-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-caption {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.auth-message {
    position: relative;
    z-index: 1;
    max-width: 630px;
}

.auth-message h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(38px, 5vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.auth-message h1 span {
    color: var(--mint-400);
}

.auth-message > p {
    max-width: 560px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    line-height: 1.7;
}

.auth-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 36px;
}

.auth-point {
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(12px);
}

.auth-point strong {
    display: block;
    color: var(--mint-300);
    font-size: 13px;
}

.auth-point span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    line-height: 1.45;
}

.auth-footnote {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.42);
    font-size: 12px;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 42px;
    background: var(--white);
}

.auth-card {
    width: min(100%, 460px);
}

.auth-card-header {
    margin-bottom: 30px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--cyan-600);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-card h2 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.035em;
}

.muted {
    color: var(--slate-500);
}

.auth-card-header .muted {
    margin: 10px 0 0;
    line-height: 1.55;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 750;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--slate-300);
    border-radius: 11px;
    outline: none;
    color: var(--slate-900);
    background: var(--white);
    transition: 160ms ease;
}

.form-control:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(10, 154, 159, 0.12);
}

.form-control.is-invalid {
    border-color: var(--red-500);
}

.form-error {
    margin: 7px 0 0;
    color: var(--red-500);
    font-size: 12px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 24px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--slate-700);
    font-size: 13px;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--cyan-600);
}

.btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    font-weight: 750;
    transition: 160ms ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-600), var(--cyan-500));
    box-shadow: 0 10px 24px rgba(8, 127, 131, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(8, 127, 131, 0.26);
}

.btn-block {
    width: 100%;
}

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-success {
    border: 1px solid #bce8d3;
    color: #126440;
    background: #ecfdf4;
}

.alert-danger {
    border: 1px solid #f3c3c8;
    color: #9e2834;
    background: #fff1f2;
}

.auth-security {
    margin-top: 24px;
    text-align: center;
    color: var(--slate-500);
    font-size: 12px;
}

/* Application shell */

.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: 264px;
    padding: 24px 18px;
	display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: var(--white);
    background:
        linear-gradient(180deg, var(--navy-950), var(--navy-900));


}

.sidebar .brand-lockup {
    padding: 0 8px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar nav {
    flex: 1 0 auto;
}

.sidebar .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 22px;
}

.nav-section {
    margin-top: 25px;
}

.nav-heading {
    margin: 0 12px 10px;
    color: rgba(255, 255, 255, 0.36);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-list {
    display: grid;
    gap: 5px;
}

.nav-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 13px;
    font-weight: 650;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(122, 226, 207, 0.12);
}

.nav-link.active {
    box-shadow: inset 3px 0 0 var(--mint-400);
}

.nav-icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    color: var(--mint-300);
    background: rgba(122, 226, 207, 0.08);
    font-size: 12px;
    font-weight: 850;
}

.sidebar-footer {
    position: static;
    flex: 0 0 auto;
    margin-top: 28px;
    padding-bottom: 4px;
}

.sidebar-environment {
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.035);
    font-size: 11px;
    line-height: 1.55;
}

.main-shell {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.topbar-title {
    margin: 0;
    font-size: 17px;
    letter-spacing: -0.015em;
}

.topbar-subtitle {
    margin: 4px 0 0;
    color: var(--slate-500);
    font-size: 11px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 11px;
    color: var(--white);
    background: var(--cyan-600);
    font-size: 13px;
    font-weight: 850;
}

.user-meta {
    line-height: 1.25;
}

.user-meta strong {
    display: block;
    font-size: 12px;
}

.user-meta span {
    color: var(--slate-500);
    font-size: 10px;
}

.logout-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--slate-200);
    border-radius: 9px;
    color: var(--slate-700);
    background: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.logout-button:hover {
    border-color: #f3c3c8;
    color: var(--red-500);
}

.mobile-menu {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--slate-200);
    border-radius: 9px;
    background: var(--white);
}

.content {
    padding: 30px;
}

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

.page-heading h1 {
    margin: 0;
    font-size: 29px;
    letter-spacing: -0.035em;
}

.page-heading p {
    margin: 8px 0 0;
    color: var(--slate-500);
    font-size: 13px;
}

.status-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

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

.status-active {
    color: #08794d;
    background: #e9fbf2;
}

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

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
    padding: 20px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    position: absolute;
    top: -24px;
    right: -24px;
    width: 92px;
    height: 92px;
    content: "";
    border-radius: 50%;
    background: rgba(122, 226, 207, 0.1);
}

.metric-label {
    margin: 0;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    margin: 15px 0 6px;
    font-size: 31px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.metric-note {
    margin: 0;
    color: var(--slate-500);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 18px;
    margin-top: 18px;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    min-height: 65px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--slate-200);
}

.panel-header h2 {
    margin: 0;
    font-size: 15px;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--slate-500);
    font-size: 10px;
}

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

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

.data-table th {
    padding: 12px 18px;
    color: var(--slate-500);
    background: var(--slate-50);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    padding: 14px 18px;
    border-top: 1px solid var(--slate-100);
    color: var(--slate-700);
    font-size: 12px;
}

.data-table strong {
    color: var(--slate-900);
}

.empty-state {
    padding: 55px 24px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 16px;
    color: var(--cyan-600);
    background: rgba(10, 154, 159, 0.1);
    font-weight: 900;
}

.empty-state h3 {
    margin: 0;
    font-size: 15px;
}

.empty-state p {
    max-width: 380px;
    margin: 8px auto 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.55;
}

.profile-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 8px;
}

.profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 10px;
}

.profile-item:hover {
    background: var(--slate-50);
}

.profile-info strong {
    display: block;
    font-size: 12px;
}

.profile-info span {
    color: var(--slate-500);
    font-size: 10px;
}

.profile-count {
    display: grid;
    min-width: 31px;
    height: 27px;
    place-items: center;
    border-radius: 8px;
    color: var(--cyan-600);
    background: rgba(10, 154, 159, 0.09);
    font-size: 11px;
    font-weight: 800;
}

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

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

@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 28px 20px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

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

    .main-shell {
        min-width: 0;
    }

    .mobile-menu {
        display: grid;
        place-items: center;
    }

    .content,
    .topbar {
        padding-right: 18px;
        padding-left: 18px;
    }

    .user-meta {
        display: none;
    }
}

@media (max-width: 580px) {
    .metric-grid {
        grid-template-columns: 1fr;
    }

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

    .content {
        padding-top: 22px;
    }

    .logout-button {
        padding: 0 9px;
    }
}
.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary {
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
    background: var(--white);
}

.btn-secondary:hover {
    border-color: var(--cyan-500);
    color: var(--cyan-600);
}

.btn-sm {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 11px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px auto;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--slate-200);
    background: var(--white);
}

.form-select {
    width: 100%;
    height: 50px;
    padding: 0 40px 0 15px;
    border: 1px solid var(--slate-300);
    border-radius: 11px;
    outline: none;
    color: var(--slate-900);
    background: var(--white);
}

.form-select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(10, 154, 159, 0.12);
}

.form-panel {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.form-panel-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--slate-200);
    background: var(--slate-50);
}

.form-panel-header h2 {
    margin: 0;
    font-size: 15px;
}

.form-panel-header p {
    margin: 5px 0 0;
    color: var(--slate-500);
    font-size: 11px;
}

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

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

.form-grid .form-group {
    margin: 0;
}

.field-span-2 {
    grid-column: span 2;
}

.form-help {
    margin: 7px 0 0;
    color: var(--slate-500);
    font-size: 10px;
    line-height: 1.5;
}

.validation-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.validation-list li {
    margin: 4px 0;
}

.form-footer {
    position: sticky;
    z-index: 20;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 26px rgba(11, 29, 42, 0.08);
    backdrop-filter: blur(14px);
}

.form-footer p {
    margin: 0;
    color: var(--slate-500);
    font-size: 11px;
}

.link-primary {
    color: var(--cyan-600);
    font-weight: 750;
}

.badge {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: capitalize;
}

.badge-active {
    color: #08794d;
    background: #e9fbf2;
}

.badge-trialing {
    color: #946000;
    background: #fff7dc;
}

.badge-suspended {
    color: #a52935;
    background: #fff0f2;
}

.badge-neutral {
    color: var(--slate-700);
    background: var(--slate-100);
}

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

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid var(--slate-200);
    color: var(--slate-500);
    font-size: 11px;
}

.pagination-links {
    display: flex;
    gap: 8px;
}

.pagination-link {
    display: inline-flex;
    min-height: 33px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--slate-700);
    background: var(--white);
    font-weight: 700;
}

.pagination-link:hover {
    border-color: var(--cyan-500);
    color: var(--cyan-600);
}

.pagination-link.disabled {
    pointer-events: none;
    opacity: 0.45;
}

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

.detail-item {
    padding: 15px;
    border: 1px solid var(--slate-200);
    border-radius: 11px;
    background: var(--slate-50);
}

.detail-item span {
    display: block;
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.detail-item strong {
    display: block;
    margin-top: 7px;
    font-size: 13px;
}

.business-list {
    display: grid;
    gap: 16px;
}

.business-card {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
}

.business-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--slate-200);
}

.business-card-header h3 {
    margin: 0;
    font-size: 15px;
}

.business-card-header p {
    margin: 5px 0 0;
    color: var(--slate-500);
    font-size: 11px;
}

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

.hierarchy-card {
    padding: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    background: var(--slate-50);
}

.hierarchy-card h4 {
    margin: 0;
    font-size: 12px;
}

.hierarchy-card p {
    margin: 6px 0 0;
    color: var(--slate-500);
    font-size: 10px;
    line-height: 1.5;
}

@media (max-width: 780px) {
    .filter-bar,
    .form-grid,
    .detail-grid,
    .hierarchy-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .form-footer .page-actions,
    .form-footer .btn {
        width: 100%;
    }
}