/* ================================
   공통 스타일 - style.css
   ================================ */

/* 폰트 */
@font-face {
    font-family: 'GounBatang';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunBatang-Regular.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

/* 리셋 & 기본 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'GounBatang', serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* 모바일 컨테이너 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

/* 버튼 공통 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'GounBatang', serif;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #2c3e50;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1a252f;
}

.btn-danger {
    background-color: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background-color: #a93226;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-block {
    width: 100%;
}

/* 입력 필드 공통 */
.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'GounBatang', serif;
    font-size: 15px;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #2c3e50;
}

.input-field::placeholder {
    color: #aaa;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

/* 카드 */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 18px;
    font-weight: normal;
}

.card-header i {
    color: #2c3e50;
}

/* 헤더 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 20px;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    color: #2c3e50;
}

/* 탭 네비게이션 */
.tab-nav {
    display: flex;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-family: 'GounBatang', serif;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn.active {
    background: #2c3e50;
    color: #fff;
}

.tab-btn:not(.active):hover {
    background: #f0f0f0;
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 테이블 스타일 */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: normal;
    font-size: 13px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.data-table .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.data-table .btn-icon.edit {
    background: #3498db;
    color: #fff;
}

.data-table .btn-icon.delete {
    background: #e74c3c;
    color: #fff;
}

/* 검색바 */
.search-bar {
    position: relative;
    margin-bottom: 16px;
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-bar input {
    padding-left: 42px;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* 알림 토스트 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

/* 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    padding: 24px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: normal;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-footer .btn {
    flex: 1;
}
