:root {
    color-scheme: light;
    --cl-primary: #7C3AED;
    --cl-primary-dark: #5B21B6;
    --cl-dark: #0F172A;
    --cl-border: #E2E8F0;
    --cl-bg: #F8FAFC;
    --cl-muted: #64748B;
    --cl-panel: #FFFFFF;
    --cl-soft: #F1F5F9;
    font-family: "Plus Jakarta Sans", Inter, Satoshi, "General Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    letter-spacing: 0;
    background: var(--cl-bg);
}

a,
button,
input,
select,
textarea {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
}

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

.shadow-soft {
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

.app-shell {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, .045), transparent 18rem),
        var(--cl-bg);
}

.app-sidebar {
    border-right: 1px solid var(--cl-border);
    background: rgba(255, 255, 255, .92);
}

.sidebar-brand-mark {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    border-radius: 1rem;
    background: var(--cl-dark);
    color: white;
    font-weight: 900;
}

.nav-link {
    position: relative;
    display: flex;
    min-height: 2.55rem;
    align-items: center;
    gap: .72rem;
    border-radius: .9rem;
    padding: .65rem .78rem;
    color: #475569;
    font-size: .875rem;
    font-weight: 760;
}

.nav-link svg {
    color: #94A3B8;
}

.nav-link:hover {
    background: #F1F5F9;
    color: var(--cl-dark);
}

.nav-link:hover svg,
.nav-link-active svg {
    color: currentColor;
}

.nav-link-active {
    background: #F5F3FF;
    color: var(--cl-primary);
}

.nav-link-active::before {
    content: "";
    position: absolute;
    left: -.45rem;
    top: 50%;
    width: .2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: var(--cl-primary);
    transform: translateY(-50%);
}

.mobile-nav {
    border: 1px solid rgba(226, 232, 240, .92);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

.mobile-nav-link {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .16rem;
    border-radius: .9rem;
    padding: .55rem .25rem;
    color: #64748B;
    font-size: .64rem;
    font-weight: 800;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
    background: #F5F3FF;
    color: var(--cl-primary);
}

.app-header {
    border-bottom: 1px solid rgba(226, 232, 240, .92);
    background: rgba(248, 250, 252, .86);
    backdrop-filter: blur(18px);
}

.panel,
.metric-card,
.phone-preview-card,
.surface-card {
    border: 1px solid var(--cl-border);
    border-radius: 1.35rem;
    background: var(--cl-panel);
}

.panel,
.phone-preview-card,
.surface-card {
    padding: 1.15rem;
}

.premium-panel {
    background: linear-gradient(180deg, #FFFFFF, #FCFCFD);
}

.section-kicker,
.eyebrow {
    color: var(--cl-primary);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.section-title {
    color: var(--cl-dark);
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    font-weight: 860;
    line-height: 1.08;
    letter-spacing: 0;
}

.section-copy {
    color: var(--cl-muted);
    font-size: .95rem;
    line-height: 1.7;
}

.metric-card {
    min-height: 10.75rem;
    padding: 1.1rem;
}

.metric-card span {
    display: block;
    color: var(--cl-muted);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-top: .72rem;
    color: var(--cl-dark);
    font-size: clamp(2rem, 6vw, 2.85rem);
    font-weight: 880;
    line-height: 1;
}

.metric-card i,
.metric-icon {
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    place-items: center;
    border: 1px solid #EDE9FE;
    border-radius: .95rem;
    background: #F5F3FF;
    color: var(--cl-primary);
    font-style: normal;
}

.metric-card p {
    margin-top: .7rem;
    color: var(--cl-muted);
    font-size: .82rem;
    font-weight: 650;
}

.metric-card p b {
    color: #059669;
    font-weight: 850;
}

.mini-chart {
    display: flex;
    height: 2.45rem;
    align-items: end;
    gap: .22rem;
    margin-top: 1rem;
}

.mini-chart i {
    flex: 1;
    min-width: .32rem;
    border-radius: 999px 999px .25rem .25rem;
    background: linear-gradient(180deg, rgba(124, 58, 237, .82), rgba(124, 58, 237, .2));
}

.form-input {
    margin-top: .5rem;
    width: 100%;
    border: 1px solid var(--cl-border);
    border-radius: .95rem;
    background: #FFFFFF;
    padding: .82rem .95rem;
    color: var(--cl-dark);
    outline: none;
}

.form-input::placeholder {
    color: #94A3B8;
}

.form-input:focus {
    border-color: var(--cl-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .1);
}

.file-input {
    margin-top: .5rem;
    width: 100%;
    border: 1px dashed #CBD5E1;
    border-radius: .95rem;
    background: #F8FAFC;
    padding: .85rem;
    color: #475569;
}

.btn-primary,
.btn-secondary,
.btn-light,
.btn-ghost-light,
.btn-muted {
    display: inline-flex;
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: 999px;
    padding: .72rem 1.05rem;
    font-size: .86rem;
    font-weight: 820;
    line-height: 1;
}

.btn-primary {
    border: 1px solid var(--cl-primary);
    background: var(--cl-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--cl-primary-dark);
    border-color: var(--cl-primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    border: 1px solid var(--cl-border);
    background: white;
    color: #334155;
}

.btn-secondary:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
    color: var(--cl-dark);
    transform: translateY(-1px);
}

.btn-light {
    border: 1px solid rgba(255, 255, 255, .28);
    background: white;
    color: var(--cl-dark);
}

.btn-ghost-light {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: white;
}

.btn-muted {
    border: 1px solid #EDE9FE;
    background: #F5F3FF;
    color: var(--cl-primary);
}

.btn-light:hover,
.btn-ghost-light:hover,
.btn-muted:hover,
.brand-action:hover,
.link-row:hover,
.setting-tile:hover,
.performance-row:hover,
.billing-row:hover,
.social-button:hover {
    transform: translateY(-1px);
}

.field-error {
    margin-top: .35rem;
    display: block;
    color: #E11D48;
    font-size: .78rem;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, .16);
    border-radius: 1.65rem;
    background:
        radial-gradient(circle at 84% 0%, rgba(124, 58, 237, .22), transparent 28%),
        linear-gradient(135deg, #111827, #0F172A 58%, #2E1065);
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, black, transparent 88%);
}

.profile-summary {
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, .08);
    padding: 1rem;
    color: white;
}

.profile-summary > div:last-child > div {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .07);
    padding: .8rem;
}

