/* ========================================
   공통 CSS 모듈 - 전체 애플리케이션 공통 스타일
   ======================================== */

/* ========================================
   1. 기본 리셋 및 폰트 설정
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #bdc2e8 0%, #e6dee9 100%);
    min-height: 100vh;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   2. 공통 배경 효과
   ======================================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(189, 194, 232, 0.1) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(230, 222, 233, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(90, 103, 216, 0.05) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(76, 81, 191, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   3. 공통 카드 스타일
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(90, 103, 216, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(90, 103, 216, 0.3);
}

/* 글래스모피즘 헤더 스타일 */
.main-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* 햄버거 버튼 (데스크톱에서는 숨김) */
.mobile-menu-toggle {
    display: none;
}

.welcome-text {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* ========================================
   4. 공통 버튼 스타일 (통합) - 웹용 기본 스타일
   ======================================== */
/* 웹용 기본 버튼 스타일 - 모바일 미디어 쿼리 밖에 있어서 웹에서만 적용 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: auto; /* 웹에서는 기본 높이 */
}

.btn-primary {
    background: linear-gradient(135deg, #5a67d8, #4c51bf);
    color: white;
    box-shadow: 0 4px 15px rgba(90, 103, 216, 0.3);
}

.btn-primary i {
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 103, 216, 0.4);
}

.btn-primary:hover i {
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #5a67d8;
    color: #5a67d8;
}

.btn-secondary:hover i {
    color: #5a67d8;
}

.btn-outline {
    background: transparent;
    color: #5a67d8;
    border: 2px solid #5a67d8;
}

.btn-outline:hover {
    background: #5a67d8;
    color: white;
}

.btn-outline:hover i {
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success i {
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-success:hover i {
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
}

.btn-danger i {
    color: white !important;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4) !important;
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
}

.btn-danger:hover i {
    color: white !important;
}

.btn-danger:disabled {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    opacity: 0.6 !important;
    cursor: not-allowed;
}

.btn-danger:disabled i {
    color: white !important;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* btn-danger는 disabled 상태가 아니어도 항상 빨간색 유지 */
.btn-danger:not(:disabled) {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* ========================================
   5. 공통 입력 필드 스타일
   ======================================== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #4a5568;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: #5a67d8 !important;
}

.input-wrapper input,
.form-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    transition: all 0.3s ease;
}

.input-wrapper input:focus,
.form-input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
    background: white;
}

.input-wrapper input:hover,
.form-input:hover {
    border-color: #5a67d8;
    background: white;
}

.input-wrapper input::placeholder,
.form-input::placeholder {
    color: #9ca3af;
}


.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 모달 버튼 스타일 */
.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #5a67d8, #4c51bf);
    color: white;
}

.modal-btn-primary:hover {
    background: linear-gradient(135deg, #4c51bf, #5a67d8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.3);
}

/* 체크 버튼 스타일 (인증용 작은 버튼) */
.check-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    background: linear-gradient(135deg, #5a67d8, #4c51bf);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.check-btn:hover {
    background: linear-gradient(135deg, #4c51bf, #5a67d8);
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 2px 8px rgba(90, 103, 216, 0.3);
}

/* ========================================
   7. 공통 체크박스 스타일
   ======================================== */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5a67d8;
}

.checkbox-wrapper label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-wrapper label a {
    color: #5a67d8;
    text-decoration: none;
}

.checkbox-wrapper label a:hover {
    text-decoration: underline;
}

/* ========================================
   8. 공통 헤더 스타일
   ======================================== */
.main-header {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(90, 103, 216, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h2 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* ========================================
   7. 공통 섹션 스타일
   ======================================== */
.section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(90, 103, 216, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(90, 103, 216, 0.1);
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.section-header h3 i {
    color: #5a67d8;
}

/* ========================================
   8. 공통 폼 그룹 스타일
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-label i {
    color: #5a67d8;
}

.required {
    color: #e53e3e;
    font-weight: bold;
}

/* ========================================
   9. 공통 테이블 스타일 (견적서 목록과 동일)
   ======================================== */
/* 테이블 컨테이너 */
.quotes-table-container {
    margin-top: 20px;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
    -webkit-overflow-scrolling: touch; /* iOS 부드러운 스크롤 */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(90, 103, 216, 0.3) transparent;
}

.quotes-table-container::-webkit-scrollbar {
    height: 8px;
}

.quotes-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.quotes-table-container::-webkit-scrollbar-thumb {
    background: rgba(90, 103, 216, 0.3);
    border-radius: 4px;
}

.quotes-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 103, 216, 0.5);
}

/* 모바일 카드 컨테이너 */
.quotes-cards-container {
    display: none; /* 기본적으로 숨김 */
    margin-top: 20px;
    gap: 16px;
}

.quote-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.quote-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
}

.quote-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0;
}

