/* public/assets/css/global.css */

:root {
    --theme-dark: #1b523c;
    --theme-light: #3CB371;
    --theme-bg: #F0FFF0;
    --input-bg: #E8F5E9;
    --result-bg: #F1F8E9;
    --text-dark: #2c3e50;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
}

/* 헤더 */
header {
    background: var(--theme-dark);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 24px;
    font-weight: bold;
}

/* 네비게이션 메뉴 스타일 개선 */
.nav {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: 100%;       /* 전체 너비 사용 */
    max-width: none;   /* 너비 제한 해제 */
    flex-wrap: nowrap; /* 줄바꿈 절대 금지 */
    overflow-x: auto;  /* 화면 좁으면 스크롤 */
    -webkit-overflow-scrolling: touch;
}

/* 스크롤바 숨기기 (깔끔하게) */
.nav ul::-webkit-scrollbar {
    display: none;
}

.nav li {
    flex: 0 0 auto; /* 크기 자동 조절 */
}

header nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 12px; /* 패딩 축소 */
    font-size: 14px;    /* 폰트 크기 축소 */
    transition: all 0.3s;
    margin-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap; /* 줄바꿈 강제 방지 */
}

header nav a:hover, 
header nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    font-weight: bold;
    border-bottom-color: var(--theme-light);
}

/* 반응형 네비게이션 조정 */
@media (max-width: 1400px) {
    header nav a {
        padding: 15px 8px;
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    header nav a {
        padding: 15px 6px;
        font-size: 13px;
        letter-spacing: -0.5px;
    }
}

/* 햄버거 메뉴 (기본 숨김) */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    transition: all 0.3s;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.active span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* 모바일 네비게이션 (992px 이하) */
@media (max-width: 992px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
    }

    .hamburger {
        display: block; /* 햄버거 버튼 표시 */
        margin-right: 20px;
    }

    .nav {
        display: none; /* 기본 숨김 */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--theme-dark);
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .nav.active {
        display: block; /* 활성화 시 표시 */
    }

    .nav ul {
        flex-direction: column; /* 세로 배치 */
        width: 100%;
        overflow-x: hidden;
        height: auto;
    }

    .nav li {
        width: 100%;
        text-align: center;
    }

    header nav a {
        padding: 15px;
        font-size: 16px; /* 폰트 키움 */
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
    
    /* 사용자 정보 등 헤더 상단 요소 조정 */
    header .container {
        padding: 0 15px;
    }
    
    .user-info {
        display: none; /* 모바일에서 사용자 정보 숨김 (필요시 메뉴 안으로 이동 고려) */
    }
}

/* 카드 */
.card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--theme-dark);
    margin-bottom: 12px;
    font-size: 16px;
    border-bottom: 2px solid var(--theme-light);
    padding-bottom: 8px;
}

/* 대시보드 그리드 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h2 {
    font-size: 42px;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 16px;
    opacity: 0.9;
}

/* ========== 버튼 스타일 통일 ========== */
/* 기본 버튼 스타일 (클래스 없어도 적용) */
button:not(.tab):not([class*="nav"]):not([class*="menu"]):not(.view-all-link):not(.item-link),
a[href*="modules/"]:not([class*="tab"]):not([class*="nav"]):not([class*="menu"]):not(.view-all-link):not(.item-link),
.action-buttons button,
.action-buttons a,
.detail-actions button,
.detail-actions a,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

/* Primary 버튼 (기본 동작 버튼) */
.btn-primary,
.action-buttons a[href*="modules/"],
.action-buttons a:not(.btn-secondary):not(.btn-danger),
button[type="submit"],
.btn-submit {
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(60, 179, 113, 0.3);
}

.btn-primary:hover,
button[type="submit"]:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(60, 179, 113, 0.4);
}

/* Secondary 버튼 (보조 버튼 - 목록, 인쇄 등) */
.btn-secondary,
.action-buttons button:not([onclick*="delete"]):not([type="submit"]),
.detail-actions a:not(.btn-danger),
button[onclick*="print"] {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover,
button[onclick*="print"]:hover {
    background: #f5f5f5;
    border-color: #999;
    transform: translateY(-2px);
}

/* Danger 버튼 (삭제 버튼) */
.btn-danger,
button[onclick*="delete"],
.detail-actions button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover,
button[onclick*="delete"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.4);
}