.profile-summary strong,
.profile-summary span {
    display: block;
}

.profile-summary strong {
    font-size: 1.28rem;
    font-weight: 860;
}

.profile-summary span {
    margin-top: .12rem;
    color: #CBD5E1;
    font-size: .7rem;
    font-weight: 750;
}

.profile-health-ring {
    background:
        radial-gradient(closest-side, white 77%, transparent 78% 100%),
        conic-gradient(var(--cl-primary) var(--score, 84%), #EDE9FE 0);
}

.tab-switcher {
    display: inline-flex;
    gap: .22rem;
    overflow-x: auto;
    border: 1px solid var(--cl-border);
    border-radius: 999px;
    background: #F8FAFC;
    padding: .25rem;
}

.tab-switcher button {
    min-height: 2.25rem;
    white-space: nowrap;
    border-radius: 999px;
    padding: .52rem .9rem;
    color: #64748B;
    font-size: .8rem;
    font-weight: 820;
}

.tab-switcher button:hover,
.tab-switcher .tab-active {
    background: var(--cl-dark);
    color: white;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: .78rem;
}

.brand-action,
.social-button,
.profile-action,
.profile-link-card {
    display: flex;
    align-items: center;
    gap: .72rem;
    border-radius: 1.05rem;
    color: white;
}

.brand-action {
    min-height: 4.3rem;
    padding: .88rem .96rem;
}

.social-button,
.profile-action,
.profile-link-card {
    min-height: 3.35rem;
    padding: .85rem .95rem;
}

.brand-action span,
.social-button span,
.link-icon,
.performance-row > span,
.social-mini-row span,
.profile-social {
    display: grid;
    place-items: center;
    flex: none;
}

.brand-action span,
.social-button span {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .18);
}

.brand-action strong,
.social-button strong,
.profile-action span,
.profile-link-card span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 850;
}

.brand-action small,
.social-button small {
    display: block;
    margin-top: .12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, .78);
    font-size: .68rem;
    font-weight: 700;
}

.link-stack {
    display: grid;
    gap: .78rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px dashed #CBD5E1;
    border-radius: 1.2rem;
    background: #F8FAFC;
    padding: 1rem;
}

.link-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: .8rem;
    border: 1px solid var(--cl-border);
    border-radius: 1.05rem;
    background: white;
    padding: .78rem;
}

.drag-handle {
    color: #94A3B8;
}

.link-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .95rem;
    color: white;
}

.link-row h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cl-dark);
    font-size: .92rem;
    font-weight: 840;
}

.link-row p {
    margin-top: .14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cl-muted);
    font-size: .76rem;
    font-weight: 620;
}

.status-pill,
.click-pill,
.soft-pill {
    justify-self: start;
    border-radius: 999px;
    padding: .36rem .62rem;
    font-size: .68rem;
    font-weight: 830;
}

.status-live {
    background: #ECFDF5;
    color: #047857;
}

.status-draft {
    background: #F1F5F9;
    color: #64748B;
}

.click-pill,
.soft-pill {
    background: #F8FAFC;
    color: #475569;
}

.icon-button {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid var(--cl-border);
    border-radius: 999px;
    background: white;
    color: #64748B;
}

