/* ========================================
   UI Improvements - 전체 UI 개선
   농부야 부탁해 VMS
   ======================================== */

/* ========================================
   1. 로그인 페이지 개선 (대시보드 톤 매칭)
   ======================================== */

/* 로그인 페이지 배경 - 대시보드와 동일한 은은한 메시 */
body:has(.login-form) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #e8eaef !important;
    overflow: hidden;
    position: relative;
}

/* 배경 메시 그라디언트 - 대시보드와 동일 */
body:has(.login-form)::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%) !important;
    z-index: 0 !important;
    pointer-events: none !important;
    display: block !important;
    animation: bgMeshSlow 30s ease-in-out infinite !important;
}

body:has(.login-form)::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(170deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.02) 100%);
    z-index: 0;
    pointer-events: none;
}

/* 떠다니는 도형들 */
body:has(.login-form) .container::before {
    content: '';
    position: fixed;
    top: 10%;
    left: 8%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(139, 92, 246, 0.06));
    filter: blur(60px);
    animation: float1 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

body:has(.login-form) .container::after {
    content: '';
    position: fixed;
    bottom: 10%;
    right: 8%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.06));
    filter: blur(60px);
    animation: float2 18s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -40px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 30px); }
}

body:has(.login-form) .container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    max-width: 440px;
    min-height: auto !important;
    margin: 0 auto;
    padding: var(--space-4);
    position: relative;
    z-index: 1;
    animation: loginCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both !important;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 로그인 카드 - 다크 카드 (대시보드 헤더와 매칭) */
.login-form {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 24px !important;
    padding: 2.5rem 2rem !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #475569 !important;
    border-left: 4px solid #7c3aed !important;
    position: relative;
    overflow: visible !important;
}

.login-form::before {
    display: none !important;
}

/* 사이트 타이틀 */
.site-title {
    margin-bottom: 2rem !important;
}

.site-title img {
    max-width: 90px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease !important;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #ffffff !important;
    padding: 6px !important;
}

.site-title img:hover {
    transform: scale(1.08) rotate(2deg) !important;
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.25) !important;
}

/* 로그인 폼 입력 필드 */
.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8 !important;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 18px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    font-size: 0.9375rem !important;
    transition: all 0.25s ease !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: rgba(124, 58, 237, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    outline: none;
}

.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.25) !important;
}

