/* ByeStar Modern UI — user-facing refresh */
:root {
    --bs-primary: #0066ff;
    --bs-primary-alt: #0052cc;
    --bs-primary-rgb: 0, 102, 255;
    --scrollbar-color: #0066ff;
    --byestar-gradient: linear-gradient(135deg, #0066ff 0%, #00c2ff 100%);
    --byestar-gradient-soft: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(0, 194, 255, 0.06) 100%);
    --byestar-radius: 14px;
    --byestar-radius-lg: 20px;
    --byestar-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --byestar-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --byestar-border: rgba(15, 23, 42, 0.08);
    --byestar-surface: #ffffff;
    --byestar-muted: #64748b;
}

html[data-theme="dark"]:root {
    --bs-primary: #3b9bff;
    --bs-primary-alt: #0066ff;
    --byestar-gradient-soft: linear-gradient(135deg, rgba(59, 155, 255, 0.12) 0%, rgba(0, 194, 255, 0.08) 100%);
    --byestar-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    --byestar-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
    --byestar-border: rgba(255, 255, 255, 0.08);
    --byestar-surface: #1e293b;
    --byestar-muted: #94a3b8;
    /* Override base theme variables for full dark mode */
    --body: #0f172a;
    --body-color: #e2e8f0;
    --hamburger-color: #e2e8f0;
    --bg-primary: #020617;
    --bg-secondary: #1e293b;
    --bg-header: #0f172a;
    --bs-border-color: rgba(255, 255, 255, 0.1);
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
}

/* ── Typography & base ── */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body {
    background-color: #0f172a !important;
    color: #e2e8f0;
}

.gradient-primary:not(.clip-text) {
    background: var(--byestar-gradient) !important;
}

/* Gradijent samo u slovima/ikonama — pozadina elementa uvijek transparentna */
.gradient-primary.clip-text,
[data-toggle="typed"].gradient-primary.clip-text,
[data-toggle="typed"].clip-text,
span.gradient-primary.clip-text,
strong.gradient-primary.clip-text,
i.gradient-primary.clip-text {
    display: inline-block;
    background-color: transparent !important;
    background-image: var(--byestar-gradient) !important;
    background-size: 100% !important;
    background-repeat: repeat !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent;
}

.typed-cursor {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    -webkit-text-fill-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
    opacity: 1;
}

/* Roditelji s plavom pozadinom + clip-text unutra → meka/transparentna pozadina */
.bg-primary:has(> .gradient-primary.clip-text),
.bg-primary:has(> strong.gradient-primary.clip-text),
.bg-primary:has(> span.gradient-primary.clip-text),
.bg-primary:has(.gradient-primary.clip-text),
.badge.bg-primary:has(.clip-text),
span.bg-primary.rounded-pill:has(.clip-text) {
    background: var(--byestar-gradient-soft) !important;
    border: 1px solid rgba(0, 102, 255, 0.12);
}

.icon-md.bg-primary,
strong.icon-md.bg-primary {
    background: var(--byestar-gradient-soft) !important;
    border: 1px solid rgba(0, 102, 255, 0.1);
}

.text-center.bg-primary:has(.clip-text),
.bg-primary.rounded:has(.clip-text),
a .bg-primary:has(.clip-text) {
    background: var(--byestar-gradient-soft) !important;
    border: 1px solid rgba(0, 102, 255, 0.12);
}

/* Features sekcija — svijetla pozadina da clip-text bude čitljiv */
section.bg-primary:not(.byestar-pricing) {
    background: var(--byestar-gradient-soft) !important;
    color: var(--body-color) !important;
}

html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) .text-dark,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) .lead,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h1,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h2,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h3,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h4,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h5,
html[data-theme="dark"] section.bg-primary:not(.byestar-pricing) h6 {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .byestar-pricing,
html[data-theme="dark"] .byestar-help,
html[data-theme="dark"] #blog.bg-primary {
    background: #0f172a !important;
}

section.bg-primary:not(.byestar-pricing) .text-dark {
    color: var(--body-color) !important;
}

section.bg-primary:not(.byestar-pricing) .lead {
    color: var(--byestar-muted);
}

/* Widget / integracije blok na dnu homepagea */
.p-md-5.bg-primary.rounded-4:not(.byestar-pricing *) {
    background: var(--byestar-gradient) !important;
}

.p-2.p-md-5.bg-primary.rounded-4 {
    background: var(--byestar-gradient) !important;
}

/* ── Public header (the23) ── */
.byestar-header,
#main-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--byestar-border);
    transition: box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

#main-header.affix,
.byestar-header.affix {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--byestar-shadow);
    border-bottom-color: transparent;
}

html[data-theme="dark"] .byestar-header,
html[data-theme="dark"] #main-header {
    background: rgba(15, 23, 42, 0.85);
}

html[data-theme="dark"] #main-header.affix,
html[data-theme="dark"] .byestar-header.affix {
    background: rgba(15, 23, 42, 0.95);
}

.byestar-navbar {
    gap: 0.5rem;
}

.byestar-brand {
    flex-shrink: 0;
    margin-right: 1rem;
}

.byestar-logo {
    max-height: 38px;
    width: auto;
}

html[data-theme="dark"] .byestar-logo-light,
html[data-theme="dark"] .byestar-logo:not(.byestar-logo-dark) {
    display: none !important;
}

html[data-theme="dark"] .byestar-logo-dark {
    display: inline-block !important;
}