.icon-button:hover {
    border-color: #CBD5E1;
    background: #F8FAFC;
    color: var(--cl-dark);
    transform: translateY(-1px);
}

.icon-button.danger:hover {
    border-color: #FECDD3;
    background: #FFF1F2;
    color: #E11D48;
}

.setting-tile {
    border: 1px solid var(--cl-border);
    border-radius: 1.05rem;
    background: white;
    padding: 1rem;
    color: var(--cl-dark);
}

.setting-tile svg {
    color: var(--cl-primary);
}

.setting-tile strong,
.setting-tile span {
    display: block;
}

.setting-tile strong {
    margin-top: .8rem;
    font-size: .93rem;
    font-weight: 840;
}

.setting-tile span {
    margin-top: .25rem;
    color: var(--cl-muted);
    font-size: .8rem;
    font-weight: 650;
}

.chart-card {
    min-height: 17rem;
    border: 1px solid #1E293B;
    border-radius: 1.2rem;
    background: var(--cl-dark);
    padding: 1rem;
    color: white;
}

.chart-card h3 {
    font-weight: 850;
}

.chart-card span {
    color: #94A3B8;
    font-size: .78rem;
    font-weight: 760;
}

.chart-bars {
    display: flex;
    height: 12rem;
    align-items: end;
    gap: .58rem;
    padding-top: 1.5rem;
}

.chart-bars i {
    flex: 1;
    border-radius: 999px 999px .38rem .38rem;
    background: linear-gradient(180deg, #A78BFA, #7C3AED);
}

.country-row,
.performance-row,
.activity-row,
.billing-row {
    display: flex;
    align-items: center;
    gap: .78rem;
    border: 1px solid var(--cl-border);
    border-radius: 1rem;
    background: white;
    padding: .82rem;
}

.country-row strong {
    margin-left: auto;
    color: var(--cl-primary);
    font-size: .86rem;
    font-weight: 850;
}

.performance-row > span {
    width: 2.22rem;
    height: 2.22rem;
    border-radius: .82rem;
    color: white;
}

.performance-row strong,
.billing-row strong {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--cl-dark);
    font-size: .85rem;
    font-weight: 840;
}

.performance-row em,
.billing-row em {
    color: var(--cl-muted);
    font-size: .78rem;
    font-style: normal;
    font-weight: 760;
}

.pulse-dot {
    width: .62rem;
    height: .62rem;
    border-radius: 999px;
    background: #10B981;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, .12);
}

.activity-row {
    align-items: flex-start;
}

.activity-row > span {
    margin-top: .25rem;
    width: .55rem;
    height: .55rem;
    flex: none;
    border-radius: 999px;
    background: var(--cl-primary);
}

.activity-row strong {
    display: block;
    color: var(--cl-dark);
    font-size: .86rem;
    font-weight: 840;
}

.activity-row p {
    margin-top: .14rem;
    color: var(--cl-muted);
    font-size: .78rem;
    font-weight: 620;
}

.billing-card {
    border: 1px solid #DDD6FE;
    border-radius: 1.35rem;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, .09), transparent 46%),
        white;
    padding: 1.15rem;
}

.pesapal-mark {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid #DDD6FE;
    border-radius: 999px;
    background: #F5F3FF;
    padding: .38rem .62rem;
    color: var(--cl-primary);
    font-size: .72rem;
    font-weight: 850;
}

.phone-preview-card {
    background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
}

.phone-shell {
    position: relative;
    margin-inline: auto;
    width: min(100%, 20.8rem);
    border: 1px solid #111827;
    border-radius: 2.65rem;
    background: #0B1120;
    padding: .58rem;
}

.phone-shell::before {
    content: "";
    position: absolute;
    left: 50%;
    top: .58rem;
    z-index: 3;
    width: 5.1rem;
    height: 1.15rem;
    border-radius: 999px;
    background: #020617;
    transform: translateX(-50%);
}

.phone-screen {
    overflow: hidden;
    min-height: 39.5rem;
    border-radius: 2.08rem;
    background: #F8FAFC;
    color: var(--cl-dark);
}

.phone-top {
    display: flex;
    height: 2.45rem;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
    padding: 0 1.05rem;
    color: #0F172A;
    font-size: .7rem;
    font-weight: 850;
}

