/* ==========================================================================
   FENKO design system on top of Bootstrap 5.3 (mobile first)
   ========================================================================== */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/InterVariable.woff2") format("woff2");
}

:root {
    /* Brand palette */
    --fk-night: #111827;
    --fk-night-soft: #1b2436;
    --fk-cyan: #18b7d9;
    --fk-cyan-hover: #14a6c6;
    --fk-cyan-dark: #087f9c;
    --fk-cyan-soft: #e0f7fc;
    --fk-orange: #f59e0b;
    --fk-orange-dark: #b45309;
    --fk-orange-soft: #fff4db;
    --fk-white: #ffffff;
    --fk-bg: #f8fafc;
    --fk-border: #e2e8f0;
    --fk-text: #1f2937;
    --fk-muted: #64748b;
    --fk-slate-soft: #f1f5f9;

    --fk-success: #16a34a;
    --fk-success-soft: #dcfce7;
    --fk-warning: #d97706;
    --fk-warning-soft: #fef3c7;
    --fk-danger: #dc2626;
    --fk-danger-soft: #fee2e2;
    --fk-info: #2563eb;
    --fk-info-soft: #dbeafe;

    /* Layout & motion */
    --fk-sidebar-width: 17rem;
    --fk-topbar-height: 4rem;
    --fk-radius-sm: 0.5rem;
    --fk-radius: 0.625rem;
    --fk-radius-lg: 1rem;
    --fk-shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.05);
    --fk-shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.06), 0 1px 2px rgba(17, 24, 39, 0.04);
    --fk-shadow-md: 0 8px 24px -6px rgba(17, 24, 39, 0.12), 0 2px 6px rgba(17, 24, 39, 0.05);
    --fk-shadow-lg: 0 24px 48px -12px rgba(17, 24, 39, 0.22);
    --fk-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --fk-fast: 150ms;
    --fk-base: 250ms;

    /* Bootstrap mapping */
    --bs-body-font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: 0.9375rem;
    --bs-body-line-height: 1.55;
    --bs-body-color: var(--fk-text);
    --bs-body-color-rgb: 31, 41, 55;
    --bs-body-bg: var(--fk-bg);
    --bs-emphasis-color: var(--fk-night);
    --bs-secondary-color: var(--fk-muted);
    --bs-tertiary-bg: var(--fk-slate-soft);
    --bs-border-color: var(--fk-border);
    --bs-border-radius: var(--fk-radius);
    --bs-border-radius-sm: var(--fk-radius-sm);
    --bs-border-radius-lg: var(--fk-radius-lg);
    --bs-heading-color: var(--fk-night);

    --bs-primary: var(--fk-cyan);
    --bs-primary-rgb: 24, 183, 217;
    --bs-primary-bg-subtle: var(--fk-cyan-soft);
    --bs-primary-text-emphasis: var(--fk-cyan-dark);
    --bs-primary-border-subtle: #a5e6f3;
    --bs-link-color: var(--fk-cyan-dark);
    --bs-link-color-rgb: 8, 127, 156;
    --bs-link-hover-color: #066a83;
    --bs-link-hover-color-rgb: 6, 106, 131;
    --bs-focus-ring-color: rgba(24, 183, 217, 0.3);

    --bs-success: var(--fk-success);
    --bs-success-rgb: 22, 163, 74;
    --bs-success-bg-subtle: var(--fk-success-soft);
    --bs-success-text-emphasis: #166534;
    --bs-success-border-subtle: #bbf7d0;
    --bs-warning: var(--fk-warning);
    --bs-warning-rgb: 217, 119, 6;
    --bs-warning-bg-subtle: var(--fk-warning-soft);
    --bs-warning-text-emphasis: #92400e;
    --bs-warning-border-subtle: #fde68a;
    --bs-danger: var(--fk-danger);
    --bs-danger-rgb: 220, 38, 38;
    --bs-danger-bg-subtle: var(--fk-danger-soft);
    --bs-danger-text-emphasis: #991b1b;
    --bs-danger-border-subtle: #fecaca;
    --bs-info: var(--fk-info);
    --bs-info-rgb: 37, 99, 235;
    --bs-info-bg-subtle: var(--fk-info-soft);
    --bs-info-text-emphasis: #1e40af;
    --bs-info-border-subtle: #bfdbfe;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    transition: color var(--fk-fast) ease;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

