* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #020617;
    color: #e5f9f6;
}

.auth-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    background-color: #020617;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: -35%;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(153, 246, 228, 0.9) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(45, 212, 191, 0.7) 0 1px, transparent 1.7px),
        radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.4px);
    background-size: 90px 90px, 150px 150px, 230px 230px;
    background-position: 0 0, 45px 75px, 120px 30px;
    animation: star-drift 46s linear infinite;
}

@keyframes star-drift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(120px, 90px, 0);
    }
}

.lightning-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.lightning {
    position: absolute;
    width: 78vw;
    height: 3px;
    opacity: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(153, 246, 228, 0.12) 18%,
        rgba(94, 234, 212, 0.85) 48%,
        rgba(20, 184, 166, 0.98) 52%,
        rgba(153, 246, 228, 0.14) 82%,
        transparent 100%
    );
    filter:
        blur(0.2px)
        drop-shadow(0 0 8px rgba(94, 234, 212, 0.9))
        drop-shadow(0 0 24px rgba(20, 184, 166, 0.75))
        drop-shadow(0 0 54px rgba(45, 212, 191, 0.55));
    animation-name: neon-cross;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.lightning::before {
    content: "";
    position: absolute;
    inset: -18px 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(45, 212, 191, 0.03) 20%,
        rgba(45, 212, 191, 0.22) 50%,
        rgba(45, 212, 191, 0.03) 80%,
        transparent 100%
    );
    filter: blur(18px);
}

.lightning-one {
    top: 22%;
    left: -82vw;
    transform: rotate(-14deg);
    animation-duration: 8s;
}

.lightning-two {
    top: 58%;
    left: -88vw;
    transform: rotate(12deg);
    animation-duration: 10.5s;
    animation-delay: 2.4s;
}

.lightning-three {
    top: 78%;
    left: -80vw;
    transform: rotate(-7deg);
    animation-duration: 12s;
    animation-delay: 5s;
}

@keyframes neon-cross {
    0% {
        opacity: 0;
        translate: 0 0;
    }

    12% {
        opacity: 0.85;
    }

    42% {
        opacity: 0.95;
    }

    70% {
        opacity: 0.18;
    }

    100% {
        opacity: 0;
        translate: 190vw 0;
    }
}

.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 390px;
    background-color: rgba(17, 24, 39, 0.94);
    padding: 34px;
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
    text-align: center;
    color: #f8fafc;
}

.auth-subtitle {
    margin: 8px 0 24px;
    color: #99f6e4;
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 6px;
    background-color: #020617;
    color: #f8fafc;
    font-size: 15px;
}

input::placeholder {
    color: #64748b;
}

input:focus {
    outline: none;
    border-color: #2dd4bf;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

button {
    padding: 12px;
    border: none;
    border-radius: 6px;
    background-color: #14b8a6;
    color: #042f2e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background-color: #2dd4bf;
}

.error-message {
    margin: 0;
    color: #f87171;
    font-size: 14px;
    text-align: center;
}

.auth-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.auth-links a {
    color: #5eead4;
    text-decoration: none;
    font-size: 14px;
}

.auth-links a:hover {
    color: #99f6e4;
    text-decoration: underline;
}


.success-message {
    margin: 0;
    color: #5eead4;
    font-size: 14px;
    text-align: center;
}

.error-detail {
    margin: 0;
    color: #fecaca;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}


.main-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #020617;
    color: #e5f9f6;
}

.main-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(45, 212, 191, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 212, 191, 0.16) 1px, transparent 1px);
    background-size: 70px 70px;
    transform: perspective(700px) rotateX(62deg);
    animation: grid-rush 5s linear infinite;
}

.main-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(94, 234, 212, 0.18),
        transparent
    );
    height: 35%;
    animation: scan-drop 3.2s ease-in-out infinite;
}

.main-panel {
    position: relative;
    z-index: 2;
    width: min(680px, calc(100% - 32px));
    padding: 38px;
    border: 1px solid rgba(94, 234, 212, 0.32);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.86);
    box-shadow:
        0 0 40px rgba(20, 184, 166, 0.22),
        inset 0 0 38px rgba(45, 212, 191, 0.08);
    text-align: center;
    backdrop-filter: blur(10px);
}

.energy-core {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 0 auto 28px;
}

.energy-core span {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(94, 234, 212, 0.85);
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(45, 212, 191, 0.7);
    animation: core-spin 4s linear infinite;
}

.energy-core span:nth-child(2) {
    inset: 24px;
    border-color: rgba(255, 255, 255, 0.72);
    animation-duration: 2.8s;
    animation-direction: reverse;
}

.energy-core span:nth-child(3) {
    inset: 52px;
    background: #5eead4;
    box-shadow: 0 0 36px #2dd4bf;
    animation: pulse-core 1.6s ease-in-out infinite;
}

.glitch-title {
    position: relative;
    margin: 0;
    font-size: 42px;
    color: #f8fafc;
    text-transform: uppercase;
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0.75;
}

.glitch-title::before {
    color: #67e8f9;
    transform: translateX(-2px);
    animation: glitch-left 1.8s infinite;
}

.glitch-title::after {
    color: #14b8a6;
    transform: translateX(2px);
    animation: glitch-right 2.1s infinite;
}

.main-subtitle {
    margin: 10px 0 28px;
    color: #99f6e4;
}

.status-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.status-board div {
    padding: 16px;
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.58);
}

.status-board strong,
.status-board span {
    display: block;
}

.status-board strong {
    color: #f8fafc;
    margin-bottom: 6px;
}

.status-board span {
    color: #5eead4;
}

.logout-link {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 6px;
    color: #042f2e;
    background: #14b8a6;
    text-decoration: none;
    font-weight: 700;
}

.logout-link:hover {
    background: #2dd4bf;
}

@keyframes grid-rush {
    from {
        transform: perspective(700px) rotateX(62deg) translateY(0);
    }

    to {
        transform: perspective(700px) rotateX(62deg) translateY(70px);
    }
}

