/* ── Content Calendar — page-specific ── */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #06060e;
    --surface: #0d0d1c;
    --surface2: #141428;
    --surface3: #1c1c35;
    --border: #252540;
    --border2: #353560;
    --accent: #7b61ff;
    --accent2: #ff6b9d;
    --accent3: #00e5a0;
    --green: #00e5a0;
    --red: #ff4d6d;
    --yellow: #ffd166;
    --blue: #4da6ff;
    --text: #eeeeff;
    --muted: #6666a0;
    --muted2: #4a4a7a;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

/* Sidebar ใช้จาก global.css — ไม่เขียนทับ */
.main-layout {
    margin-left: var(--sidebar-w, 220px);
    flex: 1;
    padding: 24px;
    display: flex;
    gap: 24px;
}

.left-sidebar {
    width: 280px;
}

.calendar-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.upcoming-card {
    background: var(--surface3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid;
    cursor: pointer;
    transition: all 0.2s;
}

.upcoming-card:hover {
    background: var(--border);
}

.upcoming-card:nth-child(1) { border-left-color: var(--accent); }
.upcoming-card:nth-child(2) { border-left-color: var(--accent2); }
.upcoming-card:nth-child(3) { border-left-color: var(--accent3); }
.upcoming-card:nth-child(4) { border-left-color: var(--blue); }
.upcoming-card:nth-child(5) { border-left-color: var(--green); }

.card-platform {
    font-size: 18px;
    margin-bottom: 4px;
}

.card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-time {
    font-size: 11px;
    color: var(--muted);
}

.card-status {
    display: inline-block;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 8px;
    font-weight: 600;
}

.status-ready {
    background: var(--accent);
    color: white;
}

.status-scheduled {
    background: var(--blue);
    color: white;
}

.status-draft {
    background: var(--muted2);
    color: var(--text);
}

.tips-section {
    font-size: 12px;
    margin-top: 12px;
}

.tips-title {
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 11px;
}

.tips-item {
    padding: 6px 0;
    font-size: 11px;
    color: var(--text);
}

.tips-platform {
    font-weight: 600;
    color: var(--muted);
}

.filter-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chip {
    padding: 8px 12px;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--accent);
}

.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.nav-button {
    padding: 8px 12px;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.nav-button:hover {
    background: var(--border);
}

.month-title {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    flex: 1;
    text-align: center;
}

.calendar-grid {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.weekday-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-cell {
    aspect-ratio: 1;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.day-cell:hover {
    border-color: var(--accent);
    background: var(--border);
}

.day-cell.today {
    border-color: var(--accent);
    background: rgba(123, 97, 255, 0.1);
}

.day-number {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--muted);
}

.day-cell.today .day-number {
    color: var(--accent);
}

.day-posts {
    flex: 1;
    display: flex;
    gap: 4px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.post-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-tiktok { background: var(--accent); }
.dot-ig { background: var(--accent2); }
.dot-fb { background: var(--blue); }
.dot-line { background: var(--green); }

.batch-schedule {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.batch-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.batch-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

select, input[type="text"], input[type="date"], input[type="time"] {
    padding: 10px;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 12px;
}

.btn-schedule {
    padding: 10px 16px;
    background: var(--accent);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Noto Sans Thai', sans-serif;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-schedule:hover {
    background: #8d7aff;
}

.automation-mode {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.automation-label {
    font-size: 12px;
    font-weight: 600;
}

.mode-buttons {
    display: flex;
    gap: 8px;
}

.mode-btn {
    padding: 8px 16px;
    background: var(--surface3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Noto Sans Thai', sans-serif;
}

.mode-btn:hover {
    border-color: var(--accent);
}

.mode-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
