/*
Theme Name: CIT Commander (Test)
Theme URI: https://cit.vstu.by/
Author: CIT VSTU
Description: Самостоятельная тестовая тема на основе CIT Desktop с двухпанельным интерфейсом в стиле Total Commander.
Version: 0.1.0
Text Domain: cit-total-commander-test
Requires at least: 5.5
Requires PHP: 7.4
*/

:root {
  --cmd-face: #d4d0c8;
  --cmd-light: #fff;
  --cmd-shadow: #808080;
  --cmd-edge: #404040;
  --cmd-blue: #000080;
  --cmd-selection: #0a246a;
  --cmd-ink: #161616;
  --cmd-line: #dedbd5;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cmd-face); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: var(--cmd-ink); background: var(--cmd-face); font: 13px/1.45 Tahoma, "Segoe UI", Arial, sans-serif; }
body.admin-bar { min-height: calc(100dvh - 32px); }
a { color: var(--cmd-blue); }
button, input, select, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #125cbd; outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 999999; top: 4px; left: 4px; padding: 8px 12px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.commander-chrome { margin: 4px 4px 0; border: 1px solid; border-color: white var(--cmd-edge) var(--cmd-shadow) white; }
.commander-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 31px; padding: 4px 5px; color: white; background: linear-gradient(90deg, #000080, #105eaf); }
.commander-titlebar__brand { display: flex; align-items: center; gap: 8px; color: white; font-weight: bold; text-decoration: none; min-width: 0; }
.commander-titlebar__subtitle { font-weight: normal; }
.commander-mark { display: inline-flex; width: 23px; height: 20px; padding: 2px; gap: 2px; border: 1px solid white; background: #c5c5c5; flex-shrink: 0; }
.commander-mark i { flex: 1; background: repeating-linear-gradient(to bottom, white 0 2px, #8aafd9 2px 4px); border-top: 4px solid #000080; }
.commander-titlebar__controls { display: flex; gap: 3px; flex-shrink: 0; color: black; }
.commander-titlebar__controls > span { width: 22px; height: 20px; text-align: center; font: bold 16px/16px Arial, sans-serif; border: 2px solid; border-color: white #404040 #404040 white; background: var(--cmd-face); }
.commander-menubar { display: flex; align-items: center; gap: 16px; padding: 2px 4px; border-bottom: 1px solid var(--cmd-shadow); box-shadow: 0 1px 0 white; }
.commander-menubar nav { display: flex; flex-wrap: wrap; flex: 1; }
.commander-menubar a { color: black; padding: 5px 9px; text-decoration: none; }
.commander-menubar a:hover, .commander-menubar a:focus-visible { background: var(--cmd-selection); color: white; }
.commander-menubar__date { padding-right: 6px; font-variant-numeric: tabular-nums; color: #444; }
.commander-toolbar { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 6px; }
.commander-toolbar__navigation { display: flex; gap: 3px; padding-right: 8px; border-right: 1px solid var(--cmd-shadow); box-shadow: 1px 0 0 white; }
.commander-toolbar__button, .commander-toolbar__search button, .commander-button { display: inline-flex; align-items: center; justify-content: center; color: black; background: var(--cmd-face); border: 2px solid; border-color: white var(--cmd-shadow) var(--cmd-shadow) white; text-decoration: none; }
.commander-toolbar__button { width: 32px; height: 31px; }
.commander-toolbar__button:hover, .commander-toolbar__search button:hover, .commander-button:hover { background: #e8e5de; }
.commander-toolbar__button:active, .commander-toolbar__search button:active, .commander-button:active { border-color: var(--cmd-shadow) white white var(--cmd-shadow); }
.commander-toolbar__button svg { width: 20px; height: 20px; fill: none; stroke: #17406c; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.commander-toolbar__search { display: flex; gap: 5px; width: min(310px, 100%); }
.commander-toolbar__search input, .commander-pane__filter input, .site-search-form__input { min-width: 0; border: 2px solid; border-color: var(--cmd-shadow) white white var(--cmd-shadow); background: white; color: black; padding: 5px 7px; border-radius: 0; }
.commander-toolbar__search input { width: 100%; }
.commander-toolbar__search button { padding: 3px 12px; }
.commander-toolbar__contacts { margin-left: auto; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 5px 14px; font-size: 12px; }
.commander-toolbar__contacts a { text-decoration: none; }
.commander-toolbar__contacts a:hover { text-decoration: underline; }
.commander { display: flex; flex: 1; flex-direction: column; padding: 0 5px; min-width: 0; }
.commander__workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 4px; }
.commander__workspace-heading h1 { margin: 0; font-size: 15px; font-weight: bold; }
.commander__workspace-heading > span { font-size: 12px; color: #525252; }
.commander__heading-separator { margin: 0 8px; color: #888; }
.commander__panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; flex: 1; min-height: 420px; }
.commander-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 2px solid; border-color: var(--cmd-shadow) white white var(--cmd-shadow); background: white; }
.commander-pane__tabs { display: flex; align-items: end; gap: 3px; background: var(--cmd-face); min-height: 35px; padding: 3px 4px 0; border-bottom: 1px solid var(--cmd-shadow); }
.commander-tab { display: flex; align-items: center; gap: 8px; color: #333; font-size: 12px; font-weight: normal; background: #c5c1b9; border: 1px solid; border-color: white var(--cmd-shadow) var(--cmd-shadow) white; padding: 6px 12px; min-height: 31px; }
.commander-tab.is-active { background: #efede7; border-bottom-color: #efede7; font-weight: bold; }
.commander-pane__drive { margin-left: auto; padding: 0 5px 6px; color: #555; font-family: Consolas, "Courier New", monospace; }
.commander-pane__path { display: flex; align-items: center; gap: 7px; min-height: 29px; padding: 3px 7px; background: #777; color: white; font-family: Consolas, "Courier New", monospace; border-bottom: 1px solid #555; }
.commander-pane.is-active .commander-pane__path { background: var(--cmd-blue); }
.commander-pane__path a { margin-left: auto; text-decoration: none; color: black; background: var(--cmd-face); border: 1px solid; border-color: white #444 #444 white; padding: 0 6px; font-weight: bold; }
.commander-pane__filter { display: flex; align-items: center; gap: 7px; padding: 5px 7px; background: #efede7; border-bottom: 1px solid #b9b5af; }
.commander-pane__filter label { flex-shrink: 0; color: #555; font-size: 12px; }
.commander-pane__filter input { flex: 1; width: 100%; padding: 3px 6px; font-size: 12px; }
.commander-pane__filter button { background: var(--cmd-face); border: 1px solid #999; color: #444; width: 24px; height: 24px; font-size: 18px; line-height: 1; }
.commander-list { flex: 1; min-height: 0; display: flex; }
.commander-list__scroll { overflow: auto; flex: 1; scrollbar-color: #aaa var(--cmd-face); scrollbar-width: thin; }
.commander-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.commander-table th { text-align: left; font-weight: normal; padding: 0; height: 26px; position: sticky; top: 0; z-index: 1; color: black; background: var(--cmd-face); border: 1px solid; border-color: white #a6a6a6 #a6a6a6 white; }
.commander-table th:first-child { width: auto; }
.commander-table th:nth-child(2) { width: 83px; padding-left: 8px; }
.commander-table th:last-child { width: 100px; }
.commander-table th button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 100%; border: 0; background: transparent; color: inherit; text-align: left; padding: 4px 8px; }
.commander-table th button:hover { background: #eeece8; }
.commander-table td { padding: 0; vertical-align: middle; border-bottom: 1px solid #f1f0ed; }
.commander-table__link { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 8px; color: var(--cmd-blue); text-decoration: none; overflow-wrap: anywhere; }
.commander-table__link:hover { text-decoration: underline; }
.commander-table__type, .commander-table__date { padding: 5px 8px !important; color: #666; font-size: 12px; white-space: nowrap; }
.commander-table__date { font-variant-numeric: tabular-nums; }
.commander-table__external { margin-left: auto; flex-shrink: 0; opacity: .65; }
.commander-table tr[data-commander-row] { cursor: default; }
.commander-table tr[data-commander-row]:hover { background: #f0f4fa; }
.commander-table tr.is-selected { background: var(--cmd-selection) !important; color: white; }
.commander-table tr.is-selected a, .commander-table tr.is-selected td { color: white; }
.commander-table tr.is-selected td { border-bottom-color: var(--cmd-selection); }
.commander-table__link:focus-visible { outline: 1px dotted currentColor; outline-offset: -3px; }
.commander-list__empty { padding: 24px 12px; margin: 0; color: #666; font-size: 13px; }
.cmd-icon { position: relative; display: inline-block; width: 15px; height: 17px; flex: 0 0 15px; }
.cmd-icon--folder { height: 12px; width: 17px; flex-basis: 17px; background: linear-gradient(#ffed9d, #e9b949); border: 1px solid #a17713; box-shadow: inset 1px 1px #fff5bc; }
.cmd-icon--folder::before { content: ""; position: absolute; left: -1px; top: -4px; width: 8px; height: 4px; background: #efd179; border: 1px solid #a17713; border-bottom: 0; }
.cmd-icon--file, .cmd-icon--link { border: 1px solid #7e91a5; background: #fff; box-shadow: inset 0 0 0 1px #edf3fa; }
.cmd-icon--file::after, .cmd-icon--link::after { content: ""; position: absolute; top: 4px; left: 3px; width: 7px; height: 8px; background: repeating-linear-gradient(#7791ad 0 1px, transparent 1px 3px); }
.cmd-icon--link::before { content: "↗"; position: absolute; z-index: 1; right: -4px; bottom: -4px; color: #13559f; background: #fff; border: 1px solid #a0b8d0; font: bold 10px/10px Arial; }
.commander-pane__status { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; padding: 5px 8px; border-top: 1px solid var(--cmd-shadow); background: var(--cmd-face); color: #444; font-size: 12px; }
.commander-pagination { display: flex; align-items: center; flex-wrap: wrap; flex-shrink: 0; gap: 5px; padding: 6px; background: var(--cmd-face); border-top: 1px solid var(--cmd-shadow); box-shadow: inset 0 1px white; font-size: 12px; }
.commander-pagination__pages { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.commander-pagination__button { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: 3px 8px; color: black; background: var(--cmd-face); border: 2px solid; border-color: white var(--cmd-shadow) var(--cmd-shadow) white; text-decoration: none; }
a.commander-pagination__button:hover { background: #e9e6df; }
a.commander-pagination__button:active { border-color: var(--cmd-shadow) white white var(--cmd-shadow); }
.commander-pagination__button.is-current { color: white; background: var(--cmd-selection); border-color: var(--cmd-shadow) white white var(--cmd-shadow); }
.commander-pagination__button.is-disabled { color: #555; opacity: .55; }
.commander-pagination__gap { padding: 0 3px; color: #555; }
.commander-pagination__summary { margin-left: auto; color: #555; font-size: 11px; white-space: nowrap; }
.commander__selection-bar { display: flex; align-items: center; gap: 9px; min-height: 34px; margin: 6px 0; padding: 5px 8px; border: 2px solid; border-color: var(--cmd-shadow) white white var(--cmd-shadow); background: white; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.commander__prompt { font-weight: bold; color: var(--cmd-blue); }
.commander__selection-bar [data-commander-selection] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.commander__keyboard-hint { margin-left: auto; white-space: nowrap; color: #777; }
.commander-actions { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; padding: 0 5px 5px; }
.commander-actions > * { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 5px 3px; border: 2px solid; border-color: white var(--cmd-edge) var(--cmd-edge) white; background: var(--cmd-face); color: #111; text-decoration: none; font-size: 12px; }
.commander-actions > *:hover { background: #e9e6df; }
.commander-actions > *:active { border-color: var(--cmd-shadow) white white var(--cmd-shadow); }
.commander-actions kbd { font: bold 12px Tahoma, Arial, sans-serif; color: var(--cmd-blue); }
.commander-help { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 3px; border: 2px solid; border-color: white var(--cmd-edge) var(--cmd-edge) white; background: var(--cmd-face); color: black; box-shadow: 7px 7px 0 #0004; }
.commander-help::backdrop { background: #0006; }
.commander-help__titlebar { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px; color: white; background: linear-gradient(90deg, #000080, #105eaf); }
.commander-help__titlebar h2 { margin: 0; font-size: 13px; }
.commander-help__titlebar button { width: 22px; height: 22px; padding: 0; background: var(--cmd-face); border: 2px solid; border-color: white #444 #444 white; }
.commander-help__body { padding: 10px 18px 18px; font-size: 13px; }
.commander-help__body dl { display: grid; grid-template-columns: 35px 1fr; gap: 4px 10px; }
.commander-help__body dt { color: var(--cmd-blue); font-weight: bold; }
.commander-help__body dd { margin: 0; }
.commander-help__note { color: #555; font-size: 12px; }
.commander-button { min-width: 90px; min-height: 30px; padding: 5px 16px; }

/* The original content templates retain WordPress and plugin content. */
.content-page { flex: 1; padding: 8px 6px 16px; min-width: 0; }
.content-page__inner { max-width: 1280px; margin: 0 auto; }
.content-page__navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0 8px; }
.content-page__navigation-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.content-page__back { padding: 4px 10px; flex-shrink: 0; color: black; text-decoration: none; border: 2px solid; border-color: white #808080 #808080 white; background: var(--cmd-face); }
.content-page__back::before { content: "← "; }
.content-page__breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; }
.content-page__breadcrumbs a { text-decoration: none; }
.content-page__breadcrumbs [aria-current] { color: #555; overflow-wrap: anywhere; }
.content-page__separator { color: #777; }
.content-page__menu { position: relative; flex-shrink: 0; z-index: 5; }
.content-page__menu-toggle { width: 32px; height: 30px; padding: 4px; border: 2px solid; border-color: white #808080 #808080 white; background: var(--cmd-face); }
.content-page__menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--cmd-blue); stroke-width: 2; }
.content-page__menu-panel { position: absolute; right: 0; top: 34px; width: min(280px, 85vw); padding: 3px; background: var(--cmd-face); border: 2px solid; border-color: white #444 #444 white; box-shadow: 4px 4px 0 #0003; }
.content-page__menu-panel a { display: block; padding: 7px 10px; color: black; text-decoration: none; }
.content-page__menu-panel a:hover { color: white; background: var(--cmd-selection); }
.content-page__article { border: 2px solid; border-color: var(--cmd-shadow) white white var(--cmd-shadow); background: #fff; min-width: 0; }
.content-page__header { padding: 8px 15px; color: white; background: var(--cmd-blue); border-bottom: 1px solid #555; }
.content-page__title { font-size: 19px; line-height: 1.4; margin: 0; font-weight: normal; overflow-wrap: anywhere; }
.content-page__body { padding: clamp(16px, 3vw, 32px); font: 16px/1.7 "Segoe UI", Tahoma, Arial, sans-serif; overflow-wrap: anywhere; }
.content-page__body p { margin: 0 0 16px; }
.content-page__body > :last-child { margin-bottom: 0; }
.content-page__body img, .content-page__body video, .content-page__body iframe { max-width: 100%; }
.content-page__body img, .content-page__body video { height: auto; }
.content-page__body > .elementor { max-width: 100%; width: 100%; }
.content-page__body table { max-width: 100%; }
.content-page__body pre { overflow: auto; }
.site-footer { border-top: 1px solid var(--cmd-shadow); box-shadow: inset 0 1px white; padding: 11px 16px; font-size: 12px; color: #555; }
.site-footer__inner { max-width: 1280px; margin: 0 auto; }
.site-footer a { text-decoration: none; }
.back-to-top { position: fixed; right: 18px; bottom: 18px; width: 34px; height: 34px; padding: 6px; border: 2px solid; border-color: white #444 #444 white; background: var(--cmd-face); z-index: 10; }
.back-to-top svg { width: 20px; height: 20px; stroke: var(--cmd-blue); stroke-width: 2; fill: none; }
.resource-list { padding: 8px 12px; }
.resource-list__item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid #ddd; }
.resource-list__item:last-child { border-bottom: 0; }
.resource-list__item--no-image { grid-template-columns: minmax(0, 1fr); }
.resource-list__image { display: block; width: 36px; height: 36px; overflow: hidden; border: 1px solid #aaa; }
.resource-list__image img { width: 100%; height: 100%; object-fit: cover; }
.resource-list__image--contain img { object-fit: contain; }
.resource-list__content { display: flex; align-items: center; gap: 15px; justify-content: space-between; min-width: 0; }
.resource-list__title { margin: 0; font-size: 14px; line-height: 1.5; font-weight: normal; overflow-wrap: anywhere; }
.resource-list__title a { text-decoration: none; }
.resource-list__title a:hover { text-decoration: underline; }
.resource-list__link { flex-shrink: 0; font-size: 12px; text-decoration: none; border: 1px solid #aaa; padding: 4px 9px; background: #ece9e2; }
.resource-list__empty, .site-search-form__summary { margin: 16px; font-size: 13px; color: #555; }
.navigation.pagination { padding: 8px 16px 16px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 5px; }
.page-numbers { padding: 4px 9px; background: var(--cmd-face); color: black; border: 1px solid #888; text-decoration: none; }
.page-numbers.current { background: var(--cmd-selection); color: white; }
.site-search-form { display: flex; gap: 7px; margin: 16px; }
.site-search-form__input { flex: 1; width: 100%; }
.site-search-form__submit { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 15px; border: 2px solid; border-color: white #808080 #808080 white; background: var(--cmd-face); color: black; }
.site-search-form__submit svg { width: 17px; height: 17px; fill: none; stroke: var(--cmd-blue); stroke-width: 2; }
.site-search-results[aria-busy="true"] { opacity: .55; }
.desktop-shell { flex: 1; margin: 8px; min-width: 0; }
.desktop-window { border: 2px solid; border-color: #808080 white white #808080; background: white; padding: 20px; }
.desktop-window article + article { border-top: 1px solid #ccc; margin-top: 20px; padding-top: 15px; }
.desktop-window h1 { color: var(--cmd-blue); font-size: 21px; font-weight: normal; margin-top: 0; }

@media (min-width: 981px) {
  .commander__panes { height: max(420px, calc(100dvh - 249px)); flex: none; }
  .admin-bar .commander__panes { height: max(420px, calc(100dvh - 281px)); }
}
@media (max-width: 1100px) {
  .commander-toolbar__contacts { font-size: 11px; gap: 3px 9px; }
  .commander-actions > * { gap: 4px; font-size: 11px; }
}
@media (max-width: 820px) {
  body.admin-bar { min-height: calc(100dvh - 46px); }
  .commander-titlebar__subtitle { display: none; }
  .commander-toolbar { flex-wrap: wrap; gap: 8px; }
  .commander-toolbar__search { flex: 1; width: auto; }
  .commander-toolbar__contacts { width: 100%; justify-content: flex-start; padding: 2px 3px; }
  .commander-menubar__date { display: none; }
  .commander-menubar a { padding: 5px 7px; font-size: 12px; }
  .commander__workspace-heading { display: block; padding: 10px 4px; }
  .commander__workspace-heading > span { display: block; margin-top: 3px; }
  .commander__panes { grid-template-columns: minmax(0, 1fr); min-height: 0; flex: none; }
  .commander-list__scroll { max-height: 440px; }
  .commander-pane { min-height: 235px; }
  .commander__selection-bar { margin-top: 8px; }
  .commander__keyboard-hint { display: none; }
  .commander-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .commander-actions > * { min-height: 39px; font-size: 12px; }
  .content-page__navigation-main { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 480px) {
  .commander-titlebar__brand { font-size: 12px; }
  .commander-toolbar__navigation { gap: 2px; padding-right: 5px; }
  .commander-toolbar__button { width: 29px; }
  .commander-toolbar__search button { padding: 3px 7px; }
  .commander-toolbar__search input { font-size: 12px; }
  .commander-toolbar__contacts { gap: 3px 9px; }
  .commander-tab { padding: 6px 8px; font-size: 11px; }
  .commander-pane__filter { gap: 5px; }
  .commander-pane__filter label { font-size: 11px; }
  .commander-table { font-size: 12px; }
  .commander-table th:nth-child(2) { width: 64px; }
  .commander-table th:last-child { width: 80px; }
  .commander-table__type, .commander-table__date { font-size: 10px; padding: 5px !important; }
  .commander-table__link { gap: 6px; padding: 7px 6px; }
  .commander-pane__status { font-size: 11px; }
  .commander-actions > * { gap: 4px; font-size: 10px; }
  .commander-actions kbd { font-size: 11px; }
  .resource-list__content { align-items: flex-start; flex-direction: column; gap: 7px; }
  .content-page__title { font-size: 17px; }
  .content-page__body { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
