/* creator.css -- Creator dashboard styles.
   Loaded by Platform.master via Site.xml for all creator panel pages.
   Public profile / profile viewer styles live in publicprofile.css (not in Site.xml).
*/

:root {
    --lb-primary: #4129e7;
    --lb-primary-soft: #EFEDFF;
    --lb-success: #1FAD66;
    --lb-danger: #E5484D;
    --lb-warning: #F4A300;
    --lb-text-primary: #161824;
    --lb-text-secondary: #6B6F80;
    --lb-text-tertiary: #9CA0AE;
    /*--lb-border: #E4E5EC;*/
    --lb-card-bg: #FFFFFF;
    --lb-app-bg: #F7F7FB;
    --lb-radius: 12px;
    --lb-radius-sm: 8px;
}

input[type="radio"],
input[type="checkbox"] {
    margin: 0 4px;
}

/* =========================================================
   UPGRADE BANNER (Free users -- Home page)
   ========================================================= */
.lb-upgrade-banner {
    background: linear-gradient(135deg, var(--lb-primary-soft) 0%, #f3f0ff 100%);
    border: 1px solid #d4cfff;
    border-radius: var(--lb-radius);
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    position: relative;
}

.lb-upgrade-close {
    position: absolute;
    top: 10px;
    background: transparent;
    border: none;
    color: var(--lb-text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    transition: color .15s, background .15s;
}

html[dir="ltr"] .lb-upgrade-close {
    right: 10px;
}

html[dir="rtl"] .lb-upgrade-close {
    left: 10px;
}

.lb-upgrade-close:hover {
    color: var(--lb-text-primary);
    background: rgba(0, 0, 0, .05);
}

.lb-upgrade-close .material-icons {
    font-size: 1.1rem;
}

.lb-upgrade-banner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lb-upgrade-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lb-upgrade-banner-icon {
    background: #FFF8E7;
    color: #B45309;
    border: 1px solid #F4C76A;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lb-upgrade-banner-text {
    min-width: 160px;
}

.lb-upgrade-banner-text h6 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lb-text-primary);
}

.lb-upgrade-banner-text p {
    margin: 0;
    font-size: .9rem;
    color: var(--lb-text-secondary);
}

.lb-upgrade-more-link {
    color: var(--lb-primary);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lb-upgrade-more-link:hover {
    text-decoration: underline;
    color: var(--lb-primary);
}

.lb-upgrade-more-arrow {
    font-size: 1rem !important;
    vertical-align: middle;
    transition: transform .2s;
    display: inline-block;
}

.lb-upgrade-more-link[aria-expanded="true"] .lb-upgrade-more-arrow {
    transform: rotate(180deg);
}

.lb-upgrade-btn {
    background: var(--lb-text-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    transition: background .18s;
}

.lb-upgrade-btn:hover {
    background: var(--lb-text-secondary);
    color: #fff;
}

.lb-upgrade-features {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, margin-top .3s ease, padding-top .3s ease;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.lb-upgrade-features.show {
    max-height: 600px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d4cfff;
}

.lb-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}

@media (max-width: 575.98px) {
    .lb-feature-list {
        grid-template-columns: 1fr;
    }
}

.lb-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .88rem;
    color: var(--lb-text-primary);
    line-height: 1.4;
}

.lb-feature-check {
    font-size: 1.1rem !important;
    color: var(--lb-success);
    flex-shrink: 0;
    margin-top: 1px;
}

.lb-feature-label {
    flex: none;
}

.lb-help-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-inline-start: 4px;
    flex-shrink: 0;
}

.lb-help-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--lb-text-tertiary);
    background: transparent;
    color: var(--lb-text-tertiary);
    font-size: .7rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, color .15s;
}

.lb-help-btn:hover,
.lb-help-btn:focus {
    border-color: var(--lb-primary);
    color: var(--lb-primary);
    outline: none;
}

.lb-help-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    z-index: 200;
    width: 240px;
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    padding: 12px 14px;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--lb-text-primary);
    font-weight: 400;
}

html[dir="rtl"] .lb-help-popover {
    left: 0;
    right: auto;
}

html[dir="ltr"] .lb-help-popover {
    right: 0;
    left: auto;
}

.lb-help-popover.show {
    display: block;
}

/* =========================================================
   PLAN BADGE (next to greeting)
   ========================================================= */
.lb-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid var(--lb-border);
    vertical-align: middle;
}

.lb-plan-badge-free {
    background: var(--lb-app-bg);
    color: var(--lb-text-secondary);
}

.lb-plan-badge-starter {
    background: #FFF8E7;
    color: #B45309;
    border-color: #F4C76A;
}

/* =========================================================
   PERIOD SELECTOR (stat date-range toggle)
   ========================================================= */
.lb-period-selector {
    display: inline-flex;
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    padding: 2px;
}

