@charset "UTF-8";
html.dark-init body {
  background: rgb(28, 40, 52) !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  outline: none !important;
  --transAll:
    box-shadow var(--transition-speed) var(--transition-progression),
    transform var(--transition-speed) var(--transition-progression),
    scale var(--transition-speed) var(--transition-progression),
    background var(--transition-speed) var(--transition-progression),
    color var(--transition-speed) var(--transition-progression),
    opacity var(--transition-speed) var(--transition-progression),
    border-color var(--transition-speed) var(--transition-progression);
  --default: #37517e;
  --darkfont: #626c76;
  --font-primary: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--font-primary);
  box-sizing: border-box;
}

body {
  background: rgb(120, 138, 159);
  font-size: 14px;
  --c-glass: #bbbbbc;
  --c-light: #fff;
  --c-dark: #000;
  --c-content: #445;
  --c-action: #0052f5;
  --c-bg: rgba(255, 255, 255, 0.12);
  --saturation: 150%;
  --transition-speed: 0.4s;
  --transition-progression: ease;
  --table-row-hover: rgba(255, 255, 255, 0.12);
  --channel-active: #d3003b;
  --channel-inactive: rgba(255, 255, 255, 0.12);
  --modal-bg: #eef1f5;
  --modal-text: #1a2234;
  --field-label-color: #37517e;
  --field-border: rgba(55, 81, 126, 0.2);
  --url-row-bg: rgba(55, 81, 126, 0.08);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}
body.dark-theme {
  background: rgb(28, 40, 52);
  --c-content: #e1e1e1;
  --c-action: #03d5ff;
  --c-bg: rgba(0, 0, 0, 0.22);
  --table-row-hover: rgba(255, 255, 255, 0.06);
  --modal-bg: rgb(18, 28, 42);
  --modal-text: #e1e1e1;
  --field-label-color: #03d5ff;
  --field-border: rgba(3, 213, 255, 0.18);
  --url-row-bg: rgba(3, 213, 255, 0.06);
}

a {
  color: var(--darkfont);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

.svg-inline--fa {
  width: 1em !important;
  height: 1em !important;
  vertical-align: -0.125em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}
#preloader::before {
  content: "";
  position: fixed;
  top: calc(50% - 24px);
  left: calc(50% - 24px);
  border: 5px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

#themeToggle {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#themeToggle:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#themeToggle {
  right: 12px;
  color: #fff;
}

#logoutBtn {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#logoutBtn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#logoutBtn {
  right: 50px;
  font-size: 1.15em;
}

#crudBtn {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#crudBtn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#crudBtn {
  right: 88px;
}
#crudBtn svg {
  display: block;
  width: 16px;
  height: 16px;
}

#backBtn {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#backBtn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#backBtn {
  right: 126px;
}

#calendarBtn {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#calendarBtn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#calendarBtn {
  right: 126px;
  font-size: 1em;
}

#analysisBtn {
  position: fixed;
  top: 8px;
  top: calc(8px + env(safe-area-inset-top, 0px));
  font-size: 1.1em;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.85);
  z-index: 1100;
  transition: var(--transAll);
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
#analysisBtn:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
#analysisBtn {
  right: 164px;
  font-size: 1em;
}

.gp-main {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gp-header {
  flex-shrink: 0;
  padding: 2em 1.5em 1.5em;
  margin-bottom: 0;
}
.gp-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2em;
}
.gp-header-text h1 {
  font-size: 1.8em;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1;
}

.gp-logo {
  height: 56px;
  width: auto;
  flex-shrink: 0;
}

.gp-subtitle {
  font-size: 0.82em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  margin: 0.2em 0 0;
}

.gp-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1em 1em;
}

.table-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 1em;
  margin-bottom: 1em;
  gap: 1em;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
}
.dark-theme .table-controls {
  background: rgba(0, 0, 0, 0.22);
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.sort-label {
  font-size: 0.75em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sort-btn {
  font-family: var(--font-primary);
  font-size: 0.78em;
  font-weight: 500;
  padding: 0.25em 0.7em;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: var(--transAll);
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.sort-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.sort-btn.active {
  background: rgba(0, 82, 245, 0.4);
  border-color: rgba(0, 82, 245, 0.5);
  color: #fff;
}
.dark-theme .sort-btn.active {
  background: rgba(3, 213, 255, 0.22);
  border-color: rgba(3, 213, 255, 0.4);
  color: #03d5ff;
}

.sort-arrow {
  font-style: normal;
  font-size: 0.9em;
  opacity: 0.8;
}

.search-bar {
  flex: 1 1 180px;
  min-width: 140px;
  max-width: 360px;
}

.search-input {
  width: 100%;
  font-family: var(--font-primary);
  font-size: 0.78em;
  font-weight: 400;
  padding: 0.3em 0.8em;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  outline: none;
  transition: var(--transAll);
}
.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.search-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
}
.search-input::-webkit-search-cancel-button {
  cursor: pointer;
}
.dark-theme .search-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
}
.dark-theme .search-input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.09);
}