@keyframes scan-drop {
    0% {
        transform: translateY(-120%);
        opacity: 0;
    }

    35% {
        opacity: 1;
    }

    100% {
        transform: translateY(320%);
        opacity: 0;
    }
}

@keyframes core-spin {
    from {
        transform: rotate(0deg) scaleX(1);
    }

    to {
        transform: rotate(360deg) scaleX(0.72);
    }
}

@keyframes pulse-core {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes glitch-left {
    0%, 100% {
        clip-path: inset(0 0 88% 0);
    }

    45% {
        clip-path: inset(42% 0 30% 0);
    }

    70% {
        clip-path: inset(10% 0 58% 0);
    }
}

@keyframes glitch-right {
    0%, 100% {
        clip-path: inset(82% 0 0 0);
    }

    40% {
        clip-path: inset(18% 0 58% 0);
    }

    75% {
        clip-path: inset(56% 0 20% 0);
    }
}

.register-card {
    max-width: 430px;
}

.register-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: 8px;
    background: linear-gradient(
        135deg,
        rgba(45, 212, 191, 0.75),
        transparent 32%,
        rgba(20, 184, 166, 0.45),
        transparent 72%,
        rgba(153, 246, 228, 0.65)
    );
    opacity: 0.55;
    animation: border-flow 4s linear infinite;
}

@keyframes border-flow {
    0% {
        filter: hue-rotate(0deg) brightness(1);
    }

    50% {
        filter: hue-rotate(24deg) brightness(1.25);
    }

    100% {
        filter: hue-rotate(0deg) brightness(1);
    }
}


.success-card {
    text-align: center;
}

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

.verification-orbit {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
}

.verification-orbit span {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(94, 234, 212, 0.72);
    border-radius: 50%;
    box-shadow: 0 0 22px rgba(45, 212, 191, 0.46);
    animation: success-orbit-spin 3.4s linear infinite;
}

.verification-orbit span:nth-child(2) {
    inset: 18px;
    border-color: rgba(255, 255, 255, 0.62);
    animation-duration: 2.2s;
    animation-direction: reverse;
}

.verification-orbit span:nth-child(3) {
    inset: 39px;
    background-color: #5eead4;
    border-color: transparent;
    box-shadow: 0 0 28px #2dd4bf;
    animation: success-pulse 1.5s ease-in-out infinite;
}

.verification-form {
    gap: 16px;
}

.verification-code-input {
    height: 58px;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 8px;
    color: #f8fafc;
}

.verification-code-input::placeholder {
    color: #334155;
}

.error-card {
    text-align: center;
    border-color: rgba(248, 113, 113, 0.36);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.38),
        0 0 34px rgba(248, 113, 113, 0.12);
}

.error-bot {
    position: relative;
    width: 118px;
    height: 128px;
    margin: 0 auto 24px;
}

.error-bot::before,
.error-bot::after {
    content: "";
    position: absolute;
    top: 34px;
    z-index: 0;
    width: 28px;
    height: 2px;
    background: rgba(248, 113, 113, 0.85);
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.55);
}

.error-bot::before {
    left: 4px;
    transform: rotate(-26deg);
}

.error-bot::after {
    right: 4px;
    transform: rotate(26deg);
}

.error-bot-head {
    position: absolute;
    top: 0;
    left: 22px;
    z-index: 2;
    width: 74px;
    height: 56px;
    border: 2px solid rgba(248, 113, 113, 0.8);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.88);
    box-shadow:
        0 0 24px rgba(248, 113, 113, 0.28),
        inset 0 0 18px rgba(248, 113, 113, 0.08);
}

.error-bot-head::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 34px;
    width: 2px;
    height: 12px;
    background: rgba(248, 113, 113, 0.82);
}

.error-bot-head::after {
    content: "";
    position: absolute;
    top: -19px;
    left: 29px;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(248, 113, 113, 0.82);
    border-radius: 50%;
    background: #020617;
}

.error-eye {
    position: absolute;
    top: 20px;
    width: 11px;
    height: 11px;
}

.error-eye::before,
.error-eye::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 13px;
    height: 2px;
    border-radius: 999px;
    background: #fecaca;
}

.error-eye::before {
    transform: rotate(45deg);
}

.error-eye::after {
    transform: rotate(-45deg);
}

.error-eye:first-child {
    left: 18px;
}

.error-eye:last-child {
    right: 18px;
}

.error-bot-body {
    position: absolute;
    left: 32px;
    bottom: 0;
    z-index: 1;
    width: 54px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(248, 113, 113, 0.72);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: inset 0 0 18px rgba(248, 113, 113, 0.08);
}

.error-alert {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(248, 113, 113, 0.88);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.34);
    animation: error-alert-pulse 1.7s ease-in-out infinite;
}

.error-alert::before,
.error-alert::after {
    content: "";
    position: absolute;
    left: 50%;
    border-radius: 999px;
    background: #fecaca;
    transform: translateX(-50%);
}

.error-alert::before {
    top: 7px;
    width: 3px;
    height: 12px;
}

.error-alert::after {
    bottom: 7px;
    width: 4px;
    height: 4px;
}

@keyframes error-alert-pulse {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.78;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

.success-orbit {
    position: relative;
    width: 116px;
    height: 116px;
    margin: 0 auto 24px;
}

.success-orbit span {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(94, 234, 212, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 22px rgba(45, 212, 191, 0.5);
    animation: success-orbit-spin 3s linear infinite;
}

.success-orbit span:nth-child(2) {
    inset: 18px;
    border-color: rgba(255, 255, 255, 0.62);
    animation-duration: 2.1s;
    animation-direction: reverse;
}

.success-orbit span:nth-child(3) {
    inset: 42px;
    background-color: #5eead4;
    border-color: transparent;
    box-shadow: 0 0 28px #2dd4bf;
    animation: success-pulse 1.5s ease-in-out infinite;
}

@keyframes success-orbit-spin {
    from {
        transform: rotate(0deg) scaleX(1);
    }

    to {
        transform: rotate(360deg) scaleX(0.68);
    }
}

@keyframes success-pulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.72;
    }

    50% {
        transform: scale(1.12);
        opacity: 1;
    }
}