.lb-period-btn {
    padding: 4px 13px;
    font-size: .8rem;
    color: var(--lb-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all .15s;
    white-space: nowrap;
}

.lb-period-btn:hover {
    color: var(--lb-primary);
    text-decoration: none;
}

.lb-period-btn.active {
    background: #fff;
    color: var(--lb-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* =========================================================
   STAT CARDS (4-up grid on Home)
   ========================================================= */
.lb-stat-card {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 24px;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.lb-stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.lb-stat-label {
    font-size: .85rem;
    color: var(--lb-text-secondary);
}

.lb-stat-icon {
    background: var(--lb-primary-soft);
    color: var(--lb-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--lb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lb-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lb-text-primary);
    line-height: 1;
}

/* =========================================================
   QUICK ACTION TILES (Home -- 3-up grid)
   ========================================================= */
.lb-quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    text-decoration: none;
    color: var(--lb-text-primary);
    font-weight: 600;
    font-size: .875rem;
    text-align: center;
    transition: all .18s;
    height: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    cursor: pointer;
}

.lb-quick-action-card:hover {
    border-color: var(--lb-primary);
    color: var(--lb-primary);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(65, 41, 231, .12);
    transform: translateY(-2px);
}

.lb-quick-action-icon {
    background: var(--lb-primary-soft);
    color: var(--lb-primary);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s;
}

.lb-quick-action-card:hover .lb-quick-action-icon {
    transform: scale(1.1);
}

/* =========================================================
   PHONE FRAME (Live profile preview on Home)
   ========================================================= */
.lb-phone-frame-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 4px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
}

.lb-phone-frame {
    width: 320px;
    height: 650px;
    background: var(--lb-text-primary);
    border: 8px solid var(--lb-text-primary);
    border-radius: 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.lb-phone-notch {
    width: 160px;
    height: 24px;
    background: var(--lb-text-primary);
    border-radius: 0 0 24px 24px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.lb-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background: #fff;
    position: relative;
}

.lb-phone-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.lb-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
    z-index: 10;
}
.lb-preview-overlay-icon {
    font-size: 2.4rem !important;
    color: var(--lb-text-tertiary);
    margin-bottom: 12px;
}
.lb-preview-overlay-msg {
    font-size: .82rem;
    color: var(--lb-text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}
.lb-preview-overlay-btn {
    background: var(--lb-text-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: .8rem;
}
.lb-preview-overlay-btn:hover { background: var(--lb-text-secondary); color: #fff; }

/* =========================================================
   SETUP WIZARD FAB (floating action button -- planned)
   ---------------------------------------------------------
   Position : bottom-left on RTL (Arabic), bottom-right on LTR (English)
   Resting  : round button with AI-style gradient/animated icon
   Hover    : expands to show icon + "Setup Wizard" label (bilingual)
   Click    : navigates to creator/welcome.aspx?revisit=1
   Scope    : all creator pages (inject via Platform.master or LB_CreatorPage)
   RTL/LTR  : use html[dir="rtl"] / html[dir="ltr"] (Platform.master has dir attr)
   ========================================================= */

/* =========================================================
   LINKS LIST (C2 - Links Manager)
   ========================================================= */
.lb-links-container {
    max-width: 100%;
}

.lb-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lb-link-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    transition: all .2s ease-in-out;
}

.lb-link-row:hover {
    border-color: var(--lb-primary);
    box-shadow: 0 4px 12px rgba(65, 41, 231, .08);
}

.lb-link-hidden {
    opacity: .7;
    background: #fafafc;
}

.lb-drag-handle {
    cursor: grab;
    color: var(--lb-text-tertiary);
    flex-shrink: 0;
    line-height: 1;
    padding: 4px;
    transition: color .15s;
}

.lb-drag-handle:hover {
    color: var(--lb-text-primary);
}

.lb-drag-handle:active {
    cursor: grabbing;
}

/* Sortable drag states */
.lb-link-row.sortable-chosen {
    border-color: var(--lb-primary);
    box-shadow: 0 4px 16px rgba(91, 75, 255, .12);
}

.lb-link-row.sortable-ghost {
    opacity: .45;
    background: var(--lb-primary-soft);
    border: 2px dashed var(--lb-primary);
    box-shadow: none;
}

.lb-link-row.sortable-drag {
    box-shadow: 0 16px 40px rgba(91, 75, 255, .22);
    transform: scale(1.02) rotate(.4deg);
    border-color: var(--lb-primary);
    opacity: .96;
    cursor: grabbing;
}

.lb-link-type-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--lb-primary-soft);
    border-radius: var(--lb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lb-primary);
}

.lb-link-hidden .lb-link-type-icon {
    background: #eef0f5;
    color: var(--lb-text-tertiary);
}

.lb-link-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lb-link-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--lb-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-link-url {
    font-size: .83rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--lb-text-secondary);
}

.lb-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.lb-status-active {
    background: rgba(31, 173, 102, .10);
    color: var(--lb-success);
    border: 1px solid rgba(31, 173, 102, .2);
}

.lb-status-hidden {
    background: #F1F2F6;
    color: var(--lb-text-secondary);
    border: 1px solid var(--lb-border);
}

.lb-status-scheduled {
    background: rgba(244, 163, 0, .10);
    color: var(--lb-warning);
    border: 1px solid rgba(244, 163, 0, .2);
}

.lb-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.lb-link-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    border-left: 1px solid var(--lb-border);
    padding-left: 16px;
    margin-left: 8px;
}

[dir=rtl] .lb-link-actions {
    border-left: none;
    border-right: 1px solid var(--lb-border);
    padding-left: 0;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 8px;
}

/* Toggle switch (links visibility) */
.lb-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.lb-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lb-toggle-track {
    position: absolute;
    inset: 0;
    background: #E4E5EC;
    border-radius: 100px;
    cursor: pointer;
    transition: background .2s;
}

