/* Social Poster Admin — Dark monochrome theme
   Green only for hover / focus / accent
   Fonts: Google Sans (UI), Saira Stencil One (numbers), mono (code/log) */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-deep: #080808;
    --bg-card: #111111;
    --bg-surface: #181818;
    --bg-elevated: #1e1e1e;
    --border: #252525;
    --border-light: #333;

    --text-primary: #b0b0b0;
    --text-bright: #e0e0e0;
    --text-secondary: #777;
    --text-muted: #555;

    --accent: #00ff41;
    --accent-dim: #00cc33;
    --accent-dark: #0a2a0a;
    --accent-glow: rgba(0, 255, 65, 0.12);

    --red: #ff4444;
    --red-bg: #2a0e0e;
    --yellow: #ccaa00;
    --yellow-bg: #1e1a00;

    --font-ui: "Google Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-stencil: var(--font-ui);
    --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", "Consolas", monospace;
    --radius: 2px;

    color-scheme: dark;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

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

/* === LAYOUT === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    padding: 0 1.5rem;
}

/* === NAV === */
body > nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body > nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

body > nav a { color: var(--text-primary); }
body > nav a:hover { color: var(--accent); }
body > nav strong {
    color: var(--text-bright);
    font-family: var(--font-stencil);
    font-size: 0.9rem;
    letter-spacing: 1px;
}
body > nav small { color: var(--text-secondary); font-size: 0.75rem; }

/* === MAIN === */
main { padding: 1.5rem 0; }

/* === FOOTER === */
body > footer,
main + footer {
    margin-top: 3rem;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}
footer small {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
}

/* === HEADINGS === */
h1 {
    color: var(--text-bright);
    font-family: var(--font-stencil);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
    margin-bottom: 1.2rem;
}

h2 {
    color: var(--text-bright);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h3 {
    color: var(--text-bright);
    font-family: var(--font-stencil);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === GRID === */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

/* === ARTICLE / CARD === */
article {
    background: var(--bg-card) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    color: var(--text-primary) !important;
}

article:hover {
    border-color: var(--border-light);
}

article > header {
    background: var(--bg-surface) !important;
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    color: var(--text-primary) !important;
}

article > header * { color: inherit !important; }
article > header h3 { color: var(--text-bright) !important; margin: 0; }

article > :not(header):not(footer) {
    padding: 0.8rem 1rem;
}

article > footer {
    background: var(--bg-surface) !important;
    border-top: 1px solid var(--border);
    padding: 0.6rem 1rem;
    color: var(--text-primary) !important;
}

article p {
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.6;
}

article strong {
    color: var(--text-bright);
    font-family: var(--font-stencil);
    font-size: 1rem;
}

/* === FORMS === */
input, select, textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius);
    padding: 0.5rem 0.7rem;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    width: 100%;
    outline: none;
    transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

input::placeholder { color: var(--text-muted); }

input[type="file"] {
    padding: 0.4rem;
    font-size: 0.78rem;
}

input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent-dim);
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

/* === BUTTONS === */
button, [role="button"] {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
    line-height: 1.4;
}

button:hover, [role="button"]:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

button[type="submit"], a[role="button"]:not(.outline):not(.secondary) {
    background: var(--bg-elevated);
    border-color: var(--border-light);
    color: var(--text-bright);
}

button[type="submit"]:hover, a[role="button"]:not(.outline):not(.secondary):hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.outline:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

.secondary { color: var(--text-muted); }

.btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
}

button:disabled, button[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

/* === LOGIN === */
.login-wrap {
    max-width: 380px;
    margin: 6rem auto;
}

.login-wrap article {
    border: 1px solid var(--border-light);
}

.login-wrap article > header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.2rem;
}

.login-wrap h2 {
    color: var(--text-bright);
    font-family: var(--font-stencil);
    font-size: 1rem;
    letter-spacing: 2px;
}

.login-wrap p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.login-wrap form { padding: 1.2rem; }

.lockout-msg {
    text-align: center;
    padding: 0.8rem;
    background: var(--red-bg);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin: 0 1.2rem 1rem;
}

/* === FLASH === */
.flash {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    margin-bottom: 0.8rem;
    position: relative;
    border-left: 3px solid;
    font-size: 0.8rem;
}

.flash-success { background: var(--accent-dark); color: var(--accent); border-color: var(--accent-dim); }
.flash-error { background: var(--red-bg); color: var(--red); border-color: var(--red); }
.flash-warning { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow); }

.flash-close {
    position: absolute;
    right: 0.5rem;
    top: 0.3rem;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    padding: 0;
}
.flash-close:hover { opacity: 1; }

/* === BADGE === */
.badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-running { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow); }
.badge-done { background: var(--accent-dark); color: var(--accent); border: 1px solid var(--accent-dim); }
.badge-schedule { background: var(--bg-elevated); color: var(--text-bright); border: 1px solid var(--border-light); margin-left: 0.5rem; }
.badge-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow); }