.auth-card,
.main-panel {
    animation: panel-enter 520ms ease-out both;
}

@keyframes panel-enter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}


.app-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: rgba(2, 6, 23, 0.72);
    border-bottom: 1px solid rgba(45, 212, 191, 0.22);
    backdrop-filter: blur(12px);
}

.app-header h1 {
    margin: 0;
    color: #f8fafc;
    font-size: 18px;
    letter-spacing: 0;
}

.app-header a {
    color: #5eead4;
    text-decoration: none;
    font-weight: 700;
}

.app-header a:hover {
    color: #99f6e4;
}

.portal-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.96)),
        radial-gradient(circle at 16% 12%, rgba(45, 212, 191, 0.16), transparent 28%),
        radial-gradient(circle at 88% 20%, rgba(59, 130, 246, 0.12), transparent 26%);
    color: #e5f9f6;
}

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

.client-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 26px 18px;
    background: rgba(2, 6, 23, 0.88);
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 18px 0 54px rgba(0, 0, 0, 0.22);
}

.client-brand {
    display: flex;
    align-items: center;
    min-height: 52px;
    text-decoration: none;
}

.client-brand img {
    width: min(180px, 100%);
    height: auto;
    display: block;
}

.client-company {
    padding: 16px;
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.68);
}

.client-company span,
.eyebrow,
.metric-card span,
.detail-grid span {
    display: block;
    color: #7dd3fc;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.client-company strong {
    display: block;
    margin-top: 8px;
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.client-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-nav-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    min-height: 46px;
    gap: 10px;
    padding: 8px 12px;
    color: #cbd5e1;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.client-nav-item span,
.client-user-chip > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #0f172a;
    background: #5eead4;
    font-size: 11px;
    font-weight: 800;
}

.client-nav-item:hover,
.client-nav-item.is-active {
    color: #f8fafc;
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(94, 234, 212, 0.28);
}

.client-nav-item.is-active span {
    background: #7dd3fc;
}

.client-logout {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 9999px;
    background: #dc2626;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: width 0.2s ease, border-radius 0.2s ease;
    cursor: pointer;
}

.client-logout:hover {
    width: 128px;
    border-radius: 8px;
}

.client-logout:active {
    transform: translate(4px, 4px);
}

/* Icon wrapper */
.client-logout .logout-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: justify-content 0.3s ease, padding 0.3s ease;
}

.client-logout:hover .logout-icon-wrap {
    justify-content: flex-start;
    padding-left: 12px;
    padding-right: 12px;
}

/* Icon SVG */
.client-logout .logout-icon-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Text */
.client-logout .logout-text {
    position: absolute;
    right: 20px;
    transform: translateX(100%);
    opacity: 0;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.client-logout:hover .logout-text {
    transform: translateX(0);
    opacity: 1;
}

.client-main {
    width: 100%;
    max-width: 1240px;
    padding: 34px clamp(20px, 4vw, 54px) 56px;
}

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

.client-topline h1 {
    margin: 8px 0 0;
    color: #f8fafc;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: 0;
}

.client-user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 360px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
}

.client-user-chip strong,
.client-user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-user-chip small {
    margin-top: 3px;
    color: #94a3b8;
}

.notice-band {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    font-weight: 800;
    line-height: 1.45;
}

.success-message {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #86efac;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 800;
    line-height: 1.45;
}

.portal-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

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

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

.portal-panel,
.metric-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.portal-panel {
    padding: 22px;
}

.metric-card {
    min-height: 138px;
    padding: 20px;
}

.metric-card strong {
    display: block;
    margin-top: 14px;
    color: #f8fafc;
    font-size: 32px;
    line-height: 1;
}

.metric-card small,
.muted,
.empty-state,
.list-row small,
.ticket-card small {
    color: #94a3b8;
}

.portal-panel h2,
.panel-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0;
}

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

.panel-heading a {
    color: #5eead4;
    font-weight: 700;
    text-decoration: none;
}

.summary-line,
.list-row,
.ticket-card > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.summary-line strong,
.list-row strong,
.ticket-card strong,
.detail-grid strong {
    color: #f8fafc;
    overflow-wrap: anywhere;
}

.list-row {
    min-height: 68px;
    padding: 14px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.portal-panel > .list-row:first-of-type {
    margin-top: 14px;
}

.row-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #bfdbfe;
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: rgba(30, 64, 175, 0.22);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

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

.detail-grid div {
    min-height: 96px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.34);
}

.detail-grid strong {
    display: block;
    margin-top: 10px;
    font-size: 18px;
}

.portal-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.portal-form label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.66);
    color: #f8fafc;
    outline: none;
}

.portal-form textarea {
    min-height: 132px;
    resize: vertical;
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
    border-color: rgba(94, 234, 212, 0.62);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.portal-form button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    color: #062b2f;
    background: #5eead4;
    font-weight: 900;
    cursor: pointer;
}

.compact-form {
    max-width: 560px;
}

.ticket-card {
    display: grid;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.ticket-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.55;
}

@media (max-width: 1040px) {
    .client-shell {
        grid-template-columns: 238px minmax(0, 1fr);
    }

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

    .two-column,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .client-shell {
        display: block;
    }

    .client-sidebar {
        position: relative;
        height: auto;
        padding: 18px;
    }

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

    .client-nav-item {
        grid-template-columns: 28px minmax(0, 1fr);
        font-size: 14px;
    }

    .client-nav-item span,
    .client-user-chip > span {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }

    .client-main {
        padding: 24px 16px 40px;
    }

    .client-topline,
    .summary-line,
    .list-row,
    .ticket-card > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-user-chip {
        min-width: 0;
        width: 100%;
    }

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

    .row-amount {
        justify-content: flex-start;
    }
}

