.portal-shell .content :is(h1,h2,h3),
.portal-shell > .main :is(h1,h2,h3) { color:#0f3e85 !important; }
.portal-shell .module-cover { background:#dceae6 url('/module-reuse.jpg') center 47% / cover no-repeat !important; }
.portal-shell .module-cover::after { background:linear-gradient(115deg,rgba(8,57,72,.52) 0%,rgba(8,57,72,.08) 55%,rgba(255,255,255,.12) 100%) !important; }
.portal-shell .module-cover > strong { color:#fff !important; }
.portal-shell .primary-action,.portal-shell .module-action,.portal-shell .btn-primary { appearance:none; background:#0e887e !important; border:0 !important; color:#fff !important; box-shadow:none !important; }
.portal-shell .module-action:hover,
.portal-shell .module-action:focus,
.portal-shell .module-action:active { background:#0e887e !important; border:0 !important; box-shadow:none !important; }

#shop-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  max-width: min(390px, calc(100vw - 32px));
  padding: 13px 17px;
  border-radius: 10px;
  background: #173c59;
  color: #fff;
  box-shadow: 0 14px 34px rgba(22, 43, 58, .22);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

#shop-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  #shop-toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }
}
html[data-theme="dark"] body .portal-shell .content :is(h1,h2,h3),
html[data-theme="dark"] body .portal-shell > .main :is(h1,h2,h3) { color:#f5f7f8 !important; }

/* Admin users/results use the same white content surface and spacing as settings. */
.admin-page-v2 .content-header{margin-bottom:24px}
.admin-page-v2 .content-header h1{margin-bottom:6px}
.admin-page-v2 .content-header p{font-size:16px}
.admin-page-v2 .admin-tabs{margin:0 0 22px;border-radius:20px 20px 0 0;padding:0 28px;background:#fff;box-shadow:0 16px 40px rgba(32,52,75,.095);border-bottom:1px solid #e2e8e6}
.admin-page-v2 .admin-tabs button{min-height:58px;padding:0 15px;font-size:14px}
.admin-page-v2 .admin-users-box{border-radius:0 0 20px 20px}
.admin-users-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:28px;border-bottom:1px solid #e2e8e6;background:#fff}
.admin-users-toolbar h2{margin:0;color:#0f3e85;font-size:22px}
.admin-users-toolbar p{margin:6px 0 0;color:#53616b;font-size:14px}
.admin-users-toolbar .header-actions{display:flex;align-items:center;gap:10px}
.admin-users-toolbar .secondary-action,.admin-users-toolbar .primary-action{min-height:45px;padding:0 15px}
.admin-users-toolbar .file-button{display:inline-flex;align-items:center}
.admin-user-filters{background:#fbfcfc}
.admin-user-table .admin-empty{text-align:center;padding:44px 28px;color:#68757d}
.admin-results-table{min-width:780px}
html[data-theme="dark"] body:not(.sales-page) .admin-users-toolbar{background:#1d2023;border-color:#353a3f}
html[data-theme="dark"] body:not(.sales-page) .admin-users-toolbar p{color:#aab2b8}
html[data-theme="dark"] body:not(.sales-page) .admin-user-table td{color:#dce2e6}
html[data-theme="dark"] body:not(.sales-page) .admin-user-table td:first-child > span:last-child strong{color:#f0f2f4}
html[data-theme="dark"] body:not(.sales-page) .admin-user-table td:first-child > span:last-child small{color:#aab2b8}
html[data-theme="dark"] body:not(.sales-page) .admin-user-table .admin-empty{color:#aab2b8}
@media(max-width:760px){.admin-users-toolbar{align-items:stretch;flex-direction:column;padding:22px 18px}.admin-users-toolbar .header-actions{align-items:stretch;flex-direction:column}.admin-page-v2 .admin-tabs{margin-left:0;margin-right:0;padding:0 18px}.admin-page-v2 .admin-tabs button{padding:0 12px}}

/* Administration components that are populated from live data. */
.settings-warning{display:flex;gap:8px 18px;align-items:center;padding:16px 28px;border-bottom:1px solid #eadfbd;background:#fff9e8;color:#5f512c;font-size:13px}
.settings-warning strong{color:#51431f}
.faq-admin-form .faq-editor{padding:0 28px}
.faq-edit-row{border-bottom:1px solid #e4e9e7}
.faq-edit-row summary{min-height:78px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:16px;list-style:none;cursor:pointer}
.faq-edit-row summary::-webkit-details-marker{display:none}
.faq-number{color:#0e887e;font-size:14px;font-weight:700}
.faq-summary-copy strong,.faq-summary-copy small{display:block}
.faq-summary-copy strong{color:#19232b;font-size:16px}
.faq-summary-copy small{max-width:780px;margin-top:4px;overflow:hidden;color:#68757d;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.faq-expand{color:#0f3e85;font-size:12px;font-weight:600}
.faq-fields{display:grid;gap:16px;padding:4px 0 20px}
.faq-fields label>span{display:block;margin-bottom:7px;color:#303b43;font-size:13px;font-weight:600}
.faq-fields input,.faq-fields textarea{width:100%;min-height:45px;padding:0 13px;border:1px solid #d5dcda;background:#fafbfb;color:#19232b;font:14px/1.6 Poppins,sans-serif}
.faq-fields textarea{min-height:110px;padding-top:11px;resize:vertical}
.faq-fields :is(input,textarea):focus{outline:3px solid rgba(14,136,126,.13);border-color:#0e887e;background:#fff}
.faq-row-actions{display:flex;justify-content:flex-end;gap:9px;padding:0 0 20px}
.admin-empty{padding:42px 28px;color:#68757d;font-size:14px;text-align:center}
.admin-pagination{display:flex;align-items:center;gap:8px;margin:0}
.admin-pagination>span{color:#65727a;font-size:12px}
.admin-pagination .btn{min-height:38px;padding:0 12px;border:1px solid #d8dfdd;background:#fff;color:#0f3e85;font:600 12px Poppins,sans-serif}
.order-detail-modal{position:fixed;inset:0;z-index:200;display:flex;align-items:stretch;justify-content:flex-end;padding:0;background:rgba(16,29,37,.28);backdrop-filter:none}
.order-detail-card{position:relative;width:min(680px,100%);height:100vh;height:100dvh;max-height:none;overflow:auto;padding:38px 34px;background:#fff;border-radius:0;box-shadow:-18px 0 55px rgba(18,38,53,.18);color:#303b43;animation:order-drawer-in .24s ease-out}
@keyframes order-drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
.order-detail-card h2{margin:5px 0 12px;font-size:26px}
.order-detail-card h3{margin:24px 0 10px;font-size:18px}
.order-detail-card p{font-size:14px;line-height:1.7}
.order-detail-card hr{margin:22px 0;border:0;border-top:1px solid #e4e9e7}
.order-detail-close{position:absolute;top:18px;right:18px;width:38px;height:38px;border:0;border-radius:8px;background:#f1f4f3;color:#303b43;font-size:22px;cursor:pointer}
.order-detail-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(220px,.65fr);gap:28px;margin-top:22px;padding:22px 0;border-top:1px solid #e4e9e7;border-bottom:1px solid #e4e9e7}
.order-detail-grid dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 22px;margin:0}
.order-detail-grid dl div{min-width:0}.order-detail-grid dt{color:#68757d;font-size:11px}.order-detail-grid dd{margin:3px 0 0;color:#19232b;font-size:14px;font-weight:600}
.order-detail-grid h3{margin:0 0 8px}.order-detail-grid p{margin:0}
.order-access-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.order-access-list>span{padding:12px 14px;background:#f5f8f7;border-radius:10px}.order-access-list strong,.order-access-list small{display:block}.order-access-list strong{font-size:13px}.order-access-list small{margin-top:3px;color:#68757d;font-size:11px}
.order-events{display:grid;gap:1px;background:#e4e9e7}
.order-events>div{padding:13px 15px;background:#fbfcfc}
.order-events b,.order-events small{display:block}.order-events small{margin-top:3px;color:#68757d;font-size:11px}
.order-detail-card .shop-button{display:inline-flex;min-height:43px;align-items:center;padding:0 14px;border:1px solid #d8dfdd;border-radius:8px;background:#fff;color:#0f3e85;font:600 12px Poppins,sans-serif;text-decoration:none;cursor:pointer}
.order-detail-card .shop-button.primary{border-color:#0e887e;background:#0e887e;color:#fff}
.order-detail-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:24px}.order-detail-actions :is(.primary-action,.secondary-action){min-height:43px;padding:0 14px;text-decoration:none}
.drawer-order-number{margin:-5px 0 20px;color:#68757d;font-size:14px}
.account-order-detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:22px 0 0;border-top:1px solid #e4e9e7}
.account-order-detail-list>div{padding:17px 0;border-bottom:1px solid #e4e9e7}
.account-order-detail-list>div:nth-child(odd){padding-right:18px}
.account-order-detail-list>div:nth-child(even){padding-left:18px}
.account-order-detail-list dt{color:#68757d;font-size:12px}
.account-order-detail-list dd{margin:4px 0 0;color:#19232b;font-size:15px;font-weight:600}
.user-delete-button{min-height:45px;margin-left:auto;padding:0 14px;border:1px solid #e4b8b4;border-radius:8px;background:#fff;color:#a9382f;font:600 12px Poppins,sans-serif;cursor:pointer}
.user-delete-button:hover{border-color:#c85147;background:#fff3f2}
.admin-results-page .admin-users-box{width:100%}
.user-detail-backdrop{backdrop-filter:none}
.user-detail-preview{max-width:100vw;overflow-x:hidden}
.user-detail-grid,.user-detail-form,.user-detail-form>*{min-width:0}
.user-detail-form :is(input,select){max-width:100%}
.user-detail-actions{flex-wrap:wrap;align-items:center}
.user-detail-actions :is(.primary-action,.secondary-action,.user-delete-button){max-width:100%;white-space:normal;text-align:center}
.user-progress,.user-progress>div,.user-progress>div>span{min-width:0}
.user-progress strong{overflow-wrap:anywhere}

html[data-theme="dark"] body:not(.sales-page) :is(.faq-summary-copy strong,.faq-fields label>span,.order-detail-card,.order-detail-card p){color:#dce2e6}
html[data-theme="dark"] body:not(.sales-page) :is(.faq-fields input,.faq-fields textarea,.order-detail-card,.order-events>div){background:#1d2023;border-color:#353a3f;color:#f1f4f5}
html[data-theme="dark"] body:not(.sales-page) :is(.order-detail-grid dd,.order-access-list strong){color:#f1f4f5}
html[data-theme="dark"] body:not(.sales-page) .account-order-detail-list{border-color:#353a3f}
html[data-theme="dark"] body:not(.sales-page) .account-order-detail-list>div{border-color:#353a3f}
html[data-theme="dark"] body:not(.sales-page) .account-order-detail-list dd{color:#f1f4f5}
html[data-theme="dark"] body:not(.sales-page) .user-delete-button{border-color:#74413d;background:#2a2222;color:#f0aaa4}
html[data-theme="dark"] body:not(.sales-page) .order-access-list>span{background:#24292d}
html[data-theme="dark"] body:not(.sales-page) :is(.faq-edit-row,.order-detail-card hr){border-color:#353a3f}
html[data-theme="dark"] body:not(.sales-page) .faq-summary-copy small{color:#aab2b8}
html[data-theme="dark"] body:not(.sales-page) .settings-warning{border-color:#4e4938;background:#29271f;color:#d7cda9}
html[data-theme="dark"] body:not(.sales-page) .settings-warning strong{color:#f2e5b7}

@media(max-width:760px){
  .faq-admin-form .faq-editor{padding:0 18px}
  .faq-edit-row summary{grid-template-columns:38px minmax(0,1fr);gap:8px;padding:14px 0}
  .faq-expand{grid-column:2}
  .faq-summary-copy small{white-space:normal}
  .settings-warning{align-items:flex-start;flex-direction:column;padding:15px 18px}
  .admin-pagination>span{display:none}
  .order-detail-card{padding:28px 20px}
  .order-detail-grid,.order-detail-grid dl,.order-access-list{grid-template-columns:1fr}
  .account-order-detail-list{grid-template-columns:1fr}
  .account-order-detail-list>div:nth-child(n){padding:15px 0}
  .user-delete-button{width:100%;margin-left:0}
  .user-detail-actions :is(.primary-action,.secondary-action){width:100%}
}
/* Editor obsahu je samostatné pracovní prostředí přes celou obrazovku. */
.portal-shell:has(> .builder) {
  display: block;
}

.portal-shell:has(> .builder) > .sidebar,
.portal-shell:has(> .builder) > .mobile-topbar,
.portal-shell:has(> .builder) > .mobile-menu-backdrop,
.portal-shell:has(> .builder) > .mobile-menu-toggle {
  display: none;
}

.portal-shell:has(> .builder) > .builder {
  width: 100%;
  height: 100vh;
  max-width: none;
  margin: 0;
}

/* The invitation follows the same visual language as the sign-in page. */
.invitation-card .field small{margin-top:-2px;color:#68757d;font-size:12px}
.invitation-card strong{color:#0f3e85}
.invitation-result>svg{width:68px;height:68px;margin-bottom:20px;padding:16px;border-radius:18px;background:#e4f4f1;color:#0e887e}
.invitation-result h2{margin-bottom:8px}
.invitation-result .btn{margin-top:12px;text-decoration:none}
.invitation-error>svg{background:#fff0e8;color:#c85a22}

/* Learning player dark mode. The editor remains light through theme suspension. */
html[data-theme="dark"] .course-player{color-scheme:dark;background:#202327!important;color:#e7ebed}
html[data-theme="dark"] .course-sidebar{background:#17191c!important;border-color:#353a3f!important}
html[data-theme="dark"] .course-back,
html[data-theme="dark"] .course-sidebar>small,
html[data-theme="dark"] .course-progress-head span,
html[data-theme="dark"] .course-nav-item{color:#aeb7bd}
html[data-theme="dark"] .course-sidebar h2,
html[data-theme="dark"] .course-progress-head strong{color:#f4f6f7}
html[data-theme="dark"] .course-progress::-webkit-progress-bar{background:#30353a}
html[data-theme="dark"] .course-nav-item>span{background:#2b3034;color:#c6ced3}
html[data-theme="dark"] .course-nav-item:hover:not(:disabled){background:#23272b;color:#fff}
html[data-theme="dark"] .course-nav-item.active{background:#292e32;color:#fff}
html[data-theme="dark"] .course-nav-item.active>span{background:#0e887e;color:#fff}
html[data-theme="dark"] .course-nav-item.done>span{background:#253632;color:#67d4c6}
html[data-theme="dark"] .course-content{background:#202327!important}
html[data-theme="dark"] .course-content .chapter-head{background:#292d31;box-shadow:0 16px 38px rgba(0,0,0,.2)}
html[data-theme="dark"] .course-content .chapter-head h1{color:#fff}
html[data-theme="dark"] .course-content .block{background:#25292d;border-color:#3a4045;color:#dce2e6;box-shadow:0 14px 34px rgba(0,0,0,.14)}
html[data-theme="dark"] .course-content .block :is(h2,h3,strong){color:#f4f6f7}
html[data-theme="dark"] .course-content .block :is(p,li){color:#d1d7db}
html[data-theme="dark"] .course-content :is(.column-card,.stat,.sorting-result){background:#1d2023;border-color:#3a4045}
html[data-theme="dark"] .course-content :is(.callout,.question){background:#23302e;border-color:#3daf9f}
html[data-theme="dark"] .course-content .callout.warning{background:#332923;border-color:#de7b43}
html[data-theme="dark"] .course-content :is(.option,.feedback,.sort-card,.sorting-source,.sorting-zone){background:#1b1e21;border-color:#41484e;color:#e7ebed}
html[data-theme="dark"] .course-content .option:hover:not(:disabled),
html[data-theme="dark"] .course-content .option.selected{border-color:#55c7ba;background:#252d2c}
html[data-theme="dark"] .course-content .option.correct{background:#213b34;border-color:#4fc0a6}
html[data-theme="dark"] .course-content .option.wrong{background:#3b2923;border-color:#df8150}
html[data-theme="dark"] .course-content .btn-secondary{background:#2b3034;border-color:#42494f;color:#f0f3f4}
html[data-theme="dark"] .course-content .result-score-area,
html[data-theme="dark"] .course-content .result-summary>div{background:#1d2023;border-color:#3a4045}
html[data-theme="dark"] .course-content .score-ring:before{background:#25292d}
html[data-theme="dark"] .course-content .result h1,
html[data-theme="dark"] .course-content .result-score-copy>strong{color:#fff}
html[data-theme="dark"] .course-content .admin-progress-reset{background:#2b2423;border-color:#704841;color:#e8d8d5}
html[data-theme="dark"] .course-content .admin-progress-reset strong{color:#f2a49c}
html[data-theme="dark"] .course-content .admin-progress-reset small{color:#bcaeab}

@media(max-width:850px){.invitation-page .login-art{min-height:290px}}

.course-content .chapter-head .chapter-count{padding-left:2px}

.portal-shell .module-cover::after{display:none!important}
.portal-shell .module-cover-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.portal-shell .module-cover.has-cover-image>strong{position:relative;z-index:1;text-shadow:0 2px 10px rgba(0,0,0,.55)}
.module-cover-setting>img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;margin:10px 0}
.module-cover-setting .media-source-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.module-cover-setting>small{display:block;color:var(--muted);line-height:1.5}

.portal-shell .module-cover{background:#dceae6 url('/module-default.jpg') center/cover no-repeat!important}
.portal-shell .module-cover-image{z-index:0}
.portal-shell .module-cover::after{display:block!important;z-index:0;width:100%;height:100%;border-radius:0;background:linear-gradient(to right,rgba(5,39,53,.72) 0%,rgba(5,39,53,.55) 30%,rgba(5,39,53,.32) 65%,rgba(5,39,53,.14) 100%)!important}
.portal-shell .module-cover>strong{z-index:1;text-shadow:none!important}
