:root {
    --app-max-width: 1100px;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --bg-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-color: #f1f5f9;
    --section-border: #e2e8f0;
    --toolbar-bg: rgba(255, 255, 255, 0.8);
    --icon-bg: #f1f5f9;
}

[data-bs-theme="dark"] {
    --bg-color: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --border-color: #334155;
    --section-border: #334155;
    --toolbar-bg: rgba(30, 41, 59, 0.8);
    --icon-bg: #334155;
}

body {
    background: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.app-shell {
    max-width: var(--app-max-width);
    margin: 0 auto;
}

#appTitle {
    transition: opacity 0.2s;
}

a:hover #appTitle {
    opacity: 0.8;
}

.card {
    background-color: var(--card-bg);
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    font-weight: 500;
}

.btn-outline-primary {
    color: #6366f1;
    border-color: #6366f1;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.section-block {
    border-left: 2px solid var(--section-border);
    padding-left: 1.25rem;
    margin-left: 0.5rem;
}

.section-title {
    font-weight: 600;
    color: var(--text-main);
}

.list-group-item {
    background-color: transparent;
    border: 1px solid var(--border-color);
    margin-bottom: 0.25rem;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
    color: var(--text-main);
}

.list-group-item:hover {
    background-color: var(--icon-bg);
    transform: translateX(4px);
}

.form-check-input:checked {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

.item-meta {
    font-size: .8125rem;
    color: var(--text-muted);
}

.packed-label {
    text-decoration: line-through;
    opacity: .5;
    color: var(--text-muted);
}

.text-success {
    color: #10b981 !important;
}

[data-bs-theme="dark"] .text-success {
    color: #34d399 !important;
}

.cursor-pointer {
    cursor: pointer;
}

.collapse-icon {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    transition: transform 0.2s ease-in-out;
    background: var(--icon-bg);
    border-radius: 50%;
    color: var(--text-muted);
}

.section-container {
    transition: all 0.3s ease;
}

.sticky-toolbar {
    position: sticky;
    bottom: 1.5rem;
    z-index: 1000;
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
}

.progress {
    background-color: var(--icon-bg);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

#appTitle {
    font-weight: 800;
    letter-spacing: -0.025em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.border-dashed {
    border-style: dashed !important;
    border-width: 2px !important;
    background-color: var(--icon-bg) !important;
}

.section-title i {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-group-item .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.btn-link.text-muted:hover {
    color: #4f46e5 !important;
}

.item-count-group, .item-comment-group {
    background-color: var(--icon-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.item-count-group:focus-within, .item-comment-group:focus-within {
    background-color: var(--card-bg);
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.item-count-inline-input {
    width: 25px !important;
    text-align: center;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.count-inline-wrapper {
    /*background-color: var(--icon-bg);*/
    padding: 0 4px;
    /*border-radius: 4px;*/
    /*border: 1px solid var(--border-color);*/
    transition: all 0.2s ease;
}

.count-inline-wrapper:focus-within {
    background-color: var(--card-bg);
    border-color: #6366f1;
}

.item-comment-input {
    min-width: 120px;
    flex: 1;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    resize: none;
}

.input-modest {
    opacity: 0.15;
    background: transparent;
    border: none;
}

.count-inline-wrapper:hover,
.item-comment-input:hover,
.input-modest:focus,
.count-inline-wrapper:focus-within {
    opacity: 1;
}

.add-comment {
    opacity: 0.2;
}

.print-only-flex {
    display: none !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .list-group-item {
        border: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-shell {
        max-width: 100%;
        padding: 0 !important;
    }

    .section-block {
        border-left: none !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
    }

    .collapse-icon {
        display: none !important;
    }

    #appTitle {
        -webkit-text-fill-color: black !important;
        color: black !important;
    }

    .progress {
        display: none !important;
    }

    .form-check-input:not(:checked) {
        visibility: hidden !important;
    }

    .col-lg-5 {
        width: 100% !important;
    }

    .row {
        display: block !important;
    }

    header {
        margin-bottom: 2rem !important;
    }

    header p {
        display: none !important;
    }

    .checklist-status-text {
        font-weight: bold;
        margin-bottom: 1rem !important;
    }

    .print-only-flex {
        display: flex !important;
    }

    .list-group-item:hover {
        transform: none !important;
    }
}