.phone-scroll {
    height: 37rem;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.phone-scroll::-webkit-scrollbar {
    display: none;
}

.preview-cover {
    height: 8.1rem;
    background-size: cover;
    background-position: center;
}

.preview-body {
    padding: 0 1rem 1.1rem;
}

.preview-logo {
    display: grid;
    width: 5.35rem;
    height: 5.35rem;
    margin: -2.65rem auto 0;
    place-items: center;
    overflow: hidden;
    border: 4px solid white;
    border-radius: 1.55rem;
    background: white;
    color: var(--cl-dark);
    font-size: 1.8rem;
    font-weight: 880;
}

.preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-body h3 {
    margin-top: .78rem;
    text-align: center;
    color: var(--cl-dark);
    font-size: 1.08rem;
    font-weight: 880;
}

.preview-body p {
    margin: .34rem auto 0;
    max-width: 16rem;
    text-align: center;
    color: var(--cl-muted);
    font-size: .73rem;
    line-height: 1.52;
    font-weight: 620;
}

.social-mini-row {
    display: flex;
    justify-content: center;
    gap: .42rem;
    margin-top: .84rem;
}

.social-mini-row span,
.social-mini-row a,
.profile-social {
    display: grid;
    place-items: center;
    width: 1.95rem;
    height: 1.95rem;
    border-radius: 999px;
    color: white;
}

.preview-qr {
    display: flex;
    align-items: center;
    gap: .68rem;
    border: 1px solid var(--cl-border);
    border-radius: 1rem;
    background: white;
    margin-top: .92rem;
    padding: .7rem;
}

.preview-qr img {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: .75rem;
    background: white;
}

.preview-qr strong {
    display: block;
    color: var(--cl-dark);
    font-size: .78rem;
    font-weight: 850;
}

.preview-qr span {
    display: block;
    margin-top: .12rem;
    color: var(--cl-muted);
    font-size: .66rem;
    font-weight: 650;
}

.preview-links {
    display: grid;
    gap: .62rem;
    margin-top: .92rem;
}

.preview-links span,
.preview-links a {
    display: flex;
    min-height: 2.92rem;
    align-items: center;
    gap: .62rem;
    border-radius: .95rem;
    padding: .72rem .8rem;
    color: white;
    font-size: .72rem;
    font-weight: 830;
}

.preview-links a:hover {
    transform: translateY(-1px);
}

.preview-links b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-profile-shell {
    background:
        linear-gradient(180deg, rgba(124, 58, 237, .08), transparent 18rem),
        var(--profile-bg, #F8FAFC);
}

.public-profile-card {
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 1.6rem;
    background: rgba(255, 255, 255, .94);
    overflow: hidden;
}

.public-cover {
    height: 10.5rem;
    background-size: cover;
    background-position: center;
}

.public-avatar {
    display: grid;
    width: 6rem;
    height: 6rem;
    margin: -3rem auto 0;
    place-items: center;
    overflow: hidden;
    border: 5px solid white;
    border-radius: 1.65rem;
    background: white;
    color: var(--cl-dark);
    font-size: 2rem;
    font-weight: 880;
}

.public-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-qr-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    border: 1px solid var(--cl-border);
    border-radius: 1.1rem;
    background: white;
    padding: .8rem;
}

.public-qr-card img {
    width: 6.5rem;
    height: 6.5rem;
    flex: none;
    border-radius: .85rem;
    background: white;
}

.public-contact-pills {
    display: grid;
    gap: .75rem;
}

.link-whatsapp {
    background: #25D366;
}

.link-linkedin {
    background: #0A66C2;
}

.link-instagram {
    background: linear-gradient(135deg, #F58529 0%, #DD2A7B 52%, #8134AF 100%);
}

.link-facebook {
    background: #1877F2;
}

.link-youtube {
    background: #FF0033;
}

.link-twitter {
    background: #0F172A;
}

.link-telegram {
    background: #229ED9;
}

.link-website {
    background: linear-gradient(135deg, #0F172A, #7C3AED);
}

.link-maps {
    background: linear-gradient(135deg, #4285F4, #34A853 45%, #FBBC05 70%, #EA4335);
}

.link-drive {
    background: linear-gradient(135deg, #0F9D58 0%, #0F9D58 33%, #4285F4 34%, #4285F4 65%, #F4B400 66%, #DB4437 100%);
}

.link-pdf {
    background: linear-gradient(135deg, #E11D48, #FB7185);
}

.link-email {
    background: linear-gradient(135deg, #475569, #0891B2);
}

.link-phone {
    background: linear-gradient(135deg, #059669, #0F766E);
}

.link-custom {
    background: linear-gradient(135deg, #334155, #64748B);
}

@media (max-width: 768px) {
    .panel,
    .metric-card,
    .phone-preview-card,
    .surface-card,
    .billing-card {
        border-radius: 1.15rem;
        padding: 1rem;
    }

    .hero-shell {
        border-radius: 1.25rem;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
    }

    .link-row {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: .72rem;
    }

    .link-row .drag-handle,
    .link-row .click-pill {
        display: none;
    }

    .link-row .link-icon {
        grid-column: 1;
    }

    .status-pill {
        grid-column: 2 / 3;
    }

    .phone-shell {
        width: min(100%, 19rem);
    }

    .phone-screen {
        min-height: 36.5rem;
    }

    .phone-scroll {
        height: 34rem;
    }
}
