* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
.container { max-width: 1280px; margin: 0 auto; padding: 20px; }
h1 { font-size: 24px; margin-bottom: 20px; color: #1a1a1a; }
h2 { font-size: 18px; margin-bottom: 12px; color: #333; border-bottom: 2px solid #4A90D9; padding-bottom: 6px; }

/* 카드 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* 폼 */
.form-row { display: flex; gap: 8px; margin-bottom: 12px; }
.form-row input[type="text"] { flex: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.form-row input[type="text"]:focus { outline: none; border-color: #4A90D9; }
button, .btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background 0.2s; }
.btn-primary { background: #4A90D9; color: #fff; }
.btn-primary:hover { background: #357ABD; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 테이블 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
th { background: #f8f9fa; font-weight: 600; color: #555; }
tr:hover { background: #f8f9fa; }

/* 상태 뱃지 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }

/* 알림 */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 12px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* 탭 */
.tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #ddd; }
.tab { padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: 500; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab:hover { color: #333; }
.tab.active { color: #4A90D9; border-bottom-color: #4A90D9; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 로딩 */
.loading { text-align: center; padding: 20px; color: #999; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #ddd; border-top-color: #4A90D9; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 이력 토글 */
.history-item { border: 1px solid #eee; border-radius: 4px; margin-bottom: 8px; }
.history-header { padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; }
.history-header:hover { background: #eee; }
.history-body { padding: 12px; display: none; }
.history-body.open { display: block; }

/* 설정 */
.setting-group { margin-bottom: 16px; }
.setting-group label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.setting-group input[type="text"] { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

/* 체크 시간 태그 */
.time-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.time-tag { display: inline-flex; align-items: center; gap: 4px; background: #e8f0fe; padding: 4px 10px; border-radius: 12px; font-size: 13px; }
.time-tag .remove { cursor: pointer; color: #999; font-weight: bold; }
.time-tag .remove:hover { color: #e74c3c; }

/* 봇별 요약 */
.bot-summary-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 16px; overflow: hidden; }
.bot-summary-row { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; transition: background 0.15s; }
.bot-summary-row:hover { background: #f8f9fa; }
.bot-summary-row:not(:last-child) { border-bottom: 1px solid #f0f0f0; }
.bot-summary-row.is-total { background: #f8f9fa; }
.bot-summary-row.is-total:hover { background: #eef1f5; }
.bot-summary-name { flex: 0 0 120px; font-weight: 600; font-size: 14px; color: #333; }
.bot-summary-row.is-total .bot-summary-name { color: #4A90D9; }
.bot-summary-stats { display: flex; flex: 1; gap: 16px; justify-content: flex-end; }
.bot-summary-stat { text-align: center; min-width: 60px; }
.bot-summary-stat .num { font-size: 20px; font-weight: 700; }
.bot-summary-stat .label { font-size: 11px; color: #999; }
.bot-summary-stat.s-total .num { color: #333; }
.bot-summary-stat.s-exposed .num { color: #27ae60; }
.bot-summary-stat.s-not .num { color: #e74c3c; }