.article-count {
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}
.article-count span {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.table-wrapper {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}
.table-responsive {
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#articlesTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 1em;
  font-weight: 300 !important;
}
#articlesTable thead tr {
  border-bottom: none;
}
#articlesTable thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgb(120, 138, 159);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}
.dark-theme #articlesTable thead th {
  background: rgb(28, 40, 52);
}
#articlesTable th {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.9em 0.8em;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}
#articlesTable th.sortable {
  cursor: pointer;
}
#articlesTable th.sortable:hover {
  color: rgba(255, 255, 255, 0.9);
}
#articlesTable th.col-channel {
  text-align: center;
  padding: 0.5em 0.4em;
  width: 60px;
}
#articlesTable th.col-img {
  width: 72px;
  padding: 0.4em 0.5em 0.4em 0.8em;
}
#articlesTable th.col-canonical {
  width: 48px;
  text-align: center;
  padding: 0.4em 0.3em;
}
#articlesTable th:hover .channel-logo {
  opacity: 1;
}
#articlesTable td {
  padding: 0.5em 0.8em;
  vertical-align: middle;
  color: var(--c-content);
}
.dark-theme #articlesTable td {
  color: rgba(255, 255, 255, 0.85);
}
#articlesTable td.col-img {
  width: 72px;
  padding: 0.4em 0.5em 0.4em 0.8em;
}
#articlesTable td.col-title {
  min-width: 200px;
  font-weight: 400;
  line-height: 1.3;
}
#articlesTable td.col-canonical {
  width: 48px;
  text-align: center;
  padding: 0.3em 0.3em;
}
#articlesTable td.col-date {
  width: 100px;
  white-space: nowrap;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.55);
}
.dark-theme #articlesTable td.col-date {
  color: rgba(255, 255, 255, 0.5);
}
#articlesTable td.col-channel {
  text-align: center;
  width: 60px;
}
#articlesTable tbody tr.article-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: var(--transAll);
}
#articlesTable tbody tr.article-row:last-child {
  border-bottom: none;
}
#articlesTable tbody tr.article-row:hover {
  background: var(--table-row-hover);
}

.canonical-col-logo {
  height: 26px;
  width: auto;
  max-width: 38px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}
tr:hover .canonical-col-logo {
  opacity: 1;
}

.channel-logo {
  height: 36px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.platform-header-icon {
  font-size: 2.4em;
  display: block;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0.85;
  transition: opacity 0.4s ease, color 0.4s ease;
}
th:hover .platform-header-icon {
  opacity: 1;
  color: rgba(255, 255, 255, 0.95);
}

.thumb-wrap {
  position: relative;
  width: 128px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.thumb-wrap.loaded .thumb-placeholder {
  display: none;
}

.thumb-placeholder {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  animation: pulse 2s infinite;
}

.article-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}
.article-thumb.loaded {
  opacity: 1;
}

.channel-active {
  color: var(--channel-active);
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-inactive {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  padding: 1em;
  transition: var(--transAll);
}
.modal.open {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: saturate(0.6) blur(2px);
  -webkit-backdrop-filter: saturate(0.6) blur(2px);
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  border-radius: 12px;
  overflow: hidden;
  background: var(--modal-bg) !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 30;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.85em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transAll);
  padding: 0;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.45);
}

.modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-scroll::-webkit-scrollbar {
  display: none;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0;
  flex-shrink: 0;
}
.modal-image-wrapper.loaded .modal-image-placeholder {
  display: none;
}

.modal-image-placeholder {
  position: absolute;
  inset: 0;
  background: rgba(200, 210, 220, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  animation: pulse 2s infinite;
}
.dark-theme .modal-image-placeholder {
  background: rgba(30, 40, 55, 0.5);
  color: rgba(255, 255, 255, 0.2);
}

#modalImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#modalImage.loaded {
  opacity: 1;
}

.modal-content-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 1em;
  background: rgb(22, 32, 46);
}

.mcb-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: 100%;
}
.mcb-row--cats {
  display: flex;
  flex-wrap: wrap;
}
.mcb-row--cats .mcb-item {
  flex: 1 1 calc((100% - 18px) / 7);
  min-width: 0;
}

.mcb-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mcb-empty {
  flex: 1;
  padding: 3px 4px;
  font-size: 0.68em;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}
.mcb-empty:hover {
  color: #fff;
}

.mcb-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.68em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, color 0.15s;
}
.mcb-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.mcb-item:disabled, .mcb-item.mcb-disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.mcb-item.mcb-group-a {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.82);
}
.mcb-item.mcb-group-a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.mcb-item.mcb-group-b {
  border-color: rgba(34, 197, 94, 0.5);
  color: rgba(134, 239, 172, 0.9);
}
.mcb-item.mcb-group-b:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.75);
  color: #86efac;
}
.mcb-item.mcb-group-c {
  border-color: rgba(245, 158, 11, 0.5);
  color: rgba(252, 211, 77, 0.9);
}
.mcb-item.mcb-group-c:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.75);
  color: #fcd34d;
}
.mcb-item.mcb-group-d {
  border-color: rgba(167, 139, 250, 0.5);
  color: rgba(196, 181, 253, 0.92);
}
.mcb-item.mcb-group-d:hover {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.8);
  color: #ddd6fe;
}
.mcb-item.mcb-active.mcb-group-a {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}
.mcb-item.mcb-active.mcb-group-b {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.8);
  color: #86efac;
}
.mcb-item.mcb-active.mcb-group-c {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.8);
  color: #fcd34d;
}

.mcb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  transition: background 0.2s;
}
.mcb-dot.has-content {
  background: #22c55e;
}