::selection {
    background: var(--fk-cyan-soft);
    color: var(--fk-night);
}

:focus-visible {
    outline: 2px solid var(--fk-cyan);
    outline-offset: 2px;
}

.icon {
    flex-shrink: 0;
    vertical-align: -0.2em;
}

.min-w-0 {
    min-width: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    border-radius: var(--fk-radius);
    background: var(--fk-night);
    color: #fff;
    transform: translateY(-200%);
    transition: transform var(--fk-fast) ease;
}

.skip-link:focus {
    transform: none;
}

/* --------------------------------------------------------------------------
   Logo
   -------------------------------------------------------------------------- */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    font-size: 1.0625rem;
    line-height: 1;
}

.logo-img {
    display: block;
    width: auto;
    height: 3rem;
}

.auth-brand .logo-img {
    height: 4.5rem;
}

.logo-link,
.logo-link:hover {
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: 0.5625rem;
    --bs-btn-font-size: 0.9375rem;
    --bs-btn-border-radius: var(--fk-radius);
    --bs-btn-focus-box-shadow: 0 0 0 4px rgba(24, 183, 217, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--fk-fast) ease, border-color var(--fk-fast) ease,
        color var(--fk-fast) ease, box-shadow var(--fk-base) var(--fk-ease), transform var(--fk-fast) ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn:hover {
    text-decoration: none;
}

.btn-sm {
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-padding-y: 0.375rem;
    --bs-btn-font-size: 0.8125rem;
    --bs-btn-border-radius: var(--fk-radius-sm);
    gap: 0.375rem;
}

.btn-lg {
    --bs-btn-padding-y: 0.75rem;
    --bs-btn-font-size: 1rem;
}

.btn-primary {
    --bs-btn-color: var(--fk-night);
    --bs-btn-bg: var(--fk-cyan);
    --bs-btn-border-color: var(--fk-cyan);
    --bs-btn-hover-color: var(--fk-night);
    --bs-btn-hover-bg: var(--fk-cyan-hover);
    --bs-btn-hover-border-color: var(--fk-cyan-hover);
    --bs-btn-active-color: var(--fk-night);
    --bs-btn-active-bg: #1197b5;
    --bs-btn-active-border-color: #1197b5;
    --bs-btn-disabled-color: var(--fk-night);
    --bs-btn-disabled-bg: var(--fk-cyan);
    --bs-btn-disabled-border-color: var(--fk-cyan);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px -4px rgba(24, 183, 217, 0.55);
}

.btn-dark {
    --bs-btn-bg: var(--fk-night);
    --bs-btn-border-color: var(--fk-night);
    --bs-btn-hover-bg: #1f2937;
    --bs-btn-hover-border-color: #1f2937;
}

.btn-light,
.btn-outline-secondary {
    --bs-btn-color: var(--fk-text);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--fk-border);
    --bs-btn-hover-color: var(--fk-night);
    --bs-btn-hover-bg: var(--fk-slate-soft);
    --bs-btn-hover-border-color: #cbd5e1;
    --bs-btn-active-color: var(--fk-night);
    --bs-btn-active-bg: #e2e8f0;
    --bs-btn-active-border-color: #cbd5e1;
    box-shadow: var(--fk-shadow-xs);
}

.btn-outline-primary {
    --bs-btn-color: var(--fk-cyan-dark);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #a5e6f3;
    --bs-btn-hover-color: var(--fk-cyan-dark);
    --bs-btn-hover-bg: var(--fk-cyan-soft);
    --bs-btn-hover-border-color: var(--fk-cyan);
    --bs-btn-active-color: var(--fk-cyan-dark);
    --bs-btn-active-bg: #c9f0f8;
    --bs-btn-active-border-color: var(--fk-cyan);
}

.btn-outline-danger {
    --bs-btn-color: var(--fk-danger);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fecaca;
    --bs-btn-hover-color: #b91c1c;
    --bs-btn-hover-bg: var(--fk-danger-soft);
    --bs-btn-hover-border-color: #fca5a5;
    --bs-btn-active-color: #b91c1c;
    --bs-btn-active-bg: #fecaca;
    --bs-btn-active-border-color: #fca5a5;
}

