:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --secondary: #ffffff;
    --accent: #fca5a5;
    --success: #10b981;
    --danger: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --bg-red-light: #fef2f2;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(220, 38, 38, 0.15);
    --shadow-lg: 0 8px 24px rgba(220, 38, 38, 0.18);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    min-height: 100vh;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    animation: float 20s ease-in-out infinite;
}

.bg-animation::before {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.bg-animation::after {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    bottom: -150px;
    left: -150px;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.1); }
    66% { transform: translate(-40px, 40px) scale(0.9); }
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.hero {
    text-align: center;
    padding: 40px 20px 32px;
    margin-bottom: 36px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #dc2626 0%, white 50%, #dc2626 100%);
}

.couple-names {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.name {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.6s ease-out;
}

.name:first-child {
    animation-delay: 0.1s;
}

.name:last-child {
    animation-delay: 0.3s;
}

.heart {
    font-size: 32px;
    animation: heartbeat 1.8s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tagline {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-red-light) 0%, white 100%);
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

.budget-display {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.currency-label {
    font-size: 16px;
    font-weight: 700;
    color: white;
    opacity: 0.9;
}

.budget-amount {
    font-size: 32px;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
}

.budget-edit {
    margin-bottom: 16px;
}

.input-modern {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.input-group {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
}

.with-prefix {
    padding-left: 44px;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

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

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

.btn-add {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 9px 24px;
    font-weight: 600;
}

.btn-add:hover {
    background: var(--primary);
    color: white;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
}

.summary-item .label {
    color: var(--text-light);
    font-weight: 500;
}

.summary-item .value {
    font-weight: 700;
    font-size: 14px;
}

.summary-total {
    padding: 14px 0;
}

.label-bold {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.value-bold {
    font-size: 22px;
    font-weight: 800;
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.divider-bold {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 12px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.category-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #dc2626 0%, white 50%, #dc2626 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.category-card:hover::before {
    transform: scaleX(1);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.category-title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.check-all-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-custom-small {
    display: none;
}

.checkbox-label-small {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: white;
    display: block;
}

.checkbox-label-small:hover {
    border-color: var(--primary);
}

.checkbox-custom-small:checked + .checkbox-label-small {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
}

.checkbox-custom-small:checked + .checkbox-label-small::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.check-all-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
}

.category-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-edit-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-delete-icon {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-icon:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-sm);
}

.category-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    padding: 10px 0;
}

.all-purchased-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    animation: bounceIn 0.5s ease-out;
    width: fit-content;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.item-list {
    margin-bottom: 10px;
}

.item {
    background: var(--bg-gray);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s ease;
    align-items: center;
}

.item-purchased {
    background: #f0fdf4;
    border-color: #86efac;
    opacity: 0.8;
}

.item:hover {
    background: var(--bg-red-light);
    border-color: var(--accent);
    transform: translateX(3px);
}

.item-purchased:hover {
    background: #dcfce7;
}

.item-checkbox {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.checkbox-custom {
    display: none;
}

.checkbox-label {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: white;
    display: block;
}

.checkbox-label:hover {
    border-color: var(--success);
}

.checkbox-custom:checked + .checkbox-label {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.checkbox-custom:checked + .checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
}

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

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.item-name-purchased {
    text-decoration: line-through;
    opacity: 0.6;
}

.item-link {
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
}

.item-link:hover {
    text-decoration: underline;
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.item-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

.item-price-purchased {
    text-decoration: line-through;
    opacity: 0.6;
}

.item-actions {
    display: flex;
    gap: 4px;
}

.btn-tiny {
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.btn-tiny:hover {
    transform: scale(1.05);
}

.btn-add-item {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-add-item:hover {
    background: var(--bg-red-light);
    border-style: solid;
}

.purchase-summary-section {
    margin-top: 32px;
    margin-bottom: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.purchase-summary-header {
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-red-light);
}

.purchase-summary-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.purchase-summary-header p {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

.purchase-summary-content {
    overflow-x: auto;
}

.empty-summary {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-size: 14px;
    font-style: italic;
}

.excel-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    background: white;
    min-width: 100%;
}

.excel-table thead {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 700;
    color: white;
    border: 1px solid #b91c1c;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.excel-table td {
    padding: 6px 6px;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
    font-size: 10px;
}

.excel-table tbody tr {
    background: white;
    transition: background 0.2s ease;
}

.excel-table tbody tr:hover {
    background: #fef2f2;
}

.excel-number {
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
}

.excel-category {
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
}

.excel-item {
    font-weight: 500;
    color: #1f2937;
}

.excel-price {
    text-align: right;
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}

.excel-subtotal-row {
    background: #fef2f2 !important;
    border-top: 2px solid #dc2626 !important;
}

.excel-subtotal-row:hover {
    background: #fee2e2 !important;
}

.excel-subtotal-label {
    text-align: right;
    font-weight: 700;
    color: #dc2626;
    font-size: 10px;
    padding: 8px 6px !important;
}

.excel-subtotal-value {
    text-align: right;
    font-weight: 800;
    color: #dc2626;
    font-size: 11px;
    white-space: nowrap;
    background: #fee2e2;
}

.excel-table tfoot {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    position: sticky;
    bottom: 0;
}

.excel-total-row {
    border-top: 3px solid #059669;
}

.excel-total-label {
    text-align: right;
    font-weight: 800;
    color: white;
    font-size: 11px;
    padding: 10px 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.excel-total-value {
    text-align: right;
    font-weight: 900;
    color: white;
    font-size: 13px;
    white-space: nowrap;
}

.motivation-section {
    margin-top: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.motivation-header {
    margin-bottom: 20px;
    text-align: center;
}

.motivation-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.motivation-header p {
    font-size: 13px;
    color: var(--text-light);
    font-style: italic;
}

.motivation-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.motivation-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-gray);
    cursor: pointer;
}

.motivation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.motivation-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.motivation-card:hover::before {
    opacity: 1;
}

.motivation-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
    background: white;
}

.motivation-card:hover .motivation-img {
    transform: scale(1.03);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    max-width: 460px;
    margin: 80px auto;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--bg-red-light) 0%, white 100%);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-gray);
    border-radius: 50%;
    font-size: 22px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-image-content {
    position: relative;
    background: white;
    max-width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-image {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(220, 38, 38, 0.9);
    border-radius: 50%;
    font-size: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close-image:hover {
    background: var(--primary-dark);
    transform: rotate(90deg) scale(1.1);
}

.modal-image-full {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}

.modal-body {
    padding: 24px;
}

.label-modern {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 14px 0 6px 0;
}

.label-modern:first-child {
    margin-top: 0;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--text-dark);
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 600;
    border-left: 4px solid var(--success);
    border: 1px solid var(--border);
}

.notification.error {
    border-left-color: var(--danger);
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 1400px) {
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 340px 1fr;
    }
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .left-section {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 12px;
    }
    
    .hero {
        padding: 20px 12px 16px;
        margin-bottom: 16px;
    }
    
    .name {
        font-size: 24px;
    }
    
    .heart {
        font-size: 20px;
    }
    
    .tagline {
        font-size: 11px;
    }
    
    .left-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .card {
        margin-bottom: 10px;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 12px 14px;
    }
    
    .card-header h3 {
        font-size: 13px;
    }
    
    .card-body {
        padding: 14px;
    }
    
    .budget-display {
        padding: 14px;
        margin-bottom: 12px;
    }
    
    .budget-amount {
        font-size: 24px;
    }
    
    .currency-label {
        font-size: 14px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .btn {
        padding: 9px 14px;
        font-size: 12px;
    }
    
    .summary-item {
        padding: 8px 0;
        font-size: 12px;
    }
    
    .summary-item .value {
        font-size: 12px;
    }
    
    .label-bold {
        font-size: 13px;
    }
    
    .value-bold {
        font-size: 18px;
    }
    
    .section-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .section-header h2 {
        font-size: 16px;
        width: 100%;
    }
    
    .btn-add {
        width: 100%;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .category-card {
        padding: 0;
        border-radius: 12px;
    }
    
    .category-header {
        padding: 12px 14px;
        margin-bottom: 0;
        background: var(--bg-red-light);
        border-bottom: 1px solid var(--border);
    }
    
    .category-title {
        font-size: 14px;
    }
    
    .category-total {
        padding: 10px 14px;
        margin-bottom: 0;
        font-size: 16px;
        background: var(--bg-red-light);
        border-bottom: 1px solid var(--border);
        color: var(--primary);
    }
    
    .item-list {
        margin-bottom: 0;
    }
    
    .item {
        display: grid;
        grid-template-columns: auto 1fr auto auto;
        gap: 8px;
        padding: 8px 10px;
        margin-bottom: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid var(--border);
        background: white;
        align-items: center;
    }
    
    .item-purchased {
        background: #f0fdf4;
    }
    
    .item:last-child {
        border-bottom: none;
    }
    
    .item:hover {
        background: var(--bg-gray);
        transform: none;
    }
    
    .item-purchased:hover {
        background: #e6f7ed;
    }
    
    .item-checkbox {
        margin-right: 0;
    }
    
    .checkbox-label {
        width: 18px;
        height: 18px;
    }
    
    .checkbox-custom:checked + .checkbox-label::after {
        font-size: 11px;
    }
    
    .all-purchased-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .item-info {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }
    
    .item-name {
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
    }
    
    .item-link {
        font-size: 10px;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }
    
    .item-right {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    
    .item-price {
        font-size: 12px;
        font-weight: 700;
        min-width: 70px;
        text-align: right;
    }
    
    .item-actions {
        display: flex;
        gap: 4px;
        flex-direction: row;
    }
    
    .btn-tiny {
        padding: 5px 7px;
        font-size: 10px;
        border-radius: 5px;
    }
    
    .btn-add-item {
        padding: 10px;
        font-size: 11px;
        margin: 10px 14px;
        border-radius: 8px;
    }
    
    .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .modal-content {
        margin: 16px;
        max-width: calc(100% - 32px);
    }
    
    .modal-header {
        padding: 16px 18px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 18px;
    }
    
    .input-modern {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .label-modern {
        font-size: 12px;
        margin: 12px 0 5px 0;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 8px;
    }
    
    .name {
        font-size: 20px;
    }
    
    .heart {
        font-size: 18px;
    }
    
    .budget-amount {
        font-size: 22px;
    }
    
    .category-card {
        border-radius: 16px;
    }
    
    .category-header {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    
    .category-title-group {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .category-title {
        font-size: 13px;
    }
    
    .check-all-container {
        margin-top: 4px;
    }
    
    .checkbox-label-small {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-custom-small:checked + .checkbox-label-small::after {
        font-size: 10px;
    }
    
    .check-all-label {
        font-size: 11px;
    }
    
    .category-total {
        padding: 8px 12px;
        font-size: 15px;
        background: var(--bg-red-light);
        color: var(--primary);
    }
    
    .item-list {
        padding: 0;
    }
    
    .item {
        grid-template-columns: auto 1fr auto auto;
        gap: 6px;
        padding: 7px 8px;
    }
    
    .checkbox-label {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-custom:checked + .checkbox-label::after {
        font-size: 10px;
    }
    
    .item-name {
        font-size: 11px;
    }
    
    .item-link {
        font-size: 9px;
        max-width: 120px;
    }
    
    .item-price {
        font-size: 11px;
        min-width: 60px;
    }
    
    .item-right {
        gap: 6px;
    }
    
    .btn-tiny {
        padding: 4px 6px;
        font-size: 9px;
    }
    
    .btn-add-item {
        margin: 8px 12px;
        padding: 8px;
        font-size: 11px;
    }
    
    .btn-icon {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .all-purchased-badge {
        margin: 0 12px 8px 12px;
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .motivation-section {
        margin-top: 16px;
        padding: 16px;
    }
    
    .motivation-header h3 {
        font-size: 15px;
    }
    
    .motivation-header p {
        font-size: 11px;
    }
    
    .motivation-gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .motivation-card {
        min-height: 250px;
    }
    
    .purchase-summary-section {
        margin-top: 16px;
        margin-bottom: 16px;
        padding: 16px;
    }
    
    .purchase-summary-header h3 {
        font-size: 15px;
    }
    
    .purchase-summary-header p {
        font-size: 11px;
    }
    
    .purchase-summary-content {
        max-height: 300px;
    }
    
    .summary-category-title {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .summary-category-total {
        font-size: 12px;
    }
    
    .summary-item-row {
        grid-template-columns: auto 1fr auto;
        gap: 8px;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .summary-item-check {
        font-size: 14px;
    }
    
    .summary-item-name {
        font-size: 12px;
    }
    
    .summary-item-price {
        font-size: 12px;
    }
    
    .summary-grand-total {
        font-size: 14px;
    }
    
    .summary-grand-total-value {
        font-size: 18px;
    }
}



/* Mobile Table Summary Fix */
@media (max-width: 768px) {
    .purchase-summary-section {
        padding: 16px;
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    
    .purchase-summary-header {
        margin-bottom: 16px;
    }
    
    .purchase-summary-header h3 {
        font-size: 15px;
    }
    
    .purchase-summary-header p {
        font-size: 11px;
    }
    
    .excel-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .excel-table {
        font-size: 9px;
        min-width: 100%;
    }
    
    .excel-table th {
        padding: 6px 4px;
        font-size: 8px;
        position: sticky;
        top: 0;
    }
    
    .excel-table td {
        padding: 5px 4px;
        font-size: 9px;
    }
    
    .excel-subtotal-label,
    .excel-total-label {
        font-size: 9px;
        padding: 6px 4px !important;
    }
    
    .excel-subtotal-value {
        font-size: 9px;
    }
    
    .excel-total-value {
        font-size: 11px;
    }
}