/* 로그인 버튼 */
.login-form button[type="submit"] {
    width: 100%;
    padding: 14px 24px !important;
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: #e2e8f0;
    border: 1px solid #475569 !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin-top: 1.5rem !important;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
    background: linear-gradient(135deg, #475569, #334155) !important;
    color: #ffffff;
}

.login-form button[type="submit"]:active {
    transform: translateY(0) scale(0.98) !important;
}

/* 회원가입 링크 */
.register-link {
    margin-top: 1.5rem !important;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.register-link a {
    color: #94a3b8 !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.register-link a:hover {
    color: #c4b5fd !important;
    text-decoration: none !important;
}

/* 에러/성공 메시지 */
.login-form .error,
.login-form .success {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-form .error {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.login-form .success {
    background: rgba(34, 197, 94, 0.12) !important;
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
}

/* 회원가입 폼 숨김 */
.register-form {
    display: none;
}

/* 회원가입 폼 h2 */
.login-form h2 {
    color: #e2e8f0 !important;
    text-align: center;
}

/* 로그인 페이지 하단 저작권 등 표시용 */
body:has(.login-form) .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* ========================================
   2. 헤더 레이아웃 개선
   ======================================== */

.header {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: var(--space-4) !important;
    align-items: center !important;
    padding: var(--space-4) var(--space-6) !important;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border: 1px solid #475569 !important;
    border-radius: 16px !important;
    margin-bottom: var(--space-5) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
    z-index: 1 !important;
}

.header::before {
    display: none !important;
}

/* 로고 영역 */
.header-left {
    display: flex;
    align-items: center;
}

.logo {
    max-width: 110px !important;
    height: auto;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s ease !important;
    background: #ffffff !important;
    padding: 4px !important;
}

.logo:hover {
    transform: scale(1.05) !important;
}

/* 헤더 버튼 영역 */
.header-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
}

.header-buttons-top {
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* 헤더 버튼 통합 스타일 - 다크 헤더용 */
.header-buttons-top button,
.header-buttons-top a,
.change-password-btn,
.logout-btn,
.fullscreen-btn,
.user-management-btn,
.columns-management-btn {
    padding: 7px 14px !important;
    font-size: 0.75rem !important;
    height: 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: auto !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(4px) !important;
}

.header-buttons-top button:hover,
.header-buttons-top a:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2) !important;
}

/* 버튼별 악센트 색상 - 다크 헤더 */
.user-management-btn {
    color: #93c5fd !important;
    border-color: rgba(147, 197, 253, 0.2) !important;
}
.user-management-btn:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(147, 197, 253, 0.4) !important;
    color: #bfdbfe !important;
}

.columns-management-btn {
    color: #fdba74 !important;
    border-color: rgba(253, 186, 116, 0.2) !important;
}
.columns-management-btn:hover {
    background: rgba(249, 115, 22, 0.15) !important;
    border-color: rgba(253, 186, 116, 0.4) !important;
    color: #fed7aa !important;
}

.change-password-btn {
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}
.change-password-btn:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.fullscreen-btn {
    color: #c4b5fd !important;
    border-color: rgba(196, 181, 253, 0.2) !important;
}
.fullscreen-btn:hover {
    background: rgba(139, 92, 246, 0.15) !important;
    border-color: rgba(196, 181, 253, 0.4) !important;
    color: #ddd6fe !important;
}

.logout-btn {
    color: #fca5a5 !important;
    border-color: rgba(252, 165, 165, 0.2) !important;
}
.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(252, 165, 165, 0.4) !important;
    color: #fecaca !important;
}