.modal-field-group {
  padding: 0.85em 1.4em;
  border-bottom: 1px solid var(--field-border);
}
.modal-field-group:last-child {
  border-bottom: none;
}
.modal-field-group.modal-group-a {
  background: rgba(55, 81, 126, 0.03);
}
.dark-theme .modal-field-group.modal-group-a {
  background: rgba(255, 255, 255, 0.015);
}
.modal-field-group.modal-group-b {
  background: rgba(34, 197, 94, 0.04);
}
.dark-theme .modal-field-group.modal-group-b {
  background: rgba(34, 197, 94, 0.035);
}
.modal-field-group.modal-group-c {
  background: rgba(245, 158, 11, 0.04);
}
.dark-theme .modal-field-group.modal-group-c {
  background: rgba(245, 158, 11, 0.035);
}
.modal-field-group.modal-group-d {
  background: rgba(139, 92, 246, 0.05);
}
.dark-theme .modal-field-group.modal-group-d {
  background: rgba(167, 139, 250, 0.04);
}
.modal-field-group.modal-section-active {
  background: rgba(59, 130, 246, 0.1) !important;
}
.dark-theme .modal-field-group.modal-section-active {
  background: rgba(3, 213, 255, 0.08) !important;
}

.modal-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4em;
  gap: 0.5em;
}

.modal-field-label {
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--field-label-color);
}

.modal-field-value {
  font-size: 0.88em;
  font-weight: 300;
  line-height: 1.45;
  color: var(--modal-text);
  word-break: break-word;
}
.modal-field-value h2 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0.6em 0 0.3em;
}
.modal-field-value h3 {
  font-size: 1em;
  font-weight: 600;
  margin: 0.5em 0 0.25em;
}
.modal-field-value h4 {
  font-size: 0.9em;
  font-weight: 600;
  margin: 0.4em 0 0.2em;
}

.modal-title-value {
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.2;
  color: var(--modal-text);
}

.modal-date-info {
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--field-label-color);
  opacity: 0.75;
  margin-bottom: 0.4em;
}

.modal-subtitle-value {
  font-size: 1em;
  font-weight: 400;
  line-height: 1.3;
  color: var(--modal-text);
}
.modal-subtitle-value:empty::before {
  content: "No subtitle available";
  opacity: 0.45;
  font-style: italic;
}

.btn-copy-field {
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(55, 81, 126, 0.55);
  font-size: 0.95em;
  padding: 0.2em 0.3em;
  border-radius: 6px;
  transition: var(--transAll);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.btn-copy-field:hover {
  color: var(--c-action);
  background: rgba(0, 82, 245, 0.08);
}
.dark-theme .btn-copy-field {
  color: rgba(255, 255, 255, 0.35);
}
.dark-theme .btn-copy-field:hover {
  color: #03d5ff;
  background: rgba(3, 213, 255, 0.1);
}

.modal-composite-group {
  background: rgba(70, 157, 169, 0.05);
  border-left: 10px solid rgba(70, 157, 169, 0.35);
}
.dark-theme .modal-composite-group {
  background: rgba(245, 158, 11, 0.04);
  border-left-color: rgba(169, 238, 250, 0.3);
}

.modal-composite-label {
  color: #b45309 !important;
}
.dark-theme .modal-composite-label {
  color: #a9eefa !important;
}

.btn-copy-composite {
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(180, 83, 9, 0.5);
  font-size: 0.95em;
  padding: 0.2em 0.3em;
  border-radius: 6px;
  transition: var(--transAll);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.btn-copy-composite:hover {
  color: #b45309;
  background: rgba(245, 158, 11, 0.1);
}
.dark-theme .btn-copy-composite {
  color: rgba(169, 238, 250, 0.4);
}
.dark-theme .btn-copy-composite:hover {
  color: #a9eefa;
  background: rgba(169, 238, 250, 0.1);
}

.modal-composite-body {
  font-size: 0.88em;
  line-height: 1.45;
  color: var(--modal-text);
  word-break: break-word;
}
.modal-composite-body h2 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0.6em 0 0.3em;
}
.modal-composite-body h3 {
  font-size: 1em;
  font-weight: 600;
  margin: 0.5em 0 0.25em;
}
.modal-composite-body h4 {
  font-size: 0.9em;
  font-weight: 600;
  margin: 0.4em 0 0.2em;
}

.composite-url {
  font-size: 0.85em;
  color: var(--c-action);
  word-break: break-all;
  padding: 0.15em 0;
}

.composite-spacer {
  height: 0.85em;
}

.composite-sentence {
  margin: 0 0 0.9em;
}
.composite-sentence:last-child {
  margin-bottom: 0;
}

.modal-urls {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.75em;
  border-radius: 8px;
  background: var(--url-row-bg);
  transition: var(--transAll);
}
.url-row:hover {
  background: rgba(55, 81, 126, 0.14);
}
.dark-theme .url-row:hover {
  background: rgba(3, 213, 255, 0.1);
}

.url-channel-logo {
  height: 24px;
  width: auto;
  max-width: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.url-text {
  flex: 1;
  font-size: 0.78em;
  font-weight: 400;
  color: var(--modal-text);
  word-break: break-all;
  line-height: 1.3;
  min-width: 0;
}
.dark-theme .url-text {
  color: rgba(255, 255, 255, 0.8);
}

.btn-url-copy,
.btn-url-open {
  border: none;
  background: rgba(55, 81, 126, 0.1);
  cursor: pointer;
  color: rgba(55, 81, 126, 0.7);
  font-size: 0.8em;
  padding: 0.3em 0.5em;
  border-radius: 8px;
  transition: var(--transAll);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
}
.btn-url-copy:hover,
.btn-url-open:hover {
  background: rgba(0, 82, 245, 0.15);
  color: #0052f5;
}
.dark-theme .btn-url-copy,
.dark-theme .btn-url-open {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.5);
}
.dark-theme .btn-url-copy:hover,
.dark-theme .btn-url-open:hover {
  background: rgba(3, 213, 255, 0.15);
  color: #03d5ff;
}

.info-modal {
  z-index: 1060;
}

.info-modal-content {
  max-width: 640px;
}

.info-modal-head {
  flex-shrink: 0;
  padding: 0.95em 3.2em 0.8em 1.4em;
  background: rgb(22, 32, 46);
}

.info-modal-kicker {
  display: block;
  margin-bottom: 0.3em;
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.55);
}

