* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background: #f5f5f7; color: #1d1d1f; -webkit-font-smoothing: antialiased;
}

/* 로그인 */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #fbfbfd; }
.login-box { background: #fff; padding: 48px 40px; border-radius: 20px; width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.login-box h1 { color: #1d1d1f; text-align: center; margin-bottom: 32px; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }

/* 폼 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; color: #86868b; font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; background: #f5f5f7; border: 1px solid #d2d2d7;
    border-radius: 10px; color: #1d1d1f; font-size: 15px; outline: none; transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #0071e3; box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }

/* 버튼 */
.btn { padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; letter-spacing: -0.2px; }
.btn-primary { background: #0071e3; color: #fff; }
.btn-primary:hover { background: #0077ed; }
.btn-success { background: #34c759; color: #fff; }
.btn-success:hover { background: #2db84e; }
.btn-danger { background: #ff3b30; color: #fff; }
.btn-danger:hover { background: #e6352b; }
.btn-secondary { background: #e8e8ed; color: #1d1d1f; }
.btn-secondary:hover { background: #d2d2d7; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-full { width: 100%; padding: 14px; font-size: 16px; border-radius: 12px; }

/* 알림 */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert.error { background: #fff2f2; color: #ff3b30; }
.alert.success { background: #f0faf4; color: #34c759; }

/* 레이아웃 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #fff; border-right: 1px solid #e8e8ed; padding: 24px 0; flex-shrink: 0; }
.sidebar h2 { padding: 0 24px 20px; color: #1d1d1f; font-size: 20px; font-weight: 700; letter-spacing: -0.3px; border-bottom: 1px solid #f5f5f7; margin-bottom: 8px; }
.sidebar a { display: block; padding: 10px 24px; color: #86868b; text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.15s; border-radius: 0; }
.sidebar a:hover { color: #1d1d1f; background: #f5f5f7; }
.sidebar a.active { color: #0071e3; background: rgba(0,113,227,0.06); font-weight: 600; }
.main { flex: 1; padding: 32px; max-width: calc(100% - 240px); }
.main h2 { margin-bottom: 24px; color: #1d1d1f; font-size: 24px; font-weight: 700; letter-spacing: -0.3px; }

/* 헤더바 */
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar .info { color: #86868b; font-size: 13px; }

/* 테이블 */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #fbfbfd; color: #86868b; padding: 12px 14px; text-align: left; white-space: nowrap; position: sticky; top: 0; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid #e8e8ed; }
td { padding: 10px 14px; border-bottom: 1px solid #f5f5f7; white-space: nowrap; color: #1d1d1f; }
tr:hover td { background: #fbfbfd; }
tr:last-child td { border-bottom: none; }

/* 상태 뱃지 */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1px; }
.badge-green { background: #e8f8ed; color: #1b7d3a; }
.badge-red { background: #ffe5e5; color: #d32f2f; }
.badge-yellow { background: #fff8e1; color: #f57f17; }
.badge-blue { background: #e3f2fd; color: #1565c0; }
.badge-gray { background: #f5f5f7; color: #86868b; }
.badge-purple { background: #f3e5f5; color: #7b1fa2; }

/* 체크박스 스타일 */
.check-on { color: #34c759; font-weight: 600; }
.check-off { color: #d2d2d7; }

/* 모달 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 28px; width: 500px; max-width: 90vw; max-height: 80vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.modal h3 { margin-bottom: 20px; color: #1d1d1f; font-size: 20px; font-weight: 700; }
.modal .form-group label { color: #6e6e73; }
.modal .form-group input, .modal .form-group select { background: #f5f5f7; border-color: #d2d2d7; color: #1d1d1f; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* 툴바 */
.toolbar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="text"] { padding: 8px 14px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; background: #fff; transition: border 0.2s; }
.toolbar input[type="text"]:focus { border-color: #0071e3; outline: none; }
.toolbar select { padding: 8px 14px; border: 1px solid #d2d2d7; border-radius: 8px; font-size: 13px; background: #fff; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2386868b' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* 페이징 */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination a { padding: 8px 14px; border: 1px solid #d2d2d7; border-radius: 8px; color: #1d1d1f; text-decoration: none; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.pagination a:hover { background: #f5f5f7; }
.pagination a.active { background: #0071e3; color: #fff; border-color: #0071e3; }

/* 카드 스타일 */
.card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06); margin-bottom: 20px; }
.card h3 { margin-bottom: 16px; font-size: 17px; font-weight: 600; color: #1d1d1f; }

/* 반응형 */
@media (max-width: 768px) {
    .sidebar { width: 64px; }
    .sidebar h2, .sidebar a span { display: none; }
    .main { padding: 16px; max-width: calc(100% - 64px); }
}