/* 버튼 hover 시 transform 미세 조정 */
.header-buttons-top button:hover,
.header-buttons-top a:hover {
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* 환영 메시지 컨테이너 */
.welcome-container {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

/* 환영 메시지 - 다크 헤더 */
.welcome {
    font-size: 0.875rem !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    padding: 0 !important;
}

.vendor-code {
    color: #94a3b8 !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
}

/* 날씨 위젯 - 다크 헤더 내 */
.weather-info {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    color: #cbd5e1 !important;
}

.weather-info * {
    color: #cbd5e1 !important;
}

.weather-info a {
    color: #93c5fd !important;
}

.weather-info a:hover {
    color: #bfdbfe !important;
}


/* ========================================
   3. 검색 폼 개선
   ======================================== */

.search-form {
    background: #edeef2 !important;
    border: 1px solid #d5d8dc !important;
    border-left: 4px solid #7c3aed !important;
    border-radius: 16px !important;
    padding: var(--space-5) var(--space-6) !important;
    margin-bottom: var(--space-5) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
    z-index: 1 !important;
}

.search-form::before {
    display: none !important;
}

/* 검색 그룹 */
.search-group {
    background: #e4e6eb !important;
    border: 1.5px solid #cdd0d6 !important;
    border-radius: 10px !important;
    padding: 8px 14px !important;
    min-height: 44px !important;
    transition: all 0.2s ease !important;
}

.search-group:hover {
    border-color: #9ca0a8 !important;
    background: #dcdfe5 !important;
    transform: none !important;
    box-shadow: none !important;
}

.search-group:focus-within {
    border-color: #667eea !important;
    background: #eef0f4 !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    transform: none !important;
}

.search-group label {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    min-width: 60px !important;
}

.search-group input,
.search-group select {
    font-size: 0.875rem !important;
    color: #111827 !important;
    background: transparent !important;
}

/* 검색/초기화 버튼 */
.search-btn {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    height: 44px !important;
    min-width: 100px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.search-btn:hover {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.search-btn::before {
    display: none !important;
}

.reset-btn {
    background: #e8eaef !important;
    color: #374151 !important;
    border: 1.5px solid #c5c8ce !important;
    border-radius: 10px !important;
    padding: 10px 24px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    height: 44px !important;
    min-width: 100px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.reset-btn:hover {
    background: #dcdfe5 !important;
    border-color: #9ca0a8 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-1px) !important;
}

.reset-btn::before {
    display: none !important;
}

/* 체크박스 그룹 */
.checkbox-group {
    background: #e4e6eb;
    border-radius: 10px;
    padding: 8px 14px !important;
    border: 1.5px solid #cdd0d6;
}

.checkbox-group input[type="checkbox"] {
    accent-color: #667eea !important;
}


/* ========================================
   4. 데이터 카운트 바 개선
   ======================================== */

.data-count {
    background: #edeef2 !important;
    border: 1px solid #d5d8dc !important;
    border-left: 4px solid #059669 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    margin-bottom: var(--space-4) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    gap: var(--space-3) !important;
    font-size: 0.8125rem !important;
    position: relative !important;
    z-index: 1 !important;
}

.data-count::before {
    display: none !important;
}

.data-count span {
    background: #e2e4e9 !important;
    border: 1px solid #cdd0d6 !important;
    border-radius: 8px !important;
    padding: 5px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8125rem !important;
    color: #334155 !important;
}

.data-count strong {
    color: #1e293b;
    font-weight: 700;
}

/* 다운로드 버튼 */
.csv-btn {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: #e2e8f0 !important;
    border: 1px solid #475569 !important;
    border-radius: 8px !important;
    padding: 8px 18px !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

.csv-btn:hover {
    transform: translateY(-1px) !important;
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

.column-select-btn {
    background: #e8eaef !important;
    color: #374151 !important;
    border: 1.5px solid #c5c8ce !important;
    border-radius: 8px !important;
    padding: 6px 16px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.column-select-btn:hover {
    background: #dcdfe5 !important;
    border-color: #9ca0a8 !important;
}


/* ========================================
   5. 테이블 개선
   ======================================== */

/* 테이블 래퍼 */
.table-wrapper,
.table-container {
    border-radius: 14px !important;
    border: 1px solid #d5d8dc !important;
    border-top: 3px solid #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 테이블 헤더 - 다크 그라디언트 */
.data-table th,
table.data-table th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: #e2e8f0 !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 14px 16px !important;
    border-bottom: none !important;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* 테이블 셀 */
.data-table td {
    padding: 12px 16px !important;
    font-size: 0.8125rem !important;
    color: #4b5563 !important;
    border-bottom: 1px solid #e2e4e9 !important;
    transition: none !important;
}

/* 줄무늬 (짝수 행) */
.data-table tbody tr:nth-child(even) {
    background-color: #eef0f3;
}

/* 행 호버 */
.data-table tbody tr:hover {
    background-color: #e4e7ed !important;
}

/* 마지막 행 */
.data-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 빈 데이터 */
.data-table td[colspan] {
    text-align: center !important;
    padding: 3rem 2rem !important;
    color: #9ca3af !important;
    font-size: 0.9375rem !important;
    font-style: italic;
}


/* ========================================
   6. 페이지네이션 개선
   ======================================== */

.pagination {
    padding: var(--space-4) var(--space-6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    background: #e8eaef;
    border-top: 1px solid #d5d8dc;
}

.pagination a,
.pagination span,
.pagination .page-link-php {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    border: 1px solid #d5d8dc !important;
    background: #edeef2 !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
}

.pagination a:hover,
.pagination .page-link-php:hover {
    background: #e2e4e9 !important;
    border-color: #9ca0a8 !important;
    color: #1e293b !important;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.pagination span.current,
.pagination span.current-page {
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}


/* ========================================
   7. 모달 개선
   ======================================== */

.modal {
    backdrop-filter: blur(8px) !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

.modal-content {
    background: #edeef2 !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2),
                0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #d5d8dc !important;
    max-width: 560px !important;
    width: 92% !important;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: var(--space-5) !important;
    padding-bottom: var(--space-4);
    border-bottom: 2px solid #d5d8dc;
}

/* 모달 닫기 버튼 */
.modal-content .close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #dcdfe5;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-content .close:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

/* 비밀번호 정보 박스 */
.password-info {
    background: #e4e6eb;
    border: 1px solid #cdd0d6;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: var(--space-5);
}

.password-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-info li {
    font-size: 0.8125rem;
    color: #64748b;
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.password-info li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

/* 모달 내 폼 */
.modal-content .form-group {
    margin-bottom: var(--space-4);
}

.modal-content .form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="number"] {
    width: 100%;
    padding: 10px 14px !important;
    border: 2px solid #d5d8dc !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    background: #e4e6eb !important;
}

.modal-content input:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12) !important;
    background: #edeef2 !important;
}

.modal-content button[type="submit"] {
    width: 100%;
    padding: 12px 24px !important;
    background: linear-gradient(135deg, #334155, #1e293b) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    margin-top: var(--space-4);
}

.modal-content button[type="submit"]:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* 컬럼 관리 모달 */
.columns-container {
    background: #e4e6eb !important;
    border: 1px solid #cdd0d6 !important;
    border-radius: 12px !important;
    padding: 16px !important;
}

.column-checkbox label {
    padding: 8px 10px !important;
    border-radius: 8px !important;
    transition: background-color 0.15s ease !important;
}

.column-checkbox label:hover {
    background-color: #dcdfe5 !important;
}

.column-checkbox input[type="checkbox"] {
    accent-color: #667eea !important;
}

/* 컬럼 액션 버튼 */
.columns-actions {
    margin-top: var(--space-4) !important;
    gap: 8px !important;
}

.columns-actions button {
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.columns-actions button:not(.save-columns-btn) {
    background: #e2e4e9 !important;
    color: #475569 !important;
    border: 1px solid #cdd0d6 !important;
}

.columns-actions button:not(.save-columns-btn):hover {
    background: #d5d8de !important;
}

.save-columns-btn {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: white !important;
    border: none !important;
}

.save-columns-btn:hover {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
}

/* 설정 정보 */
.setting-info {
    background: #e2e5ed !important;
    border: 1px solid #bcc2d0 !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
}

.setting-info p {
    color: #475569 !important;
    font-size: 0.8125rem !important;
    margin: 0 !important;
}

.setting-info strong {
    color: #4f46e5 !important;
}

/* 페이지 크기 설정 */
.per-page-setting {
    background: #e4e6eb;
    border: 1px solid #cdd0d6;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: var(--space-4);
}

.per-page-setting h3 {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: var(--space-3);
}

.per-page-setting small {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
    display: block;
}


/* ========================================
   8. 알림/토스트 개선
   ======================================== */

.alert {
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 0.875rem !important;
    border-width: 1px !important;
}

.alert-warning {
    background: #ece6d8 !important;
    color: #92400e !important;
    border-color: #d4c9a8 !important;
}

.alert-success {
    background: #dde8de !important;
    color: #166534 !important;
    border-color: #b8ccba !important;
}

.notification {
    border-radius: 14px !important;
    padding: 14px 20px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
                0 1px 3px rgba(0, 0, 0, 0.08) !important;
    font-size: 0.875rem !important;
}


/* ========================================
   9. 컨테이너 전체 개선
   ======================================== */

.container {
    max-width: 1440px !important;
    border-radius: 20px !important;
    padding: var(--space-6) !important;
    background: rgba(243, 244, 246, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(213, 216, 220, 0.8) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 바디 배경 - 은은한 메시 그라디언트 */
body {
    background: #e8eaef !important;
    position: relative;
}

body:not(:has(.login-form))::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(102, 126, 234, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.04) 0%, transparent 50%) !important;
    z-index: 0 !important;
    pointer-events: none !important;
    display: block !important;
    animation: bgMeshSlow 30s ease-in-out infinite !important;
}

body:not(:has(.login-form))::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(170deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.02) 100%);
    z-index: 0;
    pointer-events: none;
}

@keyframes bgMeshSlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

body:has(.login-form)::before {
    /* 로그인 페이지는 기존 스타일 유지 - 여기서 덮어쓰지 않음 */
}


/* ========================================
   10. 커스텀 스크롤바
   ======================================== */

/* Webkit 기반 브라우저 */
.table-container::-webkit-scrollbar,
.columns-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track,
.columns-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb,
.columns-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.columns-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* ========================================
   11. 반응형 개선 (모바일)
   ======================================== */

@media (max-width: 768px) {
    body:has(.login-form) {
        padding: var(--space-3);
    }

    body:has(.login-form) .container {
        padding: var(--space-2);
        max-width: 100%;
    }

    .login-form {
        padding: 2rem 1.5rem !important;
        border-radius: 20px !important;
        border-left: 4px solid #7c3aed !important;
    }

    .container {
        margin: var(--space-3) !important;
        padding: var(--space-4) !important;
        border-radius: 16px !important;
    }

    .header {
        grid-template-columns: 1fr !important;
        gap: var(--space-3) !important;
        padding: var(--space-3) var(--space-4) !important;
        border-radius: 12px !important;
        border-left: none !important;
    }

    .header-left {
        justify-content: center;
    }

    .logo {
        max-width: 80px !important;
    }

    .header-buttons {
        width: 100% !important;
        align-items: center !important;
    }

    .header-buttons-top {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    .header-buttons-top button,
    .header-buttons-top a {
        font-size: 0.6875rem !important;
        padding: 5px 10px !important;
        height: 30px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: #e2e8f0 !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }

    .welcome {
        font-size: 0.8125rem !important;
        text-align: center !important;
    }

    .welcome-container {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .weather-info {
        width: 100% !important;
    }

    /* 검색 폼 모바일 */
    .search-form {
        padding: var(--space-4) !important;
        border-radius: 12px !important;
    }

    .search-group {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .search-btn,
    .reset-btn {
        width: 100% !important;
        height: 44px !important;
    }

    /* 데이터 카운트 모바일 */
    .data-count {
        flex-wrap: wrap !important;
        padding: 10px 14px !important;
        border-radius: 10px !important;
    }

    .download-buttons {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 8px !important;
    }

    .csv-btn {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        padding: 10px 16px !important;
        font-size: 0.8125rem !important;
    }

    /* 테이블 모바일 */
    .data-table th {
        padding: 10px 12px !important;
        font-size: 0.6875rem !important;
        color: #e2e8f0 !important;
    }

    .data-table td {
        padding: 10px 12px !important;
        font-size: 0.75rem !important;
    }

    /* 페이지네이션 모바일 */
    .pagination a,
    .pagination span {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem !important;
    }

    /* 모달 모바일 */
    .modal-content {
        width: 95% !important;
        padding: 1.5rem !important;
        border-radius: 16px !important;
        margin: var(--space-3) auto !important;
    }
}

/* 아주 작은 화면 */
@media (max-width: 480px) {
    .header-buttons-top button,
    .header-buttons-top a {
        font-size: 0.625rem !important;
        padding: 4px 8px !important;
        height: 28px !important;
        gap: 3px !important;
    }

    .search-group label {
        font-size: 0.6875rem !important;
        min-width: 50px !important;
    }
}


/* ========================================
   12. 포커스 및 접근성
   ======================================== */

*:focus-visible {
    outline: 2px solid #667eea !important;
    outline-offset: 2px !important;
}

/* 선택 영역 */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #1e293b;
}


/* ========================================
   13. 애니메이션 정제
   ======================================== */

/* 버튼 shimmer 효과 제거 (이미지에서 깜빡임 방지) */
.btn::before,
.search-btn::before,
.reset-btn::before,
.csv-btn::before,
.change-password-btn::before,
.logout-btn::before,
.fullscreen-btn::before {
    display: none !important;
}

/* 이모지 ::after 제거 (깔끔한 디자인) */
.change-password-btn::after,
.logout-btn::after,
.fullscreen-btn::after,
.theme-btn::after,
.user-management-btn::after,
.search-btn::after,
.reset-btn::after,
.login-form button::after {
    display: none !important;
}

/* 부드러운 페이지 로드 */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: pageLoad 0.4s ease-out;
}