.info-modal-title {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
}

.info-set .modal-field-label {
  font-size: 0.8em;
  text-transform: none;
  letter-spacing: 0.02em;
}

.info-set-text,
.info-content {
  white-space: pre-wrap;
}

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 40, 60, 0.92);
  color: #fff;
  padding: 0.5em 1.2em;
  border-radius: 20px;
  font-size: 0.82em;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.login-main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2em 1em;
}

.login-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4em;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
}

.login-logo {
  height: 56px;
  width: auto;
}

.login-heading {
  font-size: 1.7em;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1;
}

.login-subheading {
  font-size: 0.82em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.login-card {
  width: 100%;
  padding: 1.8em 1.6em;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
}
.dark-theme .login-card {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.07);
}

.login-error {
  background: rgba(220, 50, 50, 0.15);
  border: 1px solid rgba(220, 50, 50, 0.3);
  color: #ff6b6b;
  font-size: 0.85em;
  font-weight: 500;
  padding: 0.6em 0.9em;
  border-radius: 10px;
  line-height: 1.4;
}
.dark-theme .login-error {
  color: #ff8585;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.login-label {
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--field-label-color);
}

.login-input {
  font-family: var(--font-primary);
  font-size: 0.95em;
  font-weight: 400;
  width: 100%;
  padding: 0.55em 0.8em;
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--modal-text);
  transition: var(--transAll);
}
.login-input:focus {
  border-color: var(--c-action);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 82, 245, 0.12);
}
.dark-theme .login-input {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.dark-theme .login-input:focus {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(3, 213, 255, 0.15);
}

.login-submit {
  font-family: var(--font-primary);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.6em 1.2em;
  border-radius: 12px;
  border: 1px solid rgba(0, 82, 245, 0.4);
  background: rgba(0, 82, 245, 0.22);
  color: #fff;
  cursor: pointer;
  transition: var(--transAll);
  margin-top: 0.3em;
  width: 100%;
}
.login-submit:hover {
  background: rgba(0, 82, 245, 0.38);
  border-color: rgba(0, 82, 245, 0.6);
}
.dark-theme .login-submit {
  border-color: rgba(3, 213, 255, 0.35);
  background: rgba(3, 213, 255, 0.18);
  color: #03d5ff;
}
.dark-theme .login-submit:hover {
  background: rgba(3, 213, 255, 0.3);
  border-color: rgba(3, 213, 255, 0.55);
  color: #fff;
}

@media (max-width: 900px) {
  .gp-header-inner {
    gap: 0.9em;
  }
  .gp-logo {
    height: 44px;
  }
  .gp-header-text h1 {
    font-size: 1.5em;
  }
  .modal-title-value {
    font-size: 1.05em;
  }
}
@media (max-width: 600px) {
  .gp-header {
    padding: calc(0.9em + env(safe-area-inset-top, 0px)) 1em 0.6em;
  }
  .gp-header-inner {
    flex-wrap: wrap;
    gap: 0.3em 0.8em;
  }
  .gp-header-text {
    flex: 0 0 100%;
  }
  .gp-logo {
    height: 32px;
  }
  .gp-header-text h1 {
    font-size: 1.25em;
  }
  .gp-subtitle {
    display: none;
  }
  .gp-content {
    padding: 0 0.5em;
  }
  .table-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "sort   count" "search fts";
    align-items: center;
    gap: 0.5em 0.6em;
    padding: 0.5em 0.7em;
    margin-bottom: 0.6em;
  }
  .sort-bar {
    grid-area: sort;
  }
  .article-count {
    grid-area: count;
    justify-self: end;
  }
  .search-bar {
    grid-area: search;
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .table-fts {
    grid-area: fts;
    white-space: nowrap;
  }
  #articlesTable {
    font-size: 0.82em;
  }
  #articlesTable th.col-date, #articlesTable th.col-canonical, #articlesTable td.col-date, #articlesTable td.col-canonical {
    display: none;
  }
  #articlesTable th.col-title, #articlesTable td.col-title {
    min-width: 0;
  }
  #articlesTable th.col-channel, #articlesTable td.col-channel {
    width: 29px;
  }
  #articlesTable th.col-img, #articlesTable td.col-img {
    width: 48px;
    padding: 0.3em 0.2em 0.3em 0.4em;
  }
  #articlesTable th.col-channel,
  #articlesTable td.col-channel {
    padding: 0.4em 0.1em;
  }
  #articlesTable td {
    padding: 0.4em 0.3em;
  }
  #articlesTable th {
    padding: 0.6em 0.3em;
  }
  .channel-logo {
    height: 20px;
    max-width: 25px;
  }
  .thumb-wrap {
    width: 44px;
    height: 28px;
  }
  .modal {
    padding: 0;
    align-items: stretch;
    z-index: 1200;
  }
  .modal-content {
    max-width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding-top: calc(44px + env(safe-area-inset-top, 0px));
  }
  .modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: calc(44px + env(safe-area-inset-top, 0px));
    background: rgb(22, 32, 46);
    pointer-events: none;
  }
  .modal-close {
    width: 34px;
    height: 34px;
    top: 5px;
    right: 8px;
  }
  .modal-content > .modal-close {
    top: calc(5px + env(safe-area-inset-top, 0px));
  }
  .modal-content-bar {
    padding: 5px 8px;
  }
  .mcb-row {
    grid-template-columns: repeat(7, auto);
  }
  .mcb-item {
    min-width: 0;
    overflow: hidden;
    font-size: 0.6em;
    padding: 3px 2px;
    gap: 3px;
    letter-spacing: 0;
  }
  .mcb-row--cats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mcb-row--cats .mcb-item {
    flex: none;
  }
  .info-modal {
    align-items: flex-end;
    z-index: 1210;
  }
  .info-modal .modal-content {
    height: auto;
    max-height: 88%;
    padding-top: 0;
    border-radius: 12px 12px 0 0;
  }
  .info-modal .modal-content::before {
    display: none;
  }
  .info-modal #infoModalClose {
    top: 5px;
  }
  .modal-field-group {
    padding: 0.7em 0.9em;
  }
  .modal-title-value {
    font-size: 1em;
  }
  .url-row {
    flex-wrap: wrap;
  }
  .url-text {
    width: 100%;
  }
}
.setup-intro-text {
  font-size: 0.85em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
}

