:root {
    --fc-accent: #6366f1;
    --fc-accent-dark: #4f46e5;
    --fc-nav-active: #262d82;
    --fc-surface: #ffffff;
    --fc-surface-muted: #f8fafc;
    --fc-border: #e2e8f0;
    --fc-radius: 0.75rem;
    --fc-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
    --fc-shadow-hover: 0 12px 24px -8px rgba(15, 23, 42, 0.18);
}

[data-bs-theme="dark"] {
    --fc-accent: #818cf8;
    --fc-accent-dark: #a5b4fc;
    --fc-surface: #1e293b;
    --fc-surface-muted: #0f172a;
    --fc-border: #334155;
    --fc-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 1px rgba(0, 0, 0, 0.3);
    --fc-shadow-hover: 0 12px 24px -8px rgba(0, 0, 0, 0.6);
}

body {
    background-color: var(--fc-surface-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Site shell: sidebar + content column */
.fc-shell {
    display: flex;
    min-height: 100vh;
}

.fc-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--fc-surface);
    border-right: 1px solid var(--fc-border);
}

/* Desktop only: the sidebar stays fixed in place, only .fc-content scrolls.
   Scoped to lg+ so Bootstrap's mobile offcanvas drawer behavior is untouched. */
@media (min-width: 992px) {
    .fc-shell {
        height: 100vh;
        overflow: hidden;
    }

    /* Bootstrap only turns .fc-sidebar (.offcanvas-lg) into a flex container
       on mobile (max-width: 991.98px); at this breakpoint it falls back to
       plain display:block, so .offcanvas-body never had a definite height
       to stretch into and the user card's sticky bottom positioning had no
       room to stick within. Force the flex chain explicitly instead of
       relying on Bootstrap's own (mobile-only) offcanvas flex styles. */
    .fc-sidebar {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow-y: auto;
    }

    .fc-sidebar > .offcanvas-body {
        flex: 1 1 auto;
        min-height: 0;
    }

    .fc-content {
        height: 100vh;
        overflow-y: auto;
    }
}

.fc-shell.fc-shell-collapsed .fc-sidebar {
    width: 72px;
}

.fc-shell.fc-shell-collapsed .fc-label {
    display: none;
}

/* Collapsed sidebar: center the brand icon, nav icons and user avatar
   instead of leaving them stuck to the left padding. */
.fc-shell.fc-shell-collapsed .fc-sidebar-brand,
.fc-shell.fc-shell-collapsed .fc-sidebar-nav .nav-link,
.fc-shell.fc-shell-collapsed .fc-sidebar-btn,
.fc-shell.fc-shell-collapsed .fc-sidebar-user-toggle {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.fc-shell.fc-shell-collapsed .fc-sidebar-user {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.fc-shell.fc-shell-collapsed .fc-sidebar-btn[data-action*="toggleCollapse"] .bi-chevron-double-left {
    transform: rotate(180deg);
}

.fc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.15rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}

.fc-sidebar-brand .bi {
    color: var(--fc-accent);
    font-size: 1.4rem;
}

.fc-sidebar-nav {
    padding: 0.5rem 0;
}

.fc-sidebar-nav .nav-link,
.fc-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.65rem 1.1rem;
    margin: 0.15rem 0.6rem;
    color: var(--bs-body-color);
    border-radius: 0.6rem;
    border: none;
    background: none;
    text-align: left;
    white-space: nowrap;
}

.fc-sidebar-nav .nav-link .bi,
.fc-sidebar-btn .bi {
    font-size: 1.1rem;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.fc-sidebar-nav .nav-link:hover,
.fc-sidebar-btn:hover {
    background: var(--fc-surface-muted);
    color: var(--fc-accent);
}

.fc-sidebar-nav .nav-link.active,
.fc-sidebar-btn.active {
    color: #fff;
    font-weight: 600;
    background: var(--fc-nav-active);
}

.fc-sidebar-nav .nav-link.active:hover {
    color: #fff;
}

.fc-sidebar-footer {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--fc-border);
    padding: 0.5rem 0;
}

.fc-sidebar-user {
    position: sticky;
    bottom: 0.75rem;
    flex-shrink: 0;
    margin: 0.75rem;
    border: 1px solid var(--fc-border);
    border-radius: 1rem;
    background: var(--fc-surface-muted);
}

.fc-sidebar-user-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    background: none;
    text-align: left;
    color: var(--bs-body-color);
    border-radius: inherit;
}

.fc-sidebar-user-toggle:hover {
    background: var(--fc-border);
}