.byestar-brand-text {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.byestar-nav-menu {
    align-items: center;
    gap: 0.15rem;
}

.byestar-nav-menu .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 0.95rem !important;
    border-radius: 10px;
    color: #475569;
    transition: background 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .byestar-nav-menu .nav-link {
    color: #cbd5e1;
}

.byestar-nav-menu .nav-link:hover,
.byestar-nav-menu .nav-link:focus {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
}

.byestar-nav-menu .nav-link.active,
.byestar-nav-menu .nav-link.active:hover {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 102, 255, 0.12);
}

.byestar-nav-menu .dropdown-toggle::after {
    margin-left: 0.35em;
    vertical-align: 0.15em;
}

.byestar-dropdown {
    min-width: 280px;
    margin-top: 0.75rem !important;
    padding: 0.75rem !important;
    border: 1px solid var(--byestar-border) !important;
}

.byestar-dropdown .dropdown-item {
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
    transition: background 0.15s ease;
}

.byestar-dropdown .dropdown-item:hover {
    background: var(--byestar-gradient-soft);
}

.byestar-solutions-mega {
    min-width: min(920px, calc(100vw - 2rem));
    max-width: 960px;
    padding: 0 !important;
}

.byestar-solutions-group-title {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.byestar-solutions-list li {
    margin-bottom: 0.15rem;
}

.byestar-solutions-link {
    display: block;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    transition: background 0.15s ease, color 0.15s ease;
}

.byestar-solutions-link:hover {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
}

.byestar-solutions-link-featured {
    padding: 0.55rem 0.65rem;
}

html[data-theme="dark"] .byestar-solutions-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .byestar-solutions-group-title {
    color: #94a3b8;
}

@media (max-width: 991.98px) {
    .byestar-solutions-mega {
        min-width: 100%;
        max-width: 100%;
    }

    .byestar-solutions-dropdown .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding-left: 0.5rem !important;
    }
}

.byestar-footer-subheading {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.72rem !important;
}

.byestar-dropdown-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--byestar-gradient-soft) !important;
    border: 1px solid rgba(0, 102, 255, 0.1);
}

.byestar-header-actions {
    flex-shrink: 0;
}

.byestar-header-utilities {
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--byestar-border);
}

html[data-theme="dark"] .byestar-header-utilities {
    background: rgba(30, 41, 59, 0.55);
}

.byestar-theme-switch {
    gap: 0.35rem;
    padding: 0 0.15rem;
}

.byestar-theme-switch .form-check-input {
    width: 2.4rem;
    height: 1.25rem;
    cursor: pointer;
    margin: 0;
    border-color: var(--byestar-border);
}

.byestar-theme-switch .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.byestar-theme-icon {
    font-size: 0.82rem;
    color: var(--byestar-muted);
    line-height: 1;
}

.byestar-theme-switch .fa-sun {
    color: #f59e0b;
}

html[data-theme="dark"] .byestar-theme-switch .fa-moon {
    color: #93c5fd;
}

.byestar-header-lang .dropdown-item.active {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
    font-weight: 600;
}

.byestar-lang-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--byestar-muted);
    text-decoration: none;
    border: 1px solid var(--byestar-border);
    background: rgba(255, 255, 255, 0.6);
    transition: background 0.2s ease, color 0.2s ease;
}

.byestar-lang-toggle:hover {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
}

html[data-theme="dark"] .byestar-lang-toggle {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
}

.byestar-btn-ghost {
    border-radius: 10px !important;
    padding: 0.5rem 1rem !important;
    border-color: var(--byestar-border) !important;
    background: rgba(255, 255, 255, 0.5);
}

.byestar-btn-ghost:hover {
    background: var(--byestar-gradient-soft) !important;
    border-color: rgba(0, 102, 255, 0.2) !important;
    color: var(--bs-primary) !important;
}

html[data-theme="dark"] .byestar-btn-ghost,
html[data-theme="dark"] .btn-outline-primary.byestar-btn-ghost,
html[data-theme="dark"] #main-header .btn-outline-primary {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .byestar-btn-ghost:hover,
html[data-theme="dark"] .btn-outline-primary.byestar-btn-ghost:hover,
html[data-theme="dark"] #main-header .btn-outline-primary:hover {
    background: rgba(59, 155, 255, 0.18) !important;
    border-color: rgba(59, 155, 255, 0.55) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .btn-outline-primary {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(59, 155, 255, 0.45);
    color: #93c5fd;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus {
    background: rgba(59, 155, 255, 0.2) !important;
    border-color: #3b9bff !important;
    color: #fff !important;
}

html[data-theme="dark"] .btn-outline-secondary {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(148, 163, 184, 0.35);
    color: #cbd5e1;
}

html[data-theme="dark"] .btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.15) !important;
    border-color: rgba(148, 163, 184, 0.5) !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .btn-secondary {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

html[data-theme="dark"] .btn-secondary:hover {
    background: #475569;
    border-color: #64748b;
    color: #f8fafc;
}

.byestar-btn-cta {
    border-radius: 10px !important;
    padding: 0.5rem 1.15rem !important;
    white-space: nowrap;
}

.byestar-nav-toggle {
    padding: 0.35rem;
    border-radius: 10px;
}

.byestar-nav-toggle:focus {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .byestar-nav-menu {
        padding: 0.75rem 0 0.5rem;
    }

    .byestar-nav-menu .nav-link {
        padding: 0.65rem 0.5rem !important;
    }

    .byestar-header-actions {
        width: 100%;
        padding: 0.75rem 0 0.25rem;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .byestar-header-utilities {
        margin-left: auto;
    }

    .byestar-header-auth {
        width: 100%;
        justify-content: flex-end;
    }

    .byestar-header-actions .btn {
        flex: 1 1 auto;
    }

    .byestar-dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding-left: 0.5rem !important;
    }
}

#main-header .navbar-logo img,
#main-header .byestar-logo {
    max-height: 38px;
    width: auto;
}