.btn-danger {
    --bs-btn-bg: var(--fk-danger);
    --bs-btn-border-color: var(--fk-danger);
    --bs-btn-hover-bg: #b91c1c;
    --bs-btn-hover-border-color: #b91c1c;
    --bs-btn-active-bg: #991b1b;
    --bs-btn-active-border-color: #991b1b;
}

.btn-ghost {
    --bs-btn-color: var(--fk-muted);
    --bs-btn-hover-color: var(--fk-night);
    --bs-btn-hover-bg: var(--fk-slate-soft);
    --bs-btn-active-bg: var(--fk-border);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-icon {
    --bs-btn-padding-x: 0.5rem;
    --bs-btn-padding-y: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fk-night);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    min-height: 2.75rem;
    border-color: var(--fk-border);
    border-radius: var(--fk-radius);
    background-color: #fff;
    color: var(--fk-text);
    font-size: 0.9375rem;
    box-shadow: var(--fk-shadow-xs);
    transition: border-color var(--fk-fast) ease, box-shadow var(--fk-base) var(--fk-ease);
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:hover,
.form-select:hover {
    border-color: #cbd5e1;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fk-cyan);
    box-shadow: 0 0 0 4px rgba(24, 183, 217, 0.15);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--fk-danger);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.form-select-sm {
    min-height: 2.25rem;
    font-size: 0.8125rem;
    border-radius: var(--fk-radius-sm);
}

.form-text {
    color: var(--fk-muted);
    font-size: 0.8125rem;
}

.invalid-feedback {
    font-size: 0.8125rem;
    font-weight: 500;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border-color: #cbd5e1;
}

.form-check-input:checked {
    background-color: var(--fk-cyan);
    border-color: var(--fk-cyan);
}

.form-check-input:focus {
    border-color: var(--fk-cyan);
    box-shadow: 0 0 0 4px rgba(24, 183, 217, 0.15);
}

.input-affix {
    position: relative;
}

.input-affix .form-control {
    padding-left: 2.625rem;
}

.input-affix.has-toggle .form-control {
    padding-right: 2.875rem;
}

.input-affix-icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: color var(--fk-fast) ease;
}

.input-affix:focus-within .input-affix-icon {
    color: var(--fk-cyan-dark);
}

.input-affix-toggle {
    position: absolute;
    top: 50%;
    right: 0.375rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: var(--fk-radius-sm);
    background: transparent;
    color: var(--fk-muted);
    transition: background-color var(--fk-fast) ease, color var(--fk-fast) ease;
}

.input-affix-toggle:hover {
    background: var(--fk-slate-soft);
    color: var(--fk-night);
}

/* --------------------------------------------------------------------------
   Cards, badges, avatars
   -------------------------------------------------------------------------- */

.card {
    --bs-card-border-color: var(--fk-border);
    --bs-card-border-radius: var(--fk-radius-lg);
    --bs-card-inner-border-radius: calc(var(--fk-radius-lg) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
    box-shadow: var(--fk-shadow-sm);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom-color: var(--fk-border);
}

.card-footer {
    padding: 0.875rem 1.25rem;
    background: var(--fk-bg);
    border-top-color: var(--fk-border);
}

.card-body > .mb-3:last-child {
    margin-bottom: 0 !important;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0;
}

.card-interactive {
    transition: transform var(--fk-base) var(--fk-ease), box-shadow var(--fk-base) var(--fk-ease),
        border-color var(--fk-fast) ease;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--fk-shadow-md);
    border-color: #cbd5e1;
}

.card-current {
    border-color: var(--fk-cyan);
    box-shadow: 0 0 0 3px rgba(24, 183, 217, 0.15), var(--fk-shadow-sm);
}

.card-dashed {
    border: 1.5px dashed #cbd5e1;
    background: transparent;
    box-shadow: none;
    color: var(--fk-muted);
    transition: border-color var(--fk-fast) ease, background-color var(--fk-fast) ease, color var(--fk-fast) ease;
}

