/* ========================================
   Internal Layout - Flightdemy Admin
   Header, Sidebar, Footer improvements
   ======================================== */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --header-height: 70px;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Header - Dashboard
   ======================================== */
.header.-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-fd-blue-3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1100;
}

.header.-dashboard .header__container {
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

/* Hamburger Button - styles moved to main.css (unified) */

/* Header Right Section */
.header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Icon Button */
.header__icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    text-decoration: none;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
}

.header__icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.header__icon-btn i {
    font-size: 18px;
}

/* Notification Badge */
.header__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-error-2);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-fd-blue-3);
}

/* User Menu */
.header__user {
    position: relative;
    margin-left: 8px;
}

.header__user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.header__user-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.header__user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.header__user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header__user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.header__user-chevron {
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    transition: var(--transition-fast);
}

.header__user.is-open .header__user-chevron {
    transform: rotate(180deg);
}

/* User Dropdown (internal header) */
.header__user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.header__user.is-open .header__user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown item styles are in main.css (shared) */

@media (max-width: 767px) {
    .header__user-info {
        display: none;
    }

    .header__user-btn {
        padding: 4px;
        border-radius: 50%;
    }

    .header__user-chevron {
        display: none;
    }
}

/* ========================================
   Sidebar - Dashboard (Light Minimal)
   ======================================== */
.dashboard__sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: #f8faf5;
    border-right: 1px solid #e8ebe0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: var(--transition-slow);
}

.dashboard__sidebar::-webkit-scrollbar {
    width: 4px;
}

.dashboard__sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard__sidebar::-webkit-scrollbar-thumb {
    background: #d4d9c5;
    border-radius: 4px;
}

.dashboard__sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--color-fd-green-4);
}

/* Sidebar Content */
.sidebar.-dashboard {
    padding: 12px 6px;
}

/* Sidebar Item */
.sidebar.-dashboard .sidebar__item {
    margin-bottom: 1px;
}

.sidebar.-dashboard .sidebar__item > a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 10px;
    border-radius: 6px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: var(--transition-fast);
}

.sidebar.-dashboard .sidebar__item > a:hover {
    background: #eef2e5;
    color: #2d3748;
}

.sidebar.-dashboard .sidebar__item > a i,
.sidebar.-dashboard .sidebar__item > a svg {
    width: 20px;
    font-size: 14px;
    margin-right: 14px;
    text-align: center;
    color: #a0aec0;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.sidebar.-dashboard .sidebar__item > a:hover i,
.sidebar.-dashboard .sidebar__item > a:hover svg {
    color: var(--color-fd-green-4);
}

/* Active State - Subtle green background */
.sidebar.-dashboard .sidebar__item.-is-active {
    background-color: rgba(140, 183, 63, 0.15) !important;
    border-radius: 6px;
}

.sidebar.-dashboard .sidebar__item.-is-active > a {
    color: var(--color-fd-green-4) !important;
}

.sidebar.-dashboard .sidebar__item.-is-active > a i,
.sidebar.-dashboard .sidebar__item.-is-active > a svg {
    color: var(--color-fd-green-4);
}

/* Section Title / Accordion Styles */
.sidebar.-dashboard .accordion {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8ebe0;
}

.sidebar.-dashboard .accordion__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.sidebar.-dashboard .accordion__button:hover {
    background: #eef2e5;
}

.sidebar.-dashboard .accordion__button .fw-600 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a0aec0;
    font-weight: 600;
}

.sidebar.-dashboard .accordion__icon {
    color: #cbd5e0;
    font-size: 10px;
}

.sidebar.-dashboard .accordion__icon i {
    font-size: 10px;
}

.sidebar.-dashboard .accordion__content__inner {
    padding-top: 6px;
}

/* Sidebar User Section (top) - Hidden on light theme, shown in header */
.sidebar__user-section {
    display: none;
}

