/* LibreConnect - Estilos Principales */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Theme tokens (default: light). Theme switcher sets html[data-theme]. */
    --lc-bg: #f5f7fa;
    /* Light theme: keep it "crystal" (slightly translucent panels). */
    --lc-panel: rgba(255, 255, 255, 0.78);
    --lc-panel-2: rgba(255, 255, 255, 0.92);
    --lc-stroke: rgba(15, 23, 42, 0.12);
    --lc-text: rgba(15, 23, 42, 0.92);
    --lc-muted: rgba(15, 23, 42, 0.72);
    --lc-faint: rgba(15, 23, 42, 0.55);
    --lc-shadow: 0 12px 30px rgba(2, 6, 23, 0.10);
    --lc-radius: 18px;
    --lc-radius-2: 14px;
    --lc-body-bg:
        radial-gradient(900px 520px at 12% 10%, rgba(124,58,237,.22), transparent 60%),
        radial-gradient(780px 540px at 88% 26%, rgba(6,182,212,.18), transparent 62%),
        radial-gradient(740px 520px at 55% 95%, rgba(34,197,94,.12), transparent 66%),
        linear-gradient(180deg, rgba(2,6,23,.02) 0%, rgba(2,6,23,.06) 45%, rgba(2,6,23,.02) 100%),
        var(--lc-bg);

    /* Vibrant accents (inspired by Ejemplo Style CSS) */
    --lc-a: #7c3aed;   /* violet */
    --lc-b: #06b6d4;   /* cyan */
    --lc-c: #22c55e;   /* green */
    --lc-d: #f59e0b;   /* amber */
    --lc-e: #ef4444;   /* red */

    /* Shell (sidebar/topbar) tokens. In dark theme, these are light-on-dark. */
    --lc-shell-panel: rgba(255, 255, 255, 0.72);
    --lc-shell-panel-2: rgba(255, 255, 255, 0.82);
    --lc-shell-stroke: rgba(15, 23, 42, 0.12);
    --lc-shell-text: rgba(15, 23, 42, 0.92);
    --lc-shell-muted: rgba(15, 23, 42, 0.72);
    --lc-shell-faint: rgba(15, 23, 42, 0.55);

    /* Shell sizing */
    --lc-sidebar-w: 280px;
    --lc-sidebar-w-collapsed: 84px;
    --lc-topbar-h: 56px;

    /* Use the vibrant accent gradient from the example as the primary brand. */
    --primary-gradient: linear-gradient(135deg, var(--lc-a) 0%, var(--lc-b) 100%);
    --primary-color: var(--lc-a);
    --secondary-color: var(--lc-b);
    --lc-banner-bg: var(--primary-gradient);
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --text-color: rgba(15, 23, 42, 0.92);
    --text-light: rgba(15, 23, 42, 0.72);
    --bg-light: var(--lc-bg);
    --border-color: rgba(15, 23, 42, 0.14);
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --lc-bg: #0b1020;
    /* True dark "glass" surfaces like the example */
    --lc-panel: rgba(255, 255, 255, 0.06);
    --lc-panel-2: rgba(255, 255, 255, 0.08);
    --lc-stroke: rgba(255, 255, 255, 0.12);
    --lc-text: rgba(255, 255, 255, 0.92);
    --lc-muted: rgba(255, 255, 255, 0.72);
    --lc-faint: rgba(255, 255, 255, 0.55);
    --lc-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --lc-body-bg:
        radial-gradient(1200px 700px at 15% 10%, rgba(124,58,237,.35), transparent 55%),
        radial-gradient(900px 600px at 80% 25%, rgba(6,182,212,.25), transparent 55%),
        radial-gradient(800px 600px at 55% 95%, rgba(34,197,94,.18), transparent 60%),
        linear-gradient(180deg, #070a14 0%, #0b1020 45%, #070a14 100%);

    /* In dark mode, full-bright banners read as "light theme". Keep them deep with neon glow. */
    --lc-banner-bg:
        radial-gradient(900px 520px at 18% 18%, rgba(124,58,237,.40), transparent 58%),
        radial-gradient(860px 520px at 86% 20%, rgba(6,182,212,.28), transparent 58%),
        linear-gradient(135deg, rgba(7,10,20,.92), rgba(11,16,32,.92));

    /* Shell becomes true dark UI (light text). */
    --lc-shell-panel: rgba(255, 255, 255, 0.06);
    --lc-shell-panel-2: rgba(255, 255, 255, 0.08);
    --lc-shell-stroke: rgba(255, 255, 255, 0.12);
    --lc-shell-text: rgba(255, 255, 255, 0.92);
    --lc-shell-muted: rgba(255, 255, 255, 0.72);
    --lc-shell-faint: rgba(255, 255, 255, 0.55);

    /* Keep legacy vars coherent in dark mode */
    --text-color: var(--lc-text);
    --text-light: var(--lc-muted);
    --border-color: rgba(255, 255, 255, 0.14);
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
    --shadow-hover: 0 16px 38px rgba(0, 0, 0, 0.38);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--lc-body-bg);
    color: var(--lc-text);
    line-height: 1.6;
}