.card-dashed:hover {
    border-color: var(--fk-cyan);
    background: rgba(224, 247, 252, 0.5);
    color: var(--fk-cyan-dark);
    text-decoration: none;
}

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.icon-tile-sm {
    width: 2rem;
    height: 2rem;
    border-radius: var(--fk-radius-sm);
}

.icon-tile-lg {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
}

.icon-tile-cyan { background: var(--fk-cyan-soft); color: var(--fk-cyan-dark); }
.icon-tile-orange { background: var(--fk-orange-soft); color: var(--fk-orange-dark); }
.icon-tile-night { background: var(--fk-night); color: var(--fk-cyan); }
.icon-tile-slate { background: var(--fk-slate-soft); color: var(--fk-muted); }
.icon-tile-danger { background: var(--fk-danger-soft); color: var(--fk-danger); }

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-role::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: currentColor;
}

.badge-role-owner { background: var(--fk-cyan-soft); color: var(--fk-cyan-dark); }
.badge-role-admin { background: var(--fk-orange-soft); color: var(--fk-orange-dark); }
.badge-role-member { background: var(--fk-slate-soft); color: #475569; }

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-soft-cyan { background: var(--fk-cyan-soft); color: var(--fk-cyan-dark); }
.badge-soft-warning { background: var(--fk-warning-soft); color: #92400e; }
.badge-soft-slate { background: var(--fk-slate-soft); color: var(--fk-muted); }
.badge-soft-success { background: var(--fk-success-soft); color: #166534; }
.badge-soft-danger { background: var(--fk-danger-soft); color: #991b1b; }
.badge-soft-night { background: var(--fk-night); color: #fff; }

.fenko-ia-badge {
    letter-spacing: 0.02em;
    text-transform: none;
}

.sidebar-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 0;
}

.sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.75rem 0.5rem 0.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-footer-logo {
    display: flex;
    justify-content: center;
    opacity: 0.92;
    transition: opacity var(--fk-fast) ease;
}

.sidebar-footer-logo:hover {
    opacity: 1;
    text-decoration: none;
}

.sidebar-footer-logo .logo-img {
    height: 2.5rem;
    width: auto;
}

.sidebar-footer-text {
    max-width: 13rem;
    margin: 0;
    text-align: center;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #64748b;
}

.sidebar-fenko-ia-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-fenko-ia-mark .icon {
    color: var(--fk-cyan);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 700;
    letter-spacing: 0.02em;
    user-select: none;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.125rem; }

.avatar-square {
    border-radius: 0.75rem;
}

.avatar-tone-0 { background: var(--fk-cyan-soft); color: var(--fk-cyan-dark); }
.avatar-tone-1 { background: var(--fk-orange-soft); color: var(--fk-orange-dark); }
.avatar-tone-2 { background: var(--fk-night); color: #fff; }
.avatar-tone-3 { background: var(--fk-info-soft); color: #1e40af; }

/* --------------------------------------------------------------------------
   Tables & lists
   -------------------------------------------------------------------------- */

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: var(--fk-bg);
    --bs-table-border-color: var(--fk-border);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.875rem 1.25rem;
}

.table thead th {
    background: var(--fk-bg);
    color: var(--fk-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.table tbody tr {
    transition: background-color var(--fk-fast) ease;
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--fk-border);
    transition: background-color var(--fk-fast) ease;
}

.list-row:last-child {
    border-bottom: 0;
}

.list-row:hover {
    background: var(--fk-bg);
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.cell-user-name {
    font-weight: 600;
    color: var(--fk-night);
}

.cell-user-meta {
    font-size: 0.8125rem;
    color: var(--fk-muted);
    overflow-wrap: anywhere;
}

.role-form .form-select {
    min-width: 9rem;
}

@media (max-width: 575.98px) {
    .table-stack thead {
        display: none;
    }

    .table-stack tbody tr {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--fk-border);
    }

    .table-stack tbody tr:last-child {
        border-bottom: 0;
    }

    .table-stack > :not(caption) > * > * {
        padding: 0;
        border-bottom: 0;
    }

    .members-role {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .members-role .role-form {
        flex: 1 1 12rem;
    }

    .members-role .role-form .form-select {
        min-width: 0;
    }
}

.role-save {
    animation: fk-pop var(--fk-base) var(--fk-ease) both;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
    --bs-pagination-color: var(--fk-text);
    --bs-pagination-border-color: var(--fk-border);
    --bs-pagination-hover-color: var(--fk-night);
    --bs-pagination-hover-bg: var(--fk-slate-soft);
    --bs-pagination-hover-border-color: var(--fk-border);
    --bs-pagination-active-color: var(--fk-night);
    --bs-pagination-active-bg: var(--fk-cyan);
    --bs-pagination-active-border-color: var(--fk-cyan);
    --bs-pagination-focus-box-shadow: 0 0 0 4px rgba(24, 183, 217, 0.25);
    --bs-pagination-border-radius: var(--fk-radius);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Dropdowns, modal, toasts
   -------------------------------------------------------------------------- */

.dropdown-menu {
    --bs-dropdown-border-color: var(--fk-border);
    --bs-dropdown-border-radius: 0.75rem;
    --bs-dropdown-padding-x: 0.375rem;
    --bs-dropdown-padding-y: 0.375rem;
    --bs-dropdown-item-padding-x: 0.75rem;
    --bs-dropdown-item-padding-y: 0.5rem;
    --bs-dropdown-item-border-radius: var(--fk-radius-sm);
    --bs-dropdown-link-hover-bg: var(--fk-slate-soft);
    --bs-dropdown-link-active-bg: var(--fk-cyan-soft);
    --bs-dropdown-link-active-color: var(--fk-cyan-dark);
    --bs-dropdown-header-color: var(--fk-muted);
    --bs-dropdown-font-size: 0.875rem;
    box-shadow: var(--fk-shadow-lg);
    min-width: 14rem;
}

.dropdown-menu.show {
    animation: fk-pop 180ms var(--fk-ease) both;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 500;
}

.dropdown-header {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal {
    --bs-modal-border-radius: var(--fk-radius-lg);
    --bs-modal-border-color: transparent;
    --bs-modal-box-shadow: var(--fk-shadow-lg);
    --bs-modal-header-border-color: transparent;
    --bs-modal-footer-border-color: transparent;
    --bs-modal-padding: 1.5rem;
}

.modal-backdrop {
    --bs-backdrop-bg: var(--fk-night);
    --bs-backdrop-opacity: 0.55;
}

.modal.fade .modal-dialog {
    transform: translateY(12px) scale(0.97);
    transition: transform 280ms var(--fk-ease);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
    gap: 0.5rem;
}

.modal-footer > * {
    margin: 0;
}

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
}

.app-toast {
    --bs-toast-max-width: 100%;
    --bs-toast-border-radius: 0.875rem;
    --bs-toast-border-color: var(--fk-border);
    --bs-toast-bg: #fff;
    --bs-toast-box-shadow: var(--fk-shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
    pointer-events: auto;
}

.app-toast.showing,
.app-toast.show {
    animation: fk-toast-in 400ms var(--fk-ease) both;
}

.app-toast-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 0.875rem 1rem 1rem;
    font-weight: 500;
    color: var(--fk-night);
}

.app-toast-body .icon-tile {
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
}

.app-toast-message {
    flex: 1;
    padding-top: 0.3125rem;
    font-size: 0.875rem;
}

.app-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: fk-progress 5s linear forwards;
}

.app-toast:hover .app-toast-progress {
    animation-play-state: paused;
}

.app-toast-success .app-toast-progress { background: var(--fk-success); }
.app-toast-error .app-toast-progress { background: var(--fk-danger); }
.app-toast-info .app-toast-progress { background: var(--fk-info); }

.icon-tile-success { background: var(--fk-success-soft); color: var(--fk-success); }
.icon-tile-info { background: var(--fk-info-soft); color: var(--fk-info); }

.alert {
    --bs-alert-border-radius: var(--fk-radius);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert .icon {
    margin-top: 0.0625rem;
}

/* --------------------------------------------------------------------------
   App shell: sidebar, topbar, content
   -------------------------------------------------------------------------- */

.app-body {
    min-height: 100vh;
    background-color: var(--fk-bg);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar-wrap {
    width: 0;
}

.app-sidebar {
    --bs-offcanvas-bg: var(--fk-night);
    --bs-offcanvas-color: #cbd5e1;
    --bs-offcanvas-width: 17.5rem;
    --bs-offcanvas-border-color: transparent;
    --bs-offcanvas-transition: transform 0.35s var(--fk-ease);
    color: #cbd5e1;
}

.app-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.sidebar-brand-minimal {
    justify-content: flex-end;
    padding-bottom: 0;
}

.sidebar-close {
    color: #94a3b8;
}

.sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.company-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    text-align: left;
    transition: background-color var(--fk-fast) ease, border-color var(--fk-fast) ease;
}

.sidebar-company-logo {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    object-fit: cover;
    background: #fff;
}

.company-switcher-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-switcher-role {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

.company-switcher .avatar-tone-2 {
    background: var(--fk-cyan);
    color: var(--fk-night);
}

.sidebar-section-label {
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--fk-radius);
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
    transition: background-color var(--fk-fast) ease, color var(--fk-fast) ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.sidebar-link .icon {
    transition: color var(--fk-fast) ease, transform var(--fk-base) var(--fk-ease);
}

.sidebar-link:hover .icon {
    transform: translateX(1px);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(24, 183, 217, 0.14);
}

.sidebar-link.active .icon {
    color: var(--fk-cyan);
}

.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--fk-cyan);
}

.app-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--fk-topbar-height);
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--fk-border);
}

.db-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.db-status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.db-status-ok {
    background: var(--fk-success-soft);
    color: #166534;
}

.db-status-down {
    background: var(--fk-danger-soft);
    color: #991b1b;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--fk-night);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background-color var(--fk-fast) ease, border-color var(--fk-fast) ease;
}

.user-menu-toggle:hover,
.user-menu-toggle[aria-expanded="true"] {
    background: #fff;
    border-color: var(--fk-border);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem 0.75rem;
}

.app-content {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fk-cyan-dark);
}

.page-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--fk-muted);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Dashboard widgets
   -------------------------------------------------------------------------- */

.stat-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
}

.stat-card-inline .card-body {
    flex-direction: row;
    align-items: center;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--fk-muted);
    margin-bottom: 0.125rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--fk-night);
    margin: 0;
}

