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

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #1e293b;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: width 0.25s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav .nav-item.active {
    background-color: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    color: white;
}

.sidebar-nav .nav-item i {
    font-size: 1.2rem;
    width: 24px;
}

/* 데스크톱 사이드바 토글 버튼 */
.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    transition: color 0.3s;
}

.sidebar-toggle-btn:hover {
    color: white;
}

/* 데스크톱 전용: 사이드바 접기/펼치기 (≥1025px) */
@media (min-width: 1025px) {
    .sidebar-toggle-btn {
        display: block;
    }
    
    /* 접힌 상태 */
    .sidebar.collapsed {
        width: 80px;
    }
    
    .sidebar.collapsed .sidebar-header h1,
    .sidebar.collapsed .sidebar-subtitle {
        opacity: 0;
        transition: opacity 0.15s ease;
    }
    
    .sidebar.collapsed .sidebar-nav .nav-item span {
        opacity: 0;
        transform: translateX(-10px);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }
    
    .sidebar.collapsed .sidebar-nav .nav-item {
        justify-content: center;
        padding: 1rem;
    }
    
    .sidebar.collapsed .sidebar-toggle-btn {
        margin: 0;
    }
    
    /* 호버 시 자동 펼치기 */
    .sidebar.collapsed:hover {
        width: 260px;
    }
    
    .sidebar.collapsed:hover .sidebar-header h1,
    .sidebar.collapsed:hover .sidebar-subtitle {
        opacity: 1;
        transition: opacity 0.2s ease 0.1s;
    }
    
    .sidebar.collapsed:hover .nav-item span {
        opacity: 1;
        transform: translateX(0);
        transition: opacity 0.2s ease 0.1s, transform 0.2s ease 0.1s;
    }
    
    .sidebar.collapsed:hover .nav-item {
        justify-content: flex-start;
        padding: 1rem 1.5rem;
    }
    
    .sidebar.collapsed:hover .sidebar-toggle-btn {
        margin-left: auto;
    }
    
    /* 호버 시 메인 콘텐츠도 함께 밀기 */
    .sidebar.collapsed:hover ~ .main-content {
        margin-left: 260px;
    }
    
    /* 메인 콘텐츠 조정 */
    .main-content.collapsed {
        margin-left: 80px;
    }
}

