/* ==========================================================================
   === CONFIRM EDITORIAL CONTROL CENTER CSS MODULE ===
   ========================================================================== */

:root {
    --bg-main: #0f172a;
    --panel-bg: #1e293b;
    --panel-card: #0f172a;
    --table-header: #0b1329;
    --accent: #f97316;
    --accent-glow: rgba(249, 115, 22, 0.35);
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --border: #334155;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;

    /* Magazine Board Colors */
    --cork: #a9784f;
    --cork-dark: #8a5f3c;
    --paper: #f3ecd9;
    --paper-2: #ead9b0;
    --paper-3: #fbf6e8;
    --ink: #211a12;
    --ink-soft: #4a3f30;
    --pin-red: #d0393f;
    --pin-red-dark: #a52a2f;
    --marker: #f2c230;
    --stamp-blue: #2f5d80;
    --stamp-green: #3c7a4f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #090d16;
    color: var(--text-dark);
    line-height: 1.5;
    padding: 12px;
    min-height: 100vh;
}

/* Masthead */
.masthead {
    background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
    color: #f8fafc;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-bottom: 4px solid var(--accent);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.masthead h1 {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.masthead-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.host-status-badge {
    background: #0f172a;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.host-status-badge:hover { border-color: var(--accent); }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}
.status-dot.offline { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* API Setting Drawer */
.api-config-bar {
    background: #0b1329;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    display: none;
    width: 100%;
    font-size: 12px;
    border: 1px solid var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.stat-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.15s;
}
.stat-card:hover { transform: translateY(-2px); }

.stat-val {
    font-size: 22px;
    font-weight: 900;
    font-family: 'Space Mono', monospace;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

/* Navigation Tabs */
.tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}

.tab-btn {
    background: #1e293b;
    border: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    color: var(--text-muted);
}
.tab-btn:hover { color: #fff; background: #334155; }

.tab-btn.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.tab-badge {
    background: rgba(0,0,0,0.3);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 4px;
}

/* Content Panel */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

/* BBS Table */
.table-wrap { overflow-x: auto; }
table.bbs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

table.bbs-table th {
    background-color: var(--table-header);
    color: #f8fafc;
    padding: 10px 12px;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid #1e293b;
}

table.bbs-table td {
    padding: 10px 12px;
    border: 1px solid #334155;
    vertical-align: middle;
}

table.bbs-table tr:nth-child(even) { background-color: #182234; }
table.bbs-table tr:hover { background-color: #24344d; cursor: pointer; }

/* Status Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.badge-pending { background: #f59e0b; color: #000; }
.badge-confirmed { background: #10b981; color: #fff; }
.badge-rejected { background: #ef4444; color: #fff; }
.badge-unread { background: #ef4444; color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 3px; font-weight: 900; }
.badge-read { background: #64748b; color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 3px; }

/* ========================================================
   WIDE DUAL-PANE LIVE EDITORIAL REVIEW MODAL
   ======================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    overflow-y: auto;
    padding: 12px;
}

.modal-container {
    background: #0f172a;
    max-width: 1560px;
    width: 96vw;
    margin: 1vh auto;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 96vh;
}

.modal-header {
    background: #0b1120;
    color: #ffffff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 2px solid var(--border);
}

.view-mode-tabs {
    display: flex;
    gap: 4px;
    background: #1e293b;
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.view-btn.active {
    background: var(--accent);
    color: #ffffff;
}

/* Split Grid Layout */
.modal-split-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    flex: 1;
    overflow: hidden;
    background: #090d16;
}

/* Left Pane: Live Case File Editorial Board */
.live-preview-pane {
    overflow-y: auto;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,0.05), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(0,0,0,0.12), transparent 45%),
        var(--cork);
    border-right: 2px solid var(--border);
    position: relative;
}

.case-file-board {
    max-width: 820px;
    margin: 0 auto 40px;
    background: var(--paper-3);
    border-left: 1px solid rgba(0,0,0,.15);
    border-right: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 20px 45px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.25);
    padding: 36px 36px 40px;
    position: relative;
    color: var(--ink);
    word-break: keep-all;
    line-height: 1.7;
}

/* Right Pane: Workbench & Candidates Editor */
.editor-pane {
    overflow-y: auto;
    padding: 20px 24px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Form Controls */
.form-group { margin-bottom: 0; }
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 9px 12px;
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #f8fafc;
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }

.form-textarea {
    min-height: 140px;
    line-height: 1.6;
    font-family: 'Space Mono', 'Pretendard', monospace;
    font-size: 12px;
}

/* Quick Info Chips */
.quick-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-chip {
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

/* Paragraph Photo Candidates Section */
.para-section-card {
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
}

.para-title-row {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.photo-candidate-card {
    border: 2px solid #334155;
    border-radius: 6px;
    padding: 4px;
    background: #0f172a;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.photo-candidate-card:hover { border-color: #64748b; }

.photo-candidate-card.selected {
    border-color: var(--accent);
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 0 0 2px var(--accent);
}

.photo-candidate-thumb {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    background: #000;
    display: block;
}

.photo-candidate-caption {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.photo-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    transform: scale(1.3);
    accent-color: var(--accent);
}

/* Modal Footer */
.modal-footer {
    background: #0b1120;
    padding: 12px 20px;
    border-top: 2px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-approve {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-approve:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45); }

.btn-reject { background: #ef4444; color: #fff; }
.btn-reject:hover { background: #dc2626; }

.btn-close { background: #334155; color: #fff; }
.btn-close:hover { background: #475569; }

/* ========================================================
   EDITORIAL MAGAZINE COMPONENT STYLES (MATCHES POST_DETAIL)
   ======================================================== */
.tape {
    position: absolute;
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    border-left: 1px dashed rgba(0,0,0,.15);
    border-right: 1px dashed rgba(0,0,0,.15);
    z-index: 4;
}

.eyebrow-row {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
    border-bottom: 2px dashed var(--ink-soft); padding-bottom: 12px; margin-bottom: 20px;
}
.case-number {
    font-family: 'Space Mono', monospace; font-size: 0.8rem; font-weight: 700;
    background: #0f172a; color: #fbbf24; padding: 4px 12px; border-radius: 9999px; border: 2px solid #000;
    letter-spacing: 1px; box-shadow: 2px 2px 0 #000;
}

.post-main-title {
    font-family: 'Black Han Sans', 'Pretendard', sans-serif;
    font-size: 1.85rem;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
}

.ticket-meta-bar {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    font-size: 0.88rem; font-weight: 700; color: var(--ink-soft);
    border-top: 2px dashed var(--ink-soft); padding-top: 10px; margin-bottom: 24px;
}

/* Chapter Tabs */
.chapter-heading-wrap {
    display: flex; align-items: center; gap: 12px; margin: 34px 0 14px;
}
.chapter-badge-num {
    font-family: 'Space Mono', monospace; font-weight: 800; font-size: 0.95rem;
    color: var(--pin-red-dark); border: 3px solid var(--pin-red-dark); border-radius: 50%;
    width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transform: rotate(-5deg); background: var(--paper-3); box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}
.chapter-main-title {
    font-family: 'Pretendard', sans-serif; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.03em;
    margin: 0; color: var(--ink); line-height: 1.35;
}

.story-paragraph-text {
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.9;
    color: #2b241a;
    margin-bottom: 16px;
    white-space: pre-wrap;
    letter-spacing: -0.02em;
}

/* Inline Magazine Polaroid Visuals */
.inline-visual-card {
    background: #fff;
    padding: 10px 10px 30px;
    box-shadow: 0 12px 26px rgba(0,0,0,.35);
    margin: 22px auto;
    max-width: 580px;
    position: relative;
    transform: rotate(-1.5deg);
    border-radius: 4px;
}
.inline-visual-card:nth-child(even) { transform: rotate(1.8deg); }
.inline-visual-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}
.inline-visual-caption {
    position: absolute;
    bottom: 8px; left: 14px; right: 14px;
    font-family: 'Nanum Pen Script', cursive;
    font-size: 1.3rem;
    color: #222;
    line-height: 1.2;
    text-align: center;
}

/* Note Quote */
.dialogue-quote-box {
    position: relative; margin: 24px auto; max-width: 560px;
    background: #fffef7; padding: 18px 24px; box-shadow: 0 10px 22px rgba(0,0,0,.25);
    border: 1px solid #e2d9c2; transform: rotate(-1.5deg);
}
.dialogue-quote-speaker {
    font-family: 'Space Mono', monospace; font-weight: 700; font-size: 0.78rem;
    color: var(--stamp-blue); margin-bottom: 4px; text-transform: uppercase;
}
.dialogue-quote-text {
    font-family: 'Nanum Pen Script', cursive; font-size: 1.55rem; color: #1e1b18; line-height: 1.4;
}

/* Sticky Fact Note */
.sticky-fact-note {
    max-width: 560px; margin: 32px auto; background: var(--marker); padding: 22px 26px;
    transform: rotate(1.2deg); box-shadow: 0 12px 24px rgba(0,0,0,.35);
    font-family: 'Nanum Pen Script', cursive; font-size: 1.4rem; line-height: 1.5; color: #2a2200;
    position: relative; border-radius: 2px;
}
.sticky-fact-note .lbl {
    font-family: 'Space Mono', monospace; font-weight: 800; font-size: 0.75rem;
    display: block; margin-bottom: 6px; color: var(--ink); text-transform: uppercase;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .modal-split-grid { grid-template-columns: 1fr; overflow-y: auto; }
    .live-preview-pane { border-right: none; border-bottom: 2px solid var(--border); }
    .modal-container { width: 100vw; height: 100vh; margin: 0; border-radius: 0; }
}