.stat-value-sm {
    font-size: 1.125rem;
    letter-spacing: -0.01em;
}

.stat-hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--fk-muted);
}

.stat-hint-up { color: var(--fk-success); }
.stat-hint-down { color: var(--fk-danger); }

.value-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.value-panel-title .icon {
    color: var(--fk-cyan);
}

.progress {
    --bs-progress-height: 0.5rem;
    --bs-progress-bg: var(--fk-slate-soft);
    --bs-progress-bar-bg: var(--fk-cyan);
    --bs-progress-border-radius: 999px;
}

.progress-bar {
    transition: width 800ms var(--fk-ease);
}

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.checklist-item + .checklist-item {
    border-top: 1px solid var(--fk-border);
}

.checklist-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    color: transparent;
    flex-shrink: 0;
    transition: all var(--fk-base) var(--fk-ease);
}

.checklist-item.is-done .checklist-mark {
    border-color: var(--fk-success);
    background: var(--fk-success);
    color: #fff;
}

.checklist-item.is-done .checklist-title {
    color: var(--fk-muted);
    text-decoration: line-through;
    text-decoration-color: #cbd5e1;
}

.checklist-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--fk-night);
}

.checklist-text {
    font-size: 0.8125rem;
    color: var(--fk-muted);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border: 0;
    background: var(--fk-night);
    color: #cbd5e1;
}