/* Shell background inspired by Ejemplo Style CSS (scoped to shell pages). */
body.lc-shell {
    background: var(--lc-body-bg);
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-item:hover {
    color: var(--primary-color);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Botones */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Make primary buttons pop more in dark theme (vibrant + glassy glow). */
html[data-theme="dark"] .btn-primary {
    box-shadow:
        0 10px 28px rgba(0,0,0,.30),
        0 0 0 1px rgba(255,255,255,.12) inset;
}

html[data-theme="dark"] .btn-primary:hover {
    box-shadow:
        0 16px 40px rgba(0,0,0,.38),
        0 0 0 1px rgba(255,255,255,.16) inset,
        0 0 40px rgba(124,58,237,.18);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Dark theme: secondary buttons should be "glass" (not flat purple) for contrast on dark backgrounds. */
html[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

html[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.96);
    border-color: rgba(6, 182, 212, 0.40);
}

/* Option 1: dark section/page titles in solid white for clarity, with a subtle gradient accent. */
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .card-title {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="dark"] .section-title {
    position: relative;
    padding-bottom: 6px;
}

html[data-theme="dark"] .section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 84px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(124,58,237,1), rgba(6,182,212,1));
    opacity: 0.9;
}

/* Dark: neutralize any inline "gradient text" snippets on shell pages (keep hierarchy consistent). */
html[data-theme="dark"] body.lc-shell [style*="-webkit-text-fill-color: transparent"] {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Dark: some pages still paint small headings/labels with --primary-color (violet) which is hard to read on
   purple-tinted glass. Force those to solid white for clarity (Option 1). */
html[data-theme="dark"] .filter-title,
html[data-theme="dark"] .user-card-name,
html[data-theme="dark"] .post-author-name,
html[data-theme="dark"] .conversation-name,
html[data-theme="dark"] .notification-user,
html[data-theme="dark"] .friend-name,
html[data-theme="dark"] .header-name {
    color: rgba(255, 255, 255, 0.92) !important;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--lc-stroke);
    backdrop-filter: blur(10px);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: var(--lc-panel-2);
    color: var(--lc-text);
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.04);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control::placeholder {
    color: var(--lc-faint);
}

/* Safari/Chrome autofill can force low-contrast text; keep it readable. */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lc-text);
    box-shadow: 0 0 0 1000px var(--lc-panel-2) inset;
    transition: background-color 999999s ease-in-out 0s;
}

