/* Shared, opt-in daylight mode for the PL.cool family of applications. */
.theme-toggle,.theme-floating-button,.kino-theme-toggle,.team-theme-toggle,.vod-theme-toggle{
  display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;padding:0!important;
  border:1px solid rgba(244,181,55,.42)!important;border-radius:13px!important;
  color:#815100!important;background:linear-gradient(145deg,#fffaf0,#ffe9b8)!important;
  box-shadow:0 7px 18px rgba(127,90,20,.13);font:800 1.16rem/1 system-ui!important;cursor:pointer;
}
.theme-toggle:hover,.theme-floating-button:hover,.kino-theme-toggle:hover,.team-theme-toggle:hover,.vod-theme-toggle:hover{filter:brightness(1.02);transform:translateY(-1px)}
.theme-floating-button{position:fixed;z-index:10000;top:max(16px,env(safe-area-inset-top));right:18px}

html[data-theme="light"]{color-scheme:light}
html[data-theme="light"] body{color:#172238;background:#f4f7fb}
html[data-theme="light"] ::selection{color:#102134;background:#a9ead0}

/* Primary library and its administrative/authentication views. */
html[data-theme="light"] body:not(.message-vod-embed):not(.messages-embed){--bg-primary:#f4f7fb;--bg-secondary:#eaf0f7;--glass-header:rgba(255,255,255,.88);--card-bg:#fff;--card-border:rgba(31,62,99,.15);--text-main:#16233a;--text-muted:#61718a;--accent:#138b69;background:radial-gradient(circle at 12% -12%,#d9f5eb 0,transparent 31%),radial-gradient(circle at 100% 0,#e6effe 0,transparent 29%),#f4f7fb}
html[data-theme="light"] .top-header,html[data-theme="light"] .switcher-container{border-color:rgba(39,70,105,.13)!important;background:rgba(255,255,255,.9)!important;box-shadow:0 10px 30px rgba(42,61,89,.08)}
html[data-theme="light"] .switch-btn,html[data-theme="light"] .sidebar-toggle,html[data-theme="light"] .mobile-more-menu button{color:#40516b!important;background:rgba(33,67,109,.045)!important}
html[data-theme="light"] .switch-btn.active,html[data-theme="light"] .switch-btn:hover{color:#075f48!important;background:rgba(30,164,119,.13)!important}
html[data-theme="light"] .card,html[data-theme="light"] .library-panel,html[data-theme="light"] .settings-card,html[data-theme="light"] .notes-container{border-color:rgba(31,62,99,.14)!important;background:#fff!important;box-shadow:0 12px 30px rgba(47,67,92,.06)}
html[data-theme="light"] .title,html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3{color:#172238!important}
html[data-theme="light"] .meta,html[data-theme="light"] .brand-subtitle,html[data-theme="light"] .small{color:#67758b!important}
html[data-theme="light"] .user-session,html[data-theme="light"] .quota-box,html[data-theme="light"] .filter-results{border-color:rgba(31,62,99,.14)!important;background:#fff!important;color:#25334a!important}

/* Messages: cool white, high contrast cards, no change to message semantics. */
html[data-theme="light"] body:has(.messenger-shell){--bg:#f4f7fb;--panel:#fff;--panel2:#edf3fa;--line:rgba(38,66,103,.14);--line2:rgba(38,66,103,.28);--text:#172238;--muted:#64738a;--accent:#168c6b;--accent2:#228ba4;--danger:#ce4058;--bubble:#fff;--mine:#e3f8ef;--shadow:0 20px 52px rgba(44,63,88,.12);background:radial-gradient(circle at 7% -10%,#d7f6eb,transparent 31%),#f4f7fb}
html[data-theme="light"] .messenger-shell{background:rgba(255,255,255,.78);border-color:rgba(38,66,103,.13)}
html[data-theme="light"] .messenger-sidebar{background:linear-gradient(180deg,#fff,#f1f6fb);border-color:rgba(38,66,103,.13)}
html[data-theme="light"] .messenger-home,html[data-theme="light"] .avatar{color:#123f40;background:linear-gradient(145deg,#e0f8ee,#dcebf9);border-color:rgba(22,140,107,.3)}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea{background:#fff;color:#172238}
html[data-theme="light"] .conversation-item:hover{background:rgba(29,82,122,.055)}
html[data-theme="light"] .conversation-item.active{background:linear-gradient(135deg,#e2f8ee,#e9f1fb);border-color:rgba(22,140,107,.3)}
html[data-theme="light"] .chat-header,html[data-theme="light"] .composer{background:rgba(255,255,255,.93);border-color:rgba(38,66,103,.14)}
html[data-theme="light"] .message-bubble{background:#fff;border-color:rgba(38,66,103,.14);box-shadow:0 7px 18px rgba(48,64,86,.08)}
html[data-theme="light"] .message-row.mine .message-bubble{background:linear-gradient(135deg,#ddf8ed,#d8f4ef);border-color:rgba(22,140,107,.25)}
html[data-theme="light"] .message-day,html[data-theme="light"] .attachment-chip,html[data-theme="light"] .preview-pill,html[data-theme="light"] .message-pip{background:#fff;border-color:rgba(38,66,103,.15);color:#172238}
html[data-theme="light"] .message-pip header{background:linear-gradient(135deg,#f5fbff,#e8f7f0);border-color:rgba(38,66,103,.14)}
html[data-theme="light"] .modal-card{background:linear-gradient(155deg,#fff,#f1f6fb)}

/* Team video calls. */
html[data-theme="light"] body:has(.team-shell){--bg:#f5f8fb;--panel:#fff;--line:rgba(33,63,99,.16);--text:#172238;--muted:#66758b;--mint:#148b69;background:radial-gradient(circle at 8% -10%,#d7f6eb,transparent 32%),radial-gradient(circle at 100% 0,#e3efff,transparent 27%),#f5f8fb}
html[data-theme="light"] .team-header{border-color:rgba(33,63,99,.15)}
html[data-theme="light"] .team-brand,html[data-theme="light"] .team-brand span{color:#172238}
html[data-theme="light"] .team-section{background:linear-gradient(135deg,#fff,#f4f8fc);box-shadow:0 22px 52px rgba(43,62,86,.08)}
html[data-theme="light"] .team-person{background:#fff;border-color:rgba(33,63,99,.14)}
html[data-theme="light"] .team-note{background:#fff;color:#66758b}

/* KINO keeps its cinematic accent but receives a bright, editorial canvas. */
html[data-theme="light"] body:has(.kino-shell),html[data-theme="light"] body:has(.kino-error-page){--kino-bg:#f4f7fb;--kino-card:#fff;--kino-border:rgba(32,58,91,.16);--kino-text:#172238;--kino-muted:#68778d;--kino-cyan:#087e9a;--kino-success:#128663;background:radial-gradient(circle at 50% -20%,#dcecff 0,transparent 32%),#f4f7fb}
html[data-theme="light"] .kino-header,html[data-theme="light"] .kino-card,html[data-theme="light"] .kino-error-panel{background:linear-gradient(145deg,rgba(255,255,255,.97),rgba(242,247,252,.96));box-shadow:0 15px 38px rgba(45,64,90,.09)}
html[data-theme="light"] .kino-brand,html[data-theme="light"] .kino-back{color:#172238}
html[data-theme="light"] .kino-create-form input,html[data-theme="light"] .kino-change-video input,html[data-theme="light"] .chat-form input,html[data-theme="light"] .nickname-dialog input{background:#fff;color:#172238}
html[data-theme="light"] .kino-secondary{border-color:rgba(32,58,91,.18);color:#294057;background:#fff}
html[data-theme="light"] .kino-room-link,html[data-theme="light"] .participant,html[data-theme="light"] .kino-film-card{color:#172238;background:#fff;border-color:rgba(32,58,91,.13)}
html[data-theme="light"] .kino-error-page{background:radial-gradient(circle at 78% 20%,#d8f3ee,transparent 32%),#f4f7fb}
html[data-theme="light"] .kino-player-wrap{border:1px solid rgba(35,76,115,.34);background:#0e1727;box-shadow:0 22px 56px rgba(43,63,89,.2),0 0 0 7px rgba(255,255,255,.62)}
html[data-theme="light"] .kino-controls{border-color:rgba(220,76,107,.28);background:linear-gradient(135deg,#fff4f6,#f4f8ff);box-shadow:0 11px 26px rgba(82,69,95,.08)}

/* VOD, library, administration and embedded VOD player. */
html[data-theme="light"] body:has(.site-header),html[data-theme="light"] body.message-vod-embed{--bg:#f5f8fc;--panel:#fff;--ink:#172238;--muted:#66758b;--accent:#138b69;--danger:#ca4057;background:#f5f8fc}
html[data-theme="light"] .site-header,html[data-theme="light"] body:has(.site-header) header{background:rgba(255,255,255,.92);border-color:rgba(34,62,99,.15)}
html[data-theme="light"] body:has(.site-header) a{color:#31506c}
html[data-theme="light"] .movie-card,html[data-theme="light"] .panel,html[data-theme="light"] .metric{background:#fff;border-color:rgba(34,62,99,.16);box-shadow:0 12px 30px rgba(43,63,89,.06)}
html[data-theme="light"] .poster{background:linear-gradient(145deg,#d6e4fb,#ebf2fb 60%,#dcefe8)}
html[data-theme="light"] body.message-vod-embed{background:#edf3f8}
html[data-theme="light"] .watch #player,html[data-theme="light"] .message-vod-player,html[data-theme="light"] .message-vod-player-frame{border-color:rgba(35,76,115,.34)!important;box-shadow:0 20px 48px rgba(43,63,89,.18),0 0 0 6px rgba(255,255,255,.62)}

/* Login/reset/setup pages are generated by the same application shell. */
html[data-theme="light"] body:has(.auth){background:radial-gradient(circle at 50% -10%,#d8f3ea 0,#edf4fb 36%,#f7f9fc 76%);color:#172238}
html[data-theme="light"] .auth{background:linear-gradient(145deg,#fff,#f3f7fb);border-color:rgba(32,63,100,.18);box-shadow:0 24px 70px rgba(45,65,91,.16)}
html[data-theme="light"] .auth input,html[data-theme="light"] .auth textarea,html[data-theme="light"] .auth select{background:#fff;color:#172238;border-color:#b9c9dc}
html[data-theme="light"] .auth-intro,html[data-theme="light"] .small{color:#66758b!important}
html[data-theme="light"] .auth .admin-create{border-color:rgba(22,140,107,.22);background:linear-gradient(135deg,#f0fbf6,#f5f8fd)}
html[data-theme="light"] .auth .admin-create h2,html[data-theme="light"] .auth .admin-user-list>h2,html[data-theme="light"] .auth .admin-user-head h3{color:#172238!important}
html[data-theme="light"] .auth .admin-create p,html[data-theme="light"] .auth .admin-user-head p,html[data-theme="light"] .auth .admin-facts small,html[data-theme="light"] .auth .permission-card small{color:#66758b!important}
html[data-theme="light"] .auth .admin-create label,html[data-theme="light"] .auth .identity-form label{color:#40516a}
html[data-theme="light"] .auth .admin-stats{border-color:rgba(22,140,107,.25);background:#e6f7ef}
html[data-theme="light"] .auth .admin-stats span{background:#f7fbff;color:#61718a}
html[data-theme="light"] .auth .admin-stats b{color:#172238}
html[data-theme="light"] .auth .admin-user-card{background:#fff;border-color:rgba(32,63,100,.15);box-shadow:0 10px 24px rgba(45,65,91,.05)}
html[data-theme="light"] .auth .admin-facts span{background:#f4f8fc;color:#314158}
html[data-theme="light"] .auth .permission-card{border-color:rgba(22,140,107,.2);background:#f5fbf8}
html[data-theme="light"] .auth .permission-card strong{color:#172238}

@media(max-width:720px){.theme-floating-button{top:auto;bottom:max(18px,env(safe-area-inset-bottom));right:16px}.messenger-brand-actions .theme-toggle{width:40px;height:40px}}