/* Mobile Sidebar */
@media (max-width: 991px) {
    .dashboard.-home-9 .dashboard__sidebar {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0;
        width: 280px;
        height: calc(100vh - var(--header-height)) !important;
        margin-top: 0 !important;
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1000;
    }

    .dashboard.-home-9 .dashboard__sidebar.is-open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    }

    .dashboard__main {
        margin-left: 0 !important;
    }
}

/* Sidebar Overlay */
.sidebar-mobile-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 33, 81, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
    z-index: 999;
}

.sidebar-mobile-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Dashboard Main - Adjust for sidebar */
.dashboard__main {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    transition: var(--transition-slow);
}

/* FAP trainer sidebar is 340px wide; explicit class so it works even in browsers without :has() support */
.dashboard__main.fap-sidebar-open {
    margin-left: 340px !important;
    width: calc(100% - 340px) !important;
    max-width: calc(100% - 340px) !important;
}

@media (max-width: 991px) {
    .dashboard__main,
    .dashboard__main.fap-sidebar-open {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ========================================
   Footer - Dashboard
   ======================================== */
.footer.-dashboard {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid var(--color-fd-gray-4);
    margin-top: auto;
}

.footer.-dashboard .footer__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer.-dashboard .footer__copyright {
    font-size: 13px;
    color: var(--color-fd-gray-1);
}

.footer.-dashboard .footer__links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer.-dashboard .footer__link {
    font-size: 13px;
    color: var(--color-fd-gray-1);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer.-dashboard .footer__link:hover {
    color: var(--color-fd-green-4);
}

@media (max-width: 767px) {
    .footer.-dashboard {
        padding: 16px 20px;
    }

    .footer.-dashboard .footer__content {
        flex-direction: column;
        text-align: center;
    }

    .footer.-dashboard .footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}

/* ========================================
   Dashboard Layout Fixes
   ======================================== */
.dashboard.-home-9 {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

/* Sidebar hidden on desktop */
.dashboard.-home-9.-is-sidebar-hidden .dashboard__sidebar {
    transform: translateX(-100%);
}

.dashboard.-home-9.-is-sidebar-hidden .dashboard__main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
}

.dashboard__main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    padding: 20px 20px 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
}

.dashboard__content {
    flex: 1;
    max-width: 100%;
}

/* Footer always at bottom */
.footer.-dashboard {
    margin-top: auto;
}

/* Content wrapper adjustment */
.content-wrapper.js-content-wrapper {
    min-height: calc(100vh - var(--header-height));
}

@media (max-width: 991px) {
    .dashboard__main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px 16px 0 16px;
    }
}

@media (max-width: 575px) {
    .dashboard__main {
        padding: 16px 12px 0 12px;
    }
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

/* Tablet */
@media (max-width: 991px) {
    .header.-dashboard .header__logo img {
        width: 110px;
        height: auto;
    }
}

/* Mobile */
@media (max-width: 575px) {
    :root {
        --header-height: 60px;
        --sidebar-width: 280px;
    }

    .header.-dashboard .header__container {
        padding: 0 12px;
    }

    .header.-dashboard .header__hamburger {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }

    .header.-dashboard .header__hamburger i,
    .header.-dashboard .header__hamburger svg {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .header.-dashboard .header__logo img {
        width: 95px;
        height: auto;
    }

    .header__icon-btn {
        width: 36px;
        height: 36px;
    }

    .header__icon-btn i {
        font-size: 16px;
    }

    .header__badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: 4px;
        right: 4px;
    }
}


/* ========================================
   Layout: No-Header Mode (sidebar-logo)
   ======================================== */

/* Dashboard shifts to top when no header */
.dashboard.-home-9.layout-no-header {
    margin-top: 0;
    min-height: 100vh;
    overflow: hidden;
}

/* Sidebar occupies full viewport height */
.layout-no-header .dashboard__sidebar {
    top: 0;
    height: 100vh;
}

/* Main content removes header offset, sidebar margin and all padding */
.layout-no-header .dashboard__main {
    --sidebar-width: 0px;
    min-height: 100vh;
    max-height: 100vh;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden;
}

/* In /fap/xxx kiosk the FAP internal sidebar is still visible; reserve its width */
.layout-no-header .dashboard__main.fap-sidebar-open {
    margin-left: 340px !important;
    width: calc(100% - 340px) !important;
    max-width: calc(100% - 340px) !important;
}

/* In /fap-ios/xxx kiosk the FIOS icon sidebar is still visible; reserve its width */
.layout-no-header .dashboard__main.fios-layout {
    margin-left: 72px !important;
    width: calc(100% - 72px) !important;
    max-width: calc(100% - 72px) !important;
}
@media (max-width: 991px) {
    .layout-no-header .dashboard__main.fios-layout {
        margin-left: 64px !important;
        width: calc(100% - 64px) !important;
        max-width: calc(100% - 64px) !important;
    }
}

/* Trainer container fills full viewport when no header */
.layout-no-header .dashboard__main .b-container {
    height: 100vh !important;
}

/* Content wrapper full height */
.layout-no-header .content-wrapper.js-content-wrapper {
    min-height: 100vh;
    overflow: hidden;
}

/* Mobile sidebar adjustment */
@media (max-width: 991px) {
    .dashboard.-home-9.layout-no-header .dashboard__sidebar {
        top: 0 !important;
        height: 100vh !important;
    }

    .layout-no-header .sidebar-mobile-overlay {
        top: 0;
    }
}


/* ========================================
   Sidebar Logo Block (sidebar-logo mode)
   ======================================== */
.trainer-sidebar-logo {
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-fd-blue-4, #081433);
}

.trainer-sidebar-logo__row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.trainer-sidebar-logo__toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    display: none;
}

.trainer-sidebar-logo__toggle:hover {
    color: #fff;
}

@media (max-width: 991px) {
    .trainer-sidebar-logo__toggle {
        display: inline-flex;
    }
}

.trainer-sidebar-logo__brand img {
    height: 26px;
    width: auto;
}

.trainer-sidebar-logo__name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

/* Subscription mark inside sidebar */
.trainer-sidebar-logo__subscription {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin-bottom: 10px;
}



.trainer-sidebar-logo__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-fd-green-4);
    text-decoration: none;
    transition: color 0.2s;
}

