.client-portal-body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(255, 81, 26, 0.08), transparent 34%),
        linear-gradient(225deg, rgba(9, 41, 71, 0.10), transparent 38%),
        #f4f7f9;
    color: #13212b;
    font-family: Arial, Helvetica, sans-serif;
}

.auth-screen {
    background: #092947;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px 16px;
}

.standalone-auth {
    width: min(1120px, 100%);
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 520px);
    gap: 24px;
    align-items: center;
    padding: 18px 0;
}

.standalone-auth.register-layout {
    grid-template-columns: minmax(0, 0.8fr) minmax(380px, 720px);
}

.auth-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    min-height: 460px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(9, 41, 71, 0.95), rgba(9, 41, 71, 0.85)),
        url('') no-repeat center/cover;
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(9, 41, 71, 0.2);
}

.auth-visual h1 {
    max-width: 640px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.05;
}

.auth-visual p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    margin-bottom: 26px;
}

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

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
}

.auth-benefits li::before {
    content: '\2713';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.72rem;
}

.mini-brand,
.portal-brand {
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: 0;
}

.auth-card {
    align-self: center;
    justify-self: center;
    width: min(520px, 100%);
    max-width: 520px;
    padding: 36px;
    box-shadow: 0 24px 60px rgba(19, 33, 43, 0.12);
}

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

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

.auth-card-header h2 {
    margin: 0 0 12px;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    line-height: 1.05;
}

.auth-visual {
    border-radius: 28px;
}

.client-auth-panel.auth-card {
    background: #fff;
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px min(24px, 4vw);
    background: #092947;
    box-shadow: 0 10px 24px rgba(9, 41, 71, 0.16);
}

.portal-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.portal-nav a {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    padding: 9px 10px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 0.92rem;
}

.portal-nav a.active,
.portal-nav a:hover {
    background: #ff511a;
    color: #fff;
}

.client-auth,
.client-dashboard {
    width: min(1140px, calc(100% - 32px));
    margin: 30px auto;
}

.client-auth {
    min-height: 62vh;
    display: grid;
    place-items: center;
}

.client-auth-panel,
.client-panel {
    width: 100%;
    max-width: none;
    background: #fff;
    border: 1px solid #dde5ed;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 14px 34px rgba(19, 33, 43, 0.07);
}

.client-auth-panel.wide {
    max-width: 960px;
}

.client-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    align-items: end;
}

.client-filter label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #334155;
}

.client-filter input,
.client-filter select,
.client-filter button {
    width: 100%;
    border: 1px solid #cbd7e1;
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}

.client-filter button {
    background: #ff511a;
    color: #fff;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    min-height: 44px;
}

.client-panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.client-panel-header h2 {
    margin: 0;
}

.profile-grid-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.profile-card {
    background: #f8fbff;
    border: 1px solid #dce9f4;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(15, 41, 66, 0.06);
}

.profile-card span {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.profile-card strong {
    display: block;
    color: #102a44;
    font-size: 1.05rem;
    line-height: 1.5;
}

.client-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.client-form button {
    width: 100%;
}

.status-pill.neutral {
    background: #e8f0f7;
    color: #092947;
}

.status-pill.pending {
    background: #fff4e5;
    color: #a24b0d;
}

.status-pill.ready {
    background: #e6ffed;
    color: #0f5132;
}

.status-pill.completed {
    background: #e8f9ff;
    color: #055a8c;
}

.status-pill.partial {
    background: #fff7e6;
    color: #9a611d;
}

.status-pill.unpaid {
    background: #ffe8e8;
    color: #8c1b1b;
}

.status-pill.cancelled {
    background: #f5e8ff;
    color: #5f2c78;
}

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

.client-form label {
    display: grid;
    gap: 8px;
    color: #334155;
}

.client-form input,
.client-form select,
.client-form textarea {
    width: 100%;
    border: 1px solid #cbd7e1;
    border-radius: 12px;
    padding: 14px 15px;
    background: #f9fbfc;
}

.client-form button {
    border: 0;
    background: #ff511a;
    color: #fff;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
}

.auth-switch {
    margin-top: 18px;
    font-size: 0.95rem;
}

.auth-switch a {
    color: #ff511a;
    text-decoration: none;
}

.client-actions a,
.client-form button {
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.client-actions a:hover,
.client-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 81, 26, 0.14);
}