.fc-sidebar-user-chevron {
    margin-left: auto;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

.fc-sidebar-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--fc-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.fc-sidebar-user-info {
    overflow: hidden;
    min-width: 0;
}

.fc-sidebar-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-sidebar-user-email {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fc-topbar {
    background: var(--fc-surface);
    border-bottom: 1px solid var(--fc-border);
    padding: 0.75rem 1rem;
    gap: 0.5rem;
}

.fc-main {
    flex: 1;
}

.fc-footer {
    margin-top: auto;
    border-top: 1px solid var(--fc-border);
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-toolbar {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    padding: 1rem;
    box-shadow: var(--fc-shadow);
}

.fc-add-link summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--fc-accent-dark);
    list-style: none;
}

.fc-add-link summary::-webkit-details-marker {
    display: none;
}

.fc-add-link summary .bi {
    transition: transform 0.15s ease;
}

.fc-add-link[open] summary .bi {
    transform: rotate(90deg);
}

/* Links grid — auto-fills as many columns as fit, so it keeps adding columns
   on wide screens instead of capping out at a fixed Bootstrap breakpoint. */
.fc-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* List view mode — single column, toggled client-side, no layout memorization */
.fc-links-grid.fc-view-list {
    grid-template-columns: 1fr;
}

/* Link cards */
.link-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    background: var(--fc-surface);
    box-shadow: var(--fc-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.link-card-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--fc-border);
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--fc-shadow-hover);
    border-color: var(--fc-accent);
}

.link-card-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.link-card .badge {
    font-weight: 500;
}

/* Edit/delete buttons — sit above the card's stretched-link so they stay clickable */
.link-card-action-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: none;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.link-card-action-btn:hover {
    background: var(--fc-surface-muted);
    color: var(--fc-accent);
}

.link-card-action-btn.link-card-action-danger:hover {
    color: #dc3545;
}

/* Reserves room on the right so badges/toggle never sit under the floating favorite star */
.link-card-footer-row {
    padding-right: 2.25rem;
}

/* Description toggle — sits above the card's stretched-link so it stays clickable */
.link-card-desc-toggle {
    position: relative;
    z-index: 2;
    color: #94a3b8;
    padding: 0.1rem 0.35rem;
}

.link-card-desc-toggle:hover {
    color: var(--fc-accent);
}

.link-card-desc-toggle .bi {
    transition: transform 0.15s ease;
}

.link-card-desc-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

/* Category/tag badges — hue is set per-badge via the --badge-hue inline custom property */
.badge-color {
    background-color: hsl(var(--badge-hue) 70% 90%);
    color: hsl(var(--badge-hue) 55% 30%);
    border: 1px solid hsl(var(--badge-hue) 60% 80%);
}

.badge-color-outline {
    background-color: transparent;
    color: hsl(var(--badge-hue) 55% 35%);
    border: 1px solid hsl(var(--badge-hue) 50% 70%);
}

[data-bs-theme="dark"] .badge-color {
    background-color: hsl(var(--badge-hue) 35% 20%);
    color: hsl(var(--badge-hue) 75% 80%);
    border-color: hsl(var(--badge-hue) 40% 30%);
}

[data-bs-theme="dark"] .badge-color-outline {
    color: hsl(var(--badge-hue) 70% 75%);
    border-color: hsl(var(--badge-hue) 40% 40%);
}

/* Tom Select — align rounding/spacing with the rest of the UI */
.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
    border-radius: 0.5rem;
    min-height: calc(1.5em + 0.75rem + 2px);
}

/* Multi-selects (e.g. Tags) grow with each chip added — cap the height and
   scroll instead, so a tag-heavy field doesn't tower over the single-value
   selects sitting next to it in the same row. */
.ts-wrapper.multi .ts-control {
    max-height: 5rem;
    overflow-y: auto;
}

.ts-wrapper .ts-control {
    border-color: var(--fc-border);
}

.ts-wrapper.focus .ts-control {
    border-color: var(--fc-accent);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.15);
}

.ts-dropdown .active {
    background-color: var(--fc-accent);
    color: #fff;
}

