/* AutoVDO additions on top of the AutoNews design system (style.css copied, not shared) */
.nav-section { padding: 14px 24px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.small { font-size: 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border-color); }
.pill-wait { background: rgba(245, 158, 11, .15); color: #fbbf24; border-color: rgba(245, 158, 11, .4); }
.pill-work { background: rgba(99, 102, 241, .15); color: #a5b4fc; border-color: rgba(99, 102, 241, .4); }
.pill-queue { background: rgba(59, 130, 246, .12); color: #93c5fd; border-color: rgba(59, 130, 246, .35); }
.pill-done { background: rgba(34, 197, 94, .15); color: #86efac; border-color: rgba(34, 197, 94, .4); }
.pill-fail { background: rgba(239, 68, 68, .15); color: #fca5a5; border-color: rgba(239, 68, 68, .4); }

.vdo-table { width: 100%; border-collapse: collapse; }
.vdo-table th, .vdo-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; }
.vdo-table th { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.vdo-table tr.clickable { cursor: pointer; }
.vdo-table tr.clickable:hover { background: var(--bg-card-hover); }
.job-title { font-weight: 600; }

.card { margin-bottom: 18px; }
.card-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
.fold-inner { margin: 10px 0; }
.fold-inner > summary { cursor: pointer; color: var(--text-secondary); }
.pre { white-space: pre-wrap; word-break: break-word; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; font-family: inherit; font-size: 14px; line-height: 1.7; max-height: 520px; overflow: auto; }
.pre.log { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.kv { margin-bottom: 12px; } .kv b { display: block; margin-bottom: 4px; color: var(--text-secondary); }

.progress-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.pstep { flex: 1; min-width: 96px; text-align: center; position: relative; }
.pdot { width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--bg-input); border: 2px solid var(--border-light); color: var(--text-muted); }
.pstep.done .pdot { background: rgba(34, 197, 94, .2); border-color: #22c55e; color: #86efac; }
.pstep.now .pdot { border-color: var(--accent-primary); color: #a5b4fc; box-shadow: 0 0 0 4px var(--accent-primary-glow); }
.pstep.wait .pdot { border-color: #f59e0b; color: #fbbf24; box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.pstep.fail .pdot { border-color: #ef4444; color: #fca5a5; }
.plabel { font-size: 12px; color: var(--text-secondary); }
.pgate { display: inline-block; margin-top: 4px; font-size: 10px; padding: 1px 6px; border-radius: 6px; border: 1px dashed var(--border-light); color: var(--text-muted); }
.pgate.ok { border-style: solid; border-color: #22c55e; color: #86efac; }
.pgate.wait { border-style: solid; border-color: #f59e0b; color: #fbbf24; }
.status-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

.gate-pending { border-color: rgba(245, 158, 11, .55); box-shadow: 0 0 0 1px rgba(245, 158, 11, .25); }
.gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.decision { margin-top: 10px; color: var(--text-secondary); font-size: 13px; }
.decision .quote, .changes-note { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--accent-warning); background: rgba(245, 158, 11, .07); border-radius: 4px; color: var(--text-primary); }

.main-story { padding: 12px 14px; border-radius: 10px; background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .3); margin-bottom: 14px; }
.main-story .label { font-size: 11px; text-transform: uppercase; color: #a5b4fc; letter-spacing: .06em; }
.main-story .headline { font-weight: 700; font-size: 17px; margin: 4px 0; }
.issue-list { display: grid; gap: 10px; margin-bottom: 16px; }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-input); cursor: pointer; }
.issue:hover { border-color: var(--border-light); }
.issue input[type=checkbox] { margin-top: 4px; transform: scale(1.25); }
.issue.dim { opacity: .45; }
.issue-body { flex: 1; }
.issue-title { font-weight: 700; }
.issue-q { color: #fbbf24; margin-top: 4px; }
.issue-why { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }
.issue-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.focus { white-space: nowrap; font-size: 13px; color: var(--text-secondary); }

.script-box { font-size: 15px; line-height: 1.85; min-height: 420px; }
.script-meta { margin-bottom: 10px; display: grid; gap: 4px; }

.asset-summary { margin-bottom: 8px; }
.asset-cat { margin: 18px 0 8px; font-weight: 700; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.asset { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #000; cursor: pointer; aspect-ratio: 1 / 1; }
.asset img, .asset video { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 11px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #ddd; }
.asset .tag { position: absolute; top: 6px; left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .7); }
.asset:hover { border-color: var(--accent-primary); }
.asset.dropped { opacity: .25; border-color: var(--accent-danger); }
.asset.dropped::after { content: "ไม่ใช้"; position: absolute; top: 6px; right: 6px; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--accent-danger); color: #fff; }

.check { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.events { display: grid; gap: 4px; font-size: 13px; max-height: 320px; overflow: auto; margin-bottom: 12px; }
.notes { margin: 10px 0 0 18px; color: var(--text-secondary); }
.hist { font-size: 13px; color: var(--text-secondary); margin: 4px 0; }

.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--bg-primary); }
.login-card { width: min(380px, calc(100vw - 32px)); }
.login-logo { font-size: 24px; font-weight: 800; margin-bottom: 4px; }

@media (max-width: 768px) {
  .vdo-table th:nth-child(1), .vdo-table td:nth-child(1), .vdo-table th:nth-child(5), .vdo-table td:nth-child(5) { display: none; }
  .asset-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .issue { flex-wrap: wrap; }
}
.main-content, .content-area, .card, .card-body { min-width: 0; }
.progress-steps { max-width: 100%; }
@media (max-width: 768px) { .pstep { min-width: 78px; } .plabel { font-size: 11px; } }