/* Reset 버튼 */
.btn-reset,
button[type="reset"] {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-reset:hover,
button[type="reset"]:hover {
    border-color: #999;
    background: #f5f5f5;
}

/* Block 버튼 (전체 너비) */
.btn-block {
    width: 100%;
    display: block;
}

/* 버튼 크기 변형 */
.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    gap: 5px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
    gap: 10px;
}

/* 비활성화 버튼 */
button:disabled,
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

button:disabled:hover,
.btn:disabled:hover,
.btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 액션 버튼 그룹 */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-buttons .btn,
.action-buttons button,
.action-buttons a {
    min-width: 140px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--theme-dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    background: var(--input-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--theme-light);
}

/* 셀렉트 박스 스타일 */
select.form-control,
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding: 12px 40px 12px 12px;
    cursor: pointer;
    background-color: #f8f9fa;
    line-height: 1.5;
    height: auto;
    vertical-align: middle;
}

select.form-control:hover,
select:hover {
    background-color: #e9ecef;
    border-color: #999;
}

select.form-control:focus,
select:focus {
    background-color: white;
    border-color: var(--theme-light);
}

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

.table thead {
    background: var(--theme-dark);
    color: white;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--theme-bg);
}

/* 탭 */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-dark);
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: var(--theme-dark);
    border-bottom-color: var(--theme-dark);
    font-weight: bold;
}

.tab:hover {
    background: var(--theme-bg);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 알림 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.trial-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.usage-info-box {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.usage-warning {
    color: #e74c3c;
    font-weight: bold;
}

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

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

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

/* 로딩 */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--theme-dark);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 업로드 섹션 */
.upload-section {
    margin-top: 20px;
}

.upload-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.upload-header {
    text-align: center;
    margin-bottom: 25px;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-header h2 {
    font-size: 22px;
    color: var(--theme-dark);
    margin-bottom: 8px;
}

.upload-subtitle {
    font-size: 14px;
    color: #666;
}

/* 폼 스타일 */
.upload-form {
    max-width: 900px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--theme-dark);
    font-size: 15px;
}

.label-icon {
    font-size: 18px;
}

.required-badge {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--theme-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(60, 179, 113, 0.1);
}

/* 셀렉트 박스 스타일 (.form-input 클래스용) */
select.form-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding: 12px 40px 12px 12px !important;
    cursor: pointer !important;
    background-color: #f8f9fa !important;
    line-height: normal !important;
    height: auto !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
}

select.form-input:hover {
    background-color: #e9ecef !important;
    border-color: #999 !important;
}

select.form-input:focus {
    background-color: white !important;
    border-color: var(--theme-light) !important;
}

/* 파일 업로드 */
.file-upload-wrapper {
    margin-bottom: 25px;
}

.file-drop-area {
    position: relative;
    border: 3px dashed #d0d0d0;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    cursor: pointer;
}

.file-drop-area:hover {
    border-color: var(--theme-light);
    background: #f0fff0;
}

.file-drop-area.drag-over {
    border-color: var(--theme-light);
    background: #f0fff0;
    transform: scale(1.02);
}

.file-drop-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.file-drop-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-drop-text strong {
    font-size: 16px;
    color: var(--theme-dark);
}

.file-drop-text span {
    font-size: 14px;
    color: #999;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-name {
    margin-top: 12px;
    padding: 12px 16px;
    background: #e8f5e9;
    border-radius: 8px;
    font-size: 14px;
    color: var(--theme-dark);
    font-weight: 500;
    display: none;
}

.file-name.show {
    display: block;
}

