* {
    box-sizing: border-box;
}
:root {
    --primary: #6d5dfc;
    --primary-light: #8b7cff;
    --primary-dark: #4f3ed7;
    --cyan: #22d3ee;
    --pink: #ec4899;
    --green: #22c55e;
    --orange: #f97316;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-dark: rgba(12, 15, 35, 0.78);
    --background: #090b1a;
    --text: #172033;
    --text-light: #f8fafc;
    --muted: #667085;
    --muted-light: #a9b1ca;
    --border: rgba(148, 163, 184, 0.23);
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.28);
}
html {
    scroll-behavior: smooth;
}
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea {
    font: inherit;
}
button, a {
    -webkit-tap-highlight-color: transparent;
}
.ambient-background {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 20%, #25205f 0, transparent 30%),
        radial-gradient(circle at 90% 10%, #143c58 0, transparent 27%),
        linear-gradient(145deg, #070914 0%, #10132d 50%, #080b19 100%);
}
.background-grid {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black, transparent 90%);
    animation: gridMove 25s linear infinite;
}
.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.55;
    animation: orbFloat 13s ease-in-out infinite alternate;
}
.orb-one {
    width: 420px;
    height: 420px;
    top: -170px;
    left: -130px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
}
.orb-two {
    width: 500px;
    height: 500px;
    right: -200px;
    top: 8%;
    background: radial-gradient(circle, #0891b2, transparent 70%);
    animation-delay: -4s;
}
.orb-three {
    width: 440px;
    height: 440px;
    left: 38%;
    bottom: -260px;
    background: radial-gradient(circle, #db2777, transparent 72%);
    animation-delay: -8s;
}
.light-beam {
    position: absolute;
    width: 2px;
    height: 80vh;
    opacity: 0.2;
    background: linear-gradient(transparent, #a5b4fc, transparent);
    transform: rotate(35deg);
    animation: beamTravel 12s linear infinite;
}
.beam-one {
    left: 25%;
    top: -30%;
}
.beam-two {
    right: 15%;
    top: -45%;
    animation-delay: -6s;
}
@keyframes orbFloat {
    from {
        transform: translate3d(-20px, -10px, 0) scale(0.94);
    }
    to {
        transform: translate3d(45px, 35px, 0) scale(1.08);
    }
}
@keyframes gridMove {
    from { transform: translateY(0); }
    to { transform: translateY(52px); }
}
@keyframes beamTravel {
    from { transform: translateY(-30%) rotate(35deg); }
    to { transform: translateY(150%) rotate(35deg); }
}
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    }
}
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 76px;
    padding: 12px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 9, 22, 0.74);
    color: white;
    backdrop-filter: blur(22px);
}
.platform-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}
.platform-brand strong {
    display: block;
    font-size: 15px;
}
.platform-brand small,
.user-identity small {
    display: block;
    margin-top: 3px;
    color: var(--muted-light);
    font-size: 11px;
}
.brand-logo {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    color: white;
    font-weight: 900;
    box-shadow: 0 9px 30px rgba(109, 93, 252, 0.4);
}
.brand-logo.tenant-logo {
    overflow: hidden;
    padding: 3px;
    background: #050505;
    border: 1px solid color-mix(in srgb, var(--primary) 65%, white);
    box-shadow: 0 9px 30px color-mix(in srgb, var(--primary) 35%, transparent);
}
.brand-logo.tenant-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
.brand-ring {
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(139, 124, 255, 0.5);
    border-radius: 18px;
}
.user-area, .user-identity {
    display: flex;
    align-items: center;
}
.user-area {
    gap: 18px;
}
.user-identity {
    gap: 9px;
}
.user-identity strong {
    display: block;
    font-size: 12px;
}
.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    font-weight: 800;
}
.live-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bbf7d0;
    font-size: 12px;
}
.live-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}
.logout-button {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.07);
    color: white;
    cursor: pointer;
    transition: 0.2s ease;
}
.logout-button:hover {
    border-color: rgba(255,255,255,.42);
    background: rgba(255,255,255,.14);
}
.page {
    width: min(1180px, 92%);
    margin: 38px auto;
    animation: cardEntrance 0.55s ease both;
}
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    color: var(--text-light);
}
h1, h2, h3, p {
    overflow-wrap: anywhere;
}
h1 {
    margin: 7px 0 11px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
}
.eyebrow {
    margin: 0;
    color: #a5b4fc;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
}
.muted {
    color: var(--muted);
    line-height: 1.65;
}
.page-heading .muted {
    max-width: 740px;
    color: var(--muted-light);
}
.status-badge {
    border: 1px solid rgba(165, 180, 252, 0.25);
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(99, 102, 241, 0.16);
    color: #c7d2fe;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.metric-grid, .module-grid {
    display: grid;
    gap: 18px;
}
.metric-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 22px;
}
.module-grid {
    grid-template-columns: repeat(2, 1fr);
}
.metric-card, .module-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transition: transform .25s ease, box-shadow .25s ease;
}
.metric-card::before, .module-card::before {
    position: absolute;
    content: "";
    width: 100px;
    height: 100px;
    right: -45px;
    top: -45px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(109,93,252,.22), rgba(34,211,238,.08));
}
.metric-card:hover, .module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.38);
}
.metric-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 36px;
}
.module-card h2 {
    margin: 0 0 10px;
}
.module-card p {
    color: var(--muted);
    line-height: 1.6;
}
.pending, .ready {
    display: inline-block;
    margin-top: 8px;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
}
.pending {
    background: #fff7ed;
    color: #c2410c;
}
.ready {
    background: #ecfdf5;
    color: #047857;
}
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}
.login-shell {
    width: min(1120px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 28px;
    background: rgba(10, 13, 32, 0.67);
    box-shadow: 0 45px 130px rgba(0,0,0,.48);
    backdrop-filter: blur(24px);
    animation: cardEntrance .7s ease both;
}
.login-showcase {
    position: relative;
    overflow: hidden;
    padding: 58px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    background:
        linear-gradient(145deg, rgba(79,62,215,.38), rgba(8,145,178,.12)),
        rgba(13, 17, 42, 0.62);
}
.login-showcase::after {
    position: absolute;
    content: "";
    width: 350px;
    height: 350px;
    right: -170px;
    bottom: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236,72,153,.65), transparent 68%);
    animation: orbFloat 10s ease-in-out infinite alternate;
}
.showcase-content, .showcase-footer {
    position: relative;
    z-index: 2;
}
.showcase-badge {
    width: fit-content;
    padding: 9px 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 800;
}
.login-showcase h1 {
    max-width: 620px;
    margin-top: 40px;
    font-size: clamp(38px, 5vw, 64px);
}
.login-showcase h1 span {
    display: block;
    margin-top: 9px;
    background: linear-gradient(90deg, #c4b5fd, #67e8f9, #f9a8d4);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.login-showcase > .showcase-content > p {
    max-width: 570px;
    color: #bdc7df;
    line-height: 1.75;
}
.channel-list {
    margin-top: 34px;
    display: grid;
    gap: 13px;
}
.channel-item {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    background: rgba(255,255,255,.055);
    transition: transform .2s ease, background .2s ease;
}
.channel-item:hover {
    transform: translateX(7px);
    background: rgba(255,255,255,.1);
}
.channel-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    font-weight: 900;
}
.voice-channel .channel-icon {
    background: rgba(139,92,246,.2);
    color: #c4b5fd;
}
.whatsapp-channel .channel-icon {
    background: rgba(34,197,94,.18);
    color: #86efac;
}
.rcs-channel .channel-icon {
    background: rgba(34,211,238,.18);
    color: #67e8f9;
}
.channel-item strong, .channel-item small {
    display: block;
}
.channel-item strong {
    font-size: 13px;
}
.channel-item small {
    margin-top: 4px;
    color: #9faac2;
    font-size: 11px;
}
.showcase-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.showcase-footer span {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 999px;
    color: #bdc7df;
    font-size: 10px;
}
.login-panel {
    padding: 50px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.96);
}
.login-card {
    width: min(380px, 100%);
}
.mobile-brand {
    display: none;
}
.login-card h2 {
    margin: 7px 0;
    color: #111827;
    font-size: 34px;
}
.field-group {
    display: grid;
    gap: 8px;
}
.login-form {
    margin-top: 25px;
    display: grid;
    gap: 18px;
}
.login-form label {
    color: #273047;
    font-size: 12px;
    font-weight: 800;
}
.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.label-row span {
    color: #98a2b3;
    font-size: 10px;
}
.input-shell {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--primary);
    font-weight: 900;
}
.input-shell input {
    width: 100%;
    height: 50px;
    padding: 0 15px 0 42px;
    border: 1px solid #d8deea;
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    color: #111827;
    transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}