.trainer-sidebar-logo__back:hover {
    color: var(--color-fd-green-3);
    text-decoration: none;
}



/* ========================================
   Config Module Tabs
   ======================================== */
.config-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    overflow: hidden;
}

.config-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 24px;
    background: #f8fafc;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.config-tabs__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.config-tabs__btn:hover {
    color: var(--color-fd-blue-3);
}

.config-tabs__btn.is-active {
    color: var(--color-fd-green-4);
    border-bottom-color: var(--color-fd-green-4);
    font-weight: 600;
}

.config-tabs__btn i {
    font-size: 15px;
}

.config-body {
    padding: 30px;
}

/* Config Dropzone */
.config-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    background: #f8f9fb;
    transition: all 0.2s;
}

.config-dropzone:hover {
    border-color: var(--color-fd-green-3);
    background: #f0fdf4;
}

.config-dropzone__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #64748b;
}

.config-dropzone__icon--success {
    background: #dcfce7;
    color: #16a34a;
}

.config-dropzone__text {
    font-size: 13px;
    color: #64748b;
}

.config-dropzone__hint {
    font-size: 11px;
    color: #94a3b8;
}

/* ========================================
   Announcements / Music - Folder System
   ======================================== */

/* Empty state */
.config-empty {
    text-align: center;
    padding: 48px 20px;
}
.config-empty__icon {
    font-size: 44px;
    color: #cbd5e1;
    margin-bottom: 14px;
}
.config-empty__title {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 4px;
}
.config-empty__desc {
    font-size: 13px;
    color: #94a3b8;
}

