﻿/* 공통 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
h1{
    user-select:none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 사이드바 네비게이션 */
.nav-item {
    display: flex;
    align-items:center;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    gap:10px;
}

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        transform: translateX(4px);
    }

    .nav-item.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        font-weight: 600;
    }

/* 통계 카드 */
.stat-card {
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
    }

    .stat-card.dashboard-widget:hover .widget-hint {
        opacity: 1 !important;
    }

    .stat-card.dashboard-widget:hover .widget-icon {
        transform: scale(1.1);
    }

    .stat-card.dashboard-widget:active {
        transform: translateY(-2px);
    }

/* 모달 애니메이션 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 견적 모달 전용 스타일 - 반응형 최적화 */
.estimate-modal-content {
    max-width: 95%;
    width: 95%;
    padding: 16px;
    max-height: 95vh;
}

/* 모바일 (640px 이하) */
@media (max-width: 640px) {
    .estimate-modal-content {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 12px;
    }
}

/* 태블릿 (641px ~ 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    .estimate-modal-content {
        max-width: 90%;
        width: 90%;
        padding: 20px;
    }
}

/* PC (1025px 이상) */
@media (min-width: 1025px) {
    .estimate-modal-content {
        max-width: 1200px;
        width: 90%;
        padding: 32px;
    }
}

/* 큰 화면 (1440px 이상) */
@media (min-width: 1440px) {
    .estimate-modal-content {
        max-width: 1400px;
        padding: 40px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 테이블 스타일 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .data-table th {
        padding: 16px;
        font-weight: 600;
    }

    .data-table td {
        padding: 16px;
        border-bottom: 1px solid #e5e7eb;
    }

    .data-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .data-table tbody tr:hover {
            background-color: #f9fafb;
        }

/* 버튼 스타일 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

.btn-success {
    background: #10b981;
    color: white;
}

    .btn-success:hover {
        background: #059669;
        transform: translateY(-2px);
    }

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

    .btn-danger:hover {
        background: #dc2626;
        transform: translateY(-2px);
    }

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

    .btn-secondary:hover {
        background: #4b5563;
    }

/* 입력 필드 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    font-size: 14px;
}

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

/* 반응형 사이드바 */
@media (max-width: 1024px) {
    #sidebar {
        transform: translateX(-100%);
    }

        #sidebar.show,
        #sidebar:not(.-translate-x-full) {
            transform: translateX(0);
        }
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 토스트 컨테이너 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* 알림 토스트 */
.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(to right, #ecfdf5, white);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(to right, #fef2f2, white);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb, white);
}

.toast.info {
    border-left-color: #6366f1;
    background: linear-gradient(to right, #eef2ff, white);
}

.toast i {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success i {
    color: #10b981;
}

.toast.error i {
    color: #ef4444;
}

.toast.warning i {
    color: #f59e0b;
}

.toast.info i {
    color: #6366f1;
}

.toast span {
    flex: 1;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}

/* 확인 다이얼로그 스타일 */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.confirm-dialog {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.confirm-dialog-header {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    padding: 20px 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-dialog-header i {
    font-size: 24px;
}

.confirm-dialog-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.confirm-dialog-body {
    padding: 24px;
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9fafb;
}

.confirm-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 80px;
}

.confirm-btn-cancel {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.confirm-btn-cancel:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.confirm-btn-ok {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: white;
}

.confirm-btn-ok:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(124, 58, 237, 0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