/* Laplace main-site theme */
:root {
    --laplace-teal: #00b8b8;
    --laplace-teal-light: #20d3d0;
    --laplace-soft-teal: #e6fafa;
    --laplace-slate: #526371;
    --laplace-slate-dark: #2f3e46;
    --laplace-slate-mid: #6c7a86;
    --laplace-slate-light: #dde4e8;
    --laplace-paper: #ffffff;
    --laplace-soft: #f4f7f8;
    --laplace-ink: #050607;
    --laplace-line: rgba(82, 99, 113, 0.16);
    --laplace-shadow: 0 24px 70px rgba(47, 62, 70, 0.15);
}

body {
    color: var(--laplace-ink);
    background: var(--laplace-paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page {
    background:
        linear-gradient(180deg, rgba(5, 6, 7, 0.78) 0%, rgba(47, 62, 70, 0.56) 100%),
        url("/media/background.jpg") center / cover no-repeat;
}

.auth-page::before {
    background-image:
        radial-gradient(circle, rgba(32, 211, 208, 0.72) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(221, 228, 232, 0.55) 0 1px, transparent 1.4px);
}

.lightning {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 184, 184, 0.08) 16%,
        rgba(32, 211, 208, 0.8) 48%,
        rgba(255, 255, 255, 0.86) 52%,
        rgba(0, 184, 184, 0.12) 82%,
        transparent 100%
    );
    filter:
        blur(0.2px)
        drop-shadow(0 0 8px rgba(32, 211, 208, 0.76))
        drop-shadow(0 0 24px rgba(0, 184, 184, 0.5))
        drop-shadow(0 0 54px rgba(255, 255, 255, 0.24));
}

.auth-card {
    max-width: 410px;
    padding: 32px;
    color: var(--laplace-ink);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(221, 228, 232, 0.82);
    box-shadow: var(--laplace-shadow);
    backdrop-filter: blur(18px);
}

.auth-logo {
    display: block;
    width: min(220px, 82%);
    height: 70px;
    object-fit: contain;
    margin: 0 auto 18px;
    mask-image:
        linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 3%, black 97%, transparent 100%);
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 3%, black 97%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.auth-card h1 {
    color: var(--laplace-ink);
    font-size: 30px;
    font-weight: 850;
}

.auth-subtitle {
    color: var(--laplace-slate);
    font-weight: 700;
}

input {
    color: var(--laplace-ink);
    border: 1px solid rgba(82, 99, 113, 0.24);
    background: rgba(244, 247, 248, 0.92);
}

input::placeholder {
    color: var(--laplace-slate-mid);
}

input:focus {
    border-color: var(--laplace-teal);
    box-shadow: 0 0 0 3px rgba(0, 184, 184, 0.16);
}

button {
    color: #ffffff;
    background: var(--laplace-teal);
}

button:hover {
    background: var(--laplace-teal-light);
}

.auth-links a {
    color: var(--laplace-slate-dark);
    font-weight: 750;
}

.auth-links a:hover {
    color: var(--laplace-teal);
}

.error-message {
    color: #b42318;
}

.portal-body {
    color: var(--laplace-ink);
    background:
        linear-gradient(180deg, rgba(244, 247, 248, 0.96), rgba(255, 255, 255, 1)),
        url("/media/background-2.png") center top / cover fixed no-repeat;
}

.client-shell {
    background: rgba(255, 255, 255, 0.68);
}

.client-sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-right: 1px solid rgba(221, 228, 232, 0.82);
    box-shadow: 14px 0 34px rgba(47, 62, 70, 0.08);
    backdrop-filter: blur(18px);
}

.client-company,
.portal-panel,
.metric-card,
.client-user-chip {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(82, 99, 113, 0.14);
    box-shadow: var(--laplace-shadow);
}

.client-company span,
.eyebrow,
.metric-card span,
.detail-grid span {
    color: var(--laplace-teal);
}

.client-company strong,
.client-topline h1,
.client-user-chip strong,
.metric-card strong,
.portal-panel h2,
.panel-heading h2,
.summary-line strong,
.list-row strong,
.ticket-card strong,
.detail-grid strong {
    color: var(--laplace-ink);
}

.client-nav-item {
    color: var(--laplace-slate-dark);
}

.client-nav-item span,
.client-user-chip > span {
    color: #ffffff;
    background: var(--laplace-slate-dark);
}

.client-nav-item:hover,
.client-nav-item.is-active {
    color: var(--laplace-ink);
    background: var(--laplace-soft-teal);
    border-color: rgba(0, 184, 184, 0.28);
}

.client-nav-item.is-active span {
    background: var(--laplace-teal);
}

.client-logout {
    border-color: var(--laplace-line);
}

.client-user-chip small,
.metric-card small,
.muted,
.empty-state,
.list-row small,
.ticket-card small {
    color: var(--laplace-slate);
}

.panel-heading a {
    color: var(--laplace-teal);
}

.list-row,
.ticket-card {
    border-top-color: rgba(82, 99, 113, 0.14);
}

.status-pill {
    color: var(--laplace-slate-dark);
    border-color: rgba(0, 184, 184, 0.24);
    background: var(--laplace-soft-teal);
}

.detail-grid div {
    border-color: rgba(82, 99, 113, 0.12);
    background: var(--laplace-soft);
}

.portal-form label {
    color: var(--laplace-slate-dark);
}

.portal-form input,
.portal-form select,
.portal-form textarea {
    color: var(--laplace-ink);
    border-color: rgba(82, 99, 113, 0.22);
    background: rgba(244, 247, 248, 0.92);
}

.portal-form input:focus,
.portal-form select:focus,
.portal-form textarea:focus {
    border-color: var(--laplace-teal);
    box-shadow: 0 0 0 3px rgba(0, 184, 184, 0.16);
}