.client-auth-panel .client-form {
    margin-top: 24px;
}

.client-auth-panel .client-form .full {
    grid-column: 1 / -1;
}

.client-auth-panel label span,
.client-form label span {
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 500;
}

.client-auth-panel .client-alert {
    margin-top: 18px;
}

.client-topline {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 24px;
}

.client-topline.compact {
    margin-bottom: 0;
}

.client-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.client-actions a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ff511a;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.1;
}

.client-auth-panel.wide {
    max-width: 860px;
}

.eyebrow {
    margin: 0 0 6px;
    color: #ff511a;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.client-auth h1,
.client-auth h2,
.client-dashboard h1,
.client-panel h2 {
    margin: 0;
    color: #092947;
    letter-spacing: 0;
}

.client-panel h2 {
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.muted,
.auth-switch {
    color: #667684;
}

.client-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.client-actions a.secondary {
    background: #0d274d;
}

.client-alert {
    padding: 12px 14px;
    border-radius: 7px;
    margin-top: 16px;
}

.client-alert.danger {
    color: #842029;
    background: #f8d7da;
}

.client-alert.success {
    color: #0f5132;
    background: #d1e7dd;
}

.client-topline {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.client-topline.compact {
    margin-bottom: 0;
}

.client-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

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

.metric-grid article {
    background: #fff;
    border: 1px solid #dfe7ee;
    border-radius: 8px;
    padding: 16px;
    min-height: 86px;
}

.metric-grid span {
    display: block;
    color: #667684;
    font-size: 0.88rem;
}

.metric-grid strong {
    display: block;
    font-size: 1.7rem;
    color: #092947;
}

.client-panel {
    width: 100%;
    margin-top: 22px;
    margin-bottom: 14px;
}

.client-auth-panel .client-form.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.referral-panel,
.split-panels {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
}

.ref-box {
    display: grid;
    gap: 8px;
}

.ref-box strong {
    color: #092947;
    font-size: 1.25rem;
}

.mobile-table {
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e4ecf5;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mobile-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.mobile-table th,
.mobile-table td {
    border-bottom: 1px solid #edf2f6;
    padding: 11px 12px;
    text-align: left;
    vertical-align: middle;
    line-height: 1.35;
}

.mobile-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef4f8;
    color: #102a44;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.8rem;
}

.mobile-table tbody tr:hover {
    background: #f8fbfd;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f0f7;
    color: #092947;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.muted {
    color: #64748b;
}

.text-muted {
    color: #94a3b8;
}

.client-panel-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

@media (max-width: 760px) {

    .client-action a,
    .client-filter button,
    .client-actions a,
    .client-form button {
        width: 100%;
    }

    .mobile-table table {
        min-width: 0;
    }

    .client-panel-header {
        align-items: flex-start;
    }
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f6;
}

.client-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.client-filter input,
.client-filter select,
.client-filter button {
    min-width: 0;
    border: 1px solid #cbd7e1;
    border-radius: 8px;
    padding: 11px 12px;
    font: inherit;
}

.client-filter button {
    border: 0;
    background: #ff511a;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 960px) {

    .standalone-auth,
    .standalone-auth.register-layout {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 260px;
        padding: 24px;
    }

    .auth-card {
        width: calc(100% - 24px);
        margin: 0 auto 24px;
    }

    .client-auth,
    .client-dashboard {
        width: min(100% - 24px, 1120px);
        margin: 18px auto;
    }

    .client-auth-panel,
    .client-panel {
        padding: 20px;
    }

    .client-form.grid,
    .metric-grid,
    .metric-grid.three,
    .referral-panel,
    .split-panels,
    .client-filter {
        grid-template-columns: 1fr;
    }

    .client-topline {
        align-items: stretch;
        flex-direction: column;
    }

    .client-actions a,
    .client-form button,
    .client-filter button {
        width: 100%;
    }
}

/* Simple button utility classes */
.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    text-align: center;
}

.btn-primary {
    background: #ff511a;
    color: #fff;
    border: 0;
}

.btn-outline-secondary {
    background: #fff;
    color: #092947;
    border: 1px solid #cbd7e1;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 81, 26, 0.12);
}