.hero-card::after {
    content: "";
    position: absolute;
    right: -4rem;
    top: -4rem;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 183, 217, 0.35), transparent 70%);
    pointer-events: none;
}

.hero-card h2 {
    color: #fff;
}

.hero-text {
    max-width: 34rem;
}

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.empty-state-icon {
    position: relative;
    margin-bottom: 1rem;
}

.empty-state-icon::before {
    content: "";
    position: absolute;
    inset: -0.5rem;
    border-radius: 1.25rem;
    background: var(--fk-cyan-soft);
    opacity: 0.5;
    z-index: -1;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.empty-state-text {
    max-width: 24rem;
    color: var(--fk-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Settings layout
   -------------------------------------------------------------------------- */

.settings-section {
    display: grid;
    gap: 1rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--fk-border);
}

.settings-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.settings-section-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.settings-section-text {
    color: var(--fk-muted);
    font-size: 0.875rem;
    margin: 0;
}

.danger-card {
    border-color: #fecaca;
}

/* --------------------------------------------------------------------------
   Auth (guest) layout
   -------------------------------------------------------------------------- */

.auth-body {
    min-height: 100vh;
    background: #fff;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 46%;
    max-width: 40rem;
    padding: 3rem;
    overflow: hidden;
    background: var(--fk-night);
    color: #cbd5e1;
    isolation: isolate;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    z-index: -1;
    animation: fk-float 14s ease-in-out infinite alternate;
}

.auth-brand::before {
    width: 26rem;
    height: 26rem;
    right: -8rem;
    top: -6rem;
    background: radial-gradient(circle, rgba(24, 183, 217, 0.4), transparent 68%);
}

.auth-brand::after {
    width: 20rem;
    height: 20rem;
    left: -6rem;
    bottom: -6rem;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 68%);
    animation-delay: -7s;
}

.auth-brand-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.auth-headline {
    color: #fff;
    font-size: 2.25rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.auth-headline span {
    color: var(--fk-cyan);
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: 1rem;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
}

.auth-features .icon-tile {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--fk-cyan);
}

.auth-cycle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    font-size: 0.8125rem;
    font-weight: 600;
}

