/* Public Design2 controls and the native Bootstrap bridge. No admin theme. */
.ff-theme-control{position:relative;display:inline-flex;flex:none;align-items:center;margin:0;min-width:0}
.ff-theme-control[hidden],.ff-theme-menu[hidden]{display:none}
.ff-theme-trigger{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:var(--ff-radius-pill);background:transparent;color:var(--ff-text-secondary);cursor:pointer}
.ff-theme-trigger [data-ff-theme-icon]{font-size:18px}
.ff-theme-trigger:hover{color:var(--ff-accent-text);background:var(--ff-bg-subtle)}
.ff-theme-trigger[aria-expanded="true"]{color:var(--ff-accent-text);background:var(--ff-bg-subtle)}
.ff-theme-trigger:focus-visible,.ff-theme-option:focus-visible{outline:3px solid var(--ff-focus);outline-offset:2px}
.ff-theme-menu{position:absolute;z-index:80;top:calc(100% + .4rem);right:0;width:10rem;max-width:calc(100vw - 1.5rem);padding:.35rem;background:var(--ff-bg-elevated);border:1px solid var(--ff-border);border-radius:var(--ff-radius-md);box-shadow:var(--ff-shadow-md)}
.ff-theme-option{display:flex;align-items:center;gap:.65rem;width:100%;min-height:40px;padding:.5rem .6rem;border:0;border-radius:var(--ff-radius-sm);background:transparent;color:var(--ff-text-primary);font:500 .82rem/1.4 var(--ff-font-frontend);text-align:left;white-space:nowrap;cursor:pointer}
.ff-theme-option:hover,.ff-theme-option:focus-visible{background:var(--ff-bg-subtle)}
.ff-theme-option[aria-checked="true"]{color:var(--ff-accent-text);background:var(--ff-selection-bg)}
.ff-theme-option .ff-icon{font-size:.9rem}
.ff-theme-check{--ff-icon:"\f00c";margin-left:auto;visibility:hidden}
.ff-theme-option[aria-checked="true"] .ff-theme-check{visibility:visible}
[data-ff-theme-icon][data-mode="system"]{--ff-icon:"\f390"}
[data-ff-theme-icon][data-mode="light"]{--ff-icon:"\f185"}
[data-ff-theme-icon][data-mode="dark"]{--ff-icon:"\f186"}
/* Readable legacy table/catalogue text in both public themes. */
.ff-v1:not(.ff-admin-shell) .table thead th{color:var(--ff-text-secondary);background-color:var(--ff-bg-subtle);border-color:var(--ff-border)}
.ff-v1:not(.ff-admin-shell) .fileItem-date{color:var(--ff-text-muted)}
.ff-v1:not(.ff-admin-shell) .fileItem{--bs-secondary-color:var(--ff-text-muted)}
.ff-v1:not(.ff-admin-shell) .btn-secondary.search-submit{color:#fff;background-color:var(--ff-brand-primary);border-color:var(--ff-brand-primary)}
html:not([data-theme="dark"]) .ff-v1:not(.ff-admin-shell){--ff-text-muted:#626e83}
.ff-auth-shell-header{gap:1rem}
.ff-auth-shell-header .ff-theme-control{position:absolute;right:var(--ff-page-gutter)}
@media(max-width:47.99rem){.ff-public-actions{flex-wrap:wrap}.ff-public-header-inner{row-gap:.6rem}.ff-auth-shell-header{justify-content:space-between}.ff-auth-shell-header .ff-theme-control{position:static}}
@media(max-width:35rem){.ff-user-utility{flex:1;justify-content:flex-end;flex-wrap:nowrap;padding-block:.35rem;gap:.3rem}.ff-account-dropdown summary{max-width:4rem}.ff-user-header-inner{min-height:4rem}.ff-public-actions{margin-left:auto}.ff-public-header .ff-brand-logo{max-width:7.6rem;height:auto}.ff-public-header .ff-public-menu-button{margin-left:auto}}

html[data-theme="dark"]{background:var(--ff-bg-page);scrollbar-color:var(--ff-border-strong) var(--ff-bg-page)}
html[data-theme="dark"] .ff-brand-logo[src$="flashfile-logo-compact-light.svg"]{content:url('/static/flashfile-brand/v2/svg/flashfile-logo-compact-dark.svg')}
html[data-theme="dark"] .ff-home-headline-emphasis{background-image:linear-gradient(100deg,var(--ff-accent-text),var(--ff-accent-secondary))}
html[data-theme="dark"] :is(.ff-public-nav-link,.ff-user-chip,.ff-side-uploader summary) .ff-icon{color:var(--ff-accent-text)}
html[data-theme="dark"] .ff-plan-notice--reserve::before{color:var(--ff-accent-secondary)}
html[data-theme="dark"] .ff-currency-choice input:checked+.ff-currency-card{border-color:var(--ff-accent-text);box-shadow:inset 0 0 0 1px var(--ff-accent-text)}
html[data-theme="dark"] .ff-v1{
 --bs-body-bg:var(--ff-bg-page);--bs-body-color:var(--ff-text-primary);--bs-heading-color:var(--ff-text-primary);
 --bs-secondary-color:var(--ff-text-secondary);--bs-tertiary-color:var(--ff-text-muted);
 --bs-secondary-bg:var(--ff-bg-subtle);--bs-tertiary-bg:var(--ff-bg-elevated);--bs-emphasis-color:var(--ff-text-primary);
 --bs-border-color:var(--ff-border);--bs-link-color:var(--ff-link);--bs-link-hover-color:var(--ff-link-hover);
 --bs-body-color-rgb:230,236,245;--bs-secondary-color-rgb:191,204,223;--bs-emphasis-color-rgb:230,236,245;
}
html[data-theme="dark"] .ff-v1 :is(.card,.modal-content,.dropdown-menu,.accordion-item,.list-group-item,.popover){color:var(--ff-text-primary);background-color:var(--ff-bg-elevated);border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 :is(.top-bar,.ff-upload-page .block){background-color:var(--ff-bg-surface);border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 :is(.card-header,.card-footer,.modal-header,.modal-footer,.popover-header){color:var(--ff-text-primary);background-color:var(--ff-bg-subtle);border-color:var(--ff-divider)}
html[data-theme="dark"] .ff-v1 :is(.dropdown-item,.list-group-item-action,.accordion-button){color:var(--ff-text-primary);background-color:transparent}
html[data-theme="dark"] .ff-v1 :is(.dropdown-item:hover,.dropdown-item:focus,.list-group-item-action:hover,.accordion-button:not(.collapsed)){color:var(--ff-text-primary);background-color:var(--ff-selection-bg)}
html[data-theme="dark"] .ff-v1 :is(.bg-white,.bg-light){background-color:var(--ff-bg-surface)!important}
html[data-theme="dark"] .ff-v1 :is(.text-dark,.text-body){color:var(--ff-text-primary)!important}
html[data-theme="dark"] .ff-v1 :is(.text-muted,.text-secondary){color:var(--ff-text-muted)!important}
html[data-theme="dark"] .ff-v1 .text-primary{color:var(--ff-accent-text)!important}
html[data-theme="dark"] .ff-v1 :is(.form-control,.form-select,.input-group-text,.ff-input,.ff-select){color:var(--ff-text-primary);background-color:var(--ff-input-bg);border-color:var(--ff-input-border);color-scheme:dark}
html[data-theme="dark"] .ff-v1 :is(input,textarea)::placeholder{color:var(--ff-text-muted);opacity:1}
html[data-theme="dark"] .ff-v1 :is(.form-control,.form-select,.ff-input,.ff-select):hover:not(:disabled){border-color:var(--ff-input-hover-border)}
html[data-theme="dark"] .ff-v1 :is(.form-control,.form-select,.ff-input,.ff-select):focus{color:var(--ff-text-primary);background-color:var(--ff-input-bg);border-color:var(--ff-focus);box-shadow:var(--ff-focus-ring)}
html[data-theme="dark"] .ff-v1 :is(.form-control,.form-select,.ff-input,.ff-select):disabled{color:var(--ff-text-muted);background-color:var(--ff-input-disabled-bg);cursor:not-allowed;opacity:1}
html[data-theme="dark"] .ff-v1 :is(input,textarea)[readonly]{background-color:var(--ff-input-readonly-bg)}
html[data-theme="dark"] .ff-v1 :is(.is-invalid,[aria-invalid="true"]){border-color:var(--ff-danger)!important}
html[data-theme="dark"] .ff-v1 .invalid-feedback{color:var(--ff-danger)}
html[data-theme="dark"] .ff-v1 input:-webkit-autofill{box-shadow:0 0 0 1000px var(--ff-input-bg) inset!important;-webkit-text-fill-color:var(--ff-text-primary);caret-color:var(--ff-text-primary)}
html[data-theme="dark"] .ff-v1 input:autofill{color:var(--ff-text-primary);background-color:var(--ff-input-bg)}
html[data-theme="dark"] .ff-v1 :is(input[type="checkbox"],input[type="radio"]){accent-color:var(--ff-brand-primary);color-scheme:dark}
html[data-theme="dark"] .ff-v1 .form-check-input{background-color:var(--ff-input-bg);border-color:var(--ff-input-border)}
html[data-theme="dark"] .ff-v1 .form-check-input:checked{background-color:var(--ff-brand-primary)}
html[data-theme="dark"] .ff-v1 .form-control::file-selector-button{color:var(--ff-text-primary);background-color:var(--ff-bg-subtle)}
html[data-theme="dark"] .ff-v1 .btn-primary{--bs-btn-bg:var(--ff-brand-primary);--bs-btn-border-color:var(--ff-brand-primary);--bs-btn-hover-bg:var(--ff-brand-primary-hover);--bs-btn-hover-border-color:var(--ff-brand-primary-hover);--bs-btn-active-bg:var(--ff-brand-primary-active);--bs-btn-color:#fff;--bs-btn-hover-color:#fff;--bs-btn-active-color:#fff}
html[data-theme="dark"] .ff-v1 :is(.btn-secondary,.btn-light,.btn-outline-secondary,.btn-outline-light){color:var(--ff-text-primary);background-color:var(--ff-button-neutral);border-color:var(--ff-input-border)}
html[data-theme="dark"] .ff-v1 :is(.btn-secondary,.btn-light,.btn-outline-secondary,.btn-outline-light):hover{background-color:var(--ff-bg-subtle)}
html[data-theme="dark"] .ff-v1 .btn-outline-primary{color:var(--ff-accent-text);border-color:var(--ff-accent-text)}
html[data-theme="dark"] .ff-v1 .btn-outline-primary:hover{color:#fff;background:var(--ff-brand-primary)}
html[data-theme="dark"] .ff-v1 .btn-danger{color:#fff;background-color:var(--ff-danger-solid);border-color:var(--ff-danger-solid)}
html[data-theme="dark"] .ff-v1 .btn-outline-danger{color:var(--ff-danger);border-color:var(--ff-danger)}
html[data-theme="dark"] .ff-v1 .btn-outline-danger:hover{color:#fff;background-color:var(--ff-danger-solid)}
html[data-theme="dark"] .ff-v1 .table{--bs-table-bg:var(--ff-bg-surface);--bs-table-color:var(--ff-text-primary);--bs-table-border-color:var(--ff-border);--bs-table-striped-bg:var(--ff-bg-subtle);--bs-table-striped-color:var(--ff-text-primary);--bs-table-hover-bg:var(--ff-bg-subtle);--bs-table-hover-color:var(--ff-text-primary);--bs-table-active-bg:var(--ff-selection-bg);--bs-table-active-color:var(--ff-text-primary)}
html[data-theme="dark"] .ff-v1 .table thead{--bs-table-bg:var(--ff-bg-subtle)}
html[data-theme="dark"] .ff-v1 :is(.page-link,.pagination a){color:var(--ff-link);background-color:var(--ff-bg-surface);border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 :is(.page-item.active .page-link,.page-link:hover){color:var(--ff-text-primary);background-color:var(--ff-selection-bg)}
html[data-theme="dark"] .ff-v1 :is(.page-item.disabled .page-link,.dropdown-item.disabled){color:var(--ff-text-muted);background-color:var(--ff-input-disabled-bg)}
html[data-theme="dark"] .ff-v1 :is(.alert-success,.text-bg-success){color:var(--ff-success)!important;background-color:var(--ff-success-bg)!important;border-color:var(--ff-success-border)}
html[data-theme="dark"] .ff-v1 :is(.alert-warning,.text-bg-warning){color:var(--ff-warning)!important;background-color:var(--ff-warning-bg)!important;border-color:var(--ff-warning-border)}
html[data-theme="dark"] .ff-v1 :is(.alert-danger,.text-bg-danger){color:var(--ff-danger)!important;background-color:var(--ff-danger-bg)!important;border-color:var(--ff-danger-border)}
html[data-theme="dark"] .ff-v1 :is(.alert-info,.text-bg-info){color:var(--ff-info)!important;background-color:var(--ff-info-bg)!important;border-color:var(--ff-info-border)}
html[data-theme="dark"] .ff-v1 .alert-secondary{color:var(--ff-text-secondary);background-color:var(--ff-bg-subtle);border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 .alert-link{color:inherit}
html[data-theme="dark"] .ff-v1 .text-success{color:var(--ff-success)!important}
html[data-theme="dark"] .ff-v1 .text-warning{color:var(--ff-warning)!important}
html[data-theme="dark"] .ff-v1 .text-danger{color:var(--ff-danger)!important}
html[data-theme="dark"] .ff-v1 .text-info{color:var(--ff-info)!important}
html[data-theme="dark"] .ff-v1 .modal-backdrop{background-color:#050a14}
html[data-theme="dark"] .ff-v1 .btn-close{filter:invert(1) grayscale(1);opacity:.8}
html[data-theme="dark"] .ff-v1 .tooltip{--bs-tooltip-bg:var(--ff-bg-elevated);--bs-tooltip-color:var(--ff-text-primary)}
html[data-theme="dark"] .ff-v1 .tooltip-inner{border:1px solid var(--ff-border-strong)}
html[data-theme="dark"] .ff-v1 .popover-body{color:var(--ff-text-primary)}
/* The existing player keeps its own dark controls/media styling. */
html[data-theme="dark"] .ff-v1 .ff-video-frame{border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 .ff-video-player{background:var(--ff-bg-surface);border-color:var(--ff-border)}
html[data-theme="dark"] .ff-v1 .ff-video-heading h2{color:var(--ff-text-primary)}
html[data-theme="dark"] .ff-v1 .ff-video-preview-label{color:var(--ff-premium);background:var(--ff-premium-bg);border-color:var(--ff-border-strong)}
