:root {
    --codeef-purple: #8c3fd9;
    --codeef-purple-2: #a960ee;
    --codeef-purple-soft: #f2e9fb;
    --codeef-black: #0b0a0f;
    --codeef-dark: #15121c;
    --codeef-text: #211c2a;
    --codeef-muted: #777181;
    --codeef-border: #e9e4ed;
    --codeef-bg: #f7f5f9;
    --codeef-surface: #ffffff;
    --codeef-radius: 22px;
    --codeef-shadow: 0 18px 55px rgba(30, 20, 42, .08);
    --sidebar-width: 86px;
    --sidebar-expanded-width: 250px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    color: var(--codeef-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--codeef-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--codeef-purple); }
a:hover { color: #6f28af; }

.app-shell { min-height: 100vh; }
.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 18px 12px;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(circle at 10% 10%, rgba(140, 63, 217, .35), transparent 30%),
        linear-gradient(180deg, #0b0a0f, #17121e 70%, #0d0b11);
}
.app-brand { display: block; width: 58px; padding: 4px 2px 16px; overflow: hidden; }
.app-brand img { display: block; width: 215px; max-width: none; height: auto; transition: width .2s ease; }
.sidebar-expanded .app-brand { width: 100%; padding-inline: 7px; }
.sidebar-toggle { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 13px; color: #bcb6c5; background: rgba(255,255,255,.035); font-size: .78rem; font-weight: 800; }
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-toggle span { display: none; white-space: nowrap; }
.sidebar-expanded .sidebar-toggle { justify-content: flex-start; }
.sidebar-expanded .sidebar-toggle span { display: inline; }
.sidebar-label {
    display: none;
    margin: 12px 12px 8px;
    color: #85808e;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.sidebar-expanded .sidebar-label { display: block; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    justify-content: center;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 15px;
    color: #c9c4cf;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: .18s ease;
}
.sidebar-link span { display: none; white-space: nowrap; }
.sidebar-expanded .sidebar-link { justify-content: flex-start; }
.sidebar-expanded .sidebar-link span { display: inline; }
.sidebar-link i { width: 21px; color: #8f8998; font-size: 1.1rem; text-align: center; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.sidebar-link.active {
    border-color: rgba(169, 96, 238, .28);
    color: #fff;
    background: linear-gradient(135deg, rgba(140,63,217,.28), rgba(140,63,217,.1));
}
.sidebar-link.active i { color: var(--codeef-purple-2); }
.sidebar-spacer { flex: 1; }
.sidebar-user {
    margin-top: 22px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.04);
}
.sidebar-user-name { color: #fff; font-size: .88rem; font-weight: 800; }
.sidebar-user-email { margin-top: 2px; overflow: hidden; color: #8f8998; font-size: .75rem; text-overflow: ellipsis; }
.sidebar-logout { margin-top: 12px; }
.sidebar-logout .btn { width: 100%; border-color: rgba(255,255,255,.1); color: #c9c4cf; }
.sidebar-logout .btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar-user-name { display: flex; min-width: 0; align-items: center; gap: 7px; }
.sidebar-user-avatar { flex: 0 0 auto; font-size: 1.05rem; }
.app-sidebar-desktop .sidebar-user { padding: 9px; text-align: center; }
.app-sidebar-desktop .sidebar-user-name { justify-content: center; }
.app-sidebar-desktop .sidebar-user-name span,
.app-sidebar-desktop .sidebar-user-email,
.app-sidebar-desktop .sidebar-plan,
.app-sidebar-desktop .sidebar-logout .btn span { display: none; }
.app-sidebar-desktop .sidebar-logout .btn { min-height: 36px; padding: 7px; }
.app-sidebar-desktop .sidebar-logout .btn i { margin: 0 !important; font-size: 1rem; }
.sidebar-expanded .app-sidebar-desktop .sidebar-user { padding: 14px; text-align: left; }
.sidebar-expanded .app-sidebar-desktop .sidebar-user-name { justify-content: flex-start; }
.sidebar-expanded .app-sidebar-desktop .sidebar-user-name span,
.sidebar-expanded .app-sidebar-desktop .sidebar-user-email,
.sidebar-expanded .app-sidebar-desktop .sidebar-plan,
.sidebar-expanded .app-sidebar-desktop .sidebar-logout .btn span { display: inline; }
.sidebar-expanded .app-sidebar-desktop .sidebar-user-email { display: block; }

.app-main { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .2s ease; }
.sidebar-expanded .app-sidebar-desktop { width: var(--sidebar-expanded-width); }
.sidebar-expanded .app-main { margin-left: var(--sidebar-expanded-width); }
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px clamp(18px, 4vw, 48px);
    border-bottom: 1px solid rgba(231, 225, 235, .78);
    background: rgba(247, 245, 249, .9);
    backdrop-filter: blur(18px);
}
.topbar-title { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 900; letter-spacing: -.035em; }
.topbar-subtitle { margin-top: 3px; color: var(--codeef-muted); font-size: .78rem; }
.app-content { padding: 28px clamp(18px, 4vw, 48px) 50px; }
.mobile-brand { width: 150px; }

.card-codeef {
    border: 1px solid var(--codeef-border);
    border-radius: var(--codeef-radius);
    background: var(--codeef-surface);
    box-shadow: var(--codeef-shadow);
}
.card-codeef .card-header {
    padding: 20px 22px 0;
    border: 0;
    background: transparent;
}
.card-codeef .card-body { padding: 22px; }
.card-codeef .card-footer { padding: 0 22px 22px; border: 0; background: transparent; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h2 { margin: 0; font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 900; letter-spacing: -.045em; }
.page-heading p { max-width: 720px; margin: 7px 0 0; color: var(--codeef-muted); line-height: 1.55; }

.btn-codeef {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--codeef-purple);
    --bs-btn-border-color: var(--codeef-purple);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #762fba;
    --bs-btn-hover-border-color: #762fba;
    --bs-btn-active-bg: #6725a5;
    --bs-btn-active-border-color: #6725a5;
    min-height: 43px;
    padding-inline: 18px;
    border-radius: 13px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(140, 63, 217, .22);
}
.btn-soft-purple {
    min-height: 42px;
    padding-inline: 16px;
    border: 1px solid #e5d2f6;
    border-radius: 13px;
    color: #6f28af;
    background: var(--codeef-purple-soft);
    font-weight: 800;
}
.btn-soft-purple:hover { color: #591e91; border-color: #d5b5f1; background: #eadcf8; }
.btn-light-codeef { min-height: 42px; border: 1px solid var(--codeef-border); border-radius: 13px; background: #fff; font-weight: 750; }
.btn-light-codeef:hover { border-color: #d3c8dc; background: #faf8fc; }
.qr-code-modal-content { overflow: hidden; border-radius: 22px; }
.qr-code-preview { display: grid; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; padding: 14px; place-items: center; border: 1px solid var(--codeef-border); border-radius: 18px; background: #fff; }
.qr-code-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }

.codeef-notifications { position: fixed; right: 22px; bottom: 22px; z-index: 1090; display: grid; gap: 10px; width: min(92vw, 420px); }
.codeef-toast { display: flex; align-items: flex-start; gap: 11px; padding: 14px 15px; border: 1px solid; border-radius: 16px; color: var(--codeef-text); background: #fff; box-shadow: 0 18px 45px rgba(30, 20, 42, .16); animation: codeef-toast-in .2s ease-out; }
.codeef-toast > i { margin-top: 2px; font-size: 1.05rem; }
.codeef-toast span { flex: 1; font-size: .82rem; font-weight: 700; line-height: 1.45; }
.codeef-toast--error { border-color: #f0c7cc; background: #fff8f8; }
.codeef-toast--error > i { color: #c0394b; }
.codeef-toast--success { border-color: #bfe7d2; background: #f5fff9; }
.codeef-toast--success > i { color: #16804d; }
.codeef-toast--info { border-color: #c8dff1; background: #f6fbff; }
.codeef-toast--info > i { color: #2474a6; }
.codeef-toast-close { flex: 0 0 auto; padding: 2px; border: 0; color: var(--codeef-muted); background: transparent; }
.codeef-toast-close:hover { color: var(--codeef-text); }
.codeef-confirm-backdrop { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 20px; background: rgba(16, 12, 22, .52); backdrop-filter: blur(4px); animation: codeef-fade-in .15s ease-out; }
.codeef-confirm { width: min(100%, 430px); padding: 26px; border: 1px solid var(--codeef-border); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(25, 17, 34, .24); }
.codeef-confirm-icon { display: grid; width: 42px; height: 42px; margin-bottom: 15px; place-items: center; border-radius: 13px; color: var(--codeef-purple); background: var(--codeef-purple-soft); }
.codeef-confirm h2 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.codeef-confirm p { margin: 9px 0 22px; color: var(--codeef-muted); font-size: .84rem; line-height: 1.5; }
.codeef-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; }
@keyframes codeef-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes codeef-fade-in { from { opacity: 0; } to { opacity: 1; } }

.stat-card { position: relative; min-height: 142px; padding: 22px; overflow: hidden; }
.stat-card::after {
    position: absolute;
    right: -30px;
    bottom: -45px;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: rgba(140,63,217,.07);
    content: "";
}
.stat-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--codeef-purple);
    background: var(--codeef-purple-soft);
    font-size: 1.15rem;
}
.stat-value { margin-top: 18px; font-size: 1.85rem; font-weight: 900; letter-spacing: -.05em; }
.stat-label { color: var(--codeef-muted); font-size: .8rem; font-weight: 700; }

.site-card { position: relative; overflow: hidden; }
.site-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--codeef-purple), var(--codeef-purple-2)); content: ""; }
.site-card-title { margin: 0; font-size: 1.1rem; font-weight: 900; letter-spacing: -.025em; }
.site-card-url { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--codeef-purple); font-size: .79rem; font-weight: 750; text-decoration: none; }
.site-card-meta { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 17px; color: var(--codeef-muted); font-size: .77rem; }
.site-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: .69rem; font-weight: 850; }
.status-badge::before { width: 7px; height: 7px; border-radius: 50%; content: ""; }
.status-published { color: #157347; background: #e6f7ef; }
.status-published::before { background: #20a669; }
.status-draft { color: #8a6400; background: #fff6d7; }
.status-draft::before { background: #dca900; }
.status-inactive { color: #7e2730; background: #fdebed; }
.status-inactive::before { background: #d34c5a; }
.site-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.site-actions .btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border-radius: 11px; font-size: .78rem; font-weight: 750; }

.form-label { margin-bottom: 7px; color: #39313f; font-size: .8rem; font-weight: 800; }
.required-mark { color: var(--codeef-purple); }
.form-control, .form-select {
    min-height: 47px;
    border-color: #ddd6e3;
    border-radius: 13px;
    color: var(--codeef-text);
    background-color: #fff;
}
textarea.form-control { min-height: 105px; }
.form-control:focus, .form-select:focus {
    border-color: #b47bea;
    box-shadow: 0 0 0 .22rem rgba(140,63,217,.12);
}
.form-hint { margin-top: 6px; color: var(--codeef-muted); font-size: .72rem; line-height: 1.45; }
.input-group-text { border-color: #ddd6e3; border-radius: 13px 0 0 13px; color: #7c7484; background: #f8f6fa; font-size: .8rem; }
.invalid-feedback { font-size: .73rem; font-weight: 650; }
.form-section-title { margin: 0 0 6px; font-size: 1.08rem; font-weight: 900; letter-spacing: -.025em; }
.form-section-description { margin: 0 0 20px; color: var(--codeef-muted); font-size: .82rem; }
.divider { height: 1px; margin: 25px 0; background: var(--codeef-border); }

.photo-uploader {
    display: grid;
    min-height: 285px;
    place-items: center;
    padding: 24px;
    border: 1.5px dashed #cbbfd4;
    border-radius: 22px;
    background: linear-gradient(145deg, #fbf9fd, #f4eff8);
    text-align: center;
}
.photo-preview {
    width: 148px;
    height: 148px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 32px;
    background: #ebe5f0;
    box-shadow: 0 13px 30px rgba(39,24,52,.14);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: #a496af; font-size: 2rem; }

.slug-feedback { display: flex; align-items: center; gap: 7px; min-height: 22px; margin-top: 6px; font-size: .73rem; font-weight: 700; }
.slug-feedback.available { color: #198754; }
.slug-feedback.unavailable { color: #c0394b; }
.slug-feedback.checking { color: #766b7f; }
.slug-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.slug-suggestion { padding: 5px 9px; border: 1px solid #dfcee9; border-radius: 999px; color: #6f28af; background: #faf5fe; font-size: .7rem; font-weight: 750; cursor: pointer; }

.table-codeef { margin: 0; }
.table-codeef > :not(caption) > * > * { padding: 14px 16px; border-bottom-color: #eee9f1; vertical-align: middle; }
.table-codeef thead th { color: #817987; font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; background: #fbfafc; }
.table-codeef tbody td { font-size: .82rem; }
.uuid-code { display: inline-block; max-width: 220px; overflow: hidden; color: #7c7382; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; text-overflow: ellipsis; vertical-align: middle; }

.empty-state { padding: 55px 25px; text-align: center; }
.empty-state-icon { display: grid; width: 74px; height: 74px; margin: 0 auto 18px; place-items: center; border-radius: 24px; color: var(--codeef-purple); background: var(--codeef-purple-soft); font-size: 1.8rem; }
.empty-state h3 { margin: 0; font-size: 1.25rem; font-weight: 900; }
.empty-state p { max-width: 500px; margin: 9px auto 20px; color: var(--codeef-muted); }

.alert-codeef { border: 0; border-left: 4px solid; border-radius: 14px; box-shadow: 0 8px 25px rgba(29,20,38,.05); }
.alert-codeef.alert-success { border-left-color: #2aa86f; }
.alert-codeef.alert-danger { border-left-color: #d74f61; }

.auth-page {
    min-height: 100vh;
    color: #fff;
    background:
        radial-gradient(circle at 14% 12%, rgba(140,63,217,.42), transparent 28%),
        radial-gradient(circle at 84% 80%, rgba(90,32,145,.28), transparent 30%),
        #09080c;
}
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.1fr) minmax(410px, .9fr); }
.auth-showcase { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(35px, 6vw, 80px); }
.auth-showcase-logo { width: 240px; max-width: 70%; }
.auth-showcase-copy { max-width: 650px; }
.auth-kicker { color: var(--codeef-purple-2); font-size: .74rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.auth-showcase h1 { margin: 15px 0 18px; font-size: clamp(2.4rem, 5.4vw, 5.2rem); font-weight: 950; line-height: .95; letter-spacing: -.065em; }
.auth-showcase p { max-width: 560px; color: #aaa4b0; font-size: clamp(.95rem, 1.5vw, 1.1rem); line-height: 1.7; }
.auth-feature-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.auth-feature { padding: 9px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: #c7c1cb; background: rgba(255,255,255,.035); font-size: .75rem; font-weight: 750; }
.auth-panel { display: grid; place-items: center; min-height: 100vh; padding: 25px; border-left: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.025); backdrop-filter: blur(20px); }
.auth-card { width: min(100%, 450px); padding: clamp(28px, 5vw, 46px); border: 1px solid rgba(255,255,255,.1); border-radius: 30px; background: rgba(20,16,27,.86); box-shadow: 0 35px 100px rgba(0,0,0,.35); }
.auth-card h2 { margin: 0; font-size: 1.8rem; font-weight: 900; letter-spacing: -.04em; }
.auth-card > p { margin: 8px 0 26px; color: #918a99; }
.auth-card .form-label { color: #d7d1dc; }
.auth-card .form-control { border-color: rgba(255,255,255,.11); color: #fff; background: rgba(255,255,255,.055); }
.auth-card .form-control::placeholder { color: #6f6974; }
.auth-card .form-control:focus { border-color: var(--codeef-purple); background: rgba(255,255,255,.075); }
.auth-footnote { margin-top: 22px; color: #716a78; font-size: .72rem; text-align: center; }

.modal-content { border: 1px solid var(--codeef-border); border-radius: 24px; box-shadow: 0 30px 90px rgba(25,17,34,.22); }
.modal-header, .modal-footer { border-color: var(--codeef-border); }
.modal-title { font-weight: 900; letter-spacing: -.025em; }

.crop-stage { display: grid; min-height: 430px; place-items: center; overflow: hidden; border-radius: 18px; background: #100e15; }
.crop-stage canvas { display: block; max-width: 100%; height: auto; touch-action: none; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.crop-controls i { color: var(--codeef-purple); }
.crop-controls input { flex: 1; }

@media (max-width: 991.98px) {
    .app-sidebar { position: static; width: 100%; min-height: 100%; }
    .app-sidebar .sidebar-label { display: block; }
    .app-sidebar .sidebar-link { justify-content: flex-start; }
    .app-sidebar .sidebar-link span { display: inline; }
    .app-main, .sidebar-expanded .app-main { margin-left: 0; }
    .app-topbar { min-height: 68px; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-showcase { display: none; }
    .auth-panel { border-left: 0; }
}
@media (max-width: 575.98px) {
    .app-content { padding-top: 20px; }
    .page-heading { flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .site-actions .btn { flex: 1 1 auto; }
    .card-codeef .card-body { padding: 18px; }
    .crop-stage { min-height: 320px; }
}

/* Autenticacao publica, cadastro e recuperacao */
.auth-card-register { width: min(100%, 560px); }
.btn-google {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 13px;
    color: #201b27;
    background: #fff;
    font-weight: 850;
    box-shadow: 0 10px 30px rgba(0,0,0,.16);
}
.btn-google:hover { color: #201b27; border-color: #fff; background: #f7f4f9; }
.google-mark {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #4285f4;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
}
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 21px 0; color: #77707d; font-size: .7rem; font-weight: 750; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: rgba(255,255,255,.1); content: ""; }
.auth-inline-link { margin-bottom: 7px; color: #b985ea; font-size: .72rem; font-weight: 750; text-decoration: none; }
.auth-inline-link:hover { color: #d2adf4; }
.auth-switch { margin-top: 22px; color: #8f8796; font-size: .8rem; text-align: center; }
.auth-switch a { color: #c18df0; font-weight: 850; text-decoration: none; }
.auth-switch a:hover { color: #dfc2f8; }
.auth-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 15px;
    color: #d9b8f6;
    background: rgba(140,63,217,.22);
    font-size: 1.2rem;
}
.auth-icon-danger { color: #ffb8c1; background: rgba(215,79,97,.17); }
.auth-card .invalid-feedback, .auth-card .text-danger { color: #ff9fad !important; }
.auth-shell-compact .auth-showcase-copy { max-width: 560px; }
.auth-shell-compact .auth-showcase h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); }

/* Planos, permissoes e conta */
.plan-badge,
.sidebar-plan,
.topbar-plan-pill,
.designer-plan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid #e2d9e8;
    border-radius: 999px;
    color: #69606f;
    background: #f6f3f8;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.plan-badge-pro,
.sidebar-plan.is-pro,
.topbar-plan-pill.is-pro,
.designer-plan-badge.is-pro {
    border-color: rgba(140, 63, 217, .28);
    color: #6d23aa;
    background: #f1e5fb;
}
.topbar-plan-pill { min-height: 38px; padding-inline: 13px; text-decoration: none; }
.topbar-plan-pill:hover { color: #5c1c94; border-color: #cda9e9; background: #ead9f8; }
.sidebar-plan { border-color: rgba(255,255,255,.12); color: #c9c1ce; background: rgba(255,255,255,.07); }
.sidebar-plan.is-pro { border-color: rgba(190,133,242,.3); color: #dfbef9; background: rgba(140,63,217,.2); }

.plan-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #dfc8f2;
    border-radius: 20px;
    background: linear-gradient(120deg, #fbf7fe, #f2e8fa);
    box-shadow: 0 14px 38px rgba(79,39,111,.08);
}
.plan-notice-icon,
.plan-lock-icon {
    display: grid;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--codeef-purple), #6f28af);
    box-shadow: 0 11px 24px rgba(140,63,217,.22);
}
.plan-notice strong { display: block; font-size: .92rem; font-weight: 900; }
.plan-notice p { margin: 4px 0 0; color: var(--codeef-muted); font-size: .79rem; line-height: 1.5; }
.stat-card-locked { display: flex; flex-direction: row; align-items: center; gap: 16px; color: inherit; }
.stat-card-locked .stat-icon { flex: 0 0 auto; }
.stat-card-locked .stat-label { color: var(--codeef-text); font-size: .9rem; font-weight: 900; }
.stat-locked-copy { margin-top: 4px; color: var(--codeef-muted); font-size: .75rem; line-height: 1.45; }

.plan-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--codeef-purple); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.plan-lock-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 19px;
    border: 1px solid #e2cff2;
    border-radius: 18px;
    background: #faf6fd;
}
.plan-lock-notice strong,
.plan-lock-notice span { display: block; }
.plan-lock-notice strong { font-size: .88rem; font-weight: 900; }
.plan-lock-notice span { margin-top: 3px; color: var(--codeef-muted); font-size: .76rem; }
.plan-card {
    position: relative;
    padding: clamp(24px, 4vw, 34px);
    overflow: hidden;
    border: 1px solid var(--codeef-border);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--codeef-shadow);
}
.plan-card.is-current { border-color: #b987e5; box-shadow: 0 18px 50px rgba(91,43,128,.14); }
.plan-card-pro { color: #fff; border-color: rgba(255,255,255,.08); background: linear-gradient(145deg, #16111d, #0b090f); }
.plan-card-pro::after { position: absolute; width: 250px; height: 250px; right: -100px; top: -120px; border-radius: 50%; background: rgba(140,63,217,.28); filter: blur(8px); content: ""; }
.plan-card-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.plan-name { color: var(--codeef-purple); font-size: .74rem; font-weight: 950; letter-spacing: .09em; text-transform: uppercase; }
.plan-card-pro .plan-name { color: #c997ef; }
.plan-card h3 { margin: 8px 0 0; font-size: 1.55rem; font-weight: 950; letter-spacing: -.045em; }
.plan-card > p { position: relative; z-index: 1; margin: 16px 0 22px; color: var(--codeef-muted); font-size: .85rem; line-height: 1.6; }
.plan-card-pro > p { color: #a9a2ae; }
.plan-current,
.plan-highlight { position: relative; z-index: 1; padding: 6px 10px; border-radius: 999px; font-size: .65rem; font-weight: 900; }
.plan-current { color: #5f1a98; background: #ead9f8; }
.plan-card-pro .plan-current { color: #f0ddff; background: rgba(140,63,217,.28); }
.plan-highlight { color: #24162e; background: #dcb7f9; }
.plan-feature-list { position: relative; z-index: 1; display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.plan-feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .82rem; line-height: 1.45; }
.plan-feature-list i { margin-top: 1px; color: #299d68; }
.plan-feature-list .is-disabled { color: #9991a0; }
.plan-feature-list .is-disabled i { color: #baafbF; }
.plan-card-pro .plan-feature-list i { color: #c18af0; }
.plan-card-pro .form-hint { color: #91899a; }

.plan-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-choice {
    position: relative;
    display: grid;
    min-height: 132px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
    padding: 17px;
    border: 1px solid #ded6e4;
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s, background .18s;
}
.plan-choice:hover { transform: translateY(-1px); border-color: #c8a5e4; }
.plan-choice.is-selected { border-color: var(--codeef-purple); box-shadow: 0 0 0 3px rgba(140,63,217,.1); background: #fbf7fe; }
.plan-choice input { position: absolute; opacity: 0; pointer-events: none; }
.plan-choice-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--codeef-purple); background: var(--codeef-purple-soft); }
.plan-choice-content strong,
.plan-choice-content small { display: block; }
.plan-choice-content strong { font-size: .9rem; font-weight: 950; }
.plan-choice-content small { margin-top: 7px; color: var(--codeef-muted); font-size: .71rem; line-height: 1.5; }
.plan-choice-check { color: #c9becf; }
.plan-choice.is-selected .plan-choice-check { color: var(--codeef-purple); }
.account-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.account-meta-grid > div { min-width: 0; padding: 14px; border: 1px solid var(--codeef-border); border-radius: 15px; background: #faf8fb; }
.account-meta-grid span,
.account-meta-grid strong,
.account-meta-grid code { display: block; }
.account-meta-grid span { margin-bottom: 5px; color: var(--codeef-muted); font-size: .67rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.account-meta-grid strong,
.account-meta-grid code { overflow: hidden; color: var(--codeef-text); font-size: .74rem; font-weight: 850; text-overflow: ellipsis; }
.plan-badge.plan-pro { border-color: rgba(140, 63, 217, .28); color: #6d23aa; background: #f1e5fb; }
.alert-codeef.alert-info { border-left-color: #4e8dcc; }

@media (max-width: 767.98px) {
    .plan-notice { align-items: flex-start; flex-wrap: wrap; }
    .plan-notice .btn { width: 100%; }
    .plan-choice-grid { grid-template-columns: 1fr; }
    .account-meta-grid { grid-template-columns: 1fr; }
}