html[data-theme="dark"] .form-control {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- App Shell (Sidebar + Topbar) ---------- */
body.lc-shell {
    padding-left: var(--lc-sidebar-w);
}

body.lc-shell .container {
    max-width: 1400px;
}

.lc-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--lc-topbar-h);
    padding: 0 14px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 1100;
    background: linear-gradient(180deg, var(--lc-shell-panel-2), var(--lc-shell-panel));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--lc-shell-stroke);
    color: var(--lc-shell-text);
}

.lc-topbarBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.lc-topbarText {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    box-shadow:
        0 8px 20px rgba(124, 58, 237, 0.3),
        0 0 0 1px rgba(255,255,255,0.15) inset;
    flex-shrink: 0;
}

.lc-mark svg {
    position: absolute;
    width: 26px;
    height: 26px;
    opacity: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.lc-mark .lc-markText {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 900;
    color: white;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
    letter-spacing: -0.5px;
    line-height: 1;
}

.lc-iconBtn {
    appearance: none;
    border: 1px solid var(--lc-shell-stroke);
    background: var(--lc-shell-panel);
    color: var(--lc-shell-text);
    border-radius: 12px;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.lc-iconBtn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.09);
    border-color: rgba(124,58,237,.32);
}

.lc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.58);
    z-index: 1090;
}

.lc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--lc-sidebar-w);
    padding: 16px 14px;
    z-index: 1200;
    border-right: 1px solid var(--lc-shell-stroke);
    background: linear-gradient(180deg, var(--lc-shell-panel-2), var(--lc-shell-panel));
    backdrop-filter: blur(12px);
    overflow: auto;
    color: var(--lc-shell-text);
}

.lc-sideHead {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.lc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    padding: 8px 8px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}

.lc-brand:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

.lc-brandText {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.lc-brandName {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-brandSub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--lc-shell-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.lc-navLink {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--lc-shell-muted);
    border: 1px solid transparent;
    transition: .18s ease;
}

.lc-navLink:hover {
    color: var(--lc-shell-text);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

.lc-navLink.active {
    color: var(--lc-shell-text);
    background: rgba(124,58,237,.18);
    border-color: rgba(124,58,237,.32);
}

.lc-navAdmin.active,
.lc-navAdmin:hover {
    background: rgba(245,158,11,.16);
    border-color: rgba(245,158,11,.30);
}

.lc-ico {
    width: 18px;
    text-align: center;
    opacity: .95;
}

.lc-navText {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-navBadge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.96);
}

.lc-badgeInfo { background: rgba(6,182,212,1); }
.lc-badgeDanger { background: rgba(239,68,68,1); }
.lc-badgeWarn { background: rgba(245,158,11,1); }

.lc-sideFoot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--lc-shell-stroke);
}

.lc-themeRow {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid var(--lc-shell-stroke);
    background: var(--lc-shell-panel);
    color: var(--lc-shell-text);
    cursor: pointer;
}

.lc-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--lc-shell-stroke);
    background: rgba(255,255,255,.04);
    padding: 4px 10px;
    font-size: 12px;
    color: var(--lc-shell-muted);
}

body.lc-shell.lc-sidebar-collapsed {
    padding-left: var(--lc-sidebar-w-collapsed);
}

body.lc-shell.lc-sidebar-collapsed .lc-sidebar {
    width: var(--lc-sidebar-w-collapsed);
}

body.lc-shell.lc-sidebar-collapsed .lc-brandText,
body.lc-shell.lc-sidebar-collapsed .lc-navText,
body.lc-shell.lc-sidebar-collapsed .lc-pill {
    display: none;
}

body.lc-shell.lc-sidebar-collapsed .lc-collapseBtn {
    transform: rotate(180deg);
}

@media (max-width: 980px) {
    body.lc-shell {
        padding-left: 0;
        padding-top: var(--lc-topbar-h);
    }

    .lc-topbar { display: flex; }

    .lc-sidebar {
        transform: translateX(-105%);
        transition: transform .18s ease;
        width: min(var(--lc-sidebar-w), 86vw);
    }

    body.lc-shell.lc-sidebar-open .lc-sidebar {
        transform: translateX(0);
    }

    body.lc-shell.lc-sidebar-open .lc-overlay {
        display: block;
    }
}