.quote-card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

.quote-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quote-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.quote-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 70px;
    flex-shrink: 0;
}

.quote-card-value {
    font-size: 0.9rem;
    color: #374151;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.quote-card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.3);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 테이블 기본 스타일 */
.quotes-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quotes-table th {
    background: rgba(247, 250, 252, 0.3);
    backdrop-filter: blur(10px);
    color: #4a5568;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.3);
    border-right: 1px solid rgba(226, 232, 240, 0.3);
}

.quotes-table th:last-child,
.quotes-table td:last-child {
    border-right: none;
}

.quotes-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    border-right: 1px solid rgba(226, 232, 240, 0.3);
    font-size: 0.9rem;
}

.quotes-table tbody tr:hover {
    background: rgba(90, 103, 216, 0.15);
}

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

/* 정렬 가능한 헤더 스타일 */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: rgba(90, 103, 216, 0.1);
}

.sort-icon {
    margin-left: 8px;
    font-size: 0.8rem;
    color: #a0aec0;
    transition: color 0.2s ease;
}

.sortable:hover .sort-icon {
    color: #5a67d8;
}

.sort-icon.sort-asc {
    color: #5a67d8;
}

.sort-icon.sort-desc {
    color: #5a67d8;
}

/* 하위 호환성을 위한 data-table 클래스 (quotes-table과 동일) */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.data-table th {
    background: rgba(247, 250, 252, 0.3);
    backdrop-filter: blur(10px);
    color: #4a5568;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.3);
    border-right: 1px solid rgba(226, 232, 240, 0.3);
}

.data-table th:last-child,
.data-table td:last-child {
    border-right: none;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    border-right: 1px solid rgba(226, 232, 240, 0.3);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background: rgba(90, 103, 216, 0.15);
}

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

/* ========================================
   10. 공통 모달 스타일
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
}

.modal[style*="display: block"] {
    display: flex !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
    position: relative;
}

/* 모달 사이즈별 스타일 */
.modal-content.modal-sm {
    max-width: 400px;
    max-height: 300px;
}

.modal-content.modal-sm .modal-body {
    padding: 20px;
    max-height: calc(300px - 120px);
    overflow-y: auto;
}

.modal-content.modal-md {
    max-width: 500px;
    max-height: 400px;
}

.modal-content.modal-md .modal-body {
    padding: 30px;
    max-height: calc(400px - 140px);
    overflow-y: auto;
}

.modal-content.modal-lg {
    max-width: 700px;
    max-height: 600px;
}

.modal-content.modal-lg .modal-body {
    padding: 40px;
    max-height: calc(600px - 160px);
    overflow-y: auto;
}

.modal-content.modal-xl {
    max-width: 900px;
    max-height: 700px;
}

.modal-content.modal-xl .modal-body {
    padding: 40px;
    max-height: calc(700px - 160px);
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0;
}

.modal-header h3 {
    color: #1a202c;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #1a202c;
}

