/* SIYA NEWS uses the E-Office indigo/slate palette and shared action buttons. */
:host,:root{
    --news-text:#1e293b;
    --news-muted:#64748b;
    --news-border:#e2e8f0;
    --news-surface:#f8fafc;
    font-family:'Prompt','Noto Sans Thai',sans-serif;
    color:var(--news-text);
}
*{box-sizing:border-box}
.news-page{max-width:1440px;margin:auto;padding:16px 24px 24px;min-height:100vh;background:#f1f5f9;font-family:'Prompt','Noto Sans Thai',sans-serif;line-height:1.6;color:var(--news-text)}
.news-brand{display:flex;align-items:center;gap:12px;padding:12px 16px;margin-bottom:16px;background:#fff;border:1px solid var(--news-border);border-radius:10px;box-shadow:0 3px 12px #11182708}
.news-brand__mark{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:#eef2ff;color:#4338ca}
.news-brand__mark svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.news-brand__text{min-width:0}
.news-brand h1{margin:0;color:var(--news-text);font:600 20px/1.4 'Prompt','Noto Sans Thai',sans-serif}
.news-brand p{margin:2px 0 0;color:var(--news-muted);font-size:12px}
.eyebrow{margin:0 0 4px;color:var(--news-muted);font-size:12px;font-weight:500}
.news-private{margin-left:auto;align-self:center;display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;background:#eef2ff;color:#4338ca;font-size:12px;white-space:nowrap}
.news-private svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.news-message{margin:16px 0;padding:12px 16px;border:1px solid #bbf7d0;border-radius:8px;background:#f0fdf4;color:#166534}
.news-message.error{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.news-workspace{display:grid;grid-template-columns:minmax(280px,.84fr) minmax(0,1.6fr);gap:20px;align-items:start}
.news-list-panel,.news-detail-panel{min-width:0;background:#fff;border:1px solid var(--news-border);border-radius:14px;box-shadow:0 3px 12px #11182708}
.news-list-panel{padding:20px;position:sticky;top:20px}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel-heading h2,.news-detail-panel h2{margin:0;color:var(--news-text);font-size:20px;font-weight:600}
.news-button{font:inherit;text-decoration:none}
.news-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 16px}
.news-tab{border:1px solid var(--news-border);border-radius:8px;background:#fff;color:#475569;padding:8px 12px;font:500 14px/1.5 'Prompt',sans-serif;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}
.news-tab:hover{background:#f8fafc;border-color:#94a3b8}
.news-tab[aria-selected=true]{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}
.search-label,.news-field label{display:block;margin:10px 0 6px;color:#475569;font-size:14px;font-weight:500}
.news-input,.news-textarea{width:100%;min-width:0;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:10px 12px;color:var(--news-text);font:inherit;outline:none}
.news-input{min-height:44px}
.news-input:focus,.news-textarea:focus,.news-image-info input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f126;outline:none}
.news-list{display:grid;gap:10px;max-height:calc(100vh - 330px);min-height:140px;overflow:auto;margin-top:16px;padding-right:2px}
.news-list-item{width:100%;text-align:left;border:1px solid var(--news-border);border-radius:8px;background:#fff;padding:14px;cursor:pointer;color:inherit;font-family:inherit}
.news-list-item:hover{border-color:#a5b4fc;background:#f8fafc}
.news-list-item.selected{border-color:#818cf8;background:#eef2ff;box-shadow:inset 3px 0 #4f46e5}
.news-list-item strong{display:block;font-size:14px;font-weight:500;line-height:1.6;color:var(--news-text)}
.news-list-item p{margin:6px 0 0;color:var(--news-muted);font-size:13px;line-height:1.6}
.news-item-meta{display:flex;gap:8px;align-items:center;margin-top:10px}
.news-item-meta small{color:var(--news-muted);font-size:12px}
.status-badge{display:inline-flex;align-items:center;border-radius:6px;padding:3px 8px;font-size:12px;font-weight:500;background:#f1f5f9;color:#475569}
.status-badge[data-status=review]{background:#fffbeb;color:#92400e}
.status-badge[data-status=changes_requested]{background:#fff7ed;color:#9a3412}
.status-badge[data-status=approved]{background:#ecfdf5;color:#047857}
.empty-state,.empty-detail p{color:var(--news-muted);font-size:14px;line-height:1.7}
.news-detail-panel{padding:24px;min-height:480px}
.empty-detail{min-height:420px;display:grid;align-content:center;justify-items:center;text-align:center;color:var(--news-muted)}
.empty-detail h2{font-size:18px;margin:16px 0 4px}
.empty-detail p{margin:4px 0}
.empty-detail__icon{width:48px;height:48px;display:grid;place-items:center;border-radius:8px;background:#eef2ff;color:#4338ca;font-size:24px}
.detail-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid var(--news-border);padding-bottom:20px;margin-bottom:16px}
.detail-title h2{font-size:22px;line-height:1.5}
.detail-subtitle{margin:8px 0 0;color:var(--news-muted);font-size:13px}
.detail-status{flex:none}
.news-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}
.news-field.full{grid-column:1/-1}
.news-textarea{min-height:170px;resize:vertical;line-height:1.8}
.news-field input:disabled,.news-field textarea:disabled{background:#f8fafc;color:#475569}
.news-hint{font-size:13px;color:var(--news-muted);margin:6px 0}
.detail-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:20px 0}
.detail-actions .spacer{flex:1}
.news-section{border-top:1px solid var(--news-border);padding-top:20px;margin-top:20px}
.news-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.news-section-heading h3,.news-reading h3{margin:0;font-size:16px;font-weight:500;color:var(--news-text)}
.news-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;margin-top:16px}
.news-image-card{min-width:0;border:1px solid var(--news-border);border-radius:8px;overflow:hidden;background:#fff}
.news-image-preview{height:180px;background:#f1f5f9;display:grid;place-items:center;overflow:hidden}
.news-image-preview img{width:100%;height:100%;object-fit:cover}
.news-image-preview .broken{font-size:13px;color:var(--news-muted)}
.news-image-info{padding:12px}
.news-image-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;font-size:13px;font-weight:500}
.news-image-info input{margin-top:8px;font:inherit;font-size:13px;width:100%;border:1px solid #cbd5e1;border-radius:8px;padding:10px}
.image-actions{display:flex;gap:8px;margin-top:12px}
.review-note{margin:16px 0;padding:12px 16px;border:1px solid #fde68a;border-radius:8px;background:#fffbeb;color:#92400e;font-size:14px;line-height:1.7}
.history-list{display:grid;gap:8px;margin-top:12px}
.history-row{padding:12px;background:#f8fafc;border:1px solid var(--news-border);border-radius:8px;font-size:13px;color:var(--news-muted);line-height:1.7}
.history-row strong{color:#475569;font-weight:500}
.history-row summary{cursor:pointer}
.news-footer{text-align:center;padding:24px 0 0;color:var(--news-muted);font-size:12px}
.news-hidden{display:none!important}
@media(max-width:940px){.news-list-panel{position:static}.news-list{max-height:420px}}
@media(max-width:680px){
    .news-page{padding:12px}
    .news-workspace{gap:16px}
    .news-list-panel,.news-detail-panel{padding:16px}
    .news-list{max-height:400px}
    .news-detail-panel{min-height:350px}
    .news-form-grid{grid-template-columns:minmax(0,1fr)}
    .news-field.full{grid-column:auto}
    .detail-title h2{font-size:20px}
    .detail-actions .spacer{flex-basis:100%}
    .detail-actions .news-button{flex:1 1 auto}
}
@media(prefers-reduced-motion:reduce){.news-tab{transition:none}}