.lb-toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    right: 3px;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

[dir=ltr] .lb-toggle-track::after {
    left: 3px;
    right: auto;
}

.lb-toggle-switch input:checked+.lb-toggle-track {
    background: var(--lb-primary);
}

.lb-toggle-switch input:checked+.lb-toggle-track::after {
    transform: translateX(-20px);
}

[dir=ltr] .lb-toggle-switch input:checked+.lb-toggle-track::after {
    transform: translateX(20px);
}

/* Empty state styling */
.lb-empty-state {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 64px 32px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.lb-empty-state-content {
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lb-empty-state-content i {
    font-size: 4rem;
    color: var(--lb-text-tertiary);
}

.lb-empty-state-content p {
    font-size: 1.1rem;
    color: var(--lb-text-secondary);
    margin: 0 0 8px 0;
}

/* =========================================================
   LINK FORM (C3) -- type tab selector & input overrides
   ========================================================= */
.form-group label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--lb-text-primary);
    margin-bottom: 8px;
    display: block;
}

.form-control {
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 12px 16px;
    height: auto;
    font-size: .95rem;
    color: var(--lb-text-primary);
    transition: all .2s ease-in-out;
}

.form-control:focus {
    border-color: var(--lb-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(65, 41, 231, 0.15);
    outline: none;
}

.form-control:disabled {
    background: #F1F2F6;
    color: var(--lb-text-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

.lb-type-tabs {
    display: flex;
    gap: 6px;
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.lb-type-tab {
    flex: 1;
    min-width: 90px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--lb-radius-sm);
    font-size: .85rem;
    font-weight: 600;
    color: var(--lb-text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all .15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.lb-type-tab:hover {
    color: var(--lb-primary);
}

.lb-type-tab.active {
    background: #fff;
    color: var(--lb-primary);
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.lb-type-tab .material-icons {
    font-size: 1.1rem;
}

/* Premium Lock Badge styling */
.lb-premium-lock-badge {
    background: var(--lb-primary-soft);
    color: var(--lb-primary);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
}

/* Starter-gated section inside link form */
.lb-starter-section {
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 24px;
    background: rgba(240, 236, 250, 0.3);
    margin-top: 24px;
}

.lb-starter-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--lb-primary);
    margin-bottom: 16px;
}

/* =========================================================
   APPEARANCE (C4)
   ========================================================= */
.lb-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.lb-tpl-card {
    cursor: pointer;
    border: 2px solid var(--lb-border);
    border-radius: var(--lb-radius);
    overflow: hidden;
    text-align: center;
    transition: all .2s ease-in-out;
    position: relative;
    background: var(--lb-card-bg);
}

.lb-tpl-card:hover {
    border-color: var(--lb-primary);
    box-shadow: 0 4px 12px rgba(65, 41, 231, .12);
}

.lb-tpl-selected {
    border-color: var(--lb-primary) !important;
    box-shadow: 0 0 0 3px rgba(65, 41, 231, .2) !important;
}

.lb-tpl-locked {
    cursor: not-allowed;
}

.lb-tpl-card img {
    width: 100%;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.lb-tpl-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .83rem;
    font-weight: 600;
    padding: 8px 4px;
    color: var(--lb-text-primary);
    background: var(--lb-card-bg);
}

.lb-tpl-check {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    background: var(--lb-primary);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}

[dir=rtl] .lb-tpl-check {
    left: auto;
    right: 8px;
}

.lb-tpl-selected .lb-tpl-check {
    display: flex;
}

.lb-tpl-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 24, 36, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(1px);
    transition: background .2s;
}

.lb-tpl-lock-overlay i {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .2));
}

.lb-tpl-locked:hover .lb-tpl-lock-overlay {
    background: rgba(22, 24, 36, 0.5);
}

.lb-premium-lock-badge-sm {
    background: var(--lb-primary-soft);
    color: var(--lb-primary);
    padding: 1px 6px;
    border-radius: 100px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.lb-btn-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
}

.lb-btn-style-card {
    cursor: pointer;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 16px;
    text-align: center;
    background: var(--lb-card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .02);
    transition: all .2s ease-in-out;
}

.lb-btn-style-card:hover {
    border-color: var(--lb-primary);
    box-shadow: 0 4px 10px rgba(65, 41, 231, .05);
}

.lb-btn-selected {
    border-color: var(--lb-primary) !important;
    box-shadow: 0 4px 12px rgba(65, 41, 231, .08) !important;
}

.lb-btn-preview {
    display: inline-block;
    padding: 8px 18px;
    font-size: .85rem;
    font-weight: 600;
    pointer-events: none;
    min-width: 90px;
    text-align: center;
}

.lb-btn-filled {
    background: var(--lb-primary);
    color: #fff;
    border-radius: 8px;
}

.lb-btn-outline {
    background: transparent;
    color: var(--lb-primary);
    border: 2px solid var(--lb-primary);
    border-radius: 8px;
}

.lb-btn-pill {
    background: var(--lb-primary);
    color: #fff;
    border-radius: 100px;
}

.lb-btn-square {
    background: var(--lb-primary);
    color: #fff;
    border-radius: 0;
}

/* Sticky save bar */
.lb-save-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--lb-border);
    padding: 16px 24px;
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    z-index: 10;
    border-radius: 0 0 var(--lb-radius) var(--lb-radius);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .03);
}