/* 모달 내부 입력 필드 가독성 향상 */
.modal-body .form-input {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    color: #1a202c;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-body .form-input:focus {
    background: white;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

.modal-body .form-label {
    color: #2d3748;
    font-weight: 600;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 다크 모달 스타일 - 글래스모피즘 강화 */
.modal-content.modal-dark {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.close {
    color: #a0aec0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-close {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
    line-height: 1;
    width: auto;
    height: auto;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    justify-content: center;
}

.modal-btn.primary {
    background: #5a67d8 !important;
    color: white !important;
    border: 1px solid #4c51bf !important;
}

.modal-btn.primary:hover {
    background: #4c51bf !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(90, 103, 216, 0.3);
}

.modal-btn.secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.modal-btn.secondary:hover {
    background: #edf2f7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   11. 공통 애니메이션
   ======================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   12. 공통 유틸리티 클래스
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* ========================================
   13. 공통 색상 변수 (CSS Custom Properties)
   ======================================== */
:root {
    --primary-color: #5a67d8;
    --primary-dark: #4c51bf;
    --secondary-color: #10b981;
    --success-color: #10b981;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --text-color: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --background-glass: rgba(255, 255, 255, 0.25);
    --shadow-primary: rgba(90, 103, 216, 0.2);
    --shadow-success: rgba(245, 158, 11, 0.2);
    --shadow-danger: rgba(220, 53, 69, 0.2);
}

/* ========================================
   14. 공통 레이아웃 컨테이너 스타일
   ======================================== */

/* 대시보드 전체 컨테이너 */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #bdc2e8 0%, #e6dee9 100%);
}

/* 메인 콘텐츠 스타일 */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 20px;
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* 사이드바 축소 시 메인 콘텐츠 마진 조정 */
.main-content.sidebar-collapsed {
    margin-left: 70px;
    width: calc(100vw - 70px);
}

/* 기본 페이지 컨테이너 */
.page-container {
    margin: 0 auto;
    padding: 20px;
}

/* 기본 섹션 스타일 */
.content-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
    margin-bottom: 30px;    
}

/* 섹션 헤더 */
.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(90, 103, 216, 0.1);
}

.section-header h3 {
    margin-bottom: 5px;
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: #5a67d8;
}

.section-header p {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* 2열 그리드 레이아웃 */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .main-content {
        width: calc(100vw - 280px);
    }
    
    .main-content.sidebar-collapsed {
        width: calc(100vw - 70px);
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 70px;
        padding: 10px;
        width: calc(100vw - 70px);
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .main-content.sidebar-collapsed {
        width: calc(100vw - 70px);
        box-sizing: border-box;
    }
    
    .page-container {
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    .content-section {
        padding: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    .two-column-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* 모바일에서 테이블 숨기고 카드 표시 */
    .quotes-table-container {
        display: none !important;
    }
    
    .quotes-cards-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }
    
    .quotes-table {
        min-width: 800px;
        font-size: 0.85rem;
    }
    
    .quotes-table th,
    .quotes-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .quotes-table th:first-child,
    .quotes-table td:first-child {
        position: sticky;
        left: 0;
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(20px);
        z-index: 10;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    /* ========================================
       모바일 앱 스타일 - 전체 UI 개선
       ======================================== */
    
    /* 기본 레이아웃 - 하단 네비게이션 바 고려 */
    .main-content {
        margin-left: 0;
        margin-bottom: 70px; /* 하단 네비게이션 바 높이만큼 여백 */
        padding: 80px 12px 12px 12px; /* 상단 헤더 높이 + 여백 */
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
        margin-bottom: 70px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 헤더 스타일 - 상단 전체 너비, 글래스모피즘 */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 0 0 20px 20px;
        padding: 16px 20px;
        margin: 0;
        margin-bottom: 0;
        box-shadow: 0 8px 32px rgba(90, 103, 216, 0.2);
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 999;
    }
    
    /* 햄버거 버튼 (모바일에서만 표시) */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        border-radius: 10px;
        color: #2d3748;
        font-size: 1.3rem;
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        box-shadow: none !important;
        min-height: auto !important;
        padding: 0 !important;
    }
    
    .mobile-menu-toggle:active {
        background: rgba(0, 0, 0, 0.05);
        box-shadow: none !important;
        transform: translateY(-50%) scale(0.97);
    }
    
    .header-content {
        max-width: 100%;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: relative;
    }
    
    .header-content h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #2d3748;
        letter-spacing: -0.02em;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    /* 모바일에서 main-header 내부의 header-actions만 숨기기 (h2 중앙정렬을 위해) */
    .main-header .header-actions {
        display: none !important;
    }
    
    .page-container {
        padding: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
    }
    
    
    .section-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    .section-header h3 {
        font-size: 1.25rem;
        font-weight: 700;
        color: #1a202c;
        letter-spacing: -0.01em;
    }
    
    /* 작은 모바일에서도 카드 표시 */
    .quotes-table-container {
        display: none !important;
    }
    
    /* 카드 컨테이너 - 앱스러운 간격 */
    .quotes-cards-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
    }
    
    /* 카드 디자인 - 모던하고 깔끔한 스타일 */
    
    .quote-card-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    .quote-card-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1a202c;
        letter-spacing: -0.01em;
        margin: 0;
    }
    
    .quote-card-badge {
        padding: 6px 12px;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    .quote-card-body {
        gap: 14px;
    }
    
    .quote-card-row {
        gap: 12px;
    }
    
    .quote-card-label {
        font-size: 0.875rem;
        font-weight: 600;
        color: #6b7280;
        min-width: 70px;
    }
    
    .quote-card-value {
        font-size: 0.95rem;
        font-weight: 500;
        color: #1a202c;
        text-align: right;
    }
    
    .quote-card-footer {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        gap: 10px;
    }
    
    .quotes-table {
        min-width: 700px;
        font-size: 0.8rem;
    }
    
    .quotes-table th,
    .quotes-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    /* ========================================
       모바일 앱 스타일 버튼 - 모든 버튼 통합
       ======================================== */
    
    /* 모든 버튼 기본 스타일 - 앱스러운 디자인 (모바일에서만) */
    /* 웹 스타일과 충돌 방지: 모바일 미디어 쿼리 안에서만 적용 */
    .btn,
    button:not([type="submit"]):not([type="button"]):not(.mobile-menu-toggle),
    input[type="button"],
    input[type="submit"] {
        min-height: 48px;
        padding: 14px 24px;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        letter-spacing: -0.01em;
    }
    
    .btn:active,
    button:active {
        transform: scale(0.97);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }
    
    /* Primary 버튼 */
    .btn-primary,
    button.btn-primary {
        background: #5a67d8;
        color: white;
        box-shadow: 0 4px 12px rgba(90, 103, 216, 0.3);
    }
    
    .btn-primary:active,
    button.btn-primary:active {
        background: #4c51bf;
        box-shadow: 0 2px 6px rgba(90, 103, 216, 0.25);
    }
    
    /* Danger 버튼 */
    .btn-danger,
    button.btn-danger {
        background: #ef4444 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    }
    
    .btn-danger:active,
    button.btn-danger:active {
        background: #dc2626 !important;
        box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25) !important;
    }
    
    /* Secondary 버튼 */
    .btn-secondary,
    button.btn-secondary {
        background: white;
        color: #4a5568;
        border: 2px solid #e2e8f0;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    .btn-secondary:active,
    button.btn-secondary:active {
        background: #f9fafb;
        border-color: #5a67d8;
        color: #5a67d8;
    }
    
    
    .btn-outline:active,
    button.btn-outline:active {
        background: #5a67d8;
        color: white;
    }
    
    /* Success 버튼 */
    .btn-success,
    button.btn-success {
        background: #10b981;
        color: white;
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    
    .btn-success:active,
    button.btn-success:active {
        background: #059669;
        box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
    }
    
    /* 작은 버튼 */
    .btn-sm,
    button.btn-sm {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* 카드 내부 버튼 */
    .quote-card-footer .btn,
    .quote-card-footer button {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.95rem;
        background-color: rgb(83 92 204 / 80%);
        color: white;
    }
    
    /* 필터 버튼 스타일 - 앱스러운 디자인 */
    .status-filter-buttons {
        gap: 10px;
        margin-bottom: 0;
    }
    
    .status-filter-btn {
        min-height: 44px;
        padding: 12px 20px;
        border-radius: 14px;
        font-size: 0.95rem;
        font-weight: 600;
        border: 2px solid transparent;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        letter-spacing: -0.01em;
    }
    
    .status-filter-btn:active {
        transform: scale(0.97);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    }
    
    .status-filter-btn.active {
        border-width: 2px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        font-weight: 700;
        transform: translateY(-1px);
    }
    
    .status-filter-btn.active:active {
        transform: scale(0.97) translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }
    
    /* 저장완료 필터 버튼 */
    .status-filter-btn[data-status="저장완료"] {
        background: #e5e7eb;
        color: #4b5563;
        border-color: #e5e7eb;
    }
    
    .status-filter-btn[data-status="저장완료"].active {
        background: #d1d5db;
        border-color: #9ca3af;
        box-shadow: 0 3px 10px rgba(156, 163, 175, 0.3);
    }
    
    /* 재견적요청 필터 버튼 */
    .status-filter-btn[data-status="재견적요청"] {
        background: #fce7f3;
        color: #9f1239;
        border-color: #fce7f3;
    }
    
    .status-filter-btn[data-status="재견적요청"].active {
        background: #fbcfe8;
        border-color: #f9a8d4;
        box-shadow: 0 3px 10px rgba(252, 231, 243, 0.3);
    }
    
    /* 발송완료 필터 버튼 */
    .status-filter-btn[data-status="발송완료"] {
        background: #dbeafe;
        color: #1e40af;
        border-color: #dbeafe;
    }
    
    .status-filter-btn[data-status="발송완료"].active {
        background: #bfdbfe;
        border-color: #60a5fa;
        box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
    }
    
    /* 입력 필드 - 앱스러운 스타일 */
    .input-wrapper input,
    .form-input,
    input[type="text"],
    input[type="number"],
    input[type="date"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        min-height: 48px;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 1rem;
        border: 2px solid #e5e7eb;
        background: rgba(255, 255, 255, 0.95);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .input-wrapper input:focus,
    .form-input:focus,
    input:focus,
    textarea:focus,
    select:focus {
        border-color: #5a67d8;
        box-shadow: 0 0 0 4px rgba(90, 103, 216, 0.1);
        outline: none;
        background: white;
    }
    
    /* 검색 박스 - 앱스러운 스타일 */
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        min-height: 48px;
        padding: 14px 16px 14px 48px;
        border-radius: 12px;
        font-size: 1rem;
        border: 2px solid #e5e7eb;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .search-box input:focus {
        border-color: #5a67d8;
        box-shadow: 0 0 0 4px rgba(90, 103, 216, 0.1);
    }
    
    .search-icon {
        left: 16px;
        color: #9ca3af;
        font-size: 1.1rem;
    }
    
    /* 선택 박스 - 앱스러운 스타일 */
    .items-per-page select,
    select {
        min-height: 48px;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 1rem;
        border: 2px solid #e5e7eb;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        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 fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        padding-right: 40px;
    }
    
    /* 헤더 액션 영역 - 앱스러운 레이아웃 */
    .header-actions {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    /* 빈 상태 메시지 - 앱스러운 스타일 */
    .empty-message,
    .empty-state {
        padding: 40px 20px;
        text-align: center;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 16px;
        margin: 20px 0;
    }
    
    .empty-message i,
    .empty-state i {
        font-size: 3rem;
        color: #cbd5e0;
        margin-bottom: 16px;
    }
    
    .empty-message p,
    .empty-state p {
        font-size: 1rem;
        color: #6b7280;
        margin: 0;
    }
    
    /* 페이지네이션 - 앱스러운 스타일 */
    .pagination-container {
        padding: 16px 0;
        gap: 16px;
    }
    
    .pagination-btn {
        min-width: 48px;
        min-height: 48px;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        background: white;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    .pagination-btn:active {
        transform: scale(0.95);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .page-number {
        min-width: 48px;
        min-height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        transition: all 0.2s ease;
    }
    
    .page-number.active {
        background: #5a67d8;
        color: white;
        box-shadow: 0 2px 8px rgba(90, 103, 216, 0.3);
    }
    
    /* 타이포그래피 개선 */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        letter-spacing: -0.02em;
    }
    
    /* 스크롤바 스타일 - 앱스러운 느낌 */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.02);
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.3);
    }
    
    /* 추가 앱스러운 스타일 개선 */
    
    /* 배경 그라데이션 조정 - 더 부드럽게 */
    body::before,
    body::after {
        opacity: 0.5;
    }
    
    /* 카드 호버 효과 제거 (모바일에서는 불필요) */
    .glass-card:hover {
        transform: none;
    }
    
    /* 모달 스타일 - 앱스러운 느낌 */
    .modal-content {
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        max-width: 90vw;
    }
    
    .modal-header {
        padding: 20px 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: -0.01em;
    }
    
    .modal-body {
        padding: 24px;
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .modal-footer {
        padding: 16px 24px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }
    
    /* 리스트 아이템 - 앱스러운 스타일 */
    .list-item,
    li {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }
    
    /* 테이블 스타일 (데스크톱용이지만 혹시 모를 경우) */
    table {
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* 폼 그룹 - 앱스러운 간격 */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 0.95rem;
        color: #374151;
    }
    
    /* 체크박스와 라디오 - 앱스러운 크기 */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        accent-color: #5a67d8;
    }
    
    /* 토글 스위치 - 앱스러운 크기 */
    .toggle-switch {
        width: 52px;
        height: 28px;
    }
    
    .toggle-switch input:checked + .toggle-slider {
        background-color: #5a67d8;
    }
    
    /* 알림/토스트 - 앱스러운 스타일 */
    .toast,
    .alert {
        border-radius: 12px;
        padding: 16px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        font-size: 0.95rem;
    }
    
    /* 로딩 스피너 - 앱스러운 스타일 */
    .spinner,
    .loading {
        border-width: 3px;
    }
    
    /* 구분선 - 앱스러운 스타일 */
    hr {
        border: none;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        margin: 20px 0;
    }
    
    /* 배지/태그 - 앱스러운 스타일 */
    .badge,
    .tag {
        padding: 6px 12px;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    /* 툴팁 - 앱스러운 스타일 */
    .tooltip {
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.85rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* ========================================
   15. 공통 아이콘 색상 스타일
   ======================================== */

/* 카드 헤더 아이콘 기본 색상 - 버튼 아이콘 제외 */
.card-title i,
.section-header i,
.modern-label i {
    color: #5a67d8;
}

/* 버튼 아이콘은 기본 색상 적용 안함 */
.btn i {
    color: inherit;
}

/* 통계 아이콘 색상 */
.stat-icon i,
.feature-icon i {
    color: white;
}
