/* ========================================
   Modern Professional Design System
======================================== */

:root {
    /* 컬러 시스템 */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #06B6D4;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* 뉴트럴 컬러 */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* 레이아웃 */
    --sidebar-width: 260px;
    --header-height: 80px;
    --border-radius: 12px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* 트랜지션 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   사이드바
======================================== */

.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--gray-200);
}

.logo i {
    font-size: 28px;
}

.nav-menu {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-700);
    font-weight: 500;
}

.user-info i {
    font-size: 32px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: capitalize;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.logout-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.logout-btn i {
    font-size: 16px;
}

.menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 0;
}

/* ========================================
   메인 컨텐츠
======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    width: calc(100% - var(--sidebar-width));
    max-width: 100%;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 20px;
}

.header-left {
    flex: 1;
    min-width: 0;
}

.header-left h1 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
    word-break: keep-all;
}

.subtitle {
    color: var(--gray-700);
    font-size: clamp(12px, 2vw, 14px);
}

.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================
   버튼
======================================== */

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background: #0891B2;
    border-color: #0891B2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 10px 20px;
    font-size: 14px;
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-icon {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    padding: 10px;
    font-size: 16px;
    position: relative;
}

.btn-icon:hover {
    background: var(--gray-50);
}

.btn-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

.btn-back {
    background: transparent;
    color: var(--gray-600);
    padding: 8px 16px;
    font-size: 14px;
}

.btn-back:hover {
    color: var(--primary);
}

/* ========================================
   대시보드 카드
======================================== */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--gray-300);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary);
    font-size: 20px;
}

.card-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.card-header-with-button h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-with-button i {
    color: var(--primary);
}

.stat-card {
    display: flex;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-icon.blue { background: var(--info); }
.card-icon.green { background: var(--success); }
.card-icon.orange { background: var(--warning); }
.card-icon.purple { background: var(--primary); }

.card-content {
    flex: 1;
    min-width: 0;
}

.card-content h3 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 6px;
    word-break: break-word;
    letter-spacing: -0.5px;
}

.card-content p {
    color: var(--gray-600);
    font-size: clamp(13px, 2vw, 15px);
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ========================================
   필터 섹션
======================================== */

.filter-section {
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
}

.filter-controls {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

/* 세금계산서 필터 레이아웃 */
.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.filter-group select,
.filter-group input {
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: var(--transition);
}

.filter-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: var(--gray-300);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.filter-group input[type="date"] {
    cursor: pointer;
}

.filter-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.filter-group input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.filter-group button {
    margin-top: auto;
}

.search-box {
    position: relative;
    flex: 1 1 250px;
    min-width: 200px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    background: white;
}

.search-box input:hover {
    border-color: var(--gray-300);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.filter-select {
    padding: 10px 16px;
    padding-right: 40px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.filter-select:hover {
    border-color: var(--gray-300);
    background-color: var(--gray-50);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* ========================================
   테이블
======================================== */

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -24px;
    padding: 0 24px;
}

.data-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(to bottom, #F9FAFB, #F3F4F6);
    border-bottom: 2px solid var(--gray-300);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--gray-200);
    white-space: nowrap;
    vertical-align: middle;
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-800);
    vertical-align: middle;
}

.data-table td:last-child {
    border-right: none;
}

.data-table tbody tr {
    transition: var(--transition);
    background: white;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
    box-shadow: inset 0 0 0 1px var(--gray-200);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FDE68A;
}

.status-badge.completed {
    background: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}

.status-badge.rejected {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 6px;
}

.btn-action:hover {
    background: var(--gray-200);
}

.btn-action.primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-action.danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* ========================================
   Empty State
======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* ========================================
   페이지네이션
======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 16px;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    font-size: 14px;
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   모달
======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-header h2 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
}

.close-modal {
    background: transparent;
    color: var(--gray-400);
    font-size: 24px;
    padding: 4px;
    flex-shrink: 0;
}

.close-modal:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.detail-section {
    background: var(--gray-50);
    padding: 20px;
    border-radius: var(--border-radius);
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-800);
}

.detail-section h3 i {
    color: var(--primary);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    gap: 12px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
    flex-shrink: 0;
}

.detail-value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.detail-memo {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.detail-image {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.detail-image:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow-lg);
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   등록 폼
======================================== */

.register-container {
    max-width: 1200px;
    margin: 0 auto;
}

.register-header {
    margin-bottom: 32px;
}

.register-header h1 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    margin: 16px 0 8px;
}

/* 2단 레이아웃 */
.register-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.register-left {
    position: sticky;
    top: 24px;
    align-self: start;
}