.auth-cycle-step {
    color: #e2e8f0;
}

.auth-cycle-step:last-of-type {
    color: var(--fk-orange);
}

.auth-cycle-arrow {
    color: var(--fk-cyan);
}

.auth-main {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: #fff;
}

.auth-panel {
    width: 100%;
    max-width: 25rem;
}

.auth-title {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.375rem;
}

.auth-subtitle {
    color: var(--fk-muted);
    margin-bottom: 2rem;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--fk-muted);
}

.auth-footer a {
    font-weight: 600;
}

.auth-db-status {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

/* Error pages */

.error-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.25rem;
    text-align: center;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--fk-cyan), var(--fk-cyan-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.error-message {
    max-width: 26rem;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes fk-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes fk-pop {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes fk-toast-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes fk-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes fk-float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-2rem, 2rem) scale(1.08); }
}

.animate-in > * {
    animation: fk-fade-up 500ms var(--fk-ease) both;
}

.animate-in > *:nth-child(2) { animation-delay: 50ms; }
.animate-in > *:nth-child(3) { animation-delay: 100ms; }
.animate-in > *:nth-child(4) { animation-delay: 150ms; }
.animate-in > *:nth-child(5) { animation-delay: 200ms; }
.animate-in > *:nth-child(n+6) { animation-delay: 250ms; }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 576px) {
    .toast-stack {
        left: auto;
        width: 24rem;
    }

    .app-content {
        padding: 2rem 1.5rem 3rem;
    }
}

@media (min-width: 576px) {
    .col-role {
        width: 17.5rem;
    }

    .stat-card .card-body {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 1.25rem;
    }
}

@media (min-width: 768px) {
    .settings-section {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        gap: 2rem;
    }

    .page-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 992px) {
    .app-sidebar-wrap {
        position: sticky;
        top: 0;
        flex: 0 0 var(--fk-sidebar-width);
        width: var(--fk-sidebar-width);
        height: 100vh;
        background: var(--fk-night);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    }

    .app-sidebar {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .app-topbar {
        padding: 0 2rem;
    }

    .app-content {
        padding: 2.5rem 2rem 4rem;
    }

    .auth-brand {
        display: flex;
    }
}

@media (min-width: 1200px) {
    .auth-brand {
        padding: 3.5rem 4rem;
    }

    .auth-headline {
        font-size: 2.75rem;
    }
}

/* --------------------------------------------------------------------------
   Public feedback page (mobile first)
   -------------------------------------------------------------------------- */

.public-body {
    min-height: 100vh;
    background: var(--fk-bg);
}

.public-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 30rem;
    min-height: 100vh;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
}