.input-shell input:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(109,93,252,.11);
}
.primary-login-button {
    height: 52px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), #06b6d4);
    background-size: 180% auto;
    color: white;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(79, 62, 215, 0.27);
    transition: transform .2s ease, background-position .35s ease;
}
.primary-login-button:hover {
    transform: translateY(-2px);
    background-position: right center;
}
.button-arrow {
    font-size: 21px;
}
.error-box {
    margin-top: 18px;
    padding: 12px;
    display: flex;
    gap: 11px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
}
.error-box > span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fee2e2;
    font-weight: 900;
}
.error-box strong, .error-box p {
    display: block;
    margin: 0;
    font-size: 11px;
}
.error-box p {
    margin-top: 3px;
}
.login-security {
    margin-top: 22px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 12px;
    background: #f5f7ff;
}
.security-shield {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 900;
}
.login-security p {
    margin: 0;
    color: #667085;
    font-size: 10px;
    line-height: 1.55;
}
.login-footer {
    margin: 20px 0 0;
    color: #98a2b3;
    font-size: 10px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
@media (max-width: 900px) {
    .login-shell {
        width: min(500px, 100%);
        min-height: auto;
        grid-template-columns: 1fr;
    }
    .login-showcase {
        display: none;
    }
    .login-panel {
        min-height: 620px;
        padding: 34px;
    }
    .mobile-brand {
        margin-bottom: 32px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .metric-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .module-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 620px) {
    .login-page {
        padding: 14px;
    }
    .login-panel {
        padding: 26px 22px;
    }
    .metric-grid {
        grid-template-columns: 1fr;
    }
    .page-heading, .topbar, .user-area {
        align-items: flex-start;
        flex-direction: column;
    }
    .topbar {
        position: relative;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.primary-action, .secondary-action {
    min-height: 44px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}
.primary-action {
    border: 0;
    background: linear-gradient(
        90deg,
        var(--primary-dark),
        var(--primary),
        #06b6d4
    );
    color: white;
    box-shadow: 0 13px 30px rgba(79, 62, 215, .25);
}
.secondary-action {
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.08);
    color: white;
}
.data-panel, .form-panel {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 19px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    animation: cardEntrance .55s ease both;
}
.panel-heading {
    padding: 20px 23px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e7eaf0;
}
.panel-heading h2, .panel-heading p {
    margin: 0;
}
.panel-heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}
.panel-heading > span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 800;
}
.table-scroll {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f5;
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
}
.data-table th {
    background: #f8fafc;
    color: #667085;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.company-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 190px;
}
.company-cell strong, .company-cell small {
    display: block;
}
.company-cell small {
    margin-top: 4px;
    color: #98a2b3;
    font-size: 10px;
}
.company-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    color: white;
    font-weight: 900;
}
.type-badge, .status-pill {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}
.type-platform {
    background: #ede9fe;
    color: #6d28d9;
}
.type-reseller {
    background: #e0f2fe;
    color: #0369a1;
}
.type-client {
    background: #f1f5f9;
    color: #475569;
}
.status-active {
    background: #dcfce7;
    color: #15803d;
}
.status-suspended {
    background: #fee2e2;
    color: #b91c1c;
}
.status-trial {
    background: #ffedd5;
    color: #c2410c;
}
.table-action {
    padding: 7px 10px;
    border: 1px solid #d7ddea;
    border-radius: 8px;
    background: white;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}