/* =========================================================
   QR CODE (C5)
   ========================================================= */
.lb-qr-card {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.lb-qr-wrapper {
    display: flex;
    justify-content: center;
}

.lb-qr-wrapper #qrcode {
    display: inline-block;
}

.lb-qr-url-group .form-control {
    background: var(--lb-app-bg);
    border-color: var(--lb-border);
    border-radius: var(--lb-radius) 0 0 var(--lb-radius) !important;
}

[dir=rtl] .lb-qr-url-group .form-control {
    border-radius: 0 var(--lb-radius) var(--lb-radius) 0 !important;
}

.lb-qr-url-group .btn {
    border-color: var(--lb-border);
    border-radius: 0 var(--lb-radius) var(--lb-radius) 0 !important;
}

[dir=rtl] .lb-qr-url-group .btn {
    border-radius: var(--lb-radius) 0 0 var(--lb-radius) !important;
}

/* Sharing buttons circles */
.lb-share-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1.15rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .08);
    transition: all .2s ease-in-out;
    text-decoration: none !important;
}

.lb-share-circle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.lb-share-circle-btn.lb-whatsapp {
    background: #25D366;
}

.lb-share-circle-btn.lb-x {
    background: #000;
}

.lb-share-circle-btn.lb-telegram {
    background: #229ED9;
}

.lb-share-circle-btn.lb-email {
    background: var(--lb-primary);
}

/* Tips card sidebar */
.lb-qr-tips-card {
    background: var(--lb-primary-soft);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 24px;
}

.lb-tip-icon-box {
    width: 42px;
    height: 42px;
    background: #fff;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lb-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .02);
}

/* =========================================================
   SETTINGS (C8 / C9)
   ========================================================= */
.lb-avatar-upload {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lb-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
    background: #F1F2F6;
}

.lb-avatar-btn {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
}

.lb-file-hidden {
    display: none;
}

/* Settings tabs style matching Stitch */
.lb-settings-tabs {
    display: flex;
    border-bottom: 2px solid var(--lb-border);
    margin-bottom: 32px;
    gap: 24px;
}

.lb-settings-tab {
    padding: 12px 4px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--lb-text-secondary);
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lb-settings-tab:hover {
    color: var(--lb-primary);
}

.lb-settings-tab.active {
    color: var(--lb-primary);
    border-bottom-color: var(--lb-primary);
}

[dir=rtl] .lb-settings-tab {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* Info label adjustments */
.lb-info-label {
    font-size: .88rem;
    font-weight: 600;
    color: var(--lb-text-primary);
    margin-bottom: 8px;
    display: block;
}

/* =========================================================
   TRACKING PIXELS (C10)
   ========================================================= */
.lb-pixel-card {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .02);
    transition: all .2s ease-in-out;
}

.lb-pixel-card:hover {
    border-color: var(--lb-primary);
    box-shadow: 0 4px 12px rgba(65, 41, 231, .05);
}