.output-title {
    display: block;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

/* === JOB STATUS === */
.job-status-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    margin: 0.6rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.job-status-bar.job-active {
    border-color: var(--accent-dim);
    animation: job-glow 2s ease-in-out infinite;
}

@keyframes job-glow {
    0%, 100% { box-shadow: 0 0 4px rgba(0, 255, 65, 0.15); }
    50% { box-shadow: 0 0 16px rgba(0, 255, 65, 0.35); }
}

.job-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.job-done-icon {
    color: var(--accent);
    font-size: 1rem;
    flex-shrink: 0;
}

.job-line {
    color: var(--accent);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-status-bar:not(.job-active) .job-line {
    color: var(--text-primary);
}

.job-meta {
    color: var(--text-muted);
    font-size: 0.6rem;
    flex-shrink: 0;
}

.btn-stop {
    background: var(--red-bg) !important;
    border: 1px solid var(--red) !important;
    color: var(--red) !important;
    padding: 0.2rem 0.7rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.btn-stop:hover {
    background: var(--red) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

.job-status-bar.job-stopped {
    border-color: var(--red);
}
.job-stopped-icon {
    color: var(--red);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.job-line-stopped {
    color: var(--red) !important;
}

.job-log-details {
    margin: 0 0 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    background: var(--bg-card);
    font-size: 0.72rem;
}

.job-log-details summary {
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
}

.job-log {
    max-height: 350px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--bg-deep);
    color: var(--text-primary);
    padding: 0.8rem;
    border-radius: var(--radius);
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid var(--border);
    line-height: 1.5;
    margin-top: 0.4rem;
}

/* === JSON EDITOR === */
.json-editor {
    font-family: var(--font-mono) !important;
    font-size: 0.75rem;
    min-height: 300px;
    tab-size: 2;
    white-space: pre;
    line-height: 1.4;
    background: var(--bg-deep) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
}

/* === TABLE === */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

table th {
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-light);
    padding: 0.4rem 0.6rem;
    text-align: left;
}

table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

table td strong {
    font-family: var(--font-stencil);
    color: var(--text-bright);
    font-size: 0.85rem;
}

table code {
    background: var(--bg-surface);
    color: var(--text-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-family: var(--font-mono);
}

table tbody tr:nth-child(even) { background: var(--bg-surface); }
table tbody tr:hover { background: var(--bg-elevated); }

.overflow-auto { overflow-x: auto; }

/* === DETAILS / SUMMARY === */
details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    background: var(--bg-card);
}

details > summary {
    cursor: pointer;
    color: var(--text-bright);
    font-weight: 600;
    font-size: 0.82rem;
}

details > summary h2 { display: inline; margin: 0; }
details > summary small { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem; }
details[open] > summary { margin-bottom: 0.6rem; }

/* === IMAGE GRID === */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
    margin: 0.6rem 0;
}

.image-card {
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem;
}

.image-card img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.image-card small {
    display: block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    margin: 0.2rem 0;
    word-break: break-all;
}

.image-card-actions {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === DAY-ROW PREVIEW LAYOUT === */
.day-row {
    margin-bottom: 1.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
}

.day-header {
    background: var(--bg-surface);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.day-header h2 {
    font-size: 0.85rem;
    margin: 0;
}

.day-posts {
    display: flex;
    gap: 1px;
    overflow-x: auto;
    background: var(--border);
}

.day-post {
    flex: 1 1 0;
    min-width: 200px;
    background: var(--bg-card);
}

.day-post-header {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-post-header strong {
    font-size: 0.75rem;
    color: var(--text-bright);
}

.day-post-header small {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.badge-type {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    font-size: 0.55rem;
    padding: 0.05rem 0.3rem;
}

.day-post-media {
    display: flex;
    gap: 2px;
    padding: 0.4rem;
    overflow-x: auto;
    align-items: flex-start;
}

.day-thumb {
    height: 180px;
    width: auto;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.day-thumb-video {
    height: 180px;
    width: auto;
    background: #000;
}

.day-thumb-html {
    height: 180px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.day-thumb-html span {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.day-thumb-html:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
}

/* === BREADCRUMB === */
nav[aria-label="breadcrumb"] ul {
    list-style: none;
    display: flex;
    gap: 0.4rem;
    margin: 0 0 0.8rem 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

nav[aria-label="breadcrumb"] li::before {
    content: ">";
    color: var(--text-muted);
    margin-right: 0.4rem;
}

nav[aria-label="breadcrumb"] li:first-child::before { content: ""; margin: 0; }
nav[aria-label="breadcrumb"] a { color: var(--text-secondary); }
nav[aria-label="breadcrumb"] a:hover { color: var(--accent); }

/* === MISC === */
.muted { color: var(--text-muted); }
.inline { display: inline; }
.contrast { color: var(--text-bright) !important; }
hr { border: none; border-top: 1px solid var(--border); margin: 0.8rem 0; }
mark { background: var(--yellow-bg); color: var(--yellow); padding: 0.1rem 0.3rem; border-radius: var(--radius); }
p { margin-bottom: 0.5rem; }
small { font-size: 0.75rem; }

/* Scrollbar */
* { scrollbar-color: var(--border) var(--bg-deep); scrollbar-width: thin; }

/* JSON actions bar */
.json-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

/* JSON upload form spacing */
.json-upload-form .grid { align-items: end; }

/* === TABS === */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.8rem;
}

.tab {
    padding: 0.5rem 1.2rem;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
}

.tab:hover {
    color: var(--text-primary);
    border-color: var(--border);
}

.tab.active {
    background: var(--bg-surface);
    color: var(--text-bright);
    border-color: var(--border);
    border-bottom-color: var(--bg-surface);
    margin-bottom: -1px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.upload-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-row input[type="file"] {
    width: auto;
    max-width: 280px;
}

/* === MUSIC LIST === */
.music-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0.6rem;
}

.music-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.music-name {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    min-width: 120px;
}

.music-item audio {
    flex: 1;
}

/* === GENERATE POST LIST === */
.gen-post-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gen-post-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    margin: 0;
    font-size: 0.82rem;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    transition: border-color 0.15s;
}

.gen-post-item:hover {
    border-color: var(--border-light);
}

.gen-post-item-warning {
    border-color: rgba(204, 170, 0, 0.45);
}

.gen-post-item input[type="checkbox"]:disabled + .gen-post-info {
    opacity: 0.72;
}

.gen-post-item input[type="checkbox"] {
    flex-shrink: 0;
}

.gen-post-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.gen-post-info strong {
    color: var(--text-bright);
    font-size: 0.8rem;
    min-width: 1.5rem;
}

.gen-post-info code {
    background: var(--bg-surface);
    color: var(--text-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius);
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

.gen-post-info span {
    color: var(--text-primary);
}

.gen-post-info small {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox.active {
    display: flex;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.lightbox-close:hover {
    opacity: 1;
}
.lightbox-content {
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: default;
}
.lightbox-video {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 4px;
    cursor: default;
}
.day-thumb {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.day-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}

/* === VSP ARTICLE GRID === */
.vsp-article-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vsp-article-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}

.vsp-article-card:hover {
    border-color: var(--border-light);
}

.vsp-article-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-surface);
}

.vsp-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vsp-article-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.vsp-article-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vsp-article-info strong {
    color: var(--text-bright);
    font-size: 0.82rem;
    font-family: var(--font-stencil);
}

.vsp-article-kw {
    color: var(--text-primary);
    font-size: 0.8rem;
}

.vsp-article-status {
    display: flex;
    gap: 0.3rem;
}

.vsp-article-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-end;
}

/* === ARTICLE DETAIL === */
.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.article-images-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.6rem 0;
}

.article-image-box {
    text-align: center;
}

.article-image-box h3 {
    margin-bottom: 0.5rem;
}

.article-img-preview {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.article-img-empty {
    width: 100%;
    max-width: 400px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 0 auto 0.5rem;
}

.article-regen-form {
    margin-top: 0.4rem;
}

.article-preview-btn {
    display: block;
    width: 100%;
    padding: 1.2rem 2rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    background: var(--bg-card);
    border: 2px solid var(--accent-dim);
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.article-preview-btn:hover {
    background: var(--accent-dark);
    box-shadow: 0 0 20px var(--accent-glow);
    color: var(--accent);
}

.article-preview-btn-disabled {
    color: var(--text-muted);
    border-color: var(--border);
    cursor: default;
    pointer-events: none;
}

/* === OUTPUT MANAGEMENT === */
.output-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.output-upload-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.output-subdir-input {
    width: 180px !important;
    padding: 0.3rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.btn-danger {
    background: var(--red-bg) !important;
    border: 1px solid var(--red) !important;
    color: var(--red) !important;
}
.btn-danger:hover {
    background: var(--red) !important;
    color: #fff !important;
}

.btn-danger-outline {
    background: transparent !important;
    border: 1px solid var(--red) !important;
    color: var(--red) !important;
    padding: 0.15rem 0.4rem;
    font-size: 0.6rem;
}
.btn-danger-outline:hover {
    background: var(--red-bg) !important;
}

.media-item-wrap {
    position: relative;
    flex-shrink: 0;
}

.media-delete-form {
    position: absolute;
    top: 3px;
    right: 3px;
}

.btn-media-delete {
    width: 20px;
    height: 20px;
    padding: 0 !important;
    line-height: 18px;
    font-size: 0.85rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 1px solid var(--red) !important;
    color: var(--red) !important;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

.media-item-wrap:hover .btn-media-delete {
    opacity: 1;
}

.btn-media-delete:hover {
    background: var(--red) !important;
    color: #fff !important;
}

/* === VIDEO GRID (Minerals) === */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.8rem;
    margin: 0.6rem 0;
}

.video-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    text-align: center;
}

.video-card video {
    border: 1px solid var(--border);
}

.video-card .video-name {
    display: block;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    margin-top: 0.3rem;
    word-break: break-all;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .preview-card-video { grid-column: span 1; }
    .image-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .grid { grid-template-columns: 1fr; }
    h1 { font-size: 0.9rem; }
    .article-images-row { grid-template-columns: 1fr; }
    .vsp-article-card { flex-wrap: wrap; }
}