/* 폼 액션 버튼 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-icon {
    font-size: 18px;
}

/* 안내 카드 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.info-card.highlight {
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
    border: 2px solid var(--theme-light);
}

.info-card-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.info-card h3 {
    font-size: 20px;
    color: var(--theme-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-light);
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
    line-height: 1.6;
}

.info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--theme-light);
    font-weight: bold;
    font-size: 16px;
}

.guide-list {
    padding-left: 0;
    counter-reset: guide-counter;
}

.guide-list li {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 40px;
    position: relative;
}

.guide-list li:before {
    counter-increment: guide-counter;
    content: counter(guide-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: var(--theme-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.guide-list strong {
    display: block;
    color: var(--theme-dark);
    margin-bottom: 5px;
    font-size: 15px;
}

.guide-list p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.external-link {
    color: var(--theme-light);
    text-decoration: none;
    font-weight: 600;
}

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

.support-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.support-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--theme-dark);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.file-format-note {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

.file-format-note strong {
    color: var(--theme-dark);
}

/* 대시보드 웰컴 섹션 */
.dashboard-welcome {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.welcome-icon {
    font-size: 48px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.welcome-text h1 {
    font-size: 24px;
    color: var(--theme-dark);
    margin-bottom: 6px;
}

.welcome-subtitle {
    font-size: 14px;
    color: #666;
}

.membership-status {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
    border-radius: 12px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 15px;
}

.status-badge.free {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}


/* from header.php */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.trial-banner {
    background: rgba(255, 215, 0, 0.15);
    padding: 8px 20px;
    text-align: center;
    font-size: 13px;
    color: #ffd700;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.top-banner {
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.top-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.top-banner-close {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.top-banner-close:hover {
    opacity: 1;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    z-index: 999;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-size: 14px;
}

.membership-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.membership-badge.free {
    background: rgba(149, 165, 166, 0.3);
}

.membership-badge.basic {
    background: rgba(52, 152, 219, 0.3);
}

.membership-badge.premium {
    background: rgba(241, 196, 15, 0.3);
}

.user-links {
    display: flex;
    gap: 10px;
    font-size: 13px;
}

.user-links.desktop-only {
    display: flex;
}

.mobile-footer-links {
    display: none;
}

.user-links a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.user-links a:hover {
    background: rgba(255,255,255,0.2);
}

.nav {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav ul {
    list-style: none;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    justify-content: space-between;
}

.nav li {
    margin: 0;
    flex: 1;
}

.nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 8px;
    transition: background 0.3s;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.2);
}

.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 15px auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 5px;
    }
}

.content-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* 모바일 반응형 */
/* 모달 스타일 */
/* 모바일 반응형 */
/* 모달 스타일 */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* 배경 투명도 조절 */
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); /* 배경 블러 효과 추가 */
}