.lb-pixel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.lb-pixel-provider-logo {
    height: 28px;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

.lb-pixel-locked-banner {
    background: rgba(244, 163, 0, .06);
    border: 1px solid rgba(244, 163, 0, .2);
    border-radius: var(--lb-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: .9rem;
    font-weight: 500;
    color: #b47200;
}

.lb-pixel-locked-banner a {
    color: #e58a00;
    font-weight: 700;
    text-decoration: underline;
}

.lb-pixel-locked-banner a:hover {
    color: #b47200;
}

/* Disabled card state (Free plan) */
.lb-pixel-card-disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Save icon inside submit button */
.lb-pixel-save-icon {
    font-size: 0.95rem !important;
    vertical-align: middle;
}

/* Mobile: stack verify + help link vertically */
@media (max-width: 575px) {
    .lb-pixel-card .d-flex.align-items-center.justify-content-between {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ---- Analytics page (Phase 5) ---- */

.lb-an-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .lb-an-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.lb-an-title {
    margin: 0 0 4px 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lb-text-primary);
}

.lb-an-period-selector {
    display: flex;
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius-sm);
    padding: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.lb-an-period-btn {
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--lb-text-secondary);
    font-size: .875rem;
    text-decoration: none;
    transition: all .15s;
    font-weight: 500;
}

.lb-an-period-btn:hover {
    background: rgba(0, 0, 0, .04);
    color: var(--lb-text-primary);
    text-decoration: none;
}

.lb-an-period-btn.active {
    background: var(--lb-card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    color: var(--lb-primary);
    font-weight: 600;
}

.lb-an-period-locked {
    color: var(--lb-text-tertiary);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: not-allowed;
}

.lb-an-period-locked:hover {
    background: transparent;
    color: var(--lb-text-tertiary);
}

.lb-an-kpi-row {}

@media (min-width: 992px) {
    .lb-an-kpi-row>div {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.lb-an-kpi-card {
    position: relative;
    overflow: hidden;
}

.lb-an-kpi-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    opacity: 0.15;
}

.lb-an-kpi-card[data-kpi="views"]::after {
    background: linear-gradient(to top, var(--lb-primary), transparent);
}

.lb-an-kpi-card[data-kpi="clicks"]::after {
    background: linear-gradient(to top, #2E8FFF, transparent);
}

.lb-an-kpi-card[data-kpi="ctr"]::after {
    background: linear-gradient(to top, var(--lb-warning), transparent);
}

.lb-an-kpi-card[data-kpi="visitors"]::after {
    background: linear-gradient(to top, #c4c0ff, transparent);
}

.lb-an-kpi-value {}

.lb-an-layout {}

.lb-an-main-col {}

.lb-an-widgets-col {}

.lb-an-card {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05), 0 2px 4px -2px rgba(0, 0, 0, .05);
}

.lb-an-card-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    position: relative;
}

.lb-an-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--lb-text-primary);
}

.lb-an-chart-card {}

.lb-an-chart-wrap {
    padding: 0 24px 24px 24px;
    position: relative;
    height: 256px;
    background-image: linear-gradient(to right, var(--lb-border) 1px, transparent 1px), linear-gradient(to bottom, var(--lb-border) 1px, transparent 1px);
    background-size: 20px 20px;
}

.lb-an-chart-legend {
    display: flex;
    gap: 16px;
    align-items: center;
}

.lb-an-chart-legend>span {
    display: inline-flex;
    align-items: center;
}

.lb-an-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.lb-an-legend-label {
    font-size: .875rem;
    color: var(--lb-text-secondary);
    margin-left: 8px;
}

[dir="rtl"] .lb-an-legend-label {
    margin-left: 0;
    margin-right: 8px;
}

.lb-an-links-card {
    overflow: hidden;
}

.lb-an-links-card .lb-an-card-header {
    border-bottom: 1px solid var(--lb-border);
}

.lb-an-links-table {
    margin: 0;
    width: 100%;
    font-size: .875rem;
    text-align: left;
}

[dir="rtl"] .lb-an-links-table {
    text-align: right;
}

.lb-an-links-table thead th {
    background: #F1F2F6;
    color: var(--lb-text-secondary);
    font-weight: 600;
    padding: 12px 24px;
    border-bottom: 1px solid var(--lb-border);
    border-top: none;
}

.lb-an-links-table tbody td {
    padding: 12px 24px;
    vertical-align: middle;
    border-bottom: 1px solid var(--lb-border);
    color: var(--lb-text-primary);
}

.lb-an-links-table tbody tr:last-child td {
    border-bottom: none;
}

.lb-an-links-table tbody tr:hover {
    background-color: #f6f2ff;
}

.lb-an-link-row {}

.lb-an-link-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lb-an-link-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.lb-an-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(65, 41, 231, .1);
    color: var(--lb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lb-an-link-icon i {
    font-size: 18px;
}

.lb-an-link-clicks {
    font-weight: 500;
}

.lb-an-link-ctr {}

.lb-an-geo-card,
.lb-an-device-card,
.lb-an-referrer-card {
    position: relative;
    overflow: hidden;
    min-height: 256px;
    display: flex;
    flex-direction: column;
}

.lb-an-starter-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.lb-an-starter-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(to bottom,
            transparent,
            transparent 16px,
            rgba(228, 224, 239, 0.8) 16px,
            rgba(228, 224, 239, 0.8) 32px,
            transparent 32px,
            transparent 48px);
    opacity: 0.5;
    filter: blur(3px);
    z-index: -1;
}

.lb-an-lock-icon {
    background: #FFEEE8;
    color: var(--lb-warning);
    padding: 12px;
    border-radius: 50%;
    margin-bottom: 12px;
    border: 1px solid rgba(244, 163, 0, .2);
    font-size: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}

.lb-an-starter-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--lb-text-primary);
    margin-bottom: 16px;
}

.lb-an-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--lb-text-tertiary);
}

.lb-an-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: var(--lb-text-secondary);
}

/* ---- Analytics page -- Starter additions ---- */

.lb-an-device-list {
    padding: 0 24px 24px 24px !important;
    margin: 0;
}