.protected-label {
    color: #98a2b3;
    font-size: 10px;
}
.message-stack {
    margin-bottom: 18px;
}
.message-box {
    padding: 13px 15px;
    border-radius: 11px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
}
.message-box.error {
    background: #fef2f2;
    color: #b91c1c;
}
.form-panel {
    padding: 24px;
}
.form-section {
    padding: 22px 0;
    border-bottom: 1px solid #eaecf0;
}
.form-section:first-of-type {
    padding-top: 0;
}
.form-section-heading {
    margin-bottom: 18px;
    display: flex;
    gap: 13px;
}
.form-section-heading > span {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 900;
}
.form-section-heading h2,
.form-section-heading p {
    margin: 0;
}
.form-section-heading h2 {
    font-size: 17px;
}
.form-section-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 17px;
}
.form-field {
    display: grid;
    gap: 7px;
}
.form-field label {
    color: #344054;
    font-size: 11px;
    font-weight: 800;
}
.form-control {
    width: 100%;
    min-height: 45px;
    padding: 0 12px;
    border: 1px solid #d8deea;
    border-radius: 10px;
    outline: none;
    background: #f8fafc;
}
.form-control:focus {
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(109,93,252,.1);
}
.color-field .form-control {
    padding: 5px;
}
.checkbox-field {
    display: flex;
    align-items: center;
    align-self: end;
    min-height: 45px;
}
.checkbox-field .form-control {
    width: 17px;
    min-height: 17px;
    margin-right: 8px;
}
.errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #b91c1c;
    font-size: 10px;
}
.form-actions {
    padding-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 11px;
}
.form-actions .secondary-action {
    border-color: #d7ddea;
    color: #344054;
}
.module-actions {
    margin-top: 15px;
}
.module-actions a {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}
.empty-state {
    padding: 45px !important;
    color: #98a2b3;
    text-align: center !important;
}
@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }
}