#main-menu .nav-link {
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

#main-menu .nav-link:hover {
    background: var(--byestar-gradient-soft);
}

#main-header .btn-primary {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#main-header .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
}

/* ── Hero section ── */
#hero {
    padding-top: 1rem;
}

#hero .display-4 {
    letter-spacing: -0.02em;
    line-height: 1.15;
}

#hero form[data-trigger="shorten-form"] {
    border: 1px solid var(--byestar-border) !important;
    border-radius: var(--byestar-radius-lg) !important;
    box-shadow: var(--byestar-shadow-lg);
    background: var(--byestar-surface);
    padding: 0.5rem !important;
    overflow: hidden;
}

#hero form[data-trigger="shorten-form"] .input-group {
    background: transparent;
}

#hero form[data-trigger="shorten-form"] .form-control {
    font-size: 1.05rem;
    padding: 0.85rem 1rem !important;
}

#hero form[data-trigger="shorten-form"] .btn-primary {
    border-radius: 12px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    margin-right: 0.25rem;
}

#hero .btn-primary.px-4 {
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
}

#output-result {
    border-radius: var(--byestar-radius) !important;
    background: rgba(34, 197, 94, 0.06) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

/* ── Cards & sections (public) ── */
.card {
    border-radius: var(--byestar-radius);
    border-color: var(--byestar-border);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card.shadow-sm,
.card.shadow,
.card.shadow-lg {
    box-shadow: var(--byestar-shadow) !important;
}

#main-header ~ section .card:hover,
.pricing .card:hover,
.byestar-pricing .card:hover {
    box-shadow: var(--byestar-shadow-lg) !important;
}

/* ── Buttons (global) ── */
.btn-primary {
    background: var(--byestar-gradient);
    border: none;
    font-weight: 600;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--byestar-gradient);
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.btn-outline-primary {
    border-radius: 10px;
    font-weight: 600;
}

/* ── Auth pages (the23) ── */
section.bg-primary.min-vh-100,
body .min-vh-100 .row.align-items-center {
    background: var(--byestar-gradient) !important;
}

section.bg-primary.min-vh-100 .card,
.min-vh-100 .card.border-0 {
    border-radius: var(--byestar-radius-lg) !important;
    box-shadow: var(--byestar-shadow-lg) !important;
}

.min-vh-100 .card .form-control,
.min-vh-100 .card .form-select {
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    border-color: var(--byestar-border);
}

.min-vh-100 .card .btn-primary {
    padding: 0.7rem 1rem;
    border-radius: 10px;
}

.min-vh-100 .btn-icon {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.min-vh-100 .btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--byestar-shadow);
}

/* Login split layout */
.min-vh-100 .col-sm-7 .text-center h4 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

/* ── Footer (public) ── */
footer.byestar-footer,
footer#footer-main {
    background: var(--byestar-surface);
    border-top: 1px solid var(--byestar-border);
    padding-bottom: 2rem !important;
}

.byestar-footer-logo {
    max-height: 40px;
    width: auto;
}

html[data-theme="dark"] .byestar-footer-logo-light,
html[data-theme="dark"] .byestar-footer-logo:not(.byestar-footer-logo-dark) {
    display: none !important;
}

html[data-theme="dark"] .byestar-footer-logo-dark {
    display: inline-block !important;
}

.byestar-footer-desc {
    color: var(--byestar-muted);
    font-size: 0.925rem;
    line-height: 1.65;
    max-width: 340px;
}

.byestar-footer-heading {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.byestar-footer-section-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
}

html[data-theme="dark"] .byestar-footer-section-label {
    color: #94a3b8;
}

.byestar-footer-group {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(0, 102, 255, 0.04);
    border: 1px solid var(--byestar-border);
}

html[data-theme="dark"] .byestar-footer-group {
    background: rgba(255, 255, 255, 0.03);
}

.byestar-footer-group-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0;
}

html[data-theme="dark"] .byestar-footer-group-title {
    color: #e2e8f0;
}

.byestar-footer-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--byestar-gradient-soft);
    border: 1px solid rgba(0, 102, 255, 0.12);
    color: var(--bs-primary);
    flex-shrink: 0;
}

.byestar-footer-group-icon .fa {
    font-size: 0.85rem;
}

.byestar-footer-more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-primary);
    text-decoration: none;
}

.byestar-footer-more-link:hover {
    text-decoration: underline;
}

.byestar-footer-nav-row {
    border-top: 1px solid var(--byestar-border);
}

.byestar-footer-cta {
    font-weight: 600;
}

html[data-theme="dark"] .byestar-footer-heading {
    color: #94a3b8;
}

.byestar-footer-links li {
    margin-bottom: 0.55rem;
}

.byestar-footer-links a {
    color: #475569;
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.byestar-footer-links a:hover {
    color: var(--bs-primary);
}

html[data-theme="dark"] .byestar-footer-links a {
    color: #cbd5e1;
}

.byestar-footer-social {
    gap: 0.35rem;
}

.byestar-footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #64748b !important;
    background: var(--byestar-gradient-soft);
    border: 1px solid var(--byestar-border);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.byestar-footer-social-link:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
    background: rgba(0, 102, 255, 0.08);
}