/* Theme toggle button for pages without the shared header (auth, landing, etc.). */
.lc-theme-fab {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 2000;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--lc-shell-stroke);
    background: var(--lc-shell-panel);
    color: var(--lc-shell-text);
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: var(--lc-shadow);
}

body.lc-shell .lc-theme-fab {
    display: none;
}

/* TinyMCE (create-post) - make editor match the crystal/glass theme in Light/Dark */
body.lc-shell .tox.tox-tinymce {
    border-radius: 14px !important;
    overflow: hidden;
    border: 1px solid var(--lc-stroke) !important;
    box-shadow: var(--lc-shadow) !important;
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel)) !important;
}

body.lc-shell .tox .tox-toolbar,
body.lc-shell .tox .tox-toolbar__primary,
body.lc-shell .tox .tox-toolbar__overflow,
body.lc-shell .tox .tox-menubar,
body.lc-shell .tox .tox-statusbar {
    background: transparent !important;
    border-color: var(--lc-stroke) !important;
}

body.lc-shell .tox .tox-statusbar {
    color: var(--lc-muted) !important;
}

body.lc-shell .tox .tox-statusbar a {
    color: var(--lc-muted) !important;
}

body.lc-shell .tox .tox-tbtn svg,
body.lc-shell .tox .tox-tbtn__select-label,
body.lc-shell .tox .tox-mbtn__select-label {
    fill: currentColor !important;
    color: var(--lc-text) !important;
}

/* Dropdown chevrons/icons in toolbar buttons */
body.lc-shell .tox .tox-tbtn__select-chevron svg,
body.lc-shell .tox .tox-split-button__chevron svg {
    fill: var(--lc-text) !important;
}

body.lc-shell .tox .tox-tbtn {
    border-radius: 10px !important;
}

body.lc-shell .tox .tox-tbtn:hover,
body.lc-shell .tox .tox-tbtn--enabled,
body.lc-shell .tox .tox-tbtn--enabled:hover {
    background: rgba(124, 58, 237, 0.16) !important;
}

body.lc-shell .tox .tox-edit-area__iframe,
body.lc-shell .tox .tox-edit-area {
    background: transparent !important;
}

/* Some TinyMCE builds keep the editable body white; force the iframe to be transparent. */
body.lc-shell .tox .tox-edit-area__iframe html,
body.lc-shell .tox .tox-edit-area__iframe body {
    background: transparent !important;
}

html[data-theme="dark"] body.lc-shell .tox .tox-tbtn:hover,
html[data-theme="dark"] body.lc-shell .tox .tox-tbtn--enabled,
html[data-theme="dark"] body.lc-shell .tox .tox-tbtn--enabled:hover {
    background: rgba(6, 182, 212, 0.12) !important;
}

/* TinyMCE dropdowns/dialogs in dark mode should stay glassy (some environments miss skin CSS). */
html[data-theme="dark"] body.lc-shell .tox .tox-menu,
html[data-theme="dark"] body.lc-shell .tox .tox-dialog,
html[data-theme="dark"] body.lc-shell .tox .tox-dialog__header,
html[data-theme="dark"] body.lc-shell .tox .tox-dialog__footer,
html[data-theme="dark"] body.lc-shell .tox .tox-collection,
html[data-theme="dark"] body.lc-shell .tox .tox-collection__group {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.06)) !important;
    color: var(--lc-text) !important;
    border-color: var(--lc-stroke) !important;
    backdrop-filter: blur(16px);
}

html[data-theme="dark"] body.lc-shell .tox .tox-collection__item {
    color: var(--lc-text) !important;
}

html[data-theme="dark"] body.lc-shell .tox .tox-collection__item--active,
html[data-theme="dark"] body.lc-shell .tox .tox-collection__item--enabled,
html[data-theme="dark"] body.lc-shell .tox .tox-collection__item:hover {
    background: rgba(124, 58, 237, 0.18) !important;
}