.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.top-header {
    background-color: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left h2 {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.help-icon-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-icon-btn:hover {
    color: #3b82f6;
    transform: scale(1.1);
}

.header-center {
    display: flex;
    justify-content: center;
}

.btn-create-quote-main {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    min-height: 44px;
}

.btn-create-quote-main:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-create-quote-main i {
    font-size: 1.2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.icon-btn {
    background-color: #f1f5f9;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #64748b;
}

.icon-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.username {
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
}

.page-content {
    flex: 1;
    padding: 2rem;
    background-color: #f8fafc;
}

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

main {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 500px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #0056b3;
}

.page-header h2 {
    color: #0056b3;
    font-size: 1.8rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #0056b3;
    color: white;
}

.btn-primary:hover {
    background-color: #004494;
}

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

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

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

.btn-danger:hover {
    background-color: #c82333;
}

.btn-default {
    background-color: #e9ecef;
    color: #333;
}

.btn-default:hover {
    background-color: #d3d6d9;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.settings-section,
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.settings-section h3,
.form-section h3 {
    color: #0056b3;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

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

.form-group label {
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0056b3;
}

.form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.preview-img {
    max-width: 100px;
    max-height: 100px;
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.items-table,
.quote-items-table,
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.items-table th,
.items-table td,
.quote-items-table th,
.quote-items-table td,
.stats-table th,
.stats-table td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.items-table th,
.quote-items-table th,
.stats-table th {
    background-color: #333;
    color: white;
    font-weight: 500;
}

.items-table tbody tr:hover,
.stats-table tbody tr:hover {
    background-color: #f5f5f5;
}

.quotes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.quotes-table th,
.quotes-table td {
    padding: 1.1rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.quotes-table th {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    padding: 1.2rem 1rem;
    border-bottom: 2px solid #3b82f6;
}

.quotes-table tbody tr {
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.quotes-table tbody tr:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: inset 3px 0 0 #3b82f6;
}

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

.items-table input {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.summary-item.total {
    font-weight: bold;
    font-size: 1.2rem;
    color: #0056b3;
    border-bottom: 2px solid #0056b3;
}

.info-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 4px;
}

.info-display p {
    margin: 0.3rem 0;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.filter-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 4px;
}

.filter-form input,
.filter-form select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.filter-grid-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-item-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-item-inline label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.date-range-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range-inline span {
    color: #666;
    font-weight: 500;
}

.date-range-inline input {
    margin: 0;
}

.action-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
}

.dropdown-menu a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
}

/* ===== Kebab Menu Styles ===== */
.action-cell {
    position: relative;
}

.kebab-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: #64748b;
    border-radius: 4px;
    transition: all 0.2s;
}

.kebab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.kebab-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 0.25rem;
    overflow: hidden;
}

.kebab-menu.show-above {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.kebab-menu.active {
    display: block;
}

.kebab-menu a {
    color: #1e293b;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.kebab-menu a:last-child {
    border-bottom: none;
}

.kebab-menu a:hover {
    background: #f8fafc;
    color: #3b82f6;
}

.kebab-menu a.danger {
    color: #dc2626;
}

.kebab-menu a.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.kebab-menu hr {
    margin: 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.text-danger {
    color: #dc3545;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #0056b3, #007bff);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.chart-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container h3 {
    color: #0056b3;
    margin-bottom: 1rem;
}

.table-section {
    margin-top: 2rem;
}

.quote-document {
    background: white;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.doc-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.company-logo {
    max-width: 150px;
    margin-bottom: 1rem;
}

.doc-header h1 {
    font-size: 2rem;
    color: #0056b3;
    margin: 1rem 0;
}

.doc-info {
    text-align: right;
    margin-bottom: 1rem;
}

.recipient-section,
.supplier-section,
.items-section,
.summary-section,
.remarks-section,
.terms-section {
    margin-bottom: 2rem;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.info-table th {
    background-color: #f0f0f0;
    padding: 0.8rem;
    text-align: left;
    width: 150px;
    border: 1px solid #ddd;
}

.info-table td {
    padding: 0.8rem;
    border: 1px solid #ddd;
}

.summary-table {
    width: 50%;
    margin-left: auto;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    border: 1px solid #ddd;
    padding: 0.8rem;
}

.summary-table th {
    background-color: #f0f0f0;
    width: 150px;
}

.total-row {
    font-weight: bold;
    background-color: #e0e0e0;
}

.terms-section pre {
    background: #f9f9f9;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    white-space: pre-wrap;
}

.signature-section {
    margin-top: 3rem;
    text-align: right;
}

.seal {
    display: inline-block;
    margin-bottom: 1rem;
}

.seal img {
    max-width: 80px;
}

.receipt-document .amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0056b3;
}

.receipt-note {
    text-align: center;
    margin: 2rem 0;
    font-size: 1.2rem;
    font-weight: bold;
}

@media print {
    .navbar,
    .page-header,
    .action-buttons {
        display: none;
    }
    
    main {
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* ===== 수신자별 통계 섹션 ===== */
.stats-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-header {
    margin-bottom: 1.5rem;
}

.stats-header h3 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-header h3 i {
    color: #3b82f6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
}

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

.stat-recipient {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.stat-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.stat-value.primary {
    color: #3b82f6;
}

.stat-value.success {
    color: #10b981;
}

/* ===== 필터 토글 버튼 ===== */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s;
    align-items: center;
    justify-content: space-between;
}

.filter-toggle-btn:hover {
    background: #2563eb;
}

.filter-toggle-btn i:last-child {
    transition: transform 0.3s;
}

.advanced-filter-form {
    transition: max-height 0.3s ease-out, opacity 0.3s;
}

/* ===== 모바일 반응형 디자인 ===== */

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e293b;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .hamburger-btn {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-section {
        grid-template-columns: 1fr;
    }
    
    /* 헤더를 2줄로 배치 - grid에서 flex로 변경 */
    .top-header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
        order: 1;
    }
    
    .header-left h2 {
        font-size: 1.3rem;
    }
    
    .header-right {
        flex: 0 0 auto;
        order: 2;
    }
    
    .header-center {
        flex: 1 0 100%;
        order: 3;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .btn-create-quote-main {
        width: auto;
        max-width: 280px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .user-info {
        padding: 0.4rem 0.8rem;
    }
    
    .username {
        display: none;
    }
}

@media (max-width: 768px) {
    /* 통계 섹션 모바일 최적화 */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        padding: 1rem;
    }
    
    .stats-header h3 {
        font-size: 1rem;
    }
    
    /* 필터 토글 버튼 표시 */
    .filter-toggle-btn {
        display: flex;
    }
    
    .advanced-filter-form {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
    }
    
    .advanced-filter-form.active {
        max-height: 2000px;
        opacity: 1;
    }
    
    /* 필터 섹션 모바일 최적화 */
    .filter-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .date-range {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .date-range span {
        display: none;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* 테이블 -> 카드 뷰 변환 */
    .table-container {
        overflow-x: visible;
    }
    
    .quotes-table {
        display: block;
    }
    
    .quotes-table thead {
        display: none;
    }
    
    .quotes-table tbody {
        display: block;
    }
    
    .quotes-table tr.quote-row {
        display: block;
        position: relative;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .quotes-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left !important;
    }
    
    .quotes-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        display: inline-block;
        width: 90px;
        font-size: 0.85rem;
    }
    
    .quotes-table td:first-child {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .quotes-table td:first-child:before {
        display: none;
    }
    
    .quotes-table .row-checkbox {
        width: 44px;
        height: 44px;
        cursor: pointer;
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .quotes-table .action-cell {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .quotes-table .action-cell:before {
        display: none;
    }
    
    .quotes-table .doc-number {
        font-size: 1.1rem;
        font-weight: 700;
        color: #1e293b;
        padding-top: 2.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .quotes-table .doc-number:before {
        display: none;
    }
    
    .quotes-table .confirm-cell,
    .quotes-table .payment-cell,
    .quotes-table .version-cell {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .quotes-table .confirm-cell .btn-confirm,
    .quotes-table .version-cell .version-btn,
    .quotes-table .payment-cell .payment-status {
        min-height: 44px;
        padding: 0.7rem 1.2rem;
    }
    
    .quotes-table .action-cell .kebab-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .quotes-table .amount {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f172a;
    }
    
    /* 모달 모바일 최적화 */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .kebab-menu {
        right: 0;
        min-width: 200px;
    }
    
    /* 견적서 작성 페이지 모바일 최적화 */
    .items-table {
        display: block;
    }
    
    .items-table thead {
        display: none;
    }
    
    .items-table tbody {
        display: block;
    }
    
    .items-table tr {
        display: block;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .items-table td {
        display: flex;
        flex-direction: column;
        padding: 0.75rem 0;
        border: none;
        text-align: left !important;
    }
    
    .items-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .items-table td:last-child {
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
        margin-top: 0.5rem;
    }
    
    .items-table input,
    .items-table select {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 44px;
    }
    
    .items-table .item-total {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f172a;
    }
    
    .btn-add-item {
        width: 100%;
        min-height: 50px;
        font-size: 1rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .btn-remove-item {
        width: 100%;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    /* 견적서 작성 버튼 크기 축소 */
    .btn-create-quote-main {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
        gap: 0.5rem;
        max-width: 220px;
    }
    
    .btn-create-quote-main i {
        font-size: 0.9375rem;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .page-content {
        padding: 0.75rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .tabs-container {
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .quotes-table td:before {
        width: 70px;
        font-size: 0.8rem;
    }
}

/* =====================================
   필터 드로어 스타일
   ===================================== */

.quotes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-open-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.btn-open-filter:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99,102,241,0.3);
}

.btn-open-filter .filter-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

/* 정렬 드롭다운 스타일 */
.sort-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.btn-open-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-open-sort:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16,185,129,0.3);
}

.sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 240px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.sort-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sort-menu a:hover {
    background: #f3f4f6;
}

.sort-menu a i {
    width: 20px;
    color: #10b981;
}

/* 테이블 헤더 정렬 스타일 */
.quotes-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.quotes-table th.sortable:hover {
    background: #f9fafb;
}

.quotes-table th.sortable .sort-icon {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.8em;
    color: #9ca3af;
    transition: color 0.2s;
}

.quotes-table th.sortable:hover .sort-icon {
    color: #6b7280;
}

.quotes-table th.sortable .sort-icon .active {
    color: #10b981;
}

.filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}

.filter-drawer.active {
    pointer-events: all;
}

.filter-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0);
    transition: background 0.3s ease-in-out;
}

.filter-drawer.active .filter-drawer-overlay {
    background: rgba(0,0,0,0.5);
}

.filter-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.filter-drawer.active .filter-drawer-content {
    transform: translateX(0);
}

.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.filter-drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-drawer {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-drawer:hover {
    color: #1f2937;
}

.filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.filter-group input[type="text"],
.filter-group input[type="date"],
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.date-range-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-separator {
    text-align: center;
    color: #6b7280;
    font-weight: 500;
    padding: 0.25rem 0;
}

.toggle-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-toggle {
    position: relative;
    cursor: pointer;
}

.chip-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-toggle span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
    background: white;
}

.chip-toggle input:checked + span {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.chip-toggle:hover span {
    border-color: #9ca3af;
}

.chip-toggle input:checked:hover + span {
    background: #5558e3;
    border-color: #5558e3;
}

.filter-drawer-footer {
    flex-shrink: 0;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    gap: 0.75rem;
}

.btn-block {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .filter-drawer-content {
        width: 100%;
        max-width: 100%;
    }
    
    .quotes-toolbar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .quotes-toolbar .toolbar-left,
    .quotes-toolbar .toolbar-right {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .quotes-toolbar .btn-open-filter {
        width: auto !important;
        max-width: 200px;
        flex: 0 0 auto;
    }
    
    .quotes-toolbar .btn {
        width: auto !important;
        max-width: 240px !important;
        flex: 0 0 auto !important;
        min-width: 160px;
    }
    
    .quotes-toolbar .bulk-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        width: 100%;
    }
    
    .bulk-actions .btn {
        width: auto !important;
        max-width: 240px !important;
    }
    
    .selected-count {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* =====================================
   대시보드 필터 팝오버 스타일
   ===================================== */

.dashboard-toolbar {
    margin-bottom: 1.5rem;
    position: relative;
}

.btn-open-filter-popover {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-open-filter-popover:hover {
    background: #5558e3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99,102,241,0.3);
}

.btn-open-filter-popover .filter-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.filter-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.filter-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-popover-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    width: 320px;
    max-width: 90vw;
}

.filter-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-popover-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-popover {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-popover:hover {
    color: #1f2937;
}

.filter-popover-form {
    padding: 1.25rem;
}

.filter-popover-form .filter-group {
    margin-bottom: 1rem;
}

.filter-popover-form .filter-group:last-of-type {
    margin-bottom: 1.25rem;
}

.filter-popover-form .filter-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-popover-form input[type="date"],
.filter-popover-form select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.filter-popover-form input:focus,
.filter-popover-form select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.filter-popover-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.filter-popover-actions .btn-block {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    text-decoration: none;
}

.filter-popover-actions .btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .filter-popover-content {
        width: 100%;
        max-width: calc(100vw - 2rem);
    }
    
    .btn-open-filter-popover {
        width: 100%;
        justify-content: center;
    }
}

/* 거래처 관리 정렬 링크 */
.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: color 0.2s;
}

.sort-link:hover {
    color: #3b82f6;
}

.sort-link i {
    font-size: 0.85rem;
    color: #3b82f6;
}

/* ===== 거래처 관리 테이블 ===== */
.recipients-table-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.recipients-table {
    width: 100%;
    min-width: 1250px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.recipients-table thead {
    background: #1e293b;
}

.recipients-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #1e293b;
    color: white;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    text-align: left;
    border: 1px solid #334155;
    white-space: nowrap;
}

.recipients-table td {
    padding: 0.75rem 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.recipients-table tbody tr {
    transition: background-color 0.15s;
}

.recipients-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.recipients-table tbody tr:hover {
    background-color: #e0f2fe;
}

/* 컬럼별 너비 및 정렬 */
.recipients-table .col-number {
    width: 45px;
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    color: #64748b;
}

.recipients-table .col-name {
    width: 160px;
    min-width: 160px;
    max-width: 180px;
    font-weight: 600;
}

.recipients-table .col-type {
    width: 90px;
    min-width: 90px;
    text-align: center;
}

.recipients-table .col-contact {
    width: 70px;
    min-width: 70px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipients-table .col-phone {
    width: 95px;
    min-width: 95px;
}

.recipients-table .col-email {
    width: 100px;
    min-width: 100px;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipients-table .col-license {
    width: 60px;
    min-width: 60px;
    text-align: center;
}

.recipients-table .col-count {
    width: 75px;
    min-width: 75px;
    text-align: right;
    font-weight: 600;
    color: #3b82f6;
}

.recipients-table .col-amount {
    width: 100px;
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #059669;
}

.recipients-table .col-actions {
    width: 110px;
    min-width: 110px;
    text-align: center;
    background: #ffffff;
    position: sticky;
    right: 0;
    z-index: 20;
    box-shadow: -3px 0 8px rgba(0,0,0,0.15);
    border-left: 2px solid #cbd5e1;
}

.recipients-table th.col-actions {
    z-index: 25;
    background: #1e293b;
    border-left: 2px solid #475569;
}

.recipients-table .col-actions .action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
}

/* 관리 버튼 스타일 */
.recipients-table .btn-icon {
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748b;
    font-size: 0.9rem;
}

.recipients-table .btn-icon:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.recipients-table .btn-icon.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* 총합계 행 스타일 */
.recipients-table tfoot .totals-row {
    background: #f1f5f9;
    font-weight: 700;
}

.recipients-table tfoot .totals-row td {
    border-top: 2px solid #94a3b8;
    padding: 1rem 0.5rem;
}

/* 스크롤 힌트 */
.recipients-table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
}

/* 정렬 링크 개선 */
.recipients-table .sort-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    transition: color 0.2s;
}

.recipients-table .sort-link:hover {
    color: #60a5fa;
}

.recipients-table .sort-link i {
    font-size: 0.75rem;
    color: #60a5fa;
}

/* 뱃지 스타일 개선 */
.recipients-table .badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.recipients-table .badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.recipients-table .badge-success {
    background: #d1fae5;
    color: #065f46;
}

.recipients-table .badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* 파일 링크 스타일 */
.recipients-table .file-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.recipients-table .file-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Empty 메시지 */
.recipients-table .empty-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: 1rem;
}

/* ============================================
   버전 히스토리 타임라인
   ============================================ */

.version-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.version-card {
    display: flex;
    gap: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.version-timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 32px;
    flex-shrink: 0;
}

.version-marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
    flex-shrink: 0;
    z-index: 2;
    transition: all 0.3s ease;
}

.version-card.latest .version-marker-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 8px rgba(59, 130, 246, 0.5);
}

.version-card.finalized .version-marker-dot {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}

.version-marker-line {
    width: 2px;
    flex-grow: 1;
    background: linear-gradient(to bottom, #cbd5e1, #e2e8f0);
    margin-top: 4px;
}

.version-card-content {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.version-card-content:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.version-card.latest .version-card-content {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
}

.version-card.finalized .version-card-content {
    border-color: #10b981;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.version-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.version-title i.fa-file-invoice {
    color: #64748b;
    font-size: 1.1rem;
}

.version-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.latest-badge {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.latest-badge i {
    font-size: 0.7rem;
}

.final-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.final-badge i {
    font-size: 0.7rem;
}

.version-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.9rem;
}

.version-date i {
    font-size: 0.85rem;
}

.version-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.version-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.version-info-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.version-info-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.version-info-value.discount {
    color: #dc2626;
}

.amount-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

.amount-change.increase {
    background: #fef3c7;
    color: #92400e;
}

.amount-change.decrease {
    background: #dbeafe;
    color: #1e40af;
}

.version-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-version-view {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-version-view:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-version-view i {
    font-size: 0.85rem;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .version-card-content {
        padding: 1rem;
    }
    
    .version-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .version-number {
        font-size: 1.1rem;
    }
    
    .version-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .version-info-label {
        font-size: 0.85rem;
    }
    
    .version-info-value {
        font-size: 0.95rem;
    }
    
    .btn-version-view {
        width: 100%;
        justify-content: center;
    }
}
