:root {
    --bg-color: #f9fafb;
    /* Light gray background like screenshot */
    --card-bg: white;
    --text-primary: #191f28;
    --text-secondary: #8b95a1;
    --accent-blue: #3182f6;
    --accent-naver: #03C75A;
    --accent-insta: #E1306C;
    --border-color: #e5e8eb;
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    padding: 24px;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 24px;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: #6b7684;
}

/* Control Bar */
.controls-card {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.label {
    font-weight: 600;
    font-size: 15px;
    color: #333d4b;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 14px;
    color: #4e5968;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    background: #f2f4f6;
}

.btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    font-weight: 600;
}

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

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

.date-picker-group {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}

input[type="date"] {
    border: none;
    font-family: inherit;
    color: #333;
    outline: none;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7684;
}

.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge.up {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge.down {
    background-color: #ffebee;
    color: #c62828;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.kpi-desc {
    font-size: 13px;
    color: #8b95a1;
}

/* Glass Panel / Sections */
.glass-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-header {
    margin-bottom: 24px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chart-container {
    height: 350px;
    width: 100%;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 12px 0;
    color: #8b95a1;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px 0;
    color: #333d4b;
    border-bottom: 1px solid #f2f4f6;
}

.platform-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.platform-tag.naver {
    background: #e8f5e9;
    color: #03C75A;
}

.platform-tag.insta {
    background: #fce4ec;
    color: #E1306C;
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

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

.status.active {
    color: #2e7d32;
}

.status.active .status-dot {
    background: #2e7d32;
}

.status.paused {
    color: #b0b8c1;
}

.status.paused .status-dot {
    background: #b0b8c1;
}

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-picker-group {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}