.byestar-footer-bottom {
    border-top: 1px solid var(--byestar-border);
}

.byestar-footer-copy {
    color: var(--byestar-muted);
    font-size: 0.875rem;
}

.byestar-footer-copy a {
    color: inherit;
    text-decoration: none;
}

.byestar-footer-copy a:hover {
    color: var(--bs-primary);
}

.byestar-footer-legal .nav-link {
    color: #64748b !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
}

.byestar-footer-legal .nav-link:hover {
    color: var(--bs-primary) !important;
}

.byestar-footer-lang {
    border: 1px solid var(--byestar-border);
    border-radius: 999px;
    padding: 0.35rem 0.85rem !important;
    margin-left: 0.25rem;
}

html[data-theme="dark"] footer.byestar-footer,
html[data-theme="dark"] footer#footer-main {
    background: #0f172a;
}

footer, .footer-public {
    border-top: 1px solid var(--byestar-border);
}

/* ══════════════════════════════════════
   USER DASHBOARD
   ══════════════════════════════════════ */

body.dark,
[data-scheme="dark"] body {
    color-scheme: dark;
}

/* Sidebar */
.sidebar {
    background: var(--byestar-surface) !important;
    border-right: 1px solid var(--byestar-border);
    box-shadow: none !important;
}

[data-scheme="dark"] .sidebar,
body.dark .sidebar {
    background: #0f172a !important;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem !important;
}

.sidebar-brand img {
    max-height: 40px;
    width: auto !important;
}

.sidebar-nav .sidebar-link {
    border-radius: 10px;
    margin: 2px 0.75rem;
    padding: 0.65rem 1rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav .sidebar-item.active > .sidebar-link,
.sidebar-nav .sidebar-link:hover {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary) !important;
}

.sidebar-nav .sidebar-item.active > .sidebar-link {
    font-weight: 600;
}

.sidebar-nav .sidebar-link svg {
    width: 18px;
    height: 18px;
}

/* Workspace switcher in sidebar */
.sidebar .bg-white.shadow.d-flex {
    border-radius: 12px !important;
    border: 1px solid var(--byestar-border) !important;
    transition: box-shadow 0.2s ease;
}

.sidebar .bg-white.shadow.d-flex:hover {
    box-shadow: var(--byestar-shadow) !important;
}

/* Top navbar */
.navbar-bg {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--byestar-border);
    box-shadow: none !important;
}

[data-scheme="dark"] .navbar-bg,
body.dark .navbar-bg {
    background: rgba(15, 23, 42, 0.9) !important;
}

.navbar-bg .card.rounded-pill {
    border-radius: 12px !important;
    border: 1px solid var(--byestar-border) !important;
    background: var(--byestar-gradient-soft) !important;
    transition: box-shadow 0.2s ease;
}

.navbar-bg .card.rounded-pill:hover {
    box-shadow: var(--byestar-shadow);
}

/* Main content area */
.main .content {
    background: #f1f5f9;
    min-height: calc(100vh - 120px);
}

[data-scheme="dark"] .main .content,
body.dark .main .content {
    background: #0b1120;
}

/* Dashboard stat cards */
.byestar-stat-card {
    border: 1px solid var(--byestar-border);
    border-radius: var(--byestar-radius);
    overflow: hidden;
    position: relative;
}

.byestar-stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--byestar-gradient);
}

.byestar-stat-card .card-body {
    padding: 1.25rem 1.5rem;
}

.byestar-stat-card h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--byestar-muted);
    margin-bottom: 0.5rem !important;
}

.byestar-stat-card h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.byestar-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
    margin-bottom: 0.75rem;
}

.byestar-stat-card .stat-icon svg {
    width: 20px;
    height: 20px;
}

/* Dashboard cards */
.main .card {
    border: 1px solid var(--byestar-border);
    border-radius: var(--byestar-radius);
    box-shadow: var(--byestar-shadow) !important;
}

.main .card-header {
    background: transparent;
    border-bottom: 1px solid var(--byestar-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.main .card-body {
    padding: 1.25rem;
}

/* Shortener form in dashboard */
.main form[data-trigger="shorten-form"] .border.rounded {
    border-radius: 12px !important;
    border-color: var(--byestar-border) !important;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.main form[data-trigger="shorten-form"] .border.rounded:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
    border-color: var(--bs-primary) !important;
}

.main form[data-trigger="shorten-form"] .btn-primary {
    border-radius: 0 10px 10px 0;
}

/* Tables & lists */
.main .table {
    --bs-table-hover-bg: rgba(0, 102, 255, 0.04);
}

.main .border.rounded.p-2 {
    border-radius: var(--byestar-radius) !important;
    border-color: var(--byestar-border) !important;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--byestar-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

/* Dropdown menus */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--byestar-border);
    box-shadow: var(--byestar-shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
}

/* Footer dashboard */
.main .footer {
    background: transparent;
    border-top: 1px solid var(--byestar-border);
    padding: 1rem 0;
}

/* Pricing page cards */
.pricing-card,
.card.pricing {
    border-radius: var(--byestar-radius-lg);
}

/* Scroll to top */
#scroll-to-top {
    border-radius: 50% !important;
    background: var(--byestar-gradient) !important;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    #hero .display-4 {
        font-size: 2.25rem;
    }

    .byestar-stat-card h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    #hero form[data-trigger="shorten-form"] .input-group-append {
        width: 100%;
        margin-top: 0.5rem;
    }

    #hero form[data-trigger="shorten-form"] .btn-primary {
        width: 100%;
        margin-right: 0;
    }
}

