:root {
    --primary-color: #4a6fdc;
    --primary-light: #eef2ff;
    --primary-dark: #3a5dc9;
    --secondary-color: #f1f5ff;
    --accent-color: #ff6b6b;
    --accent-hover: #ff5252;
    --success-color: #4CAF50;
    --success-light: #e8f5e9;
    --text-color: #333;
    --text-light: #666;
    --light-gray: #f5f5f5;
    --med-gray: #e0e0e0;
    --dark-gray: #888;
    --white: #ffffff;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #5d84ff;
    --primary-light: #1e2a4a;
    --primary-dark: #7a99ff;
    --secondary-color: #242f47;
    --accent-color: #ff7b7b;
    --accent-hover: #ff9898;
    --success-color: #66bb6a;
    --success-light: #1e3620;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --light-gray: #1a1a1a;
    --med-gray: #2a2a2a;
    --dark-gray: #999;
    --white: #2c2c2c;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    transition: var(--transition);
}

body {
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 0px;
    border-bottom: 1px solid var(--med-gray);
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    color: var(--primary-color);
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    margin: 0;
    color: var(--primary-color);
}

.theme-switch {
    display: flex;
    align-items: center;
}

.theme-switch-label {
    margin-right: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--med-gray);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.slider-icons {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    color: white;
}

/* Tab Navigation */
.tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tab {
    padding: 15px 20px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Form Styles */
h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.input-group {
    position: relative;
}

input[type="text"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--med-gray);
    border-radius: var(--radius-md);
    font-size: 16px;
    background-color: var(--white);
    color: var(--text-color);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.input-icon {
    position: absolute;
    top: 12px;
    left: 15px;
    color: var(--dark-gray);
}

.input-with-icon {
    padding-left: 40px;
}

.input-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.btn-success {
    background-color: var(--success-color);
}

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

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg, .btn-icon i {
    margin-right: 8px;
}

/* Progress Bar and Summary */
.summary {
    background-color: var(--primary-light);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.summary h2 {
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 15px;
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    background-color: var(--white);
    padding: 15px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.stat-title {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-subtitle {
    font-size: 12px;
    color: var(--dark-gray);
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--med-gray);
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--success-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Category and Checklist */
.category {
    margin-bottom: 30px;
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.category-header {
    padding: 20px;
    background-color: var(--primary-light);
    border-bottom: 1px solid var(--med-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.category-header h3 {
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.category-icon {
    margin-right: 10px;
}

.category-progress {
    display: flex;
    align-items: center;
}

.progress-text {
    font-size: 14px;
    color: var(--text-light);
    margin-right: 10px;
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.category.expanded .category-content {
    max-height: 2000px;
}

.category-info {
    padding: 15px 20px;
    background-color: var(--secondary-color);
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 1px solid var(--med-gray);
}

.checklist {
    list-style-type: none;
    padding: 10px 0;
}

.checklist-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--med-gray);
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover {
    background-color: var(--light-gray);
}

.checklist-checkbox {
    margin-right: 15px;
    position: relative;
}

.checklist-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.checklist-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checklist-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.item-info {
    flex-grow: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    position: relative;
}

.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
}

.tooltip-icon {
    color: var(--primary-color);
}

.tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: var(--dark-gray);
    color: white;
    text-align: center;
    border-radius: 5px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 14px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-gray) transparent transparent transparent;
}

.checklist-item.checked .item-name {
    text-decoration: line-through;
    color: var(--dark-gray);
}

.item-details {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

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

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.action-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.amazon-btn {
    display: flex;
    align-items: center;
    background-color: #ff9900;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.amazon-btn:hover {
    background-color: #e68a00;
}

.amazon-icon {
    margin-right: 5px;
}

.priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.priority-high {
    background-color: #ffebee;
    color: #f44336;
}

.priority-medium {
    background-color: #fff8e1;
    color: #ffa000;
}

.priority-low {
    background-color: #e8f5e9;
    color: #4caf50;
}

.quantity {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    margin-left: 5px;
    background-color: var(--light-gray);
    border-radius: 4px;
}

.quantity-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.quantity-btn:hover {
    color: var(--primary-color);
}

.quantity-value {
    width: 30px;
    text-align: center;
    font-weight: 600;
}

/* Search and Filter */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    padding-left: 40px;
    height: 50px;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    color: var(--dark-gray);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: var(--white);
    border: 1px solid var(--med-gray);
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.filter-btn-icon {
    margin-right: 5px;
}

/* Custom items */
.add-custom-item {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--secondary-color);
    border-radius: var(--radius-md);
    border: 1px dashed var(--primary-color);
}

.add-custom-form {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-col {
    flex: 1;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--success-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.budget-text {
    color: var(--success-color);
    font-weight: 600;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--white);
    border-radius: var(--radius-md);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-backdrop.show .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--med-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark-gray);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--med-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Timeline */
.timeline {
    margin-top: 30px;
}

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

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--med-gray);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid var(--med-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-light);
}

.timeline-step.active .step-indicator {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.timeline-step.completed .step-indicator {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-label {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
}

.timeline-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.timeline-step.completed .step-label {
    color: var(--success-color);
}

.timeline-content {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 15px 20px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.5s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    margin-right: 15px;
    font-size: 20px;
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-error .toast-icon {
    color: #f44336;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-light);
}

.toast-close {
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 5px;
}

/* Tips styles */
.tips-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tip-card {
    background-color: var(--secondary-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tip-category {
    font-size: 12px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.tip-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tip-content {
    font-size: 14px;
    color: var(--text-light);
}

/* Footer */
.app-footer {
    background-color: var(--white);
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid var(--med-gray);
}

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

.footer-content p {
    margin: 5px 0;
    color: var(--text-light);
    font-size: 14px;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Hidden class */
.hidden {
    display: none !important;
}

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

    .summary-stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-card {
        min-width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-progress {
        margin-top: 10px;
    }

    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }

    .filter-bar {
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .timeline-steps {
        flex-direction: column;
        gap: 20px;
    }

    .timeline-steps::before {
        height: 100%;
        width: 2px;
        top: 0;
        left: 15px;
        right: auto;
    }

    .timeline-step {
        flex-direction: row;
        align-items: flex-start;
        padding-left: 45px;
    }

    .step-indicator {
        position: absolute;
        left: 0;
        margin-bottom: 0;
        margin-right: 15px;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .btn, .theme-switch, .tabs, 
    .filter-bar, .search-bar, 
    .add-custom-item, .toast-container,
    .action-btn, .timeline, .app-footer {
        display: none !important;
    }

    .category {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .category-content {
        max-height: none !important;
        overflow: visible !important;
    }

    .category-header {
        background-color: #f5f5f5;
    }

    .checklist-item {
        border-bottom: 1px solid #eee;
    }

    .amazon-btn {
        display: none;
    }
}