.lb-an-device-row {
    padding: 12px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.lb-an-device-row:hover {
    background-color: #f6f2ff;
}

.lb-an-device-icon {
    color: var(--lb-text-secondary);
    font-size: 24px;
}

.lb-an-device-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lb-an-device-label {
    font-size: .875rem;
    color: var(--lb-text-primary);
    font-weight: 500;
}

.lb-an-device-pct {
    font-size: .875rem;
    color: var(--lb-text-secondary);
}

.lb-an-device-bar {
    height: 6px;
    background: #e4e0ef;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.lb-an-device-bar-fill {
    height: 100%;
    background: var(--lb-primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.lb-an-referrer-list {
    padding: 0 24px 24px 24px !important;
    margin: 0;
}

.lb-an-referrer-row {
    padding: 10px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid var(--lb-border);
    border-radius: 8px;
    transition: all 0.2s;
}

.lb-an-referrer-row:hover {
    background-color: #f6f2ff;
    border-color: transparent;
}

.lb-an-referrer-row:last-child {
    border-bottom: none;
}

.lb-an-referrer-domain {
    font-size: .875rem;
    color: var(--lb-text-primary);
    font-weight: 500;
}

.lb-an-referrer-count {
    font-size: .75rem;
    background: #f0ecfa;
    color: var(--lb-primary);
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 600;
}

/* =========================================================
   SUBSCRIPTION PAGE (Phase 6 - C11)
   ========================================================= */
.lb-sub-status-badge {
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    padding: 6px 16px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    font-weight: 500;
}
.lb-sub-status-badge .dot-free {
    width: 10px; height: 10px; border-radius: 50%; background: var(--lb-text-secondary);
}
.lb-sub-status-badge .dot-starter {
    width: 10px; height: 10px; border-radius: 50%; background: var(--lb-success);
}
.lb-sub-hero {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.lb-sub-hero-bg {
    position: absolute;
    top: 0; right: 0;
    width: 250px; height: 250px;
    background: rgba(65, 41, 231, 0.05);
    border-radius: 50%;
    transform: translate(50%, -50%);
    filter: blur(40px);
    pointer-events: none;
}
.lb-sub-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFEEE8;
    color: #b54800;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.lb-sub-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--lb-text-primary);
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
}
.lb-sub-price small {
    font-size: 1rem;
    color: var(--lb-text-secondary);
    font-weight: 400;
}
.lb-sub-features {
    list-style: none;
    padding: 0; margin: 0 0 32px 0;
}
.lb-sub-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--lb-text-primary);
    font-size: 1rem;
    margin-bottom: 12px;
}
.lb-sub-upgrade-box {
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
.lb-sub-payment-card {
    background: var(--lb-card-bg);
    border: 1px solid var(--lb-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color .2s;
}
.lb-sub-payment-card:hover {
    border-color: rgba(65, 41, 231, 0.3);
}
.lb-sub-payment-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.75rem;
}
.lb-sub-payment-copy-box {
    background: var(--lb-app-bg);
    border: 1px solid var(--lb-border);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background .2s;
}
.lb-sub-payment-card:hover .lb-sub-payment-copy-box {
    background: #f0ecfa;
}
.lb-sub-process-line {
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--lb-border);
    z-index: 0;
}
.lb-sub-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--lb-card-bg);
    border: 2px solid var(--lb-primary);
    color: var(--lb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    margin: 0 auto 16px auto;
    position: relative;
    z-index: 1;
}
.lb-sub-step-num.lb-sub-step-done {
    background: var(--lb-primary);
    color: #fff;
}