/* ══════════════════════════════════════
   PRICING PAGE
   ══════════════════════════════════════ */

.byestar-pricing {
    background: #f1f5f9;
}

.byestar-pricing-hero {
    background: var(--byestar-gradient);
    color: #fff;
    text-align: center;
}

.byestar-pricing-hero h1,
.byestar-pricing-hero .lead {
    color: #fff;
}

.byestar-pricing-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}

.byestar-pricing-body {
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.byestar-pricing-toggle {
    border-radius: 14px !important;
    border: 1px solid var(--byestar-border) !important;
    box-shadow: var(--byestar-shadow-lg) !important;
    padding: 0.35rem !important;
}

.byestar-pricing-body [data-pricing] {
    border-radius: 10px !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.byestar-pricing-body [data-pricing].btn-primary {
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35);
}

.byestar-pricing-body [data-pricing]:not(.btn-primary):hover {
    background: var(--byestar-gradient-soft) !important;
}

.byestar-faq-card .card-header[data-bs-toggle="collapse"] {
    cursor: pointer;
    transition: background 0.2s ease;
}

.byestar-faq-card .card-header[data-bs-toggle="collapse"]:hover {
    background: var(--byestar-gradient-soft) !important;
}

/* Pricing cards (list view) */
.pricing .card {
    border-radius: var(--byestar-radius-lg) !important;
    border: 1px solid var(--byestar-border) !important;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pricing .card:hover {
    transform: translateY(-4px);
}

.pricing .card .p-5 {
    padding: 2rem 1.75rem !important;
}

.pricing .card .h2 .gradient-primary.clip-text,
.pricing .card .h3.gradient-primary.clip-text,
.pricing .card .h3 .gradient-primary.clip-text {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    background-color: transparent !important;
    background-image: var(--byestar-gradient) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent;
}

.pricing .card .btn-primary {
    border-radius: 12px;
    padding: 0.85rem 1.5rem !important;
    font-weight: 700;
}

.pricing .card-body {
    background: rgba(241, 245, 249, 0.5);
    border-top: 1px solid var(--byestar-border);
}

html[data-theme="dark"] .pricing .card-body {
    background: rgba(15, 23, 42, 0.5);
}

.pricing .card-body li {
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--byestar-border);
}

.pricing .card-body li:last-child {
    border-bottom: none;
}

/* Pricing table view */
.byestar-pricing .table-responsive.card {
    border-radius: var(--byestar-radius-lg) !important;
    background: var(--byestar-surface);
}

.byestar-pricing .table .h3.gradient-primary.clip-text,
.byestar-pricing .table .gradient-primary.clip-text {
    background-color: transparent !important;
    background-image: var(--byestar-gradient) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent;
}

.byestar-pricing .table thead th {
    border: none;
}

.byestar-pricing .table tbody td {
    vertical-align: middle;
    padding: 0.85rem 1rem;
}

.byestar-pricing .table tbody tr:not(:first-child):not(:last-child) td {
    border-color: var(--byestar-border);
}

.byestar-pricing .table .btn-primary {
    border-radius: 10px;
    font-weight: 600;
}

.byestar-pricing .gradient-primary.with-shapes,
.byestar-pricing .h-100.gradient-primary {
    border-radius: var(--byestar-radius-lg) !important;
    box-shadow: var(--byestar-shadow-lg);
}

/* ══════════════════════════════════════
   HELP CENTER
   ══════════════════════════════════════ */

.byestar-help {
    background: #f1f5f9;
    padding-bottom: 4rem;
}

.byestar-help-hero {
    background: var(--byestar-gradient);
    color: #fff;
    border-radius: 0 0 var(--byestar-radius-lg) var(--byestar-radius-lg);
    margin-bottom: 2rem;
}

.byestar-help-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}

.byestar-help-hero h1,
.byestar-help-hero .lead {
    color: #fff;
}

.byestar-help-search {
    border-radius: var(--byestar-radius-lg) !important;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.byestar-help-search .form-control:focus {
    box-shadow: none;
}

.byestar-help-section h2 {
    letter-spacing: -0.02em;
}

.byestar-help-topic {
    border-radius: var(--byestar-radius) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.byestar-help-topic:hover {
    transform: translateY(-3px);
    box-shadow: var(--byestar-shadow-lg) !important;
}

.byestar-help-topic-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--byestar-gradient-soft);
    border: 1px solid rgba(0, 102, 255, 0.1);
}

.byestar-help-meta {
    color: var(--bs-primary);
    font-weight: 600;
}

.byestar-help-article {
    border-radius: var(--byestar-radius) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.byestar-help-article:hover {
    transform: translateY(-2px);
    box-shadow: var(--byestar-shadow-lg) !important;
}

.byestar-help-cta {
    box-shadow: var(--byestar-shadow-lg);
}

.byestar-help-quickstart-card {
    border-radius: var(--byestar-radius) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.byestar-help-quickstart-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--byestar-shadow-lg) !important;
}

.byestar-help-quickstart-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--bs-primary);
    background: var(--byestar-gradient-soft);
    border: 1px solid rgba(0, 102, 255, 0.12);
}

.byestar-help-popular-card {
    border-radius: var(--byestar-radius-lg) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.byestar-help-popular-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--byestar-shadow-lg) !important;
}

.byestar-help-breadcrumb .breadcrumb-item a {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
}

.byestar-help-breadcrumb .breadcrumb-item.active {
    color: var(--byestar-muted);
}

