/* ASSET — ISMS 자산관리 시스템 스타일 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
}

/* 네비게이션 */
.navbar {
    background: #2c3e50;
    color: #fff;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}
.nav-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}
.nav-subtitle {
    color: #95a5a6;
    font-size: 12px;
    margin-left: 12px;
}
.nav-menu { display: flex; align-items: center; gap: 16px; }
.nav-user { color: #bdc3c7; font-size: 14px; }
.nav-link { color: #ecf0f1; text-decoration: none; font-size: 14px; }
.nav-link:hover { color: #fff; text-decoration: underline; }

/* 컨테이너 */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

/* 인증 폼 */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.auth-container h2 { margin-bottom: 24px; text-align: center; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 14px; color: #555; }
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.form-group input:focus { outline: none; border-color: #3498db; }
.btn { padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn-primary {
    background: #3498db;
    color: #fff;
    width: 100%;
    margin-top: 8px;
}
.btn-primary:hover { background: #2980b9; }
.auth-link { text-align: center; margin-top: 16px; font-size: 14px; }
.auth-link a { color: #3498db; text-decoration: none; }

/* 알림 */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

/* 대시보드 */
.dashboard h1 { margin-bottom: 8px; }
.dashboard > p { color: #777; margin-bottom: 32px; }

/* 카드 그리드 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.card h3 { margin-bottom: 8px; color: #2c3e50; }
.card p { font-size: 14px; color: #777; margin-bottom: 12px; }
.card-status {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    color: #999;
}
.card-status-active { background: #d4edda; color: #155724; }
.card-link { text-decoration: none; color: inherit; display: block; transition: box-shadow .2s; }
.card-link:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* 페이지 헤더 */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { margin: 0; }
.subtitle { color: #777; font-size: 14px; margin-top: 4px; }
.header-actions { display: flex; gap: 8px; }

/* 폼 컨테이너 */
.form-container { max-width: 700px; margin: 0 auto; background: #fff; border-radius: 8px; padding: 32px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.form-container h1 { margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.three-col { grid-template-columns: 1fr 1fr 1fr; }
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: #3498db; }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }
.required { color: #e74c3c; }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.radio-label, .checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.indent { margin-left: 24px; padding-left: 16px; border-left: 3px solid #3498db; }

/* 버튼 확장 */
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-outline { background: #fff; color: #3498db; border: 1px solid #3498db; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
.btn-outline:hover { background: #ebf5fb; }
.btn-cancel { background: #eee; color: #555; text-decoration: none; display: inline-block; padding: 10px 20px; border-radius: 4px; font-size: 14px; }
.btn-danger { background: #e74c3c; color: #fff; border: none; }
.btn-danger:hover { background: #c0392b; }

/* 배지 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #eee; color: #666; }
.badge-active { background: #d4edda; color: #155724; }
.badge-archived { background: #f8d7da; color: #721c24; }
.badge-completed { background: #cce5ff; color: #004085; }
.badge-high { background: #f8d7da; color: #721c24; }
.badge-medium { background: #fff3cd; color: #856404; }
.badge-low { background: #d4edda; color: #155724; }
.badge-pi { background: #e2d5f1; color: #6f42c1; margin-left: 4px; }

/* 업체 카드 */
.company-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.company-card-header h3 { margin: 0; }
.company-card-header h3 a { color: #2c3e50; text-decoration: none; }
.company-card-header h3 a:hover { color: #3498db; }
.company-card-body { margin-bottom: 12px; }
.info-row { font-size: 14px; color: #555; margin-bottom: 4px; }
.info-label { color: #999; font-size: 12px; margin-right: 4px; }
.company-card-footer { display: flex; gap: 8px; }

/* 상세 페이지 */
.detail-section { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.detail-section h2 { margin-bottom: 16px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.section-count { font-size: 14px; color: #777; font-weight: normal; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { font-size: 14px; }
.detail-item.full-width { grid-column: 1 / -1; }
.detail-label { display: block; color: #999; font-size: 12px; margin-bottom: 2px; }
.section-actions { margin-top: 16px; display: flex; gap: 8px; }
.text-muted { color: #999; font-size: 14px; }

/* 통계 카드 */
.stat-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-card { background: #f8f9fa; border-radius: 8px; padding: 16px 24px; text-align: center; min-width: 80px; }
.stat-value { font-size: 24px; font-weight: 700; color: #2c3e50; }
.stat-label { font-size: 12px; color: #777; margin-top: 4px; }

/* 테이블 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); font-size: 14px; }
.data-table th { background: #f8f9fa; padding: 10px 12px; text-align: left; font-weight: 600; color: #555; border-bottom: 2px solid #dee2e6; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; }
.data-table tr:hover { background: #f8f9fa; }
.data-table code { background: #f0f0f0; padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.cia-cell { text-align: center; font-weight: 600; }
.action-cell { white-space: nowrap; }

/* 필터 탭 */
.filter-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tab { padding: 6px 14px; border-radius: 20px; font-size: 13px; text-decoration: none; color: #555; background: #f0f0f0; transition: .2s; }
.filter-tab:hover { background: #e0e0e0; }
.filter-tab.active { background: #3498db; color: #fff; }

/* 검색 */
.search-bar { margin-bottom: 16px; }
.search-bar form { display: flex; gap: 8px; }
.search-input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; flex: 1; max-width: 400px; }
.search-input:focus { outline: none; border-color: #3498db; }

/* 빈 상태 */
.empty-state { text-align: center; padding: 48px 24px; color: #999; }
.empty-state p { margin-bottom: 16px; }

/* 설문 진행 바 */
.questionnaire-container { max-width: 800px; margin: 0 auto; }
.progress-bar { display: flex; justify-content: space-between; margin-bottom: 32px; padding: 16px; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.progress-step { flex: 1; text-align: center; }
.progress-link { text-decoration: none; color: #999; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #eee; font-size: 13px; font-weight: 700; }
.step-name { font-size: 11px; }
.progress-step.completed .step-num { background: #27ae60; color: #fff; }
.progress-step.completed .progress-link { color: #27ae60; }
.progress-step.active .step-num { background: #3498db; color: #fff; }
.progress-step.active .progress-link { color: #3498db; }
.step-desc { color: #777; margin-bottom: 24px; }
.step-nav { display: flex; justify-content: space-between; margin-top: 32px; }

/* 프리뷰 */
.preview-summary { background: #d4edda; color: #155724; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.preview-actions { margin-top: 24px; display: flex; gap: 12px; }

/* 반응형 */
@media (max-width: 768px) {
    .form-row, .form-row.three-col { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .progress-bar { flex-wrap: wrap; gap: 8px; }
    .step-name { display: none; }
}