[data-bs-theme="dark"] .ts-wrapper.multi .ts-control > div {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

/* Bulk-select checkbox — sits inline in the card's action row */
.link-card-select {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
}

.link-card-select .form-check-input {
    cursor: pointer;
    margin: 0;
}

.link-card-pin-icon {
    color: var(--fc-accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Favorite star — floats over the bottom-right corner of every card */
.link-card-favorite {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: var(--fc-surface);
    color: #94a3b8;
    box-shadow: var(--fc-shadow);
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.link-card-favorite:hover {
    color: #f6b128;
    transform: scale(1.1);
}

.link-card-favorite.is-favorite {
    color: #f6b128;
}

/* Save-to-my-links button — floats over the bottom-right corner of cards in "Partagés" */
.link-card-save {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 50%;
    background: var(--fc-surface);
    color: #94a3b8;
    box-shadow: var(--fc-shadow);
    transition: color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.link-card-save:hover {
    color: var(--fc-accent);
    transform: scale(1.1);
}

.link-card-save.is-saved {
    color: var(--fc-accent);
    cursor: default;
}

.link-card-save.is-saved:hover {
    transform: none;
}

.link-card-published-icon {
    color: var(--fc-accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Author attribution row — shown on cards in the "Partagés" feed */
.link-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.link-card-author-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--fc-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.link-card-author-name {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
}

/* Generic card-like surface — reused by trash rows and settings panels */
.fc-panel {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    box-shadow: var(--fc-shadow);
    padding: 1.25rem;
}

.fc-trash-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Bulk actions floating bar */
.fc-bulk-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    box-shadow: var(--fc-shadow-hover);
}

.fc-bulk-tag-input {
    width: auto;
}

.fc-bulk-tag-input .form-control {
    max-width: 140px;
}

/* Back-to-top button */
.fc-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1020;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: var(--fc-accent);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--fc-shadow-hover);
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.fc-scroll-top.fc-scroll-top-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fc-scroll-top:hover {
    background: var(--fc-accent-dark);
    color: #fff;
}

.fc-coming-soon-icon {
    font-size: 3rem;
    color: var(--fc-accent);
}

/* Right sidebar (stats/categories/tags cards) stays in place while only the
   links column scrolls underneath it. */
.fc-stats-sidebar {
    position: sticky;
    top: 1.5rem;
}

/* Stats card (right sidebar) */
.fc-stats-card {
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    padding: 1.25rem;
    box-shadow: var(--fc-shadow);
}

.fc-stats-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.fc-stats-card-header .bi {
    color: var(--fc-accent);
    font-size: 1.2rem;
}

.fc-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fc-stats-tile {
    background: var(--fc-surface-muted);
    border-radius: 0.65rem;
    padding: 0.9rem 1rem;
}

.fc-stats-tile-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.fc-stats-tile-label {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-top: 0.2rem;
}

/* Category groups card (right sidebar, below stats) */
.fc-category-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.fc-category-group-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fc-category-group-row .bi-folder-fill {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.fc-category-group-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.fc-category-group-count {
    font-weight: 600;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

/* Popular tags card (right sidebar, below category groups) */
.fc-popular-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-popular-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--fc-surface-muted);
    border: 1px solid var(--fc-border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--bs-body-color);
}

.fc-popular-tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--fc-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Category group pills */
.fc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    color: var(--bs-body-color);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.fc-pill:hover {
    border-color: var(--fc-accent);
    color: var(--fc-accent);
}

.fc-pill.active {
    background: var(--fc-nav-active);
    border-color: var(--fc-nav-active);
    color: #fff;
}

.fc-pill-add {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.fc-filter-dropdown {
    min-width: 260px;
}

/* Shared floating card menu (Pin/Refresh) — positioned via Floating UI so it
   always escapes the card's own overflow:hidden (needed for the thumbnail
   corners) instead of being clipped like a nested Bootstrap dropdown would be. */
.fc-card-menu {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1060;
    display: none;
    min-width: 180px;
    background: var(--fc-surface);
    border: 1px solid var(--fc-border);
    border-radius: 0.65rem;
    box-shadow: var(--fc-shadow-hover);
    padding: 0.35rem;
}

.fc-card-menu.show {
    display: block;
}

.fc-card-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    border-radius: 0.45rem;
    text-align: left;
    color: var(--bs-body-color);
    font-size: 0.9rem;
}

.fc-card-menu-item:hover {
    background: var(--fc-surface-muted);
    color: var(--fc-accent);
}

.fc-card-menu-divider {
    height: 1px;
    margin: 0.3rem 0.35rem;
    background: var(--fc-border);
}

.fc-card-menu-item-danger:hover {
    background: var(--fc-surface-muted);
    color: #dc3545;
}

.fc-card-menu-item-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
}

/* Apple-style toggle switch — used by the "Publier" row in the card menu */
.fc-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
}

.fc-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.fc-switch-track {
    position: absolute;
    inset: 0;
    background: var(--fc-border);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.fc-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--fc-surface);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}

.fc-switch input:checked + .fc-switch-track {
    background: var(--fc-accent);
}

.fc-switch input:checked + .fc-switch-track .fc-switch-thumb {
    transform: translateX(16px);
}

.fc-switch input:focus-visible + .fc-switch-track {
    outline: 2px solid var(--fc-accent);
    outline-offset: 2px;
}

/* Login page — always dark, independent of the app's light/dark theme toggle */
.fc-login-body {
    margin: 0;
}

.fc-login-page {
    min-height: 100vh;
    background-color: #0a0e1f;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: #fff;
}

.fc-login-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 3rem;
}

.fc-login-hero {
    display: flex;
    flex-direction: column;
    flex: 1 1 50%;
    min-height: min(38rem, 80vh);
    align-self: stretch;
    padding: 0.5rem 0;
}

.fc-login-hero-text {
    margin-top: 2rem;
}

.fc-login-stats {
    margin-top: auto;
}

.fc-login-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.fc-login-brand .bi {
    color: #7c6cf9;
    font-size: 1.4rem;
}

.fc-login-hero-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.fc-login-hero-accent {
    background: linear-gradient(90deg, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fc-login-hero-text p {
    max-width: 30rem;
    color: #b8bcd4;
    font-size: 1rem;
    line-height: 1.6;
}

.fc-login-stats {
    display: flex;
    gap: 2.5rem;
}

.fc-login-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.fc-login-stat-label {
    font-size: 0.85rem;
    color: #9598b4;
    margin-top: 0.15rem;
}

.fc-login-panel {
    flex: 0 1 26rem;
    display: flex;
    justify-content: center;
}

.fc-login-card {
    width: 100%;
    max-width: 26rem;
    background: rgba(19, 23, 43, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    padding: 2.25rem 2rem;
}

.fc-login-card-badge {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}

.fc-login-card-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.fc-login-card-subtitle {
    text-align: center;
    color: #9598b4;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.fc-login-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(248, 81, 81, 0.12);
    border: 1px solid rgba(248, 81, 81, 0.3);
    color: #fca5a5;
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.fc-login-error .bi {
    flex-shrink: 0;
    font-size: 1rem;
}

.fc-login-flash {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.fc-login-flash .bi {
    flex-shrink: 0;
    font-size: 1rem;
}

.fc-login-flash-success {
    background: rgba(46, 198, 105, 0.12);
    border-color: rgba(46, 198, 105, 0.3);
    color: #6ee7a0;
}

.fc-login-flash-error {
    background: rgba(248, 81, 81, 0.12);
    border-color: rgba(248, 81, 81, 0.3);
    color: #fca5a5;
}

.fc-login-flash-warning {
    background: rgba(246, 177, 40, 0.12);
    border-color: rgba(246, 177, 40, 0.3);
    color: #fbbf24;
}

.fc-login-flash-notice {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.fc-login-field {
    margin-bottom: 1.1rem;
}

.fc-login-field label {
    display: block;
    font-size: 0.85rem;
    color: #d5d7e6;
    margin-bottom: 0.4rem;
}

.fc-login-input {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #1c2238;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.6rem;
    padding: 0.65rem 0.9rem;
}

.fc-login-input:focus-within {
    border-color: #6366f1;
}

.fc-login-input .bi {
    color: #7578a0;
}

.fc-login-input input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.9rem;
}

.fc-login-input input::placeholder {
    color: #5c6088;
}

.fc-login-forgot {
    text-align: right;
    margin-bottom: 1rem;
}

.fc-login-link {
    color: #a5b4fc;
    font-size: 0.85rem;
    text-decoration: none;
}

.fc-login-link:hover {
    color: #c7d2fe;
    text-decoration: underline;
}

.fc-login-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #d5d7e6;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.fc-login-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: #6366f1;
}

.fc-login-submit {
    width: 100%;
    border: none;
    border-radius: 0.6rem;
    padding: 0.8rem;
    background: linear-gradient(90deg, #6366f1, #4f46e5);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    transition: filter 0.15s ease;
}

.fc-login-submit:hover {
    filter: brightness(1.08);
}

.fc-login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.fc-login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: #9598b4;
}

@media (max-width: 991.98px) {
    .fc-login-page {
        background-image: none !important;
    }

    .fc-login-content {
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 1.5rem;
    }

    .fc-login-hero {
        min-height: 0;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }

    .fc-login-hero-text p {
        max-width: none;
    }

    .fc-login-stats {
        justify-content: center;
    }

    .fc-login-panel {
        flex-basis: auto;
        width: 100%;
    }
}

/* Share dialog (SweetAlert2 popup content) — grid of platform buttons */
.fc-share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.fc-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--fc-border);
    border-radius: 0.75rem;
    background: var(--fc-surface);
    color: var(--bs-body-color);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.fc-share-btn:hover {
    transform: translateY(-2px);
    border-color: var(--fc-accent);
    color: var(--bs-body-color);
}

.fc-share-btn .bi {
    font-size: 1.5rem;
}

.fc-share-btn-whatsapp .bi { color: #25d366; }
.fc-share-btn-facebook .bi { color: #1877f2; }
.fc-share-btn-messenger .bi { color: #0084ff; }
.fc-share-btn-email .bi { color: #94a3b8; }
.fc-share-btn-copy .bi { color: var(--fc-accent); }

.fc-login-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

.fc-login-row-2 > .fc-login-field {
    min-width: 0;
}

@media (max-width: 420px) {
    .fc-login-row-2 {
        grid-template-columns: 1fr;
    }
}