.byestar-help-category-header {
    border-radius: var(--byestar-radius-lg) !important;
}

.byestar-help-article-content {
    border-radius: var(--byestar-radius-lg) !important;
}

.byestar-help-prose {
    line-height: 1.75;
    color: #334155;
}

.byestar-help-prose h2,
.byestar-help-prose h3,
.byestar-help-prose h4 {
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.byestar-help-prose p,
.byestar-help-prose ul,
.byestar-help-prose ol {
    margin-bottom: 1rem;
}

.byestar-help-prose img {
    max-width: 100%;
    border-radius: var(--byestar-radius);
}

.byestar-help-prose code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.9em;
}

.byestar-help-sidebar {
    border-radius: var(--byestar-radius) !important;
}

.byestar-help-related a {
    color: #334155;
    font-size: 0.925rem;
    line-height: 1.45;
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.byestar-help-related a:hover {
    background: var(--byestar-gradient-soft);
    color: var(--bs-primary);
}

.byestar-help-pagination {
    background: var(--byestar-surface);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    box-shadow: var(--byestar-shadow);
    border: 1px solid var(--byestar-border);
}

html[data-theme="dark"] .byestar-help,
html[data-theme="dark"] .byestar-pricing {
    background: #0b1120;
}

html[data-theme="dark"] .byestar-help-prose {
    color: #cbd5e1;
}

html[data-theme="dark"] .byestar-help-related a {
    color: #cbd5e1;
}

html[data-theme="dark"] .byestar-help-prose code {
    background: #1e293b;
}

/* ══════════════════════════════════════
   BIO & QR PAGES
   ══════════════════════════════════════ */

#hero .display-4,
#hero .display-6 {
    letter-spacing: -0.02em;
}

#hero .lead {
    color: var(--byestar-muted);
    font-size: 1.15rem;
}

html[data-theme="dark"] #hero .lead {
    color: #cbd5e1;
}

/* Bio page preview cards */
#hero .card.gradient-primary,
#hero .card.gradient-secondary {
    border-radius: var(--byestar-radius-lg) !important;
    box-shadow: var(--byestar-shadow-lg);
}

#hero .card.gradient-primary .btn-light,
#hero .card.gradient-secondary .btn-light {
    border-radius: 12px;
    font-weight: 600;
    border: none;
}

/* Feature list icons */
.icon-md.bg-primary {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px !important;
    background: var(--byestar-gradient-soft) !important;
}

/* QR generator form */
#hero form.card.shadow-sm {
    border-radius: var(--byestar-radius-lg) !important;
    border: 1px solid var(--byestar-border) !important;
    box-shadow: var(--byestar-shadow-lg) !important;
    overflow: hidden;
}

#hero form.card .bg-primary.rounded-pill {
    border-radius: 12px !important;
    background: var(--byestar-gradient-soft) !important;
    padding: 0.35rem !important;
}

#hero form.card .bg-primary.rounded-pill .btn.bg-white {
    border-radius: 10px !important;
    font-weight: 600;
}

#hero [data-trigger="switcher"] {
    border-radius: 10px !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

#hero [data-trigger="switcher"].border-success,
#hero [data-trigger="switcher"]:hover {
    background: var(--byestar-gradient-soft) !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

#hero form.card .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

#hero .position-sticky.border.rounded {
    border-radius: var(--byestar-radius) !important;
    border-color: var(--byestar-border) !important;
    background: var(--byestar-surface);
    box-shadow: var(--byestar-shadow);
}

/* QR feature cards grid */
#hero .col-6 .card {
    border-radius: var(--byestar-radius) !important;
    transition: transform 0.25s ease;
}

#hero .col-6 .card:hover {
    transform: translateY(-3px);
}

/* CTA blocks (bio, qr, homepage) */
.with-shapes.rounded-4,
.gradient-primary.rounded-4,
.rounded-4.bg-primary {
    border-radius: var(--byestar-radius-lg) !important;
}

.gradient-primary.with-shapes .btn-light {
    border-radius: 12px;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border: none;
    box-shadow: var(--byestar-shadow);
}

/* Widget showcase section */
section .p-md-5.bg-primary.rounded-4 {
    background: var(--byestar-gradient) !important;
    box-shadow: var(--byestar-shadow-lg);
}

section .p-md-5.bg-primary .icon-md.bg-white {
    border-radius: 50% !important;
    padding: 0.75rem !important;
    box-shadow: var(--byestar-shadow);
}

/* ══════════════════════════════════════
   DARK MODE — PUBLIC
   ══════════════════════════════════════ */

html[data-theme="dark"] {
    --body: #0f172a;
    --body-color: #e2e8f0;
    --bg-primary: #0b1120;
    --bg-secondary: #1e293b;
    --bg-header: #0f172a;
    --bs-border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body {
    background: #0b1120;
    color: #e2e8f0;
}

html[data-theme="dark"] .card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background: #0f172a;
    border-color: var(--bs-primary);
}

