:root {
    --body-bg: #f5f6f8;
    --card-radius: 1rem;
    --brand: #e11d48;
    --brand-dark: #1e293b;
    --primary: #3b82f6;
    --primary-soft: #dbeafe;
    --teal: #38b2ac;
    --teal-dark: #2c9a94;
    --muted: #64748b;
}

body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.app-body { background: var(--body-bg); color: #1f2937; }
.basic-body { background: #fbfcfc; color: #1f2937; }

.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: #2563eb; --bs-btn-hover-border-color: #2563eb; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn-teal:hover, .btn-teal:focus { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }

/* Logo */
.logo-icon { color: var(--brand); font-size: 1.5rem; }
.logo-text { color: var(--brand-dark); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo-img { max-height: 42px; max-width: 200px; }

/* Layout with sidebar */
.app-layout { display: flex; min-height: 100vh; }
.app-sidebar { width: 300px; flex-shrink: 0; padding: 2rem 1.25rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-logo { text-align: center; margin-bottom: 1.75rem; }
.sidebar-card { background: #fff; border-radius: var(--card-radius); padding: 1.75rem 1.5rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.sidebar-link { display: flex; align-items: center; gap: .9rem; padding: .8rem 1.1rem; border-radius: .5rem; color: #334155; text-decoration: none; font-size: 1.05rem; text-align: left; }
.sidebar-link i { color: #64748b; }
.sidebar-link:hover { background: #f1f5f9; color: #0f172a; }
.sidebar-link.active { background: var(--primary); color: #fff; }
.sidebar-link.active i { color: #fff; }
.sidebar-divider { margin: .75rem 0; border-color: #e2e8f0; opacity: 1; }
.app-content { flex: 1; min-width: 0; padding: 2rem 2.5rem; }

@media (max-width: 991.98px) {
    .app-sidebar { position: fixed; z-index: 1040; left: -320px; background: var(--body-bg); transition: left .2s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
    .app-sidebar.open { left: 0; }
    .app-content { padding: 1.25rem 1rem; }
}

/* Avatar */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: #fff; font-weight: 700; flex-shrink: 0; }
.sidebar-user .avatar { width: 1.9rem; height: 1.9rem; font-size: .85rem; }

/* Stat cards */
.page-heading { font-size: 2rem; font-weight: 400; margin-bottom: 1.75rem; }
.stat-card { background: #fff; border-radius: var(--card-radius); padding: 1.75rem 1.9rem; height: 100%; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.stat-card .stat-label { font-weight: 700; font-size: .95rem; color: #475569; }
.stat-card .stat-value { font-size: 1.85rem; margin-top: .6rem; color: #1f2937; }
.stat-card .stat-sub { color: var(--muted); font-size: .95rem; }
.stat-icon { width: 2.6rem; height: 2.6rem; border-radius: .6rem; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }

/* Cards & tables */
.card-soft { background: #fff; border: 0; border-radius: var(--card-radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.table-custom { margin: 0; }
.table-custom th { color: #64748b; font-weight: 700; border-bottom-width: 1px; padding: 1.25rem 1.5rem; background: transparent; }
.table-custom td { padding: 1rem 1.5rem; vertical-align: middle; background: transparent; }
.table-custom a.user-name { font-size: 1.1rem; text-decoration: none; }
.badge-status { background: #c6f0d3; color: #166534; font-weight: 700; padding: .45rem .7rem; border-radius: .4rem; }
.badge-status.off { background: #fde2e2; color: #991b1b; }
.badge-plan { background: #eef0f3; color: #334155; font-weight: 700; padding: .45rem .7rem; border-radius: .4rem; }
.detail-icons i { color: #64748b; font-size: 1.15rem; margin-right: .7rem; }
.badge-online { background: #c6f0d3; color: #166534; font-weight: 700; border-radius: .5rem; padding: .45rem .8rem; }
.badge-online::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #4ca36b; margin-right: .5rem; }

/* Type pickers (blocks, QR codes) */
.block-type-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; width: 100%; height: 100%; min-height: 4.75rem; padding: .7rem .4rem;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: .75rem; color: #334155; font-size: .85rem; line-height: 1.2; text-align: center; transition: background .12s, border-color .12s; }
.block-type-btn i { font-size: 1.2rem; color: var(--primary); }
.block-type-btn:hover { background: #fff; border-color: #cbd5e1; }
.block-type-btn.active { background: var(--primary-soft); border-color: var(--primary); color: #1e3a8a; }

/* Auth pages */
.auth-wrap { max-width: 600px; margin: 0 auto; padding: 2.5rem 1rem; }
.auth-card { background: #fff; border-radius: var(--card-radius); padding: 3.5rem 3.75rem; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); margin-top: 3.5rem; }
.auth-card h1 { font-size: 1.6rem; font-weight: 400; margin-bottom: 2rem; }
.auth-card .form-control { padding: .8rem 1rem; }
.auth-card .btn-teal { padding: .75rem; font-size: 1.15rem; }
@media (max-width: 575.98px) { .auth-card { padding: 2rem 1.25rem; } }

/* Public biolink page: all design values come from CSS variables set by the theme */
.biolink { min-height: 100vh; padding: 3.5rem 1rem; background: var(--bl-background, #f1f5f9); color: var(--bl-text, #0f172a); font-family: var(--bl-font, inherit); font-size: var(--bl-font-size, 16px); }
.biolink-inner { max-width: var(--bl-width, 560px); margin: 0 auto; text-align: center; }
.biolink-blocks { display: grid; gap: var(--bl-gap, 1rem); }
.biolink-btn { display: block; padding: .85rem 1rem; border-radius: var(--bl-block-radius, 14px); font-weight: 600; text-decoration: none; transition: transform .12s, box-shadow .12s;
    background: var(--bl-block-bg, #fff); color: var(--bl-block-text, #0f172a); border: var(--bl-block-border, 1px solid #e2e8f0); box-shadow: var(--bl-block-shadow, none); }
.biolink-btn:hover { color: var(--bl-block-text, #0f172a); }
.biolink-btn.hover-scale:hover { transform: scale(1.02); }
.biolink-btn.hover-lift:hover { transform: translateY(-3px); }
.biolink-social { display: inline-flex; width: 2.8rem; height: 2.8rem; border-radius: 50%; align-items: center; justify-content: center; font-size: 1.25rem; text-decoration: none;
    background: var(--bl-socials-bg, #fff); color: var(--bl-socials, #0f172a); }
.biolink-social:hover { color: var(--bl-socials, #0f172a); opacity: .85; }
.biolink hr { border-color: currentColor; opacity: .2; }
.biolink .form-control { border-radius: var(--bl-block-radius, 14px); }
.biolink-preview { min-height: auto; padding: 1.5rem 1rem; }
.biolink-branding { color: inherit; opacity: .5; text-decoration: none; }
.biolink-grid { display: grid; gap: .5rem; }
.biolink-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--bl-block-radius, 14px); }
.biolink-slider { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.biolink-slider figure { flex: 0 0 85%; scroll-snap-align: center; }
.biolink-slider img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--bl-block-radius, 14px); }
.biolink-faq summary { cursor: pointer; list-style-position: inside; }
.biolink-timeline { list-style: none; padding: 0 0 0 1.25rem; margin: 0; border-left: 2px solid currentColor; }
.biolink-timeline li { position: relative; padding: 0 0 1rem .75rem; }
.biolink-timeline li::before { content: ""; position: absolute; left: -1.72rem; top: .35rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--bl-block-bg, #fff); border: 2px solid currentColor; }
.biolink-stars { color: #f59e0b; letter-spacing: .1em; }
.biolink-list { margin: 0; padding-left: 1.5rem; }
.biolink-list.list-check { list-style: none; padding-left: 0; }
.biolink-list.list-check li::before { content: "✓"; font-weight: 700; margin-right: .5rem; }
/* Announcement, cookie notice, content pages */
.announcement-bar { background: var(--brand-dark); color: #fff; }
.team-bar { background: var(--primary); color: #fff; }
.social-btn { padding: .7rem; font-weight: 600; }
.notification-unread { background: var(--primary-soft); }
.wallet-card { max-width: 340px; border-radius: 1rem; padding: 1.25rem; text-align: left; box-shadow: 0 10px 25px rgba(15, 23, 42, .18); }
.min-w-0 { min-width: 0; }
.social-google i { color: #ea4335; }
.social-facebook i { color: #1877f2; }
.captcha-img { border-radius: .5rem; border: 1px solid #e2e8f0; height: 50px; }
.cookie-consent { position: fixed; left: 1rem; bottom: 1rem; z-index: 1080; max-width: 420px; }
.content-body img { max-width: 100%; height: auto; }
.content-body h2, .content-body h3 { margin-top: 1.5rem; }

/* Landing */
.hero h1 { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; }
