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

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

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

/* --- Grid Constraints (Prevents Overlap) --- */
.pcb-list { display: flex; flex-direction: column; gap: 12px; }
.pcb-grid-header {
    display: grid;
    grid-template-columns: 50px 2fr 1fr 1fr 1fr 1.5fr; /* Exact sizing to prevent overlaps */
    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 --- */
.pcb-row {
    display: grid;
    grid-template-columns: 50px 2fr 1fr 1fr 1fr 1.5fr;
    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;
}
.pcb-row::before {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: transparent; transition: all 0.3s ease;
}
.pcb-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);
}
.pcb-row:hover::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

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

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

.pcb-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;}
.pcb-secondary-text { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tags & Color Boxes */
.pcb-type-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; }

.color-preview-box {
    padding: 6px 12px; border-radius: 6px; color: var(--mist-100); font-weight: 600;
    font-size: 0.8rem; letter-spacing: 1px; text-shadow: 0 1px 3px rgba(83, 69, 52, 0.10);
    border: 1px solid rgba(255,255,255,0.2); font-family: monospace; display: inline-block;
}

.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;}
.text-red { color: #FF3B30 !important; }

/* Actions */
.action-cell { justify-content: flex-end; gap: 4px; }
.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 md-icon { color: inherit !important; transition: color 0.2s ease; }
.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);
}

/* States */
.pcb-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; 
}
.pcb-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);
}
.pcb-state-icon md-icon { font-size: 36px; width: 36px; height: 36px; color: #64748b; }
.pcb-state h3 { color: #f8fafc; margin: 0 0 8px 0; font-weight: 700; font-size: 1.2rem; }
.pcb-state p { margin: 0; color: #64748b; font-size: 0.9rem; }


/* ==========================================================================
   EDIT / CREATE FORM CARD
   ========================================================================== */
.pcb-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; }
.pcb-form-header { background: var(--ink-850); padding: 24px 32px; border-bottom: 1px solid rgba(228, 220, 203, 0.08); }
.pcb-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);}
.pcb-form-header p { margin: 0; color: var(--mist-300); font-size: 0.9rem; }
.pcb-form-body { padding: 32px; }

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

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

.color-preview-live {
    margin-left: 16px; padding: 12px 20px; border-radius: 6px;
    color: var(--mist-100); font-weight: 700; border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(83, 69, 52, 0.08); letter-spacing: 0.5px;
}

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

/* Alerts & Hints */
.pcb-alert { color: #FF3B30; font-size: 0.8rem; font-style: italic; margin-top: 8px; font-weight: 600;}
.pcb-hint { color: #958c7f; font-size: 0.8rem; margin-bottom: 12px;}

/* Form Buttons */
.pcb-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; }
.pcb-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) {
    .pcb-grid-header { display: none; }
    .pcb-row { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
    .pcb-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;}
}