html[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

html[data-theme="dark"] .dropdown-item:hover {
    background: rgba(59, 155, 255, 0.12);
}

html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-white {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

html[data-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .byestar-pricing .pricing-container .bg-white.rounded-pill {
    background: #1e293b !important;
}

html[data-theme="dark"] .byestar-pricing .table-responsive.card {
    background: #1e293b;
}

html[data-theme="dark"] #hero form[data-trigger="shorten-form"],
html[data-theme="dark"] #hero form.card.shadow-sm {
    background: #1e293b;
}

html[data-theme="dark"] .main .card,
html[data-theme="dark"] [data-scheme="dark"] .main .card,
html[data-theme="dark"] body.dark .main .card {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .sidebar .bg-white.shadow.d-flex,
[data-scheme="dark"] .sidebar .bg-white.shadow.d-flex,
body.dark .sidebar .bg-white.shadow.d-flex {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ══════════════════════════════════════
   DASHBOARD — EXTRA PAGES
   ══════════════════════════════════════ */

.main .content > .container-fluid > .h3,
.main .content h1.h3,
.main .content h3.h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

[data-scheme="dark"] .main .content > .container-fluid > .h3,
[data-scheme="dark"] .main .content h1.h3,
body.dark .main .content h3.h3 {
    color: #f1f5f9;
}

.main .table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--byestar-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--byestar-border);
    background: transparent;
}

.main .table-hover tbody tr:hover {
    background: rgba(0, 102, 255, 0.04);
}

.main .badge {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.35em 0.65em;
}

.main .btn-group.border.rounded {
    border-radius: 10px !important;
    border-color: var(--byestar-border) !important;
    overflow: hidden;
}

.main .btn-sm.btn-primary {
    border-radius: 8px;
}

.main .modal-content {
    border-radius: var(--byestar-radius);
    border: 1px solid var(--byestar-border);
    box-shadow: var(--byestar-shadow-lg);
}

.main .modal-header {
    border-bottom-color: var(--byestar-border);
}

.main .modal-footer {
    border-top-color: var(--byestar-border);
}

/* Billing plan cards in sidebar */
.main .card .list-group-item {
    border-color: var(--byestar-border);
}

.main .card .list-group-item.active {
    background: var(--byestar-gradient-soft);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 600;
}

.byestar-blog-author-logo {
    object-fit: contain;
    background: #fff;
    padding: 3px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   MOBILE OPTIMIZATIONS (≤ 575px)
   ══════════════════════════════════════ */

/* Header: keep utilities (theme + lang) inline on small screens */
@media (max-width: 575.98px) {
    .byestar-header-utilities {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    /* Auth buttons stack but don't stretch absurdly */
    .byestar-header-auth {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .byestar-header-auth .btn {
        flex: 1 1 auto;
        font-size: 0.875rem;
        padding: 0.45rem 0.75rem !important;
    }

    /* Navbar toggler — slightly bigger tap target */
    .byestar-nav-toggle {
        padding: 0.5rem 0.65rem;
    }

    /* Hero heading smaller on xs */
    #hero .display-4 {
        font-size: 1.85rem;
    }

    #hero .lead,
    #hero .fs-5 {
        font-size: 1rem !important;
    }

    /* Hero CTA buttons full-width */
    #hero .btn.px-4 {
        width: 100%;
        text-align: center;
    }

    /* Footer: product groups stack nicely */
    .byestar-footer-group {
        padding: 0.85rem;
    }

    .byestar-footer-nav-row .col-md-4 {
        margin-bottom: 0.5rem;
    }

    footer .col-6.col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Pricing: full-width cards */
    .byestar-pricing .col-md-4 {
        margin-bottom: 1rem;
    }

    /* Blog / Help cards single column */
    .byestar-blog-grid .col-md-4,
    .byestar-help-quickstart .col-md-4,
    .byestar-help-popular .col-md-4 {
        margin-bottom: 0.75rem;
    }

    /* Tables: allow horizontal scroll */
    .main .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Dashboard stat cards row */
    .byestar-stat-card {
        margin-bottom: 0.75rem;
    }

    /* Modal: full-screen on xs */
    .main .modal-dialog {
        margin: 0.5rem;
    }

    /* Help page top hero padding */
    .byestar-help-top {
        padding: 2rem 1rem !important;
    }

    /* Blog post title font */
    .byestar-blog-post h1 {
        font-size: 1.65rem;
    }

    /* Breadcrumb truncation */
    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.3rem;
    }

    /* Footer brand + social center on xs */
    .byestar-footer-brand {
        text-align: center;
    }

    .byestar-footer-social {
        justify-content: center;
    }

    /* Footer bottom: stack vertically */
    .byestar-footer-bottom .col-md-5,
    .byestar-footer-bottom .col-md-7 {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center !important;
    }

    .byestar-footer-bottom .col-md-7 .nav {
        justify-content: center !important;
    }

    /* Lang toggle text size */
    .byestar-lang-toggle {
        font-size: 0.78rem;
        padding: 0.35rem 0.6rem;
    }

    /* Auth pages: full-width on very small screens */
    .col-11.col-lg-10.col-xl-6 {
        padding: 0 0.5rem;
    }

    /* Shorten form buttons full-row on xs already handled above, also copy btn */
    #hero form[data-trigger="shorten-form"] .btn-warning {
        width: 100%;
        margin-top: 0.25rem;
    }
}

/* ── Tablet (576–991px) fixes ── */
@media (min-width: 576px) and (max-width: 991.98px) {
    /* Hero image still hidden at md, show at lg — keep as-is */
    /* Give the nav collapse more breathing room */
    #navbar.show {
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Stat cards 2-per-row on tablet */
    .byestar-stat-card {
        margin-bottom: 1rem;
    }

    /* Help quickstart 2-col on sm */
    .byestar-help-quickstart .row .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ── Touch-device improvements ── */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover transforms on touch to avoid sticky states */
    .card:hover,
    .byestar-help-quickstart-card:hover,
    .byestar-help-popular-card:hover,
    .byestar-help-article:hover {
        transform: none;
    }

    /* Bigger tap targets for nav links */
    #main-menu .nav-link {
        padding: 0.7rem 0.85rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Bigger tap target for toggler */
    .byestar-nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* Bigger tap target for lang toggle */
    .byestar-lang-toggle {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }

    /* Scroll to top button bigger */
    #scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 1.25rem !important;
        right: 1.25rem !important;
    }
}

