﻿@charset "UTF-8";

/* cms */

input::selection,
textarea::selection,
.cms-preview-surface ::selection {
  background: var(--sh);
  color: #ffffff;
  text-shadow: none;
}

.cms-preview-cover {
  border: 4px solid var(--fg);
  box-shadow: 6px 6px 0 var(--sh);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.cms-preview-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.cms-preview-date {
  opacity: 0.8;
  font-size: 0.92rem;
  font-weight: 900;
}

.cms-preview-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  opacity: 0.92;
  margin: 0;
}

.cms-small-btn {
  width: auto;
  align-self: flex-start;
  min-width: 0;
}

.cms-login-box {
  text-align: left;
}

.cms-auth-box,
.cms-sidebar,
.cms-editor-box,
.cms-preview-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cms-auth-line,
.cms-section-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.cms-auth-title,
.cms-auth-subtitle,
.cms-preview-hint {
  margin: 0;
}

.cms-auth-actions,
.cms-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cms-notice {
  border: 3px solid var(--fg);
  padding: 10px 12px;
  font-weight: 900;
}

.cms-notice-info {
  background: rgba(255, 255, 255, 0.03);
}

.cms-notice-success {
  background: rgba(30, 255, 120, 0.12);
}

.cms-notice-error {
  background: rgba(255, 90, 90, 0.14);
}

.cms-login-error {
  margin-top: 14px;
  padding: 12px;
  border: 3px solid var(--sh);
  background: rgba(255, 90, 90, 0.12);
  font-weight: 900;
  line-height: 1.5;
}

.cms-shell {
  display: grid;
  gap: 24px;
}

.cms-post-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cms-post-item {
  width: 100%;
  text-align: left;
  padding: 14px;
  border: 4px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  box-shadow: 6px 6px 0 var(--sh);
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.cms-post-item.is-active,
.cms-post-item:hover {
  background: var(--fg);
  color: var(--bg);
}

.cms-post-item-title {
  font-weight: 900;
  text-transform: uppercase;
}

.cms-post-item-meta {
  font-size: 0.84rem;
  opacity: 0.85;
}

.cms-form-grid {
  display: grid;
  gap: 16px;
}

.cms-field {
  display: grid;
  gap: 8px;
}

.cms-field span {
  font-weight: 900;
  text-transform: uppercase;
}

.cms-markdown-input {
  min-height: 420px;
  resize: vertical;
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
}

.cms-markdown-help {
  font-size: 0.92rem;
  opacity: 0.82;
  margin: 0;
}

.cms-preview-surface {
  display: grid;
  gap: 16px;
}

.cms-shell,
.cms-panel,
.cms-form-grid,
.cms-preview-surface,
.cms-post-item {
  min-width: 0;
}

.cms-post-item,
.cms-notice,
.cms-login-error,
.cms-preview-cover {
  border-width: var(--control-border);
  box-shadow: var(--control-shadow) var(--control-shadow) 0 var(--sh);
}

.cms-field input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 56px;
  padding-right: 16px;
  margin-bottom: 0;
  box-shadow: none;
  background-image: none;
}

.cms-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
  padding: 0;
  margin-left: 12px;
  filter: invert(86%) sepia(94%) saturate(1060%) hue-rotate(8deg) brightness(102%) contrast(101%);
}

.cms-field input[type="date"]::-webkit-datetime-edit,
.cms-field input[type="date"]::-webkit-date-and-time-value {
  min-height: 1.2em;
}

.cms-field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.cms-auth-box,
.cms-sidebar,
.cms-editor-box,
.cms-preview-box {
  overflow-wrap: anywhere;
}

.cms-preview-cover img {
  max-width: 100%;
  height: auto;
}

.cms-mobile-tabs {
  display: none;
}

.cms-mobile-tablist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cms-tab-btn {
  min-width: 0;
}

.cms-tab-btn,
.cms-tab-btn:hover,
.cms-tab-btn:focus-visible {
  color: var(--fg);
}

.cms-tab-btn.is-active {
  background-color: var(--fg);
  background-image: var(--fg-gradient);
  background-size: var(--fg-gradient-size);
  color: var(--bg);
  border-color: var(--fg);
  box-shadow: 6px 6px 0 var(--sh);
}

.cms-tab-btn.is-active:hover,
.cms-tab-btn.is-active:focus-visible {
  background-color: var(--fg);
  background-image: var(--fg-gradient);
  color: var(--bg);
}

.cms-shell[data-active-tab="posts"] .cms-panel[data-tab-panel="posts"],
.cms-shell[data-active-tab="editor"] .cms-panel[data-tab-panel="editor"],
.cms-shell[data-active-tab="preview"] .cms-panel[data-tab-panel="preview"] {
  display: flex;
}

.cms-editor-actions-sticky {
  position: relative;
}

.cms-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
  border: 4px solid var(--fg);
  box-shadow: 4px 4px 0 var(--sh);
}

.cms-md-btn {
  background: var(--bg);
  color: var(--fg);
  border: 3px solid var(--fg);
  padding: 6px 12px;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.cms-md-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.cms-md-btn:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.cms-spy-box {
    border-color: var(--sh) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 6px 6px 0 var(--fg) !important; 
}

.spy-full-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.spy-log-card {
    padding: 12px !important;
    background: rgba(0,0,0,0.2) !important;
    border-left: 4px solid var(--sh) !important;
}

.spy-log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--sh);
    padding-bottom: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.spy-log-time { color: #0f0; }

.spy-log-source { color: var(--fg); font-weight: bold; }

.spy-log-details p {
    margin: 4px 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.spy-log-details strong {
    color: var(--sh);
}