.register-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-block {
    width: 100%;
    margin-top: 16px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
}

.char-count {
    text-align: right;
    font-size: 0.85em;
    color: var(--gray-500);
    margin-top: 4px;
}

.amount-summary {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 1024px) {
    .register-layout {
        grid-template-columns: 1fr;
    }

    .register-left {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.form-section {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-section.full-width {
    grid-column: 1 / -1;
}

.form-section h3 {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-800);
}

.form-section h3 i {
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label i {
    color: var(--primary);
    font-size: 14px;
}

.required {
    color: var(--danger);
}

/* 모든 입력 필드 기본 스타일 */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    color: var(--gray-900);
}

/* 포커스 상태 */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
}

/* Placeholder 스타일 */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

/* Select 박스 커스텀 */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
    cursor: pointer;
}

.form-group select:hover {
    border-color: var(--gray-300);
    background-color: var(--gray-50);
}

/* Date Input 스타일 */
.form-group input[type="date"] {
    position: relative;
    padding-right: 16px;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    filter: invert(0.5);
}

.form-group input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Number Input */
.form-group input[type="number"] {
    text-align: right;
}

.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

/* Textarea - 크고 명확한 스타일 */
.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 16px 18px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 15px;
    background: #FAFBFC;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group textarea:hover {
    border-color: var(--gray-400);
    background: white;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background: white;
}

.form-group textarea::placeholder {
    color: var(--gray-400);
    line-height: 1.8;
    font-size: 14px;
}

/* Textarea 내 form-group에서만 적용 */
textarea[name="memo"] {
    min-height: 160px;
    font-size: 15px;
    font-weight: 400;
}

/* 세금계산서 메모 */
.card textarea {
    width: 100%;
}

/* Readonly 필드 */
.form-group input:read-only,
.form-group input[readonly] {
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: not-allowed;
    border-color: var(--gray-200);
}

/* Disabled 상태 */
.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================================
   파일 업로드
======================================== */

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.upload-text {
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--gray-500);
}

.preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
}

.remove-preview:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: none;
}

.amount-summary {
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-align: center;
}

.amount-summary p {
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    color: var(--gray-700);
}