/* Error pages (404, etc.) */
.byestar-error-page {
    min-height: 100vh;
    background: linear-gradient(160deg, #f0f6ff 0%, #ffffff 45%, #f8fafc 100%);
    color: var(--body, #1a1a2e);
}

html[data-theme="dark"] .byestar-error-page {
    background: linear-gradient(160deg, #0d1117 0%, #161b22 50%, #0d1117 100%);
    color: var(--body, #e6edf3);
}

.byestar-error-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.byestar-error-header {
    text-align: center;
    margin-bottom: 2rem;
}

.byestar-error-logo img {
    max-height: 44px;
    width: auto;
}

.byestar-error-logo-dark {
    display: none;
}

html[data-theme="dark"] .byestar-error-logo-light {
    display: none;
}

html[data-theme="dark"] .byestar-error-logo-dark {
    display: inline-block;
}

.byestar-error-main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.byestar-error-card {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(0, 102, 255, 0.12);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    text-align: center;
    width: 100%;
}

html[data-theme="dark"] .byestar-error-card {
    background: var(--bg-card, #161b22);
    border-color: rgba(255, 255, 255, 0.08);
}

.byestar-error-code {
    font-size: clamp(4rem, 12vw, 6.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #0066ff 0%, #00a3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.byestar-error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.byestar-error-text {
    color: var(--text-muted, #64748b);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

html[data-theme="dark"] .byestar-error-text {
    color: #8b949e;
}

.byestar-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.byestar-error-hint {
    font-size: 0.95rem;
    color: var(--text-muted, #64748b);
}

html[data-theme="dark"] .byestar-error-hint {
    color: #8b949e;
}

@media (max-width: 575px) {
    .byestar-error-card {
        padding: 2rem 1.25rem;
    }

    .byestar-error-actions .btn {
        width: 100%;
    }
}

/* Homepage shorten success */
.byestar-shorten-success {
    border: 1px solid rgba(25, 135, 84, 0.35);
    border-radius: 1rem;
    padding: 1.25rem;
    background: var(--bg-card, #fff);
}

html[data-theme="dark"] .byestar-shorten-success {
    background: var(--bg-card, #161b22);
    border-color: rgba(25, 135, 84, 0.45);
}

.byestar-shorten-upsell {
    background: rgba(0, 102, 255, 0.06);
    border: 1px solid rgba(0, 102, 255, 0.12);
}

html[data-theme="dark"] .byestar-shorten-upsell {
    background: rgba(0, 102, 255, 0.1);
    border-color: rgba(0, 102, 255, 0.2);
}

.byestar-shorten-success #qr-result img {
    display: block;
}

/* Legal pages (Privacy, Terms) */
.byestar-legal-hero {
    background: linear-gradient(160deg, rgba(0, 102, 255, 0.08) 0%, var(--byestar-surface, #f8fafc) 55%);
    border-bottom: 1px solid var(--byestar-border);
}

html[data-theme="dark"] .byestar-legal-hero {
    background: linear-gradient(160deg, rgba(0, 102, 255, 0.12) 0%, #0d1117 55%);
}

.byestar-legal-breadcrumb {
    font-size: 0.875rem;
    color: var(--byestar-muted, #64748b);
}

.byestar-legal-breadcrumb a {
    color: var(--bs-primary);
    text-decoration: none;
}

.byestar-legal-breadcrumb a:hover {
    text-decoration: underline;
}

.byestar-legal-title {
    letter-spacing: -0.02em;
}

.byestar-legal-meta {
    font-size: 0.9rem;
}

.byestar-legal-card {
    border-radius: 1rem;
}

.byestar-legal-prose {
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
}

html[data-theme="dark"] .byestar-legal-prose {
    color: #cbd5e1;
}

.byestar-legal-prose h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
}

.byestar-legal-prose h2:first-child {
    margin-top: 0;
}

html[data-theme="dark"] .byestar-legal-prose h2 {
    color: #f1f5f9;
}

.byestar-legal-prose h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.byestar-legal-prose p {
    margin-bottom: 1rem;
}

.byestar-legal-prose ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.byestar-legal-prose li {
    margin-bottom: 0.45rem;
}

.byestar-legal-prose a {
    color: var(--bs-primary);
    font-weight: 500;
}

.byestar-legal-prose a:hover {
    text-decoration: underline;
}

.byestar-legal-prose strong {
    color: #0f172a;
}

html[data-theme="dark"] .byestar-legal-prose strong {
    color: #f8fafc;
}

/* Cookie consent — ByeStar branding */
#cc_div {
    --cc-btn-primary-bg: #0066ff;
    --cc-btn-primary-hover-bg: #0052cc;
    --cc-btn-primary-text: #fff;
    --cc-toggle-bg-on: #0066ff;
    font-family: inherit;
}

#cc_div #cm,
#cc_div #s-inr {
    border-radius: 14px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18) !important;
}

#cc_div .cc-hint {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--cc-block-text);
    opacity: 0.9;
}

html[data-theme="dark"] #cc_div {
    --cc-bg: #161b22;
    --cc-text: #e6edf3;
    --cc-btn-secondary-bg: #21262d;
    --cc-btn-secondary-hover-bg: #30363d;
}