.portal-form button {
    color: #ffffff;
    background: var(--laplace-teal);
}

.ticket-card p {
    color: var(--laplace-slate-dark);
}

/* Login cleanup and wider client layout */
.auth-page {
    justify-content: center;
}

.auth-page::before {
    display: none;
}

.auth-card {
    background: rgba(255, 255, 255, 0.94);
}

.auth-logo {
    width: min(182px, 74%);
    height: 54px;
    margin-bottom: 20px;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: normal;
    clip-path: none;
}

.client-shell {
    grid-template-columns: 250px minmax(0, 1fr);
}

.client-sidebar {
    padding: 26px 12px;
}

.client-brand {
    min-height: 46px;
    padding: 0 10px;
}

.client-brand img {
    width: 165px;
    mix-blend-mode: normal;
    clip-path: none;
}

.client-main {
    max-width: 1580px;
    padding-left: clamp(26px, 2.8vw, 44px);
    padding-right: clamp(26px, 2.8vw, 44px);
}

.tickets-layout {
    max-width: 1320px;
}

@media (max-width: 1040px) {
    .client-shell {
        grid-template-columns: 232px minmax(0, 1fr);
    }
}

/* Adaptive client portal shell */
.portal-body {
    min-width: 0;
}

.client-shell {
    grid-template-columns: 268px minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
}

.client-sidebar {
    z-index: 30;
    width: 268px;
    overflow-x: hidden;
    transition:
        width 220ms ease,
        transform 220ms ease,
        padding 220ms ease;
}

.sidebar-collapse-toggle,
.mobile-sidebar-toggle {
    align-items: center;
    justify-content: center;
    border: 1px solid var(--laplace-line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--laplace-slate-dark);
    box-shadow: 0 14px 34px rgba(47, 62, 70, 0.1);
}

.sidebar-collapse-toggle {
    position: absolute;
    top: 18px;
    right: 12px;
    z-index: 36;
    display: inline-flex;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
}

.sidebar-collapse-toggle span {
    position: absolute;
    width: 9px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-collapse-toggle span:first-child {
    transform: translateX(-2px) rotate(38deg);
}

.sidebar-collapse-toggle span:last-child {
    transform: translateX(-2px) rotate(-38deg);
}

.mobile-sidebar-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 42;
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
}

.mobile-sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 3px 0;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 24;
    display: none;
    background: rgba(5, 6, 7, 0.34);
    backdrop-filter: blur(2px);
}

.client-brand,
.client-company,
.client-nav,
.client-logout {
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        width 220ms ease;
}

.client-brand {
    position: relative;
    overflow: hidden;
    padding-right: 42px;
}

.client-brand::after {
    content: "LE";
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--laplace-slate-dark);
    font-size: 12px;
    font-weight: 900;
}

.client-nav-item {
    grid-template-columns: 34px minmax(0, 1fr);
    white-space: nowrap;
}

.nav-badge {
    flex: 0 0 auto;
}