.amount-summary span {
    color: var(--primary);
    font-size: clamp(16px, 2.5vw, 20px);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

/* ========================================
   알림 드롭다운
======================================== */

.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-dropdown.active {
    display: block;
    animation: dropdownSlideIn 0.2s ease-out;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.notification-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mark-all-read:hover {
    background-color: var(--primary-light);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    gap: 12px;
}

.notification-item:hover {
    background-color: var(--gray-50);
}

.notification-item.unread {
    background-color: #f0f7ff;
}

.notification-item.unread:hover {
    background-color: #e6f2ff;
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.notification-icon.success {
    background-color: #d1fae5;
    color: var(--success);
}

.notification-icon.error {
    background-color: #fee2e2;
    color: var(--danger);
}

.notification-icon.warning {
    background-color: #fef3c7;
    color: var(--warning);
}

.notification-icon.info {
    background-color: #dbeafe;
    color: var(--info);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.empty-notifications {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-notifications i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-notifications p {
    font-size: 14px;
    margin: 0;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   토스트 알림 시스템
======================================== */

.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
    max-width: 90vw;
    min-width: 280px;
}

.notification.fade-out {
    animation: slideOut 0.3s ease-out;
}

.notification i {
    font-size: 20px;
    flex-shrink: 0;
}

.notification span {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-success i {
    color: var(--success);
}

.notification-error {
    border-left: 4px solid var(--danger);
}

.notification-error i {
    color: var(--danger);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

.notification-warning i {
    color: var(--warning);
}

.notification-info {
    border-left: 4px solid var(--info);
}

.notification-info i {
    color: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ========================================
   로딩
======================================== */

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

button.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ========================================
   리포트 페이지 스타일
======================================== */

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 24px;
    margin-top: 24px;
}

.chart-card {
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.chart-card canvas {
    flex: 1;
    max-height: 400px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.chart-header h3 {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-800);
}

.chart-header h3 i {
    color: var(--primary);
}

.merchant-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.merchant-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
}

.merchant-rank {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.merchant-info {
    flex: 1;
    min-width: 0;
}

.merchant-name {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 4px;
    word-break: break-word;
}

.merchant-amount {
    font-size: 14px;
    color: var(--gray-600);
}

.merchant-bar {
    grid-column: 2;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.merchant-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.merchant-percent {
    text-align: right;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    flex-shrink: 0;
    min-width: 50px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--info));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ========================================
   반응형 - 태블릿
======================================== */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }

    .main-content {
        padding: 24px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   모바일 터치 타겟 최적화
======================================== */

/* 모든 터치 가능한 요소 최소 크기 보장 */
@media (max-width: 768px) {
    button,
    a.nav-item,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-icon,
    .filter-select,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* 아이콘 버튼 터치 영역 */
    .btn-icon {
        width: 44px;
        height: 44px;
        padding: 12px;
    }

    /* 체크박스/라디오 터치 영역 확대 */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    /* 네비게이션 아이템 터치 영역 */
    .nav-item {
        min-height: 48px;
        padding: 14px 16px;
    }

    /* 폼 입력 필드 터치 최적화 */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .search-box input,
    .filter-select {
        min-height: 48px;
        font-size: 16px; /* iOS 줌 방지 */
        padding: 14px 16px;
        border-width: 2px;
        border-radius: 10px;
    }

    /* 텍스트 영역 모바일 최적화 */
    .form-group textarea {
        min-height: 120px;
        resize: vertical;
    }

    /* 선택 박스 터치 영역 */
    .form-group select,
    .filter-select {
        appearance: none;
        background-size: 16px;
        background-position: right 16px center;
        padding-right: 48px;
    }

    /* 검색 박스 모바일 최적화 */
    .search-box {
        width: 100%;
        margin-bottom: 12px;
    }

    .search-box input {
        width: 100%;
        padding-left: 48px;
    }

    .search-box i {
        left: 16px;
        font-size: 18px;
    }

    /* 필터 그룹 모바일 레이아웃 */
    .filter-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
        min-width: 100%;
    }

    .filter-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        font-size: 15px;
    }

    .filter-group button {
        width: 100%;
        min-height: 48px;
    }

    /* 업로드 영역 터치 개선 */
    .upload-area {
        min-height: 120px;
        padding: 24px 16px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .upload-icon {
        font-size: 40px;
    }

    /* 날짜 입력 최적화 */
    input[type="date"],
    input[type="time"] {
        min-height: 48px;
        padding: 12px 16px;
    }

    /* 숫자 입력 최적화 */
    input[type="number"] {
        -moz-appearance: textfield;
    }

    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* 포커스 상태 개선 */
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-width: 2px;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    /* 플레이스홀더 스타일 */
    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: var(--gray-400);
        font-size: 15px;
    }

    /* 폼 액션 버튼 */
    .form-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 16px;
        margin: 0 -16px -16px;
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .form-actions button {
        width: 100%;
        min-height: 52px;
        font-size: 16px;
        margin-bottom: 8px;
    }
}

/* ========================================
   반응형 - 모바일
======================================== */

@media (max-width: 768px) {
    /* 모바일 타이포그래피 최적화 */
    body {
        padding: 0;
        font-size: 16px; /* 모바일 기본 폰트 크기 - iOS 줌 방지 */
        line-height: 1.6;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* 전역 터치 최적화 */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }

    /* 스크롤 최적화 */
    * {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* 안전 영역 지원 (아이폰 노치 대응) */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .main-content {
        padding-top: calc(76px + env(safe-area-inset-top)) !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    /* 카드 간격 최적화 */
    .card {
        margin-bottom: 16px;
    }

    /* 터치 피드백 개선 */
    button:active,
    .btn-primary:active,
    .btn-secondary:active,
    .btn-outline:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* 링크 터치 피드백 */
    a:active {
        opacity: 0.7;
    }

    /* 제목 크기 최적화 */
    h1 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    h2 {
        font-size: 20px !important;
        line-height: 1.4;
    }

    h3 {
        font-size: 18px !important;
        line-height: 1.4;
    }

    /* 본문 가독성 개선 */
    p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    /* 작은 텍스트도 읽기 쉽게 */
    small,
    .small-text {
        font-size: 14px;
        line-height: 1.5;
    }

    /* 라벨 및 폼 텍스트 */
    label {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    /* 카드 내 제목 */
    .card-title {
        font-size: 18px;
    }

    /* 상태 뱃지 가독성 */
    .status-badge {
        font-size: 13px;
        padding: 6px 12px;
        min-height: 32px;
    }

    /* 버튼 텍스트 */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        font-size: 15px;
        font-weight: 600;
    }

    /* 테이블 데이터 가독성 */
    .data-table td {
        font-size: 15px;
        line-height: 1.5;
    }

    /* 메뉴 아이템 텍스트 */
    .nav-item {
        font-size: 16px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 80vw;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .header-right {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stat-card {
        padding: 20px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .filter-controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
        flex: none;
    }

    .filter-select {
        width: 100%;
    }

    .table-container {
        margin: 0 -16px;
        padding: 0 16px;
    }

    /* 모바일 테이블을 카드형으로 변경 */
    .data-table {
        border: 0;
        min-width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: block;
    }

    .data-table tr {
        display: block;
        margin-bottom: 16px;
        background: white;
        border: 1px solid var(--gray-200);
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .data-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
        font-size: 14px;
        min-height: 44px;
    }

    .data-table td:last-child {
        border-bottom: none;
    }

    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        flex-shrink: 0;
        width: 40%;
        font-size: 13px;
    }

    .data-table td:first-child {
        padding-top: 0;
    }

    /* 액션 버튼 모바일 최적화 */
    .action-buttons {
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-end;
    }

    .btn-action {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .notification {
        left: 12px;
        right: 12px;
        min-width: auto;
        max-width: none;
        padding: 12px 16px;
    }

    .notification i {
        font-size: 18px;
    }

    .notification span {
        font-size: 13px;
    }

    /* 모바일 모달 - 하단 시트 스타일 */
    .modal {
        padding: 0;
        align-items: flex-end;
        backdrop-filter: blur(4px);
    }

    .modal-content {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        width: 100%;
        animation: slideUp 0.3s ease-out;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .modal-header {
        padding: 20px;
        position: relative;
        border-bottom: 2px solid var(--gray-200);
    }

    /* 모달 드래그 핸들 */
    .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--gray-300);
        border-radius: 2px;
    }

    .modal-header h2 {
        margin-top: 12px;
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
        overflow-y: auto;
        max-height: calc(90vh - 80px);
        -webkit-overflow-scrolling: touch;
    }

    .close-modal {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gray-100);
        border-radius: 50%;
        font-size: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-images {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .register-header h1 {
        font-size: 24px;
    }

    .form-section {
        padding: 20px;
    }

    .upload-area {
        padding: 32px 20px;
    }

    .upload-icon {
        font-size: 40px;
    }

    .preview-area {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }

    .btn-primary,
    .btn-outline,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 15px;
    }

    .report-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-card {
        min-height: 300px;
    }

    .merchant-item {
        grid-template-columns: 35px 1fr 45px;
        gap: 10px;
    }

    .merchant-rank {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .merchant-name {
        font-size: 14px;
    }

    .merchant-amount {
        font-size: 13px;
    }

    .merchant-percent {
        font-size: 13px;
        min-width: 45px;
    }

    .pagination {
        gap: 6px;
    }

    .pagination button {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 36px;
    }
}

/* ========================================
   반응형 - 작은 모바일
======================================== */

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .card-content h3 {
        font-size: 20px;
    }

    .card-content p {
        font-size: 12px;
    }

    .form-section {
        padding: 16px;
    }

    .upload-area {
        padding: 24px 16px;
    }

    .upload-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }

    /* 차트 모바일 최적화 */
    .chart-card {
        min-height: 280px;
        padding: 16px;
    }

    .chart-card canvas {
        max-height: 250px !important;
        height: 250px !important;
    }

    .chart-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .chart-header h3 {
        font-size: 16px;
    }

    /* 리포트 그리드 모바일 */
    .report-grid {
        gap: 16px;
    }

    /* 머천트 리스트 최적화 */
    .merchant-list {
        gap: 12px;
    }

    .merchant-item {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }

    .merchant-bar {
        grid-column: 1 / -1;
        margin-top: 8px;
    }

    .merchant-item {
        grid-template-columns: 32px 1fr 40px;
        gap: 8px;
    }

    .merchant-rank {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .btn-primary,
    .btn-outline,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ========================================
   프린트 스타일
======================================== */

@media print {
    .sidebar,
    .header-right,
    .filter-section,
    .action-buttons,
    .pagination,
    .notification {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
        page-break-inside: avoid;
    }

    body {
        background: white;
    }
}

/* ========================================
   경비 수정 모드 스타일
======================================== */

.detail-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.detail-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.detail-input[type="number"] {
    text-align: right;
}

/* 모달 버튼 스타일 */
.btn-modal {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-modal.primary {
    background: var(--primary);
    color: white;
}

.btn-modal.primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-modal.success {
    background: #10b981;
    color: white;
}

.btn-modal.success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-modal.secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-modal.secondary:hover {
    background: var(--gray-300);
    transform: translateY(-2px);
}

.btn-modal:active {
    transform: translateY(0);
}