.setup-hint {
  font-weight: 300;
  font-size: 0.88em;
  opacity: 0.6;
  text-transform: none;
  letter-spacing: 0;
}

.setup-success {
  font-size: 0.82em;
  font-weight: 500;
  color: #22c55e;
  text-align: center;
  margin: 0.5em 0 0;
}
.dark-theme .setup-success {
  color: #4ade80;
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.3em 1em;
  }
  .login-logo {
    height: 44px;
  }
  .login-heading {
    font-size: 1.4em;
  }
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 600px) {
    .modal-scroll {
      padding-bottom: calc(1em + env(safe-area-inset-bottom));
    }
  }
}
.admin-content {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  padding-top: 0.5em;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-content > * {
  flex-shrink: 0;
}

.admin-flash {
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.5;
  padding: 0.6em 0.9em;
  border-radius: 10px;
  margin-bottom: 0.8em;
}
.admin-flash--success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}
.dark-theme .admin-flash--success {
  color: #4ade80;
}
.admin-flash--error {
  background: rgba(220, 50, 50, 0.15);
  border: 1px solid rgba(220, 50, 50, 0.3);
  color: #dc3545;
}
.dark-theme .admin-flash--error {
  color: #ff8585;
}

.admin-section {
  padding: 1.4em 1.6em;
  display: flex;
  flex-direction: column;
  gap: 1em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
}
.dark-theme .admin-section {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.07);
}

.admin-section-title {
  font-size: 1em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1;
  letter-spacing: 0.01em;
}

.admin-section-count {
  font-weight: 300;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.5);
}

.gp-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 0.75em 1em;
  align-items: end;
}
.gp-form-grid--compact {
  grid-template-columns: 1fr 1fr auto;
}

.gp-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}
.gp-form-field--action {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5em;
  padding-bottom: 1px;
}

.gp-form-label {
  font-size: 0.68em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--field-label-color);
  white-space: nowrap;
}

.gp-form-input {
  font-family: var(--font-primary);
  font-size: 0.9em;
  font-weight: 400;
  width: 100%;
  padding: 0.5em 0.75em;
  border-radius: 10px;
  border: 1px solid var(--field-border);
  background: rgba(255, 255, 255, 0.5);
  color: var(--modal-text);
  transition: var(--transAll);
}
.gp-form-input:focus {
  border-color: var(--c-action);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 82, 245, 0.12);
}
.dark-theme .gp-form-input {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.dark-theme .gp-form-input:focus {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(3, 213, 255, 0.15);
}

.btn-action {
  font-family: var(--font-primary);
  font-size: 0.9em;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.5em 1em;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transAll);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
  line-height: 1.2;
}
.btn-action--sm {
  font-size: 0.78em;
  padding: 0.35em 0.75em;
  border-radius: 8px;
}
.btn-action--primary {
  background: rgba(0, 82, 245, 0.22);
  border-color: rgba(0, 82, 245, 0.4);
  color: #fff;
}
.btn-action--primary:hover {
  background: rgba(0, 82, 245, 0.38);
  border-color: rgba(0, 82, 245, 0.6);
}
.dark-theme .btn-action--primary {
  background: rgba(3, 213, 255, 0.18);
  border-color: rgba(3, 213, 255, 0.35);
  color: #03d5ff;
}
.dark-theme .btn-action--primary:hover {
  background: rgba(3, 213, 255, 0.3);
  border-color: rgba(3, 213, 255, 0.55);
  color: #fff;
}
.btn-action--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
}
.btn-action--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.btn-action--danger {
  background: rgba(220, 50, 50, 0.12);
  border-color: rgba(220, 50, 50, 0.3);
  color: #e05252;
}
.btn-action--danger:hover {
  background: rgba(220, 50, 50, 0.25);
  border-color: rgba(220, 50, 50, 0.5);
  color: #ff6b6b;
}
.dark-theme .btn-action--danger {
  background: rgba(220, 50, 50, 0.1);
  border-color: rgba(220, 50, 50, 0.25);
  color: #ff7070;
}
.dark-theme .btn-action--danger:hover {
  background: rgba(220, 50, 50, 0.22);
  border-color: rgba(220, 50, 50, 0.45);
  color: #ff9090;
}

.inline-form {
  display: inline;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}