/* ---- C12/C13 Receipt Upload Form ---- */
.lb-sub-plan-box {
    border: 2px solid var(--lb-border);
    background: var(--lb-card-bg);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    height: 100%;
}
.lb-sub-plan-radio:checked + .lb-sub-plan-box {
    border-color: var(--lb-primary);
    background: #f0ecfa;
}
.lb-sub-plan-badge {
    background: rgba(31, 173, 102, 0.1);
    color: var(--lb-success);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 8px;
}
.lb-sub-plan-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--lb-text-primary);
    margin-bottom: 4px;
}
.lb-sub-plan-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lb-primary);
}
.lb-sub-plan-save {
    font-size: 0.75rem;
    color: var(--lb-success);
    margin-top: 4px;
}
.lb-sub-plan-spacer {
    height: 16px;
}
.lb-sub-drop-area {
    border: 2px dashed var(--lb-outline-variant, #c7c4d9);
    border-radius: 16px;
    padding: 32px;
    background: var(--lb-app-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.lb-sub-drop-area:hover {
    border-color: var(--lb-primary);
}
.lb-sub-drop-icon {
    width: 48px;
    height: 48px;
    background: var(--lb-brand-primary-soft, #EFEDFF);
    color: var(--lb-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.lb-sub-drop-area:hover .lb-sub-drop-icon {
    transform: scale(1.1);
}

/* ---- C13 Mobile History Timeline ---- */
.lb-sub-timeline {
    position: relative;
}
.lb-sub-timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}
.lb-sub-timeline-line {
    position: absolute;
    width: 2px;
    background-color: var(--lb-border);
    top: 48px;
    bottom: -1.5rem;
    right: 23px;
    z-index: 0;
}
[dir="ltr"] .lb-sub-timeline-line {
    right: auto;
    left: 23px;
}
.lb-sub-timeline-item:last-child .lb-sub-timeline-line {
    display: none;
}
.lb-sub-timeline-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--lb-app-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.lb-sub-timeline-card {
    flex-grow: 1;
    background: var(--lb-card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(228, 229, 236, 0.5);
}
.lb-sub-plan-label {
    cursor: pointer;
}
.lb-drag-active {
    background: #EFEDFF;
}

/* ---- C11 Mobile Process Line ---- */
/* Aligned to center of the 48px step circle in RTL/LTR horizontal layout */
.lb-sub-process-line-mobile {
    position: absolute;
    top: 48px;
    bottom: 0;
    width: 2px;
    background: var(--lb-border);
    right: 36px;
    z-index: 0;
}
[dir="ltr"] .lb-sub-process-line-mobile {
    right: auto;
    left: 36px;
}

/* Smart App Link (C3b) styling */
.lb-app-picker-row {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #d0cce8 transparent;
}
.lb-app-picker-row::-webkit-scrollbar {
    height: 4px;
}
.lb-app-picker-row::-webkit-scrollbar-track {
    background: transparent;
}
.lb-app-picker-row::-webkit-scrollbar-thumb {
    background: #d0cce8;
    border-radius: 2px;
}
.lb-app-tile {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.lb-app-tile:active {
    transform: scale(0.95);
}
.lb-app-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--lb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
    transition: all 0.2s ease;
}
.lb-app-tile:hover .lb-app-icon-wrap {
    border-color: var(--lb-primary);
}
.lb-app-tile.selected .lb-app-icon-wrap {
    border-color: var(--lb-primary);
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(65, 41, 231, .12);
}
.lb-app-selected-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--lb-primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 2;
}
[dir="rtl"] .lb-app-selected-badge {
    right: auto;
    left: -2px;
}
.lb-app-tile.selected .lb-app-selected-badge {
    display: flex;
}
.lb-app-selected-badge .material-icons {
    font-size: 12px;
}
.lb-app-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--lb-text-secondary);
    transition: color 0.2s;
}
.lb-app-tile.selected .lb-app-name {
    color: var(--lb-primary);
}
.lb-app-icon-wrap i {
    font-size: 28px;
}
/* Live Preview button */
.lb-smart-preview-btn {
    width: 100%;
    max-width: 360px;
    padding: 12px 24px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
/* Info card styling */
.lb-smart-info-card {
    border-radius: var(--lb-radius);
    padding: 16px;
    border: 1px solid var(--lb-primary-soft);
    background: rgba(240, 236, 250, 0.4);
}
.lb-smart-info-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--lb-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lb-smart-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lb-smart-info-list li {
    display: flex;
    align-items: start;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--lb-text-secondary);
}
.lb-smart-info-list li i {
    font-size: 16px;
    color: var(--lb-primary);
}

/* Smart App identifier -- icon inside input (RTL: icon on right) */
.lb-smart-id-wrap {
    position: relative;
}
.lb-smart-id-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    pointer-events: none;
    color: var(--lb-text-secondary, #6b6f80);
    z-index: 4;
    display: flex;
    align-items: center;
}
[dir="ltr"] .lb-smart-id-icon {
    right: auto;
    left: 12px;
}
.lb-smart-id-input {
    padding-right: 42px !important;
}
[dir="ltr"] .lb-smart-id-input {
    padding-right: 0.75rem !important;
    padding-left: 42px !important;
}

/* =========================================================
   BACKGROUND TAB SELECTOR (Appearance page)
   ========================================================= */
.lb-bg-tabs {
    background: #f0f0f7;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.lb-bg-tab {
    border-radius: 8px !important;
    font-size: 0.85rem;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}

.lb-bg-tab:not(.disabled):hover {
    background: #fff !important;
    color: var(--lb-text-primary) !important;
}

.lb-bg-tab.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.lb-bg-panel {
    padding-top: 4px;
}

/* Compact thumbnail used for "Current Image / Current Video" rows */
.lb-bg-preview-thumb {
    flex-shrink: 0;
}

/* Responsive: on very small screens stack the tab buttons */
@media (max-width: 480px) {
    .lb-bg-tabs {
        flex-wrap: wrap;
    }
    .lb-bg-tab {
        flex: 1 1 40%;
        font-size: 0.78rem;
    }
}

/* =========================================================
   ANALYTICS PAGE  (lb-an-*, lb-stat-card)
   Creator page: creator/analytics.aspx
   ========================================================= */

/* ---- Stat card (shared with Home KPI summary) ---- */
.lb-stat-card {
    background: #fff;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    height: 100%;
}
.lb-stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.lb-stat-label {
    font-size: 0.8rem;
    color: var(--lb-text-secondary);
    font-weight: 500;
}
.lb-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--lb-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lb-primary);
    flex-shrink: 0;
}
.lb-stat-icon .material-icons {
    font-size: 17px;
}
.lb-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lb-text-primary);
    line-height: 1.1;
}

/* ---- Analytics KPI card variant ---- */
.lb-an-kpi-card {
    min-height: 110px;
}
.lb-an-kpi-value {
    font-size: 1.6rem;
}

/* ---- Page header + period selector ---- */
.lb-an-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .lb-an-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
.lb-an-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--lb-text-primary);
    margin: 0;
}
.lb-an-title-block p {
    font-size: 0.82rem;
    color: var(--lb-text-secondary);
    margin: 2px 0 0;
}
.lb-an-period-selector {
    display: flex;
    gap: 4px;
    background: #f0ecfa;
    border-radius: 10px;
    padding: 4px;
    flex-wrap: wrap;
}
.lb-an-period-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--lb-text-secondary);
    text-decoration: none;
    border: none;
    background: transparent;
    transition: background .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.lb-an-period-btn:hover {
    color: var(--lb-text-primary);
    text-decoration: none;
}
.lb-an-period-btn.active {
    background: #fff;
    color: var(--lb-primary);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.lb-an-period-locked {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}
.lb-an-period-lock-icon {
    font-size: 14px !important;
    vertical-align: middle;
}

/* ---- KPI row layout ---- */
.lb-an-kpi-row {
    margin-bottom: 20px;
}

/* ---- Generic card ---- */
.lb-an-card {
    background: #fff;
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    overflow: hidden;
}
.lb-an-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lb-border);
}
.lb-an-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lb-text-primary);
}