.custom-modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px; /* 더 둥글게 */
    padding: 40px 30px;
    max-width: 360px;
    width: 85%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: floatIcon 2s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modal-message {
    font-size: 16px;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
    white-space: pre-line;
    font-weight: 500;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.modal-btn-primary {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal-btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 로딩바 스타일 */
.modal-progress {
    margin-top: 20px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 30%;
    border-radius: 3px;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 70%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}

.modal-btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.modal-btn-secondary:hover {
    background: #d0d0d0;
}

.modal-progress {
    margin-top: 20px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.3s;
    animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    100% { width: 100%; }
}

@media (max-width: 768px) {
    .trial-banner {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .top-banner {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .header-top {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .user-info {
        display: none;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        padding-top: 70px; /* Header height offset */
        background: rgba(27, 82, 60, 0.98); /* Dark theme background */
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        z-index: 999;
        overflow-y: auto;
        box-shadow: none;
    }
    
    .nav.active {
        display: flex;
        flex-direction: column;
    }
    
    .nav ul {
        display: flex;
        flex-direction: column;
        padding: 20px 15px;
        padding-top: 80px;
        padding-bottom: 20px;
        gap: 0;
        width: 100%;
    }
    
    .nav li {
        flex: none;
        width: 100%;
    }
    
    .nav a {
        text-align: left;
        padding: 12px 15px;
        border-radius: 8px;
        margin-bottom: 8px;
        font-size: 15px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .nav .mobile-footer-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 20px 15px;
        border-top: 2px solid rgba(255,255,255,0.3);
        background: rgba(0,0,0,0.1);
        margin-top: auto;
        flex-shrink: 0;
    }
    
    .nav .mobile-footer-links a {
        width: 100%;
        padding: 12px 15px;
        border-radius: 8px;
        margin-bottom: 8px;
        text-align: left;
        font-size: 15px;
        color: white;
        text-decoration: none;
        transition: background 0.3s;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .nav .mobile-footer-links a:hover {
        background: rgba(255,255,255,0.2);
    }
}

/* from index.view.php */
.notice-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.notice-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.notice-section .section-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.notice-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.notice-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.notice-title {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0;
    text-align: left;
    flex: 1;
    margin-right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.notice-date::before {
    content: "📅 ";
}

@media (max-width: 768px) {
    .notice-section {
        padding: 15px;
    }
    
    .notice-section .section-header h2 {
        font-size: 18px;
    }
    
    .notice-section .section-header a {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .notice-item {
        padding: 12px 15px;
    }
    
    .notice-item a {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .notice-title {
        font-size: 14px;
        width: 100%;
        margin-bottom: 2px;
        line-height: 1.4;
    }
    
    .notice-meta {
        display: flex;
        flex-direction: row;
        gap: 12px;
        width: 100%;
        font-size: 11px;
    }
}

/* from login.view.php */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Malgun Gothic', sans-serif;
    padding: 0 5px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    margin: 0 0 10px 0;
}

.login-header p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* Scoped form styles for login page */
.login-page .form-group {
    margin-bottom: 20px;
}

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

.login-page .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

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

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c62828;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin: 0 10px;
    transition: color 0.2s;
}

.links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: #999;
    font-size: 13px;
}

/* from index.view.php - additional styles */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 20px;
    }
}

.section-header p {
    font-size: 16px;
    color: #666;
}

.trial-status,
.usage-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    flex: 1;
    min-width: 100x;
}

.status-icon {
    font-size: 24px;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-text strong {
    font-size: 14px;
    color: var(--theme-dark);
}

.status-text span {
    font-size: 13px;
    color: #666;
}

.badge-text {
    font-size: 14px;
}

.badge-icon {
    font-size: 18px;
}

.status-badge.basic {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.status-badge.premium {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

/* 최근 내역 섹션 */
.recent-section {
    margin-top: 50px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.recent-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.recent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.recent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--theme-light);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recent-icon {
    font-size: 32px;
}

.recent-card-header h3 {
    font-size: 20px;
    color: var(--theme-dark);
    margin: 0;
}

.recent-card-header .view-all-link {
    font-size: 14px;
    color: var(--theme-light);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border: 1px solid var(--theme-light);
    border-radius: 6px;
    transition: all 0.3s;
}

.recent-card-header .view-all-link:hover {
    background: var(--theme-light);
    color: white;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s;
}

.recent-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--theme-dark);
    margin-bottom: 5px;
}

.item-date {
    font-size: 13px;
    color: #999;
}

.item-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--theme-light);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.item-link:hover {
    background: var(--theme-dark);
}

.link-arrow {
    transition: transform 0.3s;
}

.item-link:hover .link-arrow {
    transform: translateX(3px);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 22px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: #666;
}

@media (max-width: 768px) {
    .recent-grid {
        grid-template-columns: 1fr;
    }
    
    .recent-card {
        padding: 20px;
    }
    
    .recent-card-header h3 {
        font-size: 17px;
    }
    
    .recent-icon {
        font-size: 24px;
    }
    
    .recent-card-header .view-all-link {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .item-link {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .item-title {
        font-size: 14px;
    }
    
    .item-date {
        font-size: 12px;
    }
}

/* Page Header */
.page-header {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 0;
    border-bottom: none;
}

.page-header h1 {
    font-size: 32px;
    color: var(--theme-dark);
    margin: 0;
    font-weight: 700;
}

/* Upload Section */
.upload-section {
    max-width: 1200px;
    margin: 0 auto;
}

.upload-card {
    background: white;
    border-radius: 16px;
    padding: 60px 80px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Form Section Card */
.form-section-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-light);
}

.section-icon {
    font-size: 22px;
}

.section-card-header h3 {
    font-size: 17px;
    color: var(--theme-dark);
    margin: 0;
}

/* Result Section (for profit, simulator, etc.) */
.result-section {
    max-width: 1200px;
    margin: 0 auto;
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h2 {
    font-size: 28px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.result-header p {
    font-size: 16px;
    color: #666;
}

.result-card-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.result-card-section h3 {
    font-size: 20px;
    color: var(--theme-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.result-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s;
}

.result-card.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe5a0 100%);
    border-color: #f39c12;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.result-card-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.result-card label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
}

.result-card .value {
    font-size: 22px;
    font-weight: bold;
    color: var(--theme-dark);
}

.result-card .value.large {
    font-size: 28px;
}

.result-card .value.excellent {
    color: #f39c12;
}

.result-card .value.good {
    color: #27ae60;
}

.result-card .value.average {
    color: #3498db;
}

.result-card .value.positive {
    color: #27ae60;
}

.result-card .value.negative {
    color: #e74c3c;
}

.form-col small {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-card {
        padding: 20px 15px;
    }
    
    .form-section-card {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .section-card-header h3,
    .result-card-section h3,
    .info-card h3,
    .result-header h2,
    .upload-header h2 {
        font-size: 16px !important;
    }

    .result-header p,
    .upload-subtitle {
        font-size: 13px;
    }
    
    /* Map page mobile responsive */
    .map-workspace {
        grid-template-columns: 1fr !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* Map Page Styles */
.map-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.map-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(60, 179, 113, 0.3);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(60, 179, 113, 0.4);
}

.address-table-wrap,
.route-table-wrap {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.address-table,
.route-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

.address-table thead,
.route-table thead {
    position: sticky;
    top: 0;
    background: var(--theme-dark);
    color: white;
    z-index: 10;
}

.address-table th,
.address-table td,
.route-table th,
.route-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
}

.address-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.address-table tbody tr:hover {
    background: #f0fff0;
}

.address-table tbody tr.selected {
    background: #e8f5e9;
}

.details-content {
    background: #fafafa;
    border-radius: 10px;
    padding: 15px;
    min-height: 150px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-line;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

.route-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.route-info {
    background: #e8f5e9;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--theme-dark);
    font-size: 13px;
    margin-top: 10px;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    padding: 10px 12px;
    font-size: 13px;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

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

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    padding: 10px 12px;
    font-size: 13px;
}

.btn-info:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

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

.log-content {
    background: #fafafa;
    border-radius: 10px;
    padding: 15px;
    height: 150px;
    overflow-y: auto;
    font-size: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-line;
    line-height: 1.5;
    color: #333;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.log-section .toggle-icon {
    transition: transform 0.3s;
    margin-left: auto;
}

.log-section .toggle-icon.open {
    transform: rotate(180deg);
}

.demo-preview {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.demo-preview h3 {
    font-size: 22px;
    color: var(--theme-dark);
    margin-bottom: 20px;
    text-align: center;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.demo-item {
    background: linear-gradient(135deg, #f0fff0 0%, #e8f5e9 100%);
    border: 2px solid var(--theme-light);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.demo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(60, 179, 113, 0.2);
}

.demo-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.demo-item h4 {
    font-size: 18px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.demo-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Footer Styles */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.footer-column h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: white;
}

.footer-column p {
    font-size: 13px;
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    line-height: 2;
    color: #bdc3c7;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
}

.footer-bottom p {
    margin: 0;
}

/* 공통 페이지 헤더 스타일 (AI 권리분석 스타일 통일) */
.page-header {
    text-align: center;
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 1.8rem;
    color: #2d5016;
    margin-bottom: 8px;
    font-weight: bold;
}

.page-header p {
    color: #666;
    font-size: 0.95rem;
    word-break: keep-all;
}

@media (max-width: 768px) {
    .page-header {
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    .page-header p {
        font-size: 0.9rem;
    }
}

.footer-links {
    margin-top: 5px;
}

.footer-links a {
    color: #95a5a6;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .site-footer {
        padding: 20px 0;
    }
}

/* Community Board Styles */
.board-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-item {
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-item:hover {
    color: #333;
    background: #f8f9fa;
}

.tab-item.active {
    color: var(--theme-dark);
    border-bottom-color: var(--theme-dark);
}

.search-form {
    margin-bottom: 20px;
    text-align: right;
}

.search-form form {
    display: inline-flex;
    gap: 10px;
}

.search-form select,
.search-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-form select {
    width: 120px;
}

.search-form input[type="text"] {
    width: 250px;
}

.btn-search {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-search:hover {
    opacity: 0.9;
}

.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

.board-table th,
.board-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.board-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.board-table td.title {
    text-align: left;
}

.board-table td.title a {
    color: #333;
    text-decoration: none;
}

.board-table td.title a:hover {
    text-decoration: underline;
    color: var(--theme-dark);
}

.board-table td.no-data {
    padding: 40px;
    color: #999;
}

.secret-icon {
    font-size: 14px;
    margin-right: 5px;
    color: #6c757d;
}

.comment-count {
    color: var(--theme-dark);
    font-size: 0.9em;
    margin-left: 5px;
}

.board-actions {
    text-align: right;
    margin-top: 20px;
}

.btn-write {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.btn-write:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .board-tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }
    
    .tab-item {
        border-bottom: 1px solid #ddd;
        border-radius: 0;
    }
    
    .tab-item.active {
        background: var(--theme-light);
        color: white;
        border-bottom-color: var(--theme-dark);
    }
    
    .search-form {
        text-align: left;
    }
    
    .search-form form {
        flex-direction: column;
        width: 100%;
    }
    
    .search-form select,
    .search-form input[type="text"],
    .btn-search {
        width: 100%;
    }
    
    .board-table {
        display: block;
        overflow-x: auto;
    }
    
    .board-table thead {
        display: none;
    }
    
    .board-table tbody {
        display: block;
    }
    
    .board-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }
    
    .board-table td {
        display: block;
        text-align: left !important;
        padding: 8px 0;
        border: none;
    }
    
    .board-table td:first-child {
        font-size: 13px;
        color: #999;
        padding-bottom: 5px;
    }
    
    .board-table td:first-child:before {
        content: '번호: ';
        font-weight: bold;
        color: #666;
    }
    
    .board-table td.title {
        font-size: 16px;
        font-weight: 600;
        padding-top: 0;
        padding-bottom: 15px;
    }
    
    .board-table td.author:before {
        content: '작성자: ';
        font-weight: bold;
        color: #666;
        margin-right: 5px;
    }
    
    .board-table td.views:before {
        content: '조회: ';
        font-weight: bold;
        color: #666;
        margin-right: 5px;
    }
    
    .board-table td.date:before {
        content: '날짜: ';
        font-weight: bold;
        color: #666;
        margin-right: 5px;
    }
    
    .board-table td.no-data {
        text-align: center !important;
    }
    
    .board-table td.no-data:before {
        content: '';
    }
}

/* Index Page Styles */
.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-guide {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-guide:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .welcome-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .welcome-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .welcome-icon {
        font-size: 36px;
    }
    
    .welcome-text h1 {
        font-size: 20px;
    }
    
    .welcome-subtitle {
        font-size: 13px;
    }
    
    .btn-guide {
        width: 100%;
        text-align: center;
    }
    
    .recent-grid {
        grid-template-columns: 1fr !important;
    }
    
    .notice-item {
        padding: 12px;
    }
}

/* Map Modal (Layer Popup) Styles */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

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

.map-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.map-modal-content {
    position: relative;
    width: 90%;
    height: 85%;
    max-width: 1400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.map-modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.map-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.map-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.map-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .map-modal-content {
        width: 95%;
        height: 90%;
    }
    
    .map-modal-header {
        padding: 15px 20px;
    }
    
    .map-modal-header h2 {
        font-size: 18px;
    }
}


@media (max-width: 768px) {
    .container > h1,
    .page-header {
        font-size: 22px !important;
        margin-bottom: 20px;
    }
}

/* Mypage Styles */
.dashboard-welcome {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.welcome-icon {
    font-size: 48px;
}

.welcome-text h1 {
    font-size: 28px;
    color: var(--theme-dark);
    margin-bottom: 5px;
}

.welcome-subtitle {
    font-size: 16px;
    color: #666;
}

.membership-status {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.mypage-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.mypage-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    font-weight: 600;
}

.mypage-tab:hover {
    border-color: var(--theme-light);
    background: var(--theme-bg);
    transform: translateY(-2px);
}

.mypage-tab.active {
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    border-color: var(--theme-dark);
    color: white;
}

.tab-icon {
    font-size: 32px;
}

.list-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.search-section {
    margin-bottom: 25px;
}

.search-input-group {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}

.btn-search, .btn-reset {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-search {
    background: linear-gradient(135deg, var(--theme-dark) 0%, var(--theme-light) 100%);
    color: white;
    border: none;
    cursor: pointer;
}

.btn-reset {
    background: #e0e0e0;
    color: #666;
}

.list-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.list-card-header h3 {
    font-size: 20px;
    color: var(--theme-dark);
    margin-bottom: 20px;
}

.list-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.item-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--theme-light);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-dark);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.item-title:hover {
    color: var(--theme-light);
}

.item-date {
    font-size: 13px;
    color: #999;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-view, .btn-delete {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view {
    background: var(--theme-light);
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.page-btn, .page-num {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #666;
    background: white;
    border: 1px solid #e0e0e0;
    transition: all 0.3s;
}

.page-num.active {
    background: var(--theme-light);
    color: white;
    border-color: var(--theme-light);
}

.page-btn:hover, .page-num:hover {
    border-color: var(--theme-light);
    color: var(--theme-light);
}

.settings-section {
    max-width: 800px;
    margin: 0 auto;
}

.settings-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.settings-card-header h2 {
    font-size: 24px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.settings-card-header p {
    color: #666;
    margin-bottom: 20px;
}

/* Mobile Styles for Mypage */
@media (max-width: 768px) {
    .dashboard-welcome {
        padding: 20px 15px;
    }
    
    .welcome-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .welcome-icon {
        font-size: 36px;
    }
    
    .welcome-text h1 {
        font-size: 22px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
    }
    
    .membership-status {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .status-badge {
        width: 100%;
        justify-content: center;
    }
    
    .usage-status {
        width: auto;
        justify-content: flex-start;
        min-width: 0 !important;
        flex: initial !important;
        padding: 0 !important;
    }
    
    .mypage-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .mypage-tab {
        padding: 15px 10px;
        gap: 8px;
    }
    
    .mypage-tab span:not(.tab-icon) {
        font-size: 13px;
    }
    
    .tab-icon {
        font-size: 24px;
    }
    
    .list-section {
        padding: 15px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .btn-search, .btn-reset {
        width: 100%;
        justify-content: center;
    }
    
    .list-card {
        padding: 15px;
    }
    
    .list-card-header h3 {
        font-size: 15px;
    }
    
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 12px;
    }
    
    .item-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .item-content {
        width: 100%;
    }
    
    .item-title {
        font-size: 15px;
    }
    
    .item-date {
        font-size: 12px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .btn-view, .btn-delete {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-btn, .page-num {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .settings-card {
        padding: 20px 15px;
    }
    
    .settings-card-header h2 {
        font-size: 20px;
    }
    
    .settings-card-header p {
        font-size: 14px;
    }
}

/* Login/Register Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--theme-dark);
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 15px;
}

.error-message, .success-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.5;
}

.error-message {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.success-message {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--theme-dark);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fafafa;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--theme-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.divider {
    text-align: center;
    margin: 25px 0;
    color: #999;
    font-size: 14px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.links {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.links a {
    color: var(--theme-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.links a:hover {
    color: var(--theme-light);
}

/* Email Check Messages */
.email-check-msg {
    margin-top: 8px;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.email-check-msg.checking {
    color: #666;
    background: #f5f5f5;
}

.email-check-msg.available {
    color: #2ecc71;
    background: #eafaf1;
    font-weight: 600;
}

.email-check-msg.unavailable {
    color: #e74c3c;
    background: #fadbd8;
    font-weight: 600;
}

@media (max-width: 480px) {
    .login-container {
        padding: 35px 25px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}

/* Mobile Header Sticky Fix (Overrides previous rules) */
@media (max-width: 992px) {
    .header {
        position: sticky !important;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2001 !important;
    }
    
    .nav {
        z-index: 2000 !important;
    }
    
    .mobile-overlay {
        z-index: 1999 !important;
    }
}