.admin-table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.admin-table th {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.75em 0.9em;
  text-align: left;
  white-space: nowrap;
  user-select: none;
}
.admin-table td {
  padding: 0.6em 0.9em;
  vertical-align: middle;
  color: var(--c-content);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dark-theme .admin-table td {
  color: rgba(255, 255, 255, 0.85);
}
.admin-table tbody tr {
  transition: var(--transAll);
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr.admin-row:hover {
  background: var(--table-row-hover);
}

.admin-col-username {
  font-weight: 600;
  min-width: 140px;
}

.admin-col-date {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
.dark-theme .admin-col-date {
  color: rgba(255, 255, 255, 0.5);
}

.admin-col-actions {
  white-space: nowrap;
}
.admin-col-actions .btn-action + .btn-action,
.admin-col-actions .btn-action + .inline-form,
.admin-col-actions .inline-form + .btn-action {
  margin-left: 0.4em;
}

.admin-self-badge {
  font-size: 0.7em;
  font-weight: 500;
  background: rgba(0, 82, 245, 0.15);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 0.1em 0.5em;
  margin-left: 0.4em;
  vertical-align: middle;
}
.dark-theme .admin-self-badge {
  background: rgba(3, 213, 255, 0.15);
  color: rgba(3, 213, 255, 0.8);
}

.pw-change-row td {
  border-bottom: none;
}

.pw-change-cell {
  padding: 0.5em 0.9em 1em !important;
  background: rgba(0, 0, 0, 0.06);
}
.dark-theme .pw-change-cell {
  background: rgba(0, 0, 0, 0.15);
}

.crud-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.crud-tab {
  font-size: 0.9em;
  padding: 0.4em 1.1em;
  text-decoration: none;
}

.crud-tab-count {
  font-size: 0.9em;
  font-weight: 400;
  opacity: 0.65;
}

.info-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 1fr);
  gap: 0.75em 1em;
  align-items: end;
}

.gp-form-field--wide {
  grid-column: 1/-1;
}

.gp-form-textarea {
  min-height: 9em;
  resize: vertical;
  line-height: 1.5;
  white-space: pre-wrap;
  tab-size: 4;
}

.gp-form-hint {
  font-size: 0.75em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
}

.info-empty {
  margin: 0;
  font-size: 0.88em;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
}

.info-category {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}
.info-category + .info-category {
  margin-top: 0.6em;
  padding-top: 1.1em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.info-category-title {
  margin: 0;
  font-size: 0.95em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  padding: 0.8em 0.9em;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.dark-theme .info-item {
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(255, 255, 255, 0.06);
}

.info-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 0.7em;
}

.info-order {
  min-width: 2.2em;
  padding: 0.15em 0.55em;
  border-radius: 20px;
  text-align: center;
  font-size: 0.72em;
  font-weight: 600;
  background: rgba(0, 82, 245, 0.25);
  color: rgba(255, 255, 255, 0.9);
}
.dark-theme .info-order {
  background: rgba(3, 213, 255, 0.15);
  color: #03d5ff;
}

.info-item-name {
  flex: 1 1 12em;
  min-width: 0;
  margin: 0;
  font-size: 0.95em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  word-break: break-word;
}

.info-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.info-content {
  max-height: 16em;
  overflow: auto;
  padding: 0.65em 0.85em;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--modal-text);
  font-size: 0.88em;
  line-height: 1.5;
  word-break: break-word;
}
.dark-theme .info-content {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.88);
}