/* Folder card */
.ann-folder {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.ann-folder:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Folder header */
.ann-folder__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.ann-folder__header:hover {
    background: #f1f5f9;
}
.ann-folder__icon {
    color: var(--color-fd-green-4, #16a34a);
    font-size: 17px;
    flex-shrink: 0;
}
.ann-folder__input {
    flex: 1;
    min-width: 0;
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ann-folder__input:focus {
    outline: none;
    border-color: var(--color-fd-green-3);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}
.ann-folder__count {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ann-folder__delete,
.ann-item__delete {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ann-folder__delete:hover,
.ann-item__delete:hover {
    color: #ef4444;
    background: #fef2f2;
}
.ann-folder__chevron {
    color: #94a3b8;
    font-size: 11px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.ann-folder__chevron.is-open {
    transform: rotate(180deg);
}

/* Folder body */
.ann-folder__body {
    display: none;
    padding: 8px 16px 12px;
    border-top: 1px solid #f1f5f9;
    background: #fbfcfd;
}

/* Announcement item */
.ann-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: border-color 0.15s;
}
.ann-item:hover {
    border-color: #d1d5db;
}
.ann-item__input {
    flex: 3 1 0%;
    min-width: 0;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    background: transparent;
    transition: all 0.2s;
}
.ann-item__input:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.ann-item__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--color-fd-green-3);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}
.ann-item audio {
    height: 30px;
    flex: 2 1 0%;
    min-width: 0;
}
.ann-item__missing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Upload button inside folder */
.ann-folder__upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 5px 12px;
    font-size: 12px;
    color: #64748b;
    background: none;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.ann-folder__upload:hover {
    color: var(--color-fd-green-4);
    border-color: var(--color-fd-green-3);
    background: #f0fdf4;
}

/* Add folder button area */
.ann-add-folder {
    margin-top: 16px;
}


/* ========================================
   Config: Setting Items & Toggle Switch
   ======================================== */
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.setting-item:last-child {
    border-bottom: none;
}
.setting-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.setting-item__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-fd-blue-4, #112151);
}
.setting-item__control {
    flex-shrink: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
    margin: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-fd-green-4, #6b8e00);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ========================================
   Watermark + Subscription Mark (branding)
   ======================================== */
.fd-watermark {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: none;
    user-select: none;
    transition: opacity 0.4s ease;
}

.fd-watermark img {
    display: block;
    height: 22px;
    width: auto;
}

/* Subscription mark sits next to the logo in the top bar */
.fd-subscription-mark {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.fd-subscription-mark__label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.3px;
}

/* Hide watermark when sidebar is visible (logo already in sidebar) */
.dashboard.-home-9:not(.-is-sidebar-hidden) .fd-watermark {
    opacity: 0;
}

/* On mobile, sidebar is off-canvas so show watermark; hide when sidebar opens */
@media (max-width: 991px) {
    .dashboard.-home-9 .fd-watermark {
        opacity: 1;
    }
    .dashboard.-home-9.-sidebar-open .fd-watermark {
        opacity: 0;
    }
}

/* Hide branding (watermark + subscription mark) when addon is active */
.hide-branding .fd-watermark {
    display: none !important;
}

/* ========================================
   Shared Sidebar FAB (all trainers)
   ======================================== */
.trainer-sidebar-fab {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 950;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(30, 40, 60, 0.35);
    background: rgba(30, 40, 60, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto;
    transition: background 0.1s, transform 0.1s;
}

@media (pointer: coarse) {
    .trainer-sidebar-fab {
        display: flex;
    }
}

.trainer-sidebar-fab:active {
    background: rgba(30, 40, 60, 0.7);
    transform: scale(0.92);
}

/* ========================================
   Anonymous Trial Gate Overlay
   ======================================== */
.anon-gate-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 20, 51, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.anon-gate-overlay.active {
    display: flex;
}

.anon-gate-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    max-width: 440px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
    animation: confirmSlideIn 0.3s ease;
}

.anon-gate-card__icon {
    font-size: 48px;
    color: #f59e0b;
    margin-bottom: 16px;
}

.anon-gate-card__title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.anon-gate-card__subtitle {
    font-size: 17px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.anon-gate-card__text {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}