/* 푸른가족 통합 관리 시스템 - 공통 스타일 (블루 테마) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #E3F2FD;
    --success: #0d904f;
    --success-light: #e6f4ea;
    --warning: #f9ab00;
    --warning-light: #fef7e0;
    --danger: #d93025;
    --danger-light: #fce8e6;
    --info: #1565C0;
    --brand-accent: #29B6F6;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-400: #bdc1c6;
    --gray-500: #9aa0a6;
    --gray-600: #80868b;
    --gray-700: #5f6368;
    --gray-800: #3c4043;
    --gray-900: #202124;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 헤더 */
.app-header {
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%);
    color: white;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-header .logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-header .logo svg { width: 28px; height: 28px; }
.app-header .user-info { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.app-header .user-info .user-name {
    background: rgba(255,255,255,0.15);
    padding: 4px 12px; border-radius: 20px; font-weight: 500;
}

.btn-back {
    background: rgba(255,255,255,0.15);
    border: none; color: white;
    padding: 6px 14px; border-radius: 6px; cursor: pointer;
    font-size: 13px; font-family: inherit; transition: background 0.2s;
}
.btn-back:hover { background: rgba(255,255,255,0.25); }

/* 카드 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600; font-size: 15px;
    display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 20px; }

/* 버튼 */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: none; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-100); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* 테이블 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    background: var(--gray-50); padding: 10px 12px; text-align: left;
    font-weight: 600; color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200); white-space: nowrap;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-800); }
.data-table tbody tr:hover { background: var(--primary-light); }

/* 배지 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #b06000; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--primary-light); color: var(--primary); }

/* 그리드 */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* 유틸 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #b06000; }
.text-muted { color: var(--gray-500); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }

/* 입력 */
.form-input {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,0.15); }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 4px; }

/* 로딩 */
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--gray-200); border-top-color: var(--primary-dark);
    border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.datetime { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--gray-600); }

/* 상태 점 */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active { background: var(--success); animation: pulse 2s infinite; }
.status-dot.inactive { background: var(--gray-400); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