.info-edit {
  padding-top: 0.8em;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
  .info-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .info-form-grid {
    grid-template-columns: 1fr;
  }
  .info-item-actions {
    width: 100%;
  }
}
@media (max-width: 900px) {
  .gp-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gp-form-grid--compact {
    grid-template-columns: 1fr 1fr;
  }
  .gp-form-field--action {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .admin-section {
    padding: 1em 0.9em;
  }
  .gp-form-grid,
  .gp-form-grid--compact {
    grid-template-columns: 1fr;
  }
  .admin-col-date {
    display: none;
  }
}
/* ── Media-planning calendar page (article_calendar.php) ────────────── */
.cal-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: "asap-condensed", sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  transition: background 0.3s, color 0.3s;
  /* light theme */
  --cal-row-h: 250px;
  --cal-hdr-h: 32px;
  --body-bg: $bg-light;
  --text-primary: #1a2234;
  --text-secondary: #37517e;
  --text-muted: #5a6a7e;
  --text-header: rgba(255, 255, 255, 0.92);
  --bg-header: rgba(28, 45, 70, 0.88);
  --bg-card: rgba(255, 255, 255, 0.68);
  --bg-secondary: rgba(255, 255, 255, 0.48);
  --bg-tertiary: rgba(255, 255, 255, 0.28);
  --bg-primary: rgba(255, 255, 255, 0.92);
  --border-color: rgba(55, 81, 126, 0.22);
  --border-light: rgba(55, 81, 126, 0.12);
  --info-bg: rgba(0, 82, 245, 0.07);
  --btn-primary: #0052f5;
  --btn-secondary: #37517e;
  --btn-secondary-hover: #2a3d60;
  --btn-warning: #f59e0b;
  --btn-success: #22c55e;
  --btn-danger: #ef4444;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.dark-theme .cal-page {
  --body-bg: $bg-dark;
  --text-primary: #e1e1e1;
  --text-secondary: #03d5ff;
  --text-muted: #9ca3af;
  --bg-header: rgba(8, 18, 32, 0.92);
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-secondary: rgba(255, 255, 255, 0.07);
  --bg-tertiary: rgba(0, 0, 0, 0.28);
  --bg-primary: rgba(18, 28, 42, 0.96);
  --border-color: rgba(3, 213, 255, 0.18);
  --border-light: rgba(3, 213, 255, 0.10);
  --info-bg: rgba(3, 213, 255, 0.06);
  --btn-primary: #03d5ff;
  --btn-secondary: #1a3050;
  --btn-secondary-hover: #264070;
}
@media (max-width: 768px) {
  .cal-page {
    --cal-row-h: 200px;
  }
}
.cal-page .cal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 8px 16px;
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-shrink: 0;
  gap: 10px;
}
.cal-page .cal-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-page .cal-logo {
  height: 28px;
  width: auto;
}
.cal-page .cal-page-title {
  font-size: 1em;
  font-weight: 700;
  color: var(--text-header);
  margin: 0;
}
.cal-page .cal-topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.cal-page .cal-range-label {
  font-size: 0.88em;
  font-weight: 600;
  color: var(--text-header);
}
.cal-page .cal-today-btn {
  background: var(--btn-secondary);
  color: #fff;
  border: none;
  padding: 5px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "asap-condensed", sans-serif;
  font-size: 0.82em;
  font-weight: 700;
  transition: background 0.15s;
}
.cal-page .cal-today-btn:hover {
  background: var(--btn-secondary-hover);
}
.cal-page .cal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  overflow: hidden;
}
.cal-page .cal-viewport {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  scroll-padding-top: var(--cal-hdr-h);
}
.cal-page .cal-col-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--cal-hdr-h);
  background: var(--bg-header);
}
.cal-page .cal-col-hdr {
  color: var(--text-header);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: var(--cal-hdr-h);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.cal-page .cal-col-hdr:last-child {
  border-right: none;
}
.cal-page .cal-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  height: var(--cal-row-h);
  scroll-snap-align: start;
  border-bottom: 1px solid var(--border-color);
}
.cal-page .cal-week-row:last-child {
  border-bottom: none;
}
.cal-page .cal-cell {
  height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 5px;
  overflow-y: auto;
  box-sizing: border-box;
}
.cal-page .cal-cell:last-child {
  border-right: none;
}
.cal-page .cal-cell.today {
  background: var(--info-bg);
}
.cal-page .cal-cell.past {
  background: var(--bg-tertiary);
}
.cal-page .cal-date-num {
  position: sticky;
  top: 0;
  z-index: 1;
  background: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding-bottom: 3px;
  margin-bottom: 3px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1;
}
.cal-page .cal-cell.today .cal-date-num {
  color: #fff;
}
.cal-page .cal-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-primary);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  line-height: 1;
  margin-left: auto;
}
.cal-page .cal-article {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 4px 5px;
  margin-bottom: 3px;
  font-size: 0.8rem;
  line-height: 1.3;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.cal-page .cal-article:hover {
  background: var(--bg-primary);
}
.cal-page {
  /* canonical URL */
}
.cal-page .cal-article-canonical {
  font-size: 0.56rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.cal-page {
  /* thumbnail (16:9) */
}
.cal-page .cal-article-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 3px;
  display: block;
  background: var(--bg-tertiary);
}
.cal-page .cal-article-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 3px;
}
.cal-page .cal-article-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 3px;
}
.cal-page .cal-channel-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.5;
  white-space: nowrap;
}
.cal-page .cal-article-date-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
}
.cal-page .cal-article-date-wrap label {
  font-size: 0.58rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin: 0;
}
.cal-page .cal-date-input {
  font-size: 0.58rem;
  font-family: "asap-condensed", sans-serif;
  padding: 1px 2px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 100%;
  max-width: 108px;
}
.cal-page .cal-date-input:focus {
  outline: none;
  border-color: var(--btn-primary);
}
.cal-page .cal-date-input.saving {
  border-color: var(--btn-warning);
}
.cal-page .cal-date-input.saved {
  border-color: var(--btn-success);
}
.cal-page .cal-date-input.error {
  border-color: var(--btn-danger);
}
@media (max-width: 768px) {
  .cal-page .cal-article-date-wrap {
    display: none;
  }
}
@media (max-width: 600px) {
  .cal-page .cal-topbar {
    flex-wrap: wrap;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  }
  .cal-page .cal-topbar-left {
    flex-wrap: wrap;
    gap: 2px 10px;
  }
  .cal-page .cal-page-title {
    flex: 0 0 100%;
  }
  .cal-page .cal-topbar-center {
    position: static;
    transform: none;
    flex: 0 0 100%;
    justify-content: space-between;
  }
}

/* ── Full-text search page (search.php) ──────────────────────────────── */
body.search-page .gp-main {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}
body.search-page .gp-content {
  flex: none;
  overflow: visible;
}
body.search-page .table-wrapper {
  flex: none;
  overflow: visible;
}
body.search-page .table-responsive {
  flex: none;
  overflow: visible;
  max-height: none;
}

mark.gp-highlight {
  background: #d3003b;
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
  font-style: normal;
}

.fts-card {
  padding: 1.4em 1.6em;
  margin-bottom: 1em;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
}
.dark-theme .fts-card {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.07);
}

.fts-input-row {
  display: flex;
  gap: 0.6em;
  align-items: stretch;
  margin-bottom: 0.9em;
}

.fts-input {
  flex: 1;
  font-family: var(--font-primary);
  font-size: 1.05em;
  font-weight: 400;
  padding: 0.55em 1em;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.fts-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}
.fts-input:focus {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
}
.dark-theme .fts-input {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}
.dark-theme .fts-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
}

