/* ==========================================================================
   PREMIUM NEWS BOARD UI (Grid, No Overlaps, Dark/Orange Theme)
   ========================================================================== */

.premium-news-board {
    padding: 24px;
    max-width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* --- Header --- */
.pnb-header { margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 16px; }
.pnb-title { font-size: 1.6rem; color: var(--mist-100); text-transform: uppercase; letter-spacing: 1.5px; margin: 0; font-weight: 700; display: block;}
.pnb-sub { color: var(--mist-300); font-size: 0.85rem; margin: 8px 0 0 0; }

/* --- Grid Constraints (Prevents Overlap) --- */
.pnb-list { display: flex; flex-direction: column; gap: 12px; }
.pnb-grid-header {
    display: grid;
    grid-template-columns: 50px 2.5fr 1fr 1.5fr 1fr 60px;
    padding: 0 24px 8px 24px;
    color: #64748b; font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 4px;
}

/* --- Detached Row --- */
.pnb-row {
    display: grid;
    grid-template-columns: 50px 2.5fr 1fr 1.5fr 1fr 60px;
    background: linear-gradient(145deg, #f4ecdf 0%, var(--ink-900) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 16px 24px; align-items: center;
    box-shadow: 0 4px 12px rgba(83, 69, 52, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.pnb-row::before {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: transparent; transition: all 0.3s ease;
}
.pnb-row:hover {
    background: linear-gradient(145deg, #efe5d7 0%, #e8dccd 100%);
    border-color: rgba(199, 166, 107, 0.32);
    box-shadow: 0 10px 30px rgba(83, 69, 52, 0.08), 0 0 20px rgba(199, 166, 107, 0.08);
    transform: translateY(-2px);
}
.pnb-row:hover::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* --- Cells & Typography --- */
.pnb-cell { display: flex; align-items: center; min-width: 0; }
.pnb-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; gap: 4px; }

.index-cell { justify-content: center; }
.pnb-index { color: #837b6e; font-weight: 800; font-family: 'Courier New', monospace; font-size: 1rem; }

.pnb-primary-text { font-weight: 600; color: var(--mist-100); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.3px;}
.pnb-secondary-text { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tags & Badges */
.pnb-type-tag, .pnb-status-tag {
    display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700;
    padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: 1px; width: fit-content;
    border: 1px solid transparent;
}
.type-draft { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: #94a3b8; }
.type-published { background: rgba(52, 199, 89, 0.1); border-color: rgba(52, 199, 89, 0.2); color: #34C759; }

.status-featured { background: rgba(255, 204, 0, 0.1); border-color: rgba(255, 204, 0, 0.2); color: #FFCC00; }
.status-normal { background: rgba(66, 165, 245, 0.1); border-color: rgba(66, 165, 245, 0.2); color: #42A5F5; }

.tiny-icon { font-size: 14px !important; width: 14px !important; height: 14px !important; min-width: 14px !important; min-height: 14px !important; margin-right: 6px; color: inherit !important;}

/* Actions Dropdown */
.action-cell { justify-content: flex-end; }
.quick-action-btn { 
    margin: 0 !important; transition: all 0.2s ease !important; 
    background: transparent !important; border: 1px solid transparent !important; 
    border-radius: 6px !important; color: #94a3b8 !important; width: 40px; height: 40px;
}
.quick-action-btn:hover { border-color: rgba(255,255,255,0.1) !important; background: rgba(255,255,255,0.05) !important; color: var(--mist-100) !important; transform: translateY(-2px);}

.pnb-dark-menu { background: var(--ink-900) !important; border: 1px solid rgba(228, 220, 203, 0.14); border-radius: 8px; box-shadow: 0 10px 30px rgba(83, 69, 52, 0.10); }
.pnb-dark-menu md-menu-item .md-button { color: var(--mist-200) !important; font-weight: 500; }
.pnb-dark-menu md-menu-item .md-button:hover { background: var(--ink-850) !important; color: var(--mist-100) !important; }

/* States */
.pnb-state { text-align: center; padding: 80px 20px; background: rgba(164, 134, 93, 0.06); border: 1px dashed rgba(255,255,255,0.1); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pnb-state-icon { width: 80px; height: 80px; border-radius: 16px; background: var(--ink-900); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 2px 10px rgba(255,255,255,0.02); }
.pnb-state-icon md-icon { font-size: 36px; width: 36px; height: 36px; color: #64748b; }
.pnb-state h3 { color: #f8fafc; margin: 0 0 8px 0; font-weight: 700; font-size: 1.2rem; }
.pnb-state p { margin: 0; color: #64748b; font-size: 0.9rem; }


/* ==========================================================================
   EDIT / CREATE FORM & DETAILS MODAL
   ========================================================================== */

/* --- Details Dialog --- */
.pnb-dark-dialog { background: var(--ink-900) !important; border: 1px solid rgba(228, 220, 203, 0.08); border-radius: 12px !important; box-shadow: 0 20px 60px rgba(83, 69, 52, 0.12); }
.pnb-dialog-toolbar { background: var(--ink-850) !important; border-bottom: 1px solid rgba(228, 220, 203, 0.08); color: var(--mist-100) !important; }
.pnb-dialog-title { font-weight: 700; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; }
.pnb-dialog-content { padding: 24px; color: var(--mist-200); }

.pnb-detail-image-wrap { background: #f7f1e8; border: 1px solid rgba(228, 220, 203, 0.08); border-radius: 8px; padding: 20px; text-align: center; margin-bottom: 24px; }
.pnb-main-img { max-width: 100%; max-height: 300px; border-radius: 4px; box-shadow: 0 10px 30px rgba(83, 69, 52, 0.08); }

.pnb-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.pnb-stat-box { background: var(--ink-850); border: 1px solid rgba(228, 220, 203, 0.08); border-radius: 8px; padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;}
.pnb-stat-box .stat-label { font-size: 0.75rem; color: var(--mist-300); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.pnb-stat-box .stat-value { font-size: 1.2rem; font-weight: 700; color: var(--mist-100); }

.pnb-detail-section { margin-bottom: 24px; border-bottom: 1px solid rgba(228, 220, 203, 0.08); padding-bottom: 24px; }
.detail-label { color: var(--mist-300); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }
.pnb-html-content { background: var(--ink-850); padding: 16px; border-radius: 8px; border: 1px solid rgba(228, 220, 203, 0.08); font-size: 0.9rem; line-height: 1.6; color: var(--mist-100);}

/* --- Edit / Create Form Card --- */
.pnb-form-card { background: var(--ink-900); border: 1px solid rgba(228, 220, 203, 0.08); border-radius: 12px; box-shadow: 0 10px 30px rgba(83, 69, 52, 0.08); overflow: hidden; }
.pnb-form-header { background: var(--ink-850); padding: 24px 32px; border-bottom: 1px solid rgba(228, 220, 203, 0.08); }
.pnb-form-header h2 { margin: 0 0 6px 0; color: var(--mist-100); font-size: 1.4rem; font-weight: 700; text-shadow: 0 2px 10px rgba(199, 166, 107, 0.24);}
.pnb-form-header p { margin: 0; color: var(--mist-300); font-size: 0.9rem; }
.pnb-form-body { padding: 32px; }

/* Dark Inputs */
.pnb-input-dark label { color: var(--mist-300) !important; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.pnb-input-dark .md-input { color: var(--mist-100) !important; border-bottom-color: rgba(228, 220, 203, 0.14) !important; padding: 8px 0; }
.pnb-input-dark .md-input:focus { border-bottom-color: var(--accent) !important; }
.pnb-select-dark .md-select-value { color: var(--mist-100) !important; border-bottom-color: rgba(228, 220, 203, 0.14) !important;}

/* Fieldsets & Uploads */
.pnb-fieldset { border: 1px solid rgba(228, 220, 203, 0.14); border-radius: 8px; padding: 20px; transition: border-color 0.3s; margin-bottom: 24px;}
.pnb-fieldset:hover { border-color: #837b6e; }
.pnb-fieldset legend { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; padding: 0 8px; }
.pnb-file-upload { background: var(--ink-850); padding: 8px 16px; border-radius: 6px; border: 1px dashed #70695d; }
.pnb-file-upload input[type="file"] { color: var(--mist-200); }

/* Text Angular Dark Mode Override */
.pnb-editor-wrap { margin-top: 16px; }
.editor-legend { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; margin-bottom: 12px; display: block;}
.pnb-dark-ta .ta-toolbar { background: var(--ink-850); border: 1px solid rgba(228, 220, 203, 0.14); border-radius: 6px 6px 0 0; padding: 8px; }
.pnb-dark-ta .ta-toolbar .btn { background: rgba(228, 220, 203, 0.08); color: var(--mist-200); border: 1px solid rgba(228, 220, 203, 0.14); margin: 2px; }
.pnb-dark-ta .ta-toolbar .btn:hover { background: var(--accent); color: #000; }
.pnb-dark-ta .ta-scroll-window > .ta-bind { background: var(--ink-900); color: var(--mist-100); border: 1px solid rgba(228, 220, 203, 0.14); border-top: none; border-radius: 0 0 6px 6px; padding: 16px; min-height: 200px; }

/* Checkboxes */
.pnb-dark-checkbox { margin-bottom: 12px; }
.pnb-dark-checkbox .md-label { color: var(--mist-200); font-weight: 500; }
.pnb-dark-checkbox .md-icon { border-color: #837b6e; }
.pnb-dark-checkbox.md-checked .md-icon { background-color: var(--accent); border-color: var(--accent); }
.text-orange { color: var(--accent); font-weight: 700; }

/* Alerts & Hints */
.pnb-alert { color: #FF3B30; font-size: 0.85rem; padding: 8px; background: rgba(255, 59, 48, 0.1); border: 1px solid rgba(255, 59, 48, 0.2); border-radius: 4px; margin-top: 8px;}
.pnb-hint { color: #958c7f; font-size: 0.8rem; margin-bottom: 12px;}

/* Form Buttons */
.pnb-btn-outline { border: 1px solid rgba(228, 220, 203, 0.14) !important; color: var(--mist-200) !important; font-weight: 600 !important; border-radius: 6px !important; }
.pnb-btn-outline:hover { background: var(--ink-850) !important; color: var(--mist-100) !important; border-color: #837b6e !important; }
.modern-btn-cyan { 
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%) !important; 
    color: #000000 !important; border-radius: 6px !important; font-weight: 800 !important; 
    padding: 0 24px !important; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(199, 166, 107, 0.32) !important; transition: all 0.3s ease !important;
}
.modern-btn-cyan:hover { box-shadow: 0 6px 20px rgba(199, 166, 107, 0.42) !important; transform: translateY(-2px); }

@media screen and (max-width: 900px) {
    .pnb-grid-header { display: none; }
    .pnb-row { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
    .pnb-row::before { width: 100%; height: 3px; top: 0; left: 0; border-radius: 10px 10px 0 0; }
    .index-cell { display: none; }
    .action-cell { justify-content: flex-start; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 12px; margin-top: 8px;}
}