/* ---- Chart card ---- */
.lb-an-chart-wrap {
    padding: 16px 20px;
    position: relative;
    height: 240px;
}
.lb-an-chart-legend {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lb-an-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.lb-an-legend-dot--views  { background: #4129e7; }
.lb-an-legend-dot--clicks { background: #2E8FFF; }
.lb-an-legend-label {
    font-size: 0.78rem;
    color: var(--lb-text-secondary);
}

/* ---- Top links table ---- */
.lb-an-links-table {
    font-size: 0.85rem;
    margin: 0;
}
.lb-an-links-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lb-text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--lb-border);
    padding: 10px 12px;
    background: #fafafa;
}
.lb-an-link-row {
    transition: background .12s;
}
.lb-an-link-row:hover {
    background: #f7f7fb;
}
.lb-an-link-row td {
    padding: 10px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f5;
}
.lb-an-link-title {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-an-link-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--lb-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lb-primary);
    flex-shrink: 0;
}
.lb-an-link-icon .material-icons {
    font-size: 15px;
}
.lb-an-link-clicks {
    font-weight: 600;
    color: var(--lb-text-primary);
}
.lb-an-link-ctr {
    color: var(--lb-text-secondary);
    font-size: 0.82rem;
}

/* ---- Widgets (right column) ---- */
.lb-an-widgets-col .lb-an-card {
    margin-bottom: 16px;
}

/* ---- Device breakdown ---- */
.lb-an-device-list {
    padding: 12px 16px !important;
}
.lb-an-device-row {
    border-bottom: 1px solid #f4f4f8;
}
.lb-an-device-row:last-child {
    border-bottom: none;
}
.lb-an-device-icon {
    font-size: 20px !important;
    color: var(--lb-primary);
    width: 24px;
    flex-shrink: 0;
}
.lb-an-device-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--lb-text-primary);
}
.lb-an-device-pct {
    font-size: 0.78rem;
    color: var(--lb-text-secondary);
}
.lb-an-device-bar {
    height: 4px;
    border-radius: 2px;
    background: #eaeaf0;
    margin-top: 5px;
    overflow: hidden;
}
.lb-an-device-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--lb-primary);
    transition: width .3s ease;
}

/* ---- Referrer list ---- */
.lb-an-referrer-list {
    padding: 4px 16px 8px !important;
}
.lb-an-referrer-row {
    border-bottom: 1px solid #f4f4f8;
}
.lb-an-referrer-row:last-child {
    border-bottom: none;
}
.lb-an-referrer-domain {
    font-size: 0.83rem;
    color: var(--lb-text-primary);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-an-referrer-count {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---- Starter overlay (device / referrer lock) ---- */
.lb-an-starter-overlay {
    padding: 24px 16px;
}
.lb-an-lock-icon {
    font-size: 2rem !important;
    color: var(--lb-warning);
    display: block;
    margin-bottom: 8px;
}
.lb-an-starter-label {
    font-size: 0.85rem;
    color: var(--lb-text-secondary);
}

/* ---- Coming soon placeholder (geography) ---- */
.lb-an-coming-soon {
    padding: 24px 16px;
}
.lb-an-coming-soon-icon {
    font-size: 2.5rem !important;
    color: #ccc;
    display: block;
    margin-bottom: 8px;
}

/* ---- Empty state ---- */
.lb-an-empty {
    padding: 24px 16px;
}
.lb-an-empty-icon {
    font-size: 2rem !important;
    color: #ccc;
    display: block;
    margin-bottom: 8px;
}

/* ---- Responsive: mobile-first adjustments ---- */
@media (max-width: 767px) {
    /* Period selector scrolls horizontally on small screens */
    .lb-an-period-selector {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .lb-an-period-btn {
        flex-shrink: 0;
    }
    /* Chart taller on mobile for readability */
    .lb-an-chart-wrap {
        height: 200px;
        padding: 12px;
    }
    /* Link title truncates tighter on narrow screens */
    .lb-an-link-title {
        max-width: 160px;
    }
    /* Stat value slightly smaller on mobile */
    .lb-an-kpi-value {
        font-size: 1.3rem;
    }
}

/* FA icon aliases missing from Screen.css -- needed for Smart App picker and icon picker */
.fa-snapchat::before  { content: "\f2ac"; }
.fa-linkedin::before  { content: "\f0e1"; }
.fa-telegram::before  { content: "\f3fe"; }
.fa-apple::before     { content: "\f179"; }
.fa-github::before    { content: "\f09b"; }
.fa-discord::before   { content: "\f392"; }
.fa-twitch::before    { content: "\f1e8"; }
.fa-reddit::before    { content: "\f1a1"; }

/* Icon picker row (URL link tab) */
.lb-icon-picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 8px;
}
.lb-icon-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: #f4f3fb;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.lb-icon-tile:hover {
    border-color: #c4bfe8;
    background: #edeaf8;
}
.lb-icon-tile.selected {
    border-color: #7c6fe0;
    background: #ede9fd;
}

/* =========================================================
   PREFERENCE ROWS  (mirrors .g-privilege-row from admin dashboard)
   Gray block with radius; title left, control right.
   ========================================================= */
.lb-pref-row {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #F9F9FB;
    border-radius: 12px;
    margin-bottom: 10px;
    gap: 6px;
}
.lb-pref-row:last-child {
    margin-bottom: 0;
}
.lb-pref-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.lb-pref-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--lb-text-primary);
    margin: 0;
}
.lb-pref-desc {
    font-size: 12px;
    color: var(--lb-text-secondary);
    margin: 0;
}