.fts-submit {
  font-family: var(--font-primary);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.55em 1.5em;
  border-radius: 10px;
  border: 1px solid rgba(0, 82, 245, 0.4);
  background: rgba(0, 82, 245, 0.22);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.fts-submit:hover {
  background: rgba(0, 82, 245, 0.38);
  border-color: rgba(0, 82, 245, 0.6);
}
.dark-theme .fts-submit {
  border-color: rgba(3, 213, 255, 0.35);
  background: rgba(3, 213, 255, 0.18);
  color: #03d5ff;
}
.dark-theme .fts-submit:hover {
  background: rgba(3, 213, 255, 0.3);
  border-color: rgba(3, 213, 255, 0.55);
  color: #fff;
}

/* ── Syntax hints ─────────────────────────────────────────────────────── */
.fts-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 0.75em;
  align-items: center;
}

.fts-hint {
  font-size: 0.72em;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 0.35em;
}
.fts-hint code {
  font-family: "Menlo", "Courier New", monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.82);
}
.dark-theme .fts-hint code {
  background: rgba(255, 255, 255, 0.07);
}

.fts-hint-sep {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.72em;
}

/* ── Result info bar ──────────────────────────────────────────────────── */
.fts-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4em;
  padding: 0.4em 0.2em;
  margin-bottom: 0.75em;
  font-size: 0.82em;
  color: rgba(255, 255, 255, 0.55);
}

.fts-result-count {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.fts-mode-badge {
  font-size: 0.78em;
  padding: 0.15em 0.65em;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
}

/* ── Empty / error states ─────────────────────────────────────────────── */
.fts-state {
  padding: 2.5em 1.4em;
  text-align: center;
  font-size: 0.88em;
  color: rgba(255, 255, 255, 0.5);
}

.fts-state-heading {
  display: block;
  font-size: 1.25em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.4em;
}

.fts-state--error {
  color: #ff8585;
}

/* ── Search results table ─────────────────────────────────────────────── */
#searchTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 1em;
  font-weight: 300;
}
#searchTable thead tr {
  border-bottom: none;
}
#searchTable thead th {
  font-weight: 600;
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.9em 0.8em;
  text-align: left;
  white-space: nowrap;
  user-select: none;
  background: rgb(120, 138, 159);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12);
}
.dark-theme #searchTable thead th {
  background: rgb(28, 40, 52);
}
#searchTable thead th.col-channel {
  text-align: center;
  padding: 0.5em 0.4em;
  width: 60px;
}
#searchTable thead th.col-img {
  width: 88px;
  padding: 0.4em 0.5em 0.4em 0.8em;
}
#searchTable td {
  padding: 0.5em 0.8em;
  vertical-align: middle;
  color: var(--c-content);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dark-theme #searchTable td {
  color: rgba(255, 255, 255, 0.85);
}
#searchTable td.col-img {
  width: 88px;
  padding: 0.4em 0.5em 0.4em 0.8em;
}
#searchTable td.col-title {
  min-width: 200px;
  font-weight: 400;
  line-height: 1.3;
}
#searchTable td.col-date {
  width: 100px;
  white-space: nowrap;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.55);
}
#searchTable td.col-channel {
  text-align: center;
  width: 60px;
}
#searchTable tbody tr.srch-row {
  cursor: pointer;
  transition: background 0.2s;
}
#searchTable tbody tr.srch-row:last-child td {
  border-bottom: none;
}
#searchTable tbody tr.srch-row:hover {
  background: var(--table-row-hover);
}

/* ── Search modal article area ────────────────────────────────────────── */
#srchModal .modal-article-content {
  font-size: 0.88em;
  font-weight: 300;
  line-height: 1.55;
  color: var(--modal-text);
  word-break: break-word;
}
#srchModal .modal-article-content h2 {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0.6em 0 0.3em;
}
#srchModal .modal-article-content h3 {
  font-size: 1em;
  font-weight: 600;
  margin: 0.5em 0 0.25em;
}
#srchModal .modal-article-content h4 {
  font-size: 0.9em;
  font-weight: 600;
  margin: 0.4em 0 0.2em;
}
#srchModal .modal-article-content p {
  margin: 0 0 0.7em;
}

/* ── Search modal image (mirrors #modalImage rules) ───────────────────── */
#srchModalImg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#srchModalImg.loaded {
  opacity: 1;
}

/* ── Article copy btn (article group) ─────────────────────────────────── */
.srch-copy-btn {
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(55, 81, 126, 0.55);
  font-size: 0.95em;
  padding: 0.2em 0.3em;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.srch-copy-btn:hover {
  color: var(--c-action);
}
.dark-theme .srch-copy-btn {
  color: rgba(255, 255, 255, 0.35);
}
.dark-theme .srch-copy-btn:hover {
  color: #03d5ff;
}

@media (max-width: 600px) {
  .fts-input-row {
    flex-direction: column;
  }
  .fts-submit {
    width: 100%;
  }
  .fts-hint-sep {
    display: none;
  }
  #searchTable {
    font-size: 0.82em;
  }
  #searchTable thead th {
    padding: 0.6em 0.3em;
  }
  #searchTable thead th.col-date {
    display: none;
  }
  #searchTable thead th.col-channel {
    width: 29px;
    padding: 0.4em 0.1em;
  }
  #searchTable thead th.col-img {
    width: 48px;
    padding: 0.3em 0.2em 0.3em 0.4em;
  }
  #searchTable td {
    padding: 0.4em 0.3em;
  }
  #searchTable td.col-date {
    display: none;
  }
  #searchTable td.col-title {
    min-width: 0;
  }
  #searchTable td.col-channel {
    width: 29px;
    padding: 0.4em 0.1em;
  }
  #searchTable td.col-img {
    width: 48px;
    padding: 0.3em 0.2em 0.3em 0.4em;
  }
}
@media (max-width: 600px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=submit]):not([type=button]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