.public-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
}

.public-brand-logo {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    object-fit: cover;
    background: #fff;
    box-shadow: var(--fk-shadow-sm);
}

.public-brand-name {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--fk-night);
}

.public-brand-message {
    margin: 0;
    color: var(--fk-muted);
}

.public-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.75rem;
    color: var(--fk-muted);
}

.rating-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.rating-choice {
    position: relative;
}

.rating-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-choice label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 4.25rem;
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--fk-fast) ease, background-color var(--fk-fast) ease, transform var(--fk-fast) ease;
}

.rating-choice-value {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1;
    color: var(--fk-night);
}

.rating-choice-label {
    font-size: 0.6875rem;
    color: var(--fk-muted);
    text-align: center;
    line-height: 1.2;
}

.rating-choice input:focus-visible + label {
    outline: 3px solid rgba(24, 183, 217, 0.35);
    outline-offset: 2px;
}

.rating-choice input:checked + label {
    border-color: var(--fk-cyan);
    background: var(--fk-cyan-soft);
    transform: translateY(-1px);
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Feedback, Radar & action plan
   -------------------------------------------------------------------------- */

.rating-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: var(--fk-cyan-soft);
    color: var(--fk-night);
    font-weight: 700;
    font-size: 0.8125rem;
}

.rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.rating-distribution-row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.8125rem;
}

.rating-distribution-row .progress {
    height: 0.5rem;
}

.rating-distribution-count {
    text-align: right;
    color: var(--fk-muted);
}

.chart-card .card-header {
    border-bottom: 1px solid var(--fk-border);
}

.chart-wrap {
    position: relative;
    height: 16rem;
}

.chart-wrap-sm {
    height: 14rem;
}

.chart-wrap-wide {
    height: 18rem;
}

.chart-wrap-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 8rem;
}

.list-row-link {
    color: inherit;
    text-decoration: none;
}

.list-row-link:hover {
    color: inherit;
}

.list-row-text {
    color: var(--fk-text);
    font-size: 0.9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: var(--fk-muted);
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.625rem;
    border: 1px solid var(--fk-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.8125rem;
    color: var(--fk-text);
}

.topic-chip-count {
    font-weight: 700;
    color: var(--fk-cyan-dark);
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.insight-list li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.9375rem;
}

.insight-list .icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.recommendation {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--fk-border);
}

.recommendation:last-child {
    border-bottom: 0;
}

.recommendation-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.recommendation-text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--fk-muted);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.875rem;
    border: 1px solid var(--fk-border);
    border-radius: 999px;
    background: #fff;
    color: var(--fk-text);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}

.filter-tab:hover {
    border-color: var(--fk-cyan);
    color: var(--fk-text);
}

.filter-tab.active {
    border-color: var(--fk-night);
    background: var(--fk-night);
    color: #fff;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--fk-cyan);
}

.timeline-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--fk-muted);
}

.text-pre-line {
    white-space: pre-line;
}

.public-link-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logo-preview {
    width: 4rem;
    height: 4rem;
    border-radius: 0.875rem;
    object-fit: cover;
    border: 1px solid var(--fk-border);
    background: #fff;
}

.qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.qr-preview {
    width: 11.25rem;
    height: 11.25rem;
    flex-shrink: 0;
    padding: 0.5rem;
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius-lg);
    background: var(--fk-white);
}

.detail-list-row {
    padding: 0.75rem 0;
    border-top: 1px solid var(--fk-border);
}

.detail-list-row dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fk-muted);
}

.detail-list-row dd {
    margin: 0.125rem 0 0;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

@media (min-width: 576px) {
    .public-shell {
        padding-top: 3rem;
    }

    .public-link-box {
        flex-direction: row;
    }

    .qr-panel {
        flex-direction: row;
        align-items: flex-start;
    }

    .detail-list-row {
        display: grid;
        grid-template-columns: 11rem 1fr;
        gap: 1rem;
    }

    .detail-list-row dd {
        margin-top: 0;
    }

    .rating-choice-label {
        font-size: 0.75rem;
    }
}