/* TinyMCE dialog form fields should match dark crystal */
html[data-theme="dark"] body.lc-shell .tox .tox-textfield,
html[data-theme="dark"] body.lc-shell .tox .tox-textarea,
html[data-theme="dark"] body.lc-shell .tox .tox-selectfield {
    background: rgba(255,255,255,.06) !important;
    color: var(--lc-text) !important;
    border-color: rgba(255,255,255,.14) !important;
    border-radius: 10px !important;
}

html[data-theme="dark"] body.lc-shell .tox .tox-label,
html[data-theme="dark"] body.lc-shell .tox .tox-textfield::placeholder,
html[data-theme="dark"] body.lc-shell .tox .tox-textarea::placeholder {
    color: var(--lc-muted) !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.6rem;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255,255,255,.92) 50%),
        linear-gradient(135deg, rgba(255,255,255,.92) 50%, transparent 50%),
        linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    background-position:
        calc(100% - 18px) 52%,
        calc(100% - 12px) 52%,
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
}

html[data-theme="dark"] select.form-control {
    color-scheme: dark;
}

html[data-theme="dark"] select.form-control option,
html[data-theme="dark"] select.form-control optgroup {
    background-color: #0b1020;
    color: rgba(255,255,255,.92);
}

html:not([data-theme="dark"]) select.form-control {
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(15,23,42,.78) 50%),
        linear-gradient(135deg, rgba(15,23,42,.78) 50%, transparent 50%),
        linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-verified {
    background: #4CAF50;
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Grid Systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.profile-image {
    width: 100%;
    height: 220px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
}

.profile-info {
    padding: 1rem;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.profile-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================================
   Landing (no logueado) - alineada con el tema crystal
   Scope: body.lc-landing
   ========================================================== */

body.lc-landing {
    background: var(--lc-body-bg);
    color: var(--lc-text);
}

.lc-landingHeader {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    border-bottom: 1px solid var(--lc-stroke);
    backdrop-filter: blur(14px);
}

.lc-landingBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.lc-landingLogo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    box-shadow:
        0 8px 20px rgba(124, 58, 237, 0.3),
        0 0 0 1px rgba(255,255,255,0.15) inset;
    flex: 0 0 auto;
    overflow: hidden;
}

.lc-landingLogo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.lc-landingLogo svg {
    position: absolute;
    width: 34px;
    height: 34px;
    opacity: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.lc-landingLogo .lc-logoText {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 900;
    color: white;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
    letter-spacing: -0.5px;
    line-height: 1;
}

.lc-landingBrandText {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.lc-landingBrandName {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-landingBrandSub {
    font-size: 13px;
    color: var(--lc-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-landingActions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lc-landingActions .btn {
    width: auto;
    padding: 0.70rem 1.05rem;
    border-radius: 12px;
}

.lc-landingHero {
    padding: 56px 0 22px;
    position: relative;
    overflow: hidden;
    background: var(--lc-banner-bg);
    color: rgba(255,255,255,.96);
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.lc-landingHero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 520px at 14% 22%, rgba(255,255,255,.22), transparent 62%),
        radial-gradient(800px 560px at 86% 18%, rgba(255,255,255,.16), transparent 62%),
        radial-gradient(900px 600px at 50% 105%, rgba(255,255,255,.10), transparent 65%);
    opacity: 0.8;
    pointer-events: none;
}

.lc-landingHeroInner {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.lc-landingHeroMark {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    position: relative;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
    animation: lcLandingFloat 3.2s ease-in-out infinite;
    overflow: hidden;
}

.lc-landingHeroMark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.lc-landingHeroMark svg {
    position: absolute;
    width: 72px;
    height: 72px;
    opacity: 1;
    filter: drop-shadow(0 3px 10px rgba(0,0,0,0.4));
}

.lc-landingHeroMark .lc-heroText {
    position: relative;
    z-index: 2;
    font-size: 32px;
    font-weight: 900;
    color: rgba(255,255,255,0.95);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
    letter-spacing: -1.5px;
    line-height: 1;
}

@keyframes lcLandingFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.lc-landingHeroTitle {
    font-size: 3.1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 900;
    text-shadow: 0 10px 34px rgba(0,0,0,.22);
    margin-bottom: 12px;
}

.lc-landingHeroLead {
    font-size: 1.25rem;
    opacity: 0.96;
    margin-bottom: 10px;
}

.lc-landingHeroDesc {
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 760px;
    margin: 0 auto 22px;
}

.lc-landingPromo {
    max-width: 560px;
    margin: 14px auto 18px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 44px rgba(0,0,0,.20);
}

.lc-landingPromoBig {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
}

.lc-landingPromoSmall {
    font-size: 0.98rem;
    margin: 6px 0 0;
    opacity: 0.94;
}

.lc-landingCtas {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.lc-landingCtas .btn {
    width: auto;
    padding: 1.05rem 2.0rem;
    border-radius: 16px;
    font-size: 1.05rem;
}

.lc-landingStats {
    padding: 22px 0 10px;
}

.lc-landingStatsInner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.lc-landingStat {
    border-radius: var(--lc-radius);
    border: 1px solid var(--lc-stroke);
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    box-shadow: var(--lc-shadow);
    padding: 18px 18px 16px;
    text-align: center;
    backdrop-filter: blur(14px);
}

.lc-landingStatNum {
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
    display: inline-block;
}

.lc-landingStatLabel {
    color: var(--lc-muted);
    font-weight: 700;
    font-size: 0.98rem;
}

.lc-landingSection {
    padding: 54px 0;
}

.lc-landingSectionAlt {
    background:
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border-top: 1px solid var(--lc-stroke);
    border-bottom: 1px solid var(--lc-stroke);
}

html[data-theme="dark"] .lc-landingSectionAlt {
    background:
        radial-gradient(900px 560px at 12% 40%, rgba(124,58,237,.18), transparent 62%),
        radial-gradient(820px 560px at 86% 30%, rgba(6,182,212,.14), transparent 62%),
        linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.lc-landingSectionInner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.lc-landingTitle {
    text-align: center;
    font-size: 2.35rem;
    margin-bottom: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lc-landingSub {
    text-align: center;
    font-size: 1.08rem;
    color: var(--lc-muted);
    margin: 0 auto 28px;
    max-width: 760px;
}

.lc-landingGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

/* Centrar la última tarjeta si es impar (5 elementos) */
.lc-landingGrid .lc-landingCard:nth-child(5):last-child {
    grid-column: span 1;
    margin: 0 auto;
    max-width: 280px;
}

/* En pantallas grandes (3 columnas), centrar en la fila inferior */
@media (min-width: 900px) {
    .lc-landingGrid .lc-landingCard:nth-child(5):last-child {
        grid-column: 2 / 3;
        max-width: none;
        margin: 0;
    }
}

.lc-landingCard {
    border-radius: var(--lc-radius);
    border: 1px solid var(--lc-stroke);
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    box-shadow: var(--lc-shadow);
    padding: 22px;
    text-align: center;
    backdrop-filter: blur(14px);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.lc-landingCard:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(0,0,0,.18);
    border-color: rgba(6,182,212,.28);
}

.lc-landingIcon {
    font-size: 42px;
    margin-bottom: 12px;
    display: inline-block;
}

.lc-landingCardTitle {
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--lc-text);
}

.lc-landingCardText {
    color: var(--lc-muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.lc-landingList {
    max-width: 860px;
    margin: 24px auto 0;
    display: grid;
    gap: 12px;
}

.lc-landingRow {
    border-radius: var(--lc-radius);
    border: 1px solid var(--lc-stroke);
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    box-shadow: var(--lc-shadow);
    padding: 18px 18px 16px;
    backdrop-filter: blur(14px);
}

.lc-landingRowHead {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.lc-landingRowIcon {
    font-size: 26px;
}

.lc-landingRowTitle {
    font-size: 1.12rem;
    font-weight: 900;
    color: var(--lc-text);
}

.lc-landingRowText {
    color: var(--lc-muted);
    margin-left: 38px;
    font-size: 0.98rem;
    line-height: 1.6;
}

.lc-landingCta {
    padding: 54px 0;
    background: var(--lc-banner-bg);
    color: rgba(255,255,255,.96);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,.10);
}

.lc-landingCta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 520px at 50% 40%, rgba(255,255,255,.18), transparent 68%);
    opacity: 0.8;
    pointer-events: none;
}

.lc-landingCtaInner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.lc-landingCtaTitle {
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.lc-landingCtaText {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0 auto 18px;
    max-width: 760px;
}

.lc-landingFooter {
    padding: 30px 0;
    border-top: 1px solid var(--lc-stroke);
    background: linear-gradient(180deg, var(--lc-panel-2), var(--lc-panel));
    backdrop-filter: blur(14px);
}

.lc-landingFooterInner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.lc-landingFooterLinks {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.lc-landingFooterLinks a {
    color: var(--lc-text);
    text-decoration: none;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.lc-landingFooterLinks a:hover {
    border-color: rgba(6,182,212,.25);
    background: rgba(255,255,255,.08);
}

html[data-theme="dark"] .lc-landingFooterLinks a:hover {
    background: rgba(255,255,255,.06);
}

.lc-landingFooterText {
    color: var(--lc-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .lc-landingStatsInner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .lc-landingHeroTitle {
        font-size: 2.3rem;
    }

    .lc-landingHeroInner,
    .lc-landingSectionInner,
    .lc-landingStatsInner,
    .lc-landingCtaInner,
    .lc-landingFooterInner {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .lc-landingHeader {
        padding: 12px 12px;
        flex-wrap: wrap;
    }

    .lc-landingActions {
        width: 100%;
        justify-content: flex-start;
    }

    .lc-landingActions .btn {
        width: auto;
    }

    .lc-landingRowText {
        margin-left: 0;
    }
}

/* Auth Logo (Login, Forgot Password, Reset Password) */
.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
    box-shadow:
        0 16px 40px rgba(124, 58, 237, 0.35),
        0 0 0 1px rgba(255,255,255,0.15) inset;
    overflow: hidden;
}

.auth-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.22) 0%, transparent 100%);
}

.auth-logo svg {
    position: absolute;
    width: 62px;
    height: 62px;
    opacity: 1;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35));
}

.auth-logo .auth-logoText {
    position: relative;
    z-index: 2;
    font-size: 28px;
    font-weight: 900;
    color: white;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    letter-spacing: -1px;
    line-height: 1;
}

/* ============== TOAST NOTIFICATIONS ============== */
#lc-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.lc-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    min-width: 260px;
    max-width: 380px;
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18);
    pointer-events: all;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lc-toast--show {
    opacity: 1;
    transform: translateX(0);
}

.lc-toast--success {
    background: rgba(34, 197, 94, 0.92);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.lc-toast--error {
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.lc-toast--warning {
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.lc-toast--info {
    background: rgba(124, 58, 237, 0.92);
    color: #fff;
    border-color: rgba(255,255,255,0.25);
}

.lc-toast__icon {
    font-size: 1rem;
    font-style: normal;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-weight: 700;
}

.lc-toast__msg {
    flex: 1;
    line-height: 1.4;
}

.lc-toast__close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}

.lc-toast__close:hover {
    color: #fff;
}

@media (max-width: 768px) {
    #lc-toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    .lc-toast {
        max-width: 100%;
    }
}
