/*
 * 파일명: style.css
 * 위치: /web/assets/
 * 설명: 공통 스타일시트
 * 작성일: 2025-09-25
 * 수정일: 2025-09-25
 */

/* ===================================
 * 전역 스타일 및 리셋
 * =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ===================================
 * 레이아웃 컨테이너
 * =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================
 * 헤더
 * =================================== */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
}

header nav {
    margin-top: 20px;
}

/* ===================================
 * 네비게이션
 * =================================== */
nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: background 0.3s;
    display: inline-block;
}

nav a:hover {
    background: rgba(255,255,255,0.3);
}

nav a.active {
    background: rgba(255,255,255,0.4);
    font-weight: bold;
}

/* ===================================
 * 메인 콘텐츠
 * =================================== */
main {
    flex: 1;
    padding: 20px 0;
}

/* ===================================
 * 푸터
 * =================================== */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 14px;
}

/* ===================================
 * 기본 카드 스타일
 * =================================== */
.info-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.info-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.form-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.result-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ===================================
 * 대시보드 레이아웃
 * =================================== */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* ===================================
 * 폼 요소
 * =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

/* ===================================
 * 버튼
 * =================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

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

.btn-primary:hover:not(:disabled) {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: #a5b4fc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-link {
    background: transparent;
    color: #667eea;
    padding: 5px 10px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ===================================
 * 알림 메시지
 * =================================== */
.alert {
    padding: 15px;
    margin: 15px 0;
    border: 1px solid;
    border-radius: 5px;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* ===================================
 * 테이블
 * =================================== */
.info-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.info-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.info-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background: #f8f9fa;
}

/* ===================================
 * 유틸리티 클래스
 * =================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6c757d;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===================================
 * 반응형 디자인
 * =================================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}