.client-nav-item .nav-label {
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    color: inherit;
    background: transparent;
    border-radius: 0;
    font-size: inherit;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-nav-item.is-active .nav-label {
    color: inherit;
    background: transparent;
}

.nav-label,
.client-company,
.client-brand img {
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.client-main {
    width: min(100%, 2160px);
    max-width: none;
    margin: 0 auto;
    padding:
        clamp(26px, 2vw, 42px)
        clamp(28px, 3.6vw, 72px)
        64px;
}

.client-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.two-column {
    grid-template-columns: repeat(2, minmax(360px, 1fr));
}

.tickets-layout {
    max-width: 1760px;
    grid-template-columns: minmax(420px, 0.9fr) minmax(420px, 1.1fr);
}

.portal-panel {
    min-width: 0;
}

body.sidebar-collapsed .client-shell {
    grid-template-columns: 76px minmax(0, 1fr);
}

body.sidebar-collapsed .client-sidebar {
    width: 76px;
    align-items: center;
    padding: 18px 10px;
}

body.sidebar-collapsed .sidebar-collapse-toggle span:first-child {
    transform: translateX(2px) rotate(-38deg);
}

body.sidebar-collapsed .sidebar-collapse-toggle span:last-child {
    transform: translateX(2px) rotate(38deg);
}

body.sidebar-collapsed .sidebar-collapse-toggle {
    top: 80px;
    left: 21px;
    right: auto;
}

body.sidebar-collapsed .client-brand {
    justify-content: center;
    width: 56px;
    min-height: 56px;
    padding: 0;
}

body.sidebar-collapsed .client-brand img {
    display: none;
}

body.sidebar-collapsed .client-brand::after {
    display: inline-flex;
}

body.sidebar-collapsed .client-company {
    display: none;
}

body.sidebar-collapsed .client-company,
body.sidebar-collapsed .nav-label {
    width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-8px);
}

body.sidebar-collapsed .client-nav-item {
    display: flex;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    padding: 8px;
}

body.sidebar-collapsed .client-nav {
    align-items: center;
    gap: 12px;
    margin-top: 46px;
}

body.sidebar-collapsed .client-nav-item .nav-badge,
body.sidebar-collapsed .client-user-chip > span {
    width: 36px;
    height: 36px;
}

body.sidebar-collapsed .client-logout {
    width: 44px;
    height: 44px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
}

body.sidebar-collapsed .client-logout:hover {
    width: 128px;
}

body.sidebar-collapsed .client-logout .logout-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body.sidebar-collapsed .client-logout .logout-icon-svg {
    width: 16px;
    height: 16px;
}

body.sidebar-collapsed .client-logout .logout-text {
    transform: translateX(100%);
    opacity: 0;
}

body.sidebar-collapsed .client-logout:hover .logout-text {
    transform: translateX(0);
    opacity: 1;
}

@media (min-width: 1800px) {
    .portal-panel {
        padding: 28px;
    }

    .metric-card {
        min-height: 152px;
    }

    .client-topline h1 {
        font-size: 50px;
    }
}

@media (max-width: 1180px) {
    .client-shell {
        grid-template-columns: 238px minmax(0, 1fr);
    }

    .client-sidebar {
        width: 238px;
    }

    .two-column,
    .tickets-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .portal-body {
        background: var(--laplace-paper);
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
        flex-direction: column;
    }

    .client-shell {
        display: block;
    }

    .client-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        max-width: 320px;
        height: 100dvh;
        padding: 76px 16px 18px;
        transform: translateX(-105%);
        border-right: 1px solid rgba(82, 99, 113, 0.18);
    }

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

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .client-brand {
        position: absolute;
        top: 18px;
        left: 70px;
        right: 16px;
        min-height: 40px;
        padding: 0;
    }

    .client-brand::after {
        display: none;
    }

    .client-brand img {
        display: block;
        width: 150px;
    }

    .client-nav {
        display: flex;
    }

    .client-nav-item {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 48px;
        font-size: 15px;
    }

    .client-main {
        width: 100%;
        padding: 76px 16px 40px;
    }

    .client-topline {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .client-topline h1 {
        font-size: clamp(30px, 10vw, 42px);
    }

    .client-user-chip {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .stats-grid,
    .two-column,
    .tickets-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .portal-panel,
    .metric-card {
        padding: 18px;
    }

    body.sidebar-collapsed .client-shell {
        display: block;
    }

    body.sidebar-collapsed .client-sidebar {
        width: min(86vw, 320px);
        padding: 76px 16px 18px;
    }

    body.sidebar-collapsed .client-company,
    body.sidebar-collapsed .nav-label {
        width: auto;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        transform: none;
    }

    body.sidebar-collapsed .client-nav-item {
        display: grid;
        justify-content: stretch;
        padding: 8px 12px;
    }

    body.sidebar-collapsed .client-logout {
        width: auto;
        border-radius: 8px;
    }

    body.sidebar-collapsed .client-logout .logout-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-left: 12px;
        width: auto;
    }

    body.sidebar-collapsed .client-logout .logout-text {
        position: static;
        transform: translateX(0);
        opacity: 1;
    }
}

/* Account settings */
.client-user-chip .user-avatar,
.settings-avatar {
    overflow: hidden;
}

.client-user-chip .user-avatar img,
.settings-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-panel,
.password-panel {
    margin-bottom: 18px;
}

.settings-form {
    max-width: 980px;
}

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

.profile-photo-field {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    grid-column: 1 / -1;
    padding: 16px;
    border: 1px solid rgba(82, 99, 113, 0.14);
    border-radius: 8px;
    background: rgba(244, 247, 248, 0.7);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.profile-photo-field.is-dragging {
    border-color: rgba(0, 200, 200, 0.72);
    background: #e8ffff;
    box-shadow: 0 0 0 3px rgba(0, 200, 200, 0.16);
}

.settings-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 18px;
    color: #ffffff;
    background: var(--laplace-slate-dark);
    font-size: 1.1rem;
    font-weight: 900;
}

.photo-upload {
    display: grid;
    gap: 8px;
}

.photo-upload-title {
    color: var(--laplace-slate-dark);
    font-weight: 850;
}

.photo-upload-box {
    display: grid;
    gap: 3px;
    min-height: 74px;
    padding: 14px 16px;
    border: 1px dashed rgba(82, 99, 113, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.photo-upload-box:hover {
    border-color: rgba(0, 184, 184, 0.56);
    background: #ffffff;
}

.photo-upload-box strong {
    color: var(--laplace-ink);
    font-size: 0.98rem;
}

.photo-upload-box small {
    color: var(--laplace-slate);
}

.photo-upload-box em {
    color: var(--laplace-teal);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 800;
}

.photo-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.notification-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid rgba(82, 99, 113, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.notification-box legend {
    padding: 0 8px;
    color: var(--laplace-slate-dark);
    font-weight: 850;
}

.check-option {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(82, 99, 113, 0.12);
    border-radius: 8px;
    background: rgba(244, 247, 248, 0.72);
}

.check-option input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--laplace-teal);
}

.check-option span {
    color: var(--laplace-slate-dark);
    font-weight: 750;
}

.password-panel .error-message {
    margin: 14px 0 0;
    color: #b42318;
    font-weight: 750;
    text-align: left;
}

.portal-body .notice-band,
.portal-body .success-message,
.portal-body .error-message {
    margin: 14px 0 18px;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: left;
}

.portal-body .notice-band {
    color: #92400e;
    border: 1px solid #fcd34d;
    background: #fffbeb;
}

.portal-body .success-message {
    color: #065f46;
    border: 1px solid #86efac;
    background: #ecfdf5;
}

.portal-body .error-message {
    color: #991b1b;
    border: 1px solid #fecaca;
    background: #fef2f2;
}

@media (max-width: 840px) {
    .settings-grid,
    .notification-box {
        grid-template-columns: 1fr;
    }

    .profile-photo-field {
        grid-template-columns: 58px minmax(0, 1fr);
        padding: 14px;
    }

    .settings-avatar {
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }
}

/* Client portal sidebar polish */
.client-shell {
    grid-template-columns: clamp(238px, 18vw, 268px) minmax(0, 1fr);
}

.client-sidebar {
    width: clamp(238px, 18vw, 268px);
}

.sidebar-collapse-toggle {
    top: 0;
    right: 0;
    z-index: 37;
    width: 12px;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    cursor: ew-resize;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus-visible {
    opacity: 1;
    background: linear-gradient(90deg, transparent, rgba(0, 184, 184, 0.12));
    outline: none;
}

.sidebar-collapse-toggle span {
    display: none;
}

.client-brand {
    min-width: 0;
    padding-right: 0;
}

.client-brand .client-brand-logo {
    display: block;
}

.client-brand .client-brand-favicon {
    display: none;
}

.client-brand::after {
    content: none;
}

body.sidebar-collapsed .client-shell {
    grid-template-columns: 76px minmax(0, 1fr);
}

body.sidebar-collapsed .client-sidebar {
    width: 76px;
    padding: 18px 10px;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
    top: 0;
    right: 0;
    left: auto;
    height: 100%;
}

body.sidebar-collapsed .client-brand {
    justify-content: center;
    width: 56px;
    min-height: 56px;
    padding: 0;
}

body.sidebar-collapsed .client-brand .client-brand-logo {
    display: none;
}

body.sidebar-collapsed .client-brand .client-brand-favicon {
    display: block;
    width: 42px;
    height: 42px;
    max-width: 42px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(47, 62, 70, 0.12);
}

body.sidebar-collapsed .client-brand::after {
    display: none;
}

body.sidebar-collapsed .client-nav {
    margin-top: 18px;
}

@media (max-width: 1180px) and (min-width: 841px) {
    .client-shell {
        grid-template-columns: clamp(216px, 22vw, 238px) minmax(0, 1fr);
    }

    .client-sidebar {
        width: clamp(216px, 22vw, 238px);
    }

    .client-brand .client-brand-logo {
        width: min(150px, 100%);
    }

    .client-company {
        padding: 14px;
    }

    .client-nav-item {
        gap: 10px;
        padding: 8px 10px;
        font-size: 14px;
    }
}

@media (max-width: 980px) and (min-width: 841px) {
    .client-shell {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .client-sidebar {
        width: 76px;
        align-items: center;
        padding: 18px 10px;
    }

    .client-brand {
        justify-content: center;
        width: 56px;
        min-height: 56px;
        padding: 0;
    }

    .client-brand .client-brand-logo {
        display: none;
    }

    .client-brand .client-brand-favicon {
        display: block;
        width: 42px;
        height: 42px;
        max-width: 42px;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 12px 28px rgba(47, 62, 70, 0.12);
    }

    .client-company,
    .nav-label {
        width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateX(-8px);
    }

    .client-company {
        display: none;
    }

    .client-nav {
        align-items: center;
        gap: 12px;
        margin-top: 18px;
    }

    .client-nav-item {
        display: flex;
        justify-content: center;
        width: 48px;
        min-height: 48px;
        padding: 8px;
    }

    .client-nav-item .nav-badge {
        width: 36px;
        height: 36px;
    }

    .client-logout {
        width: 44px;
        height: 44px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .client-logout:hover {
        width: 128px;
    }

    .client-logout .logout-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .client-logout .logout-icon-svg {
        width: 16px;
        height: 16px;
    }

    .client-logout .logout-text {
        transform: translateX(100%);
        opacity: 0;
    }

    .client-logout:hover .logout-text {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 840px) {
    .portal-body {
        overflow-x: hidden;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
        flex-direction: column;
    }

    .client-shell,
    body.sidebar-collapsed .client-shell {
        display: block;
        width: 100%;
        overflow-x: hidden;
    }

    .client-sidebar,
    body.sidebar-collapsed .client-sidebar {
        width: min(86vw, 320px);
        max-width: 320px;
        padding: 76px 16px 18px;
    }

    .client-brand,
    body.sidebar-collapsed .client-brand {
        position: absolute;
        top: 18px;
        left: 70px;
        right: 16px;
        justify-content: flex-start;
        width: auto;
        min-height: 40px;
        padding: 0;
    }

    .client-brand .client-brand-logo,
    body.sidebar-collapsed .client-brand .client-brand-logo {
        display: block;
        width: 150px;
    }

    .client-brand .client-brand-favicon,
    body.sidebar-collapsed .client-brand .client-brand-favicon {
        display: none;
    }

    .client-main {
        max-width: 100%;
        overflow-x: hidden;
    }

    .client-user-chip {
        min-width: 0;
        width: 100%;
    }

    .client-user-chip > div {
        min-width: 0;
    }

    .notice-band,
    .portal-panel,
    .metric-card {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.sidebar-collapsed .client-nav {
        margin-top: 0;
    }
}

/* Hover-expand sidebar with Lucide-style navigation icons */
.client-nav-item .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    color: #ffffff;
    background: #2D3D46;
    font-size: 0;
}

.client-nav-item .nav-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.client-nav-item.is-active {
    color: #111827;
    background: #E8FFFF;
    border: 1px solid #8EEEEE;
}

.client-nav-item.is-active .nav-icon {
    color: #ffffff;
    background: #00C8C8;
}

.client-nav-item.is-active .nav-label,
.client-nav-item:hover .nav-label {
    color: inherit;
    background: transparent;
}

@media (min-width: 841px) {
    .client-shell,
    body.sidebar-collapsed .client-shell {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .client-sidebar,
    body.sidebar-collapsed .client-sidebar {
        width: 76px;
        align-items: center;
        padding: 18px 10px;
        overflow-x: hidden;
        transition:
            width 220ms ease,
            padding 220ms ease,
            box-shadow 220ms ease;
    }

    .client-sidebar:hover,
    .client-sidebar:focus-within {
        width: 268px;
        align-items: stretch;
        padding: 26px 12px;
        box-shadow: 22px 0 52px rgba(47, 62, 70, 0.16);
    }

    .client-brand,
    body.sidebar-collapsed .client-brand {
        justify-content: center;
        width: 56px;
        min-height: 56px;
        padding: 0;
    }

    .client-sidebar:hover .client-brand,
    .client-sidebar:focus-within .client-brand {
        justify-content: flex-start;
        width: auto;
        min-height: 46px;
        padding: 0 10px;
    }

    .client-brand .client-brand-logo,
    body.sidebar-collapsed .client-brand .client-brand-logo {
        display: none;
    }

    .client-sidebar:hover .client-brand .client-brand-logo,
    .client-sidebar:focus-within .client-brand .client-brand-logo {
        display: block;
        width: 165px;
    }

    .client-brand .client-brand-favicon,
    body.sidebar-collapsed .client-brand .client-brand-favicon {
        display: block;
        width: 42px;
        height: 42px;
        max-width: 42px;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 12px 28px rgba(47, 62, 70, 0.12);
    }

    .client-sidebar:hover .client-brand .client-brand-favicon,
    .client-sidebar:focus-within .client-brand .client-brand-favicon {
        display: none;
    }

    .client-company,
    body.sidebar-collapsed .client-company {
        display: none;
    }

    .client-sidebar:hover .client-company,
    .client-sidebar:focus-within .client-company {
        display: block;
        width: auto;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        transform: none;
    }

    .client-nav,
    body.sidebar-collapsed .client-nav {
        align-items: center;
        gap: 12px;
        margin-top: 18px;
    }

    .client-sidebar:hover .client-nav,
    .client-sidebar:focus-within .client-nav {
        align-items: stretch;
        margin-top: 0;
    }

    .client-nav-item,
    body.sidebar-collapsed .client-nav-item {
        display: flex;
        justify-content: center;
        width: 48px;
        min-height: 48px;
        padding: 8px;
        gap: 0;
    }

    .client-sidebar:hover .client-nav-item,
    .client-sidebar:focus-within .client-nav-item {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        justify-content: stretch;
        width: 100%;
        padding: 8px 10px;
        gap: 10px;
    }

    .client-nav-item .nav-label,
    body.sidebar-collapsed .client-nav-item .nav-label {
        width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateX(-8px);
    }

    .client-sidebar:hover .client-nav-item .nav-label,
    .client-sidebar:focus-within .client-nav-item .nav-label {
        width: auto;
        opacity: 1;
        overflow: hidden;
        pointer-events: auto;
        transform: none;
    }

    .client-logout,
    body.sidebar-collapsed .client-logout {
        width: 44px;
        height: 44px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .client-logout .logout-icon-wrap,
    body.sidebar-collapsed .client-logout .logout-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .client-logout .logout-icon-svg,
    body.sidebar-collapsed .client-logout .logout-icon-svg {
        width: 16px;
        height: 16px;
    }

    .client-logout .logout-text,
    body.sidebar-collapsed .client-logout .logout-text {
        position: absolute;
        right: 20px;
        transform: translateX(100%);
        opacity: 0;
        white-space: nowrap;
    }

    .client-sidebar:hover .client-logout,
    .client-sidebar:focus-within .client-logout {
        width: 100%;
        height: auto;
        min-height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .client-sidebar:hover .client-logout .logout-icon-wrap,
    .client-sidebar:focus-within .client-logout .logout-icon-wrap {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        padding-left: 12px;
        padding-right: 10px;
    }

    .client-sidebar:hover .client-logout .logout-text,
    .client-sidebar:focus-within .client-logout .logout-text {
        position: static;
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 840px) {
    .client-brand .client-brand-logo,
    body.sidebar-collapsed .client-brand .client-brand-logo {
        display: block;
        width: 150px;
    }

    .client-brand .client-brand-favicon,
    body.sidebar-collapsed .client-brand .client-brand-favicon {
        display: none;
    }

    .client-nav-item,
    body.sidebar-collapsed .client-nav-item {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        width: 100%;
        min-height: 48px;
        padding: 8px 12px;
    }

    .client-nav-item .nav-label,
    body.sidebar-collapsed .client-nav-item .nav-label {
        width: auto;
        opacity: 1;
        overflow: hidden;
        pointer-events: auto;
        transform: none;
    }

    .client-logout {
        width: auto;
        height: auto;
        border-radius: 8px;
    }

    .client-logout .logout-icon-wrap {
        justify-content: flex-start;
        padding-left: 12px;
        padding-right: 10px;
    }

    .client-logout .logout-text {
        position: static;
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile login viewport */
html,
body {
    min-height: 100%;
}

.auth-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
    background-position: center;
    background-size: cover;
}

@supports (min-height: 100dvh) {
    .auth-page {
        min-height: 100dvh;
    }
}

@media (max-width: 600px) {
    body {
        background:
            linear-gradient(180deg, rgba(5, 6, 7, 0.78) 0%, rgba(47, 62, 70, 0.56) 100%),
            url("/media/background.jpg") center / cover no-repeat;
    }

    .auth-page {
        align-items: center;
        justify-content: center;
        padding-left: 18px;
        padding-right: 18px;
        overflow-y: auto;
    }

    .auth-card {
        width: min(100%, 360px);
        max-width: none;
        padding: 24px 18px;
    }

    .auth-logo {
        width: min(172px, 76%);
        height: 46px;
        margin-bottom: 16px;
    }

    .auth-card h1 {
        font-size: 24px;
        line-height: 1.1;
    }

    .auth-subtitle {
        margin-bottom: 18px;
        font-size: 0.9rem;
    }

    .auth-card form {
        gap: 12px;
    }

    .auth-card input,
    .auth-card button {
        min-height: 44px;
        font-size: 16px;
    }

    .auth-links {
        margin-top: 16px;
        gap: 10px;
    }

    .success-orbit,
    .verification-orbit {
        width: 74px;
        height: 74px;
        margin-bottom: 18px;
    }

    .success-orbit span:nth-child(2),
    .verification-orbit span:nth-child(2) {
        inset: 14px;
    }

    .success-orbit span:nth-child(3),
    .verification-orbit span:nth-child(3) {
        inset: 28px;
    }

    .error-bot {
        width: 92px;
        height: 102px;
        margin-bottom: 18px;
        transform: scale(0.86);
        transform-origin: center bottom;
    }

    .verification-code-input {
        height: 52px;
        font-size: 22px;
        letter-spacing: 6px;
    }
}

@media (max-width: 360px) {
    .auth-card {
        padding: 22px 14px;
    }

    .auth-logo {
        width: min(150px, 74%);
    }
}

