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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 28px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.header-stat {
    text-align: center;
}

.header-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.header-stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Controls */
.controls {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

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

.control-group label {
    font-weight: 500;
    color: #333;
}

.control-group input,
.control-group select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
}

.stat-change.positive {
    background: #c6f6d5;
    color: #22543d;
}

.stat-change.negative {
    background: #fed7d7;
    color: #742a2a;
}

/* Table Section */
.table-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.table-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f7fafc;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

tr:hover {
    background: #f7fafc;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-new {
    background: #bee3f8;
    color: #2c5282;
}

.status-contacted {
    background: #fbd38d;
    color: #744210;
}

.status-completed {
    background: #c6f6d5;
    color: #22543d;
}

.vip-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 5px;
}

.action-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    margin-right: 5px;
}

.action-btn.view {
    background: #667eea;
    color: white;
}

.action-btn.call {
    background: #48bb78;
    color: white;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-message {
    background: #fed7d7;
    color: #742a2a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Detail Modal */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
}

.detail-modal-content {
    position: relative;
    background: white;
    max-width: 800px;
    margin: 40px auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header h2 {
    font-size: 24px;
    margin: 0;
}

.detail-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.detail-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.detail-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.detail-value.large {
    font-size: 24px;
    color: #667eea;
}

.detail-qa {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #48bb78;
}

.detail-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.detail-answer {
    color: #555;
    padding-left: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.detail-answer-sub {
    color: #666;
    font-size: 13px;
    margin-left: 10px;
    margin-top: 3px;
}

.highlight-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.highlight-value {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

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

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-modal-content {
        margin: 20px;
        max-width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-header h2 {
        font-size: 18px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

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

    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
}

