@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600&display=swap');
/* Item Images Viewer (Lightbox) */
.image-viewer.hidden { display: none; }
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.image-viewer .viewer-backdrop {
    position: absolute; inset: 0;
    background: radial-gradient(1200px 600px at 20% 10%, rgba(80,160,255,0.25), rgba(20,20,30,0.9)),
                            linear-gradient(135deg, rgba(25,25,35,0.85), rgba(60,90,140,0.8));
    backdrop-filter: blur(4px) saturate(1.1);
}
.image-viewer .viewer-panel {
    position: relative;
    margin: 4vh auto;
    width: min(92vw, 1200px);
    height: 82vh;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(30,40,60,0.85), rgba(18,22,30,0.85));
    box-shadow: 0 12px 40px rgba(80,160,255,0.35), inset 0 0 24px rgba(255,255,255,0.08);
    overflow: hidden;
}
.viewer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.viewer-title { color: #eaf3ff; font-weight: 600; letter-spacing: 0.3px; }
.viewer-actions { display: flex; gap: 8px; }
.viewer-btn {
    padding: 6px 10px; border-radius: 10px; border: none; cursor: pointer;
    background: linear-gradient(135deg, rgba(40,50,70,0.9), rgba(80,160,255,0.6));
    color: #fff; box-shadow: 0 0 10px rgba(80,160,255,0.35);
}
.viewer-btn:hover { filter: brightness(1.1); }
.viewer-main {
    position: relative; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
    padding: 10px;
}
.viewer-main img {
    max-width: 100%; max-height: 45vh; object-fit: contain; border-radius: 12px;
    box-shadow: 0 0 20px rgba(80,160,255,0.35), inset 0 0 14px rgba(255,255,255,0.08);
    cursor: move;
    touch-action: pan-x pan-y;
    display: block;
    margin: 0 auto;
    justify-self: center;
    align-self: center;
}

/* Mobile viewer adjustments */
@media (max-width: 768px) {
    .image-viewer .viewer-panel {
        margin: 1vh auto;
        width: 98vw;
        max-height: 96vh;
        height: 96vh;
        grid-template-rows: auto minmax(0, 1fr) minmax(80px, auto) auto;
    }
    .viewer-header {
        padding: 8px 12px;
    }
    .viewer-title {
        font-size: 0.95rem;
    }
    .viewer-btn {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    .viewer-main {
        padding: 8px;
        grid-template-columns: 40px 1fr 40px;
        overflow: hidden;
    }
    .viewer-main img {
        max-height: 45vh;
        max-width: 100%;
    }
    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    .viewer-meta {
        padding: 10px 12px;
        max-height: none;
        min-height: 80px;
        overflow-y: auto;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .viewer-desc-row {
        flex-direction: column;
        gap: 8px;
    }
    .viewer-desc-label {
        min-width: auto;
        font-size: 0.85rem;
    }
    .viewer-desc-body p {
        font-size: 0.875rem;
    }
    .viewer-desc-edit textarea {
        font-size: 0.875rem;
        padding: 6px 8px;
        min-height: 80px;
        resize: vertical;
    }
    .viewer-desc-actions {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    .viewer-desc-actions .pill {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
        padding: 8px 10px;
        max-height: 80px;
        min-height: 80px;
        gap: 6px;
    }
    .viewer-thumbs img {
        height: 56px;
    }
}

/* Compressed mobile checklist layout */
@media (max-width: 600px) {
    .list-selection-card {
        padding: 12px;
        margin: 0;
        border-radius: 12px;
    }

    .list-selection-card .card-header {
        padding: 0 0 10px 0;
        margin-bottom: 10px;
    }

    .list-selection-card .card-body {
        padding: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .list-selection-card .tab-content {
        width: 100%;
        max-width: 100%;
    }

    .list-selection-card .existing-list-pane,
    .list-selection-card .create-list-pane {
        width: 100%;
        max-width: 100%;
        padding: 0;
        overflow-x: hidden;
    }

    .list-selection-card .row {
        margin-left: 0;
        margin-right: 0;
    }

    .list-selection-card .col-12,
    .list-selection-card .col-md-7,
    .list-selection-card .col-md-4 {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .list-selection-card .form-label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .list-selection-card .form-select,
    .list-selection-card .form-control {
        font-size: 0.9rem;
        padding: 10px;
        width: 100%;
    }

    .list-selection-card .default-mode-panel,
    .list-selection-card .current-list-banner,
    .list-selection-card .mode-row {
        margin-top: 8px;
        margin-bottom: 8px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        width: 100%;
    }

    .list-selection-card .current-list-banner {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-height: auto;
    }

    .list-selection-card .current-list-banner .eyebrow {
        font-size: 0.7rem;
        margin: 0;
    }

    .list-selection-card .current-list-banner .current-list-name {
        font-size: 0.9rem;
        margin: 0;
        word-break: break-word;
    }

    .current-list-banner .select-display {
        padding: 8px 10px;
        min-height: 38px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .current-list-banner .select-display .label {
        font-size: 0.9rem;
    }

    .current-list-banner .select-display .chev {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }

    .list-selection-card .mode-toggle-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
    }

    #mode-toggle {
        margin: 8px 0;
        padding: 12px 16px !important;
        font-size: 0.95rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    /* Mobile checklist header styling */
    #checklist thead {
        display: none;
    }

    .collector-mode #checklist tbody tr {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        align-items: center;
    }
    
    .collector-mode #checklist td {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px;
        width: auto;
        background: rgba(0, 0, 0, 0.08);
        border-radius: 6px;
        border: none;
        text-align: left;
    }
    
    .collector-mode #checklist td::before {
        display: none;
    }

    /* Data saver / mobile soften visuals */
    @media (max-width: 600px), (prefers-reduced-data: reduce) {
        .collector-mode #checklist tbody tr {
            background: rgba(255, 255, 255, 0.02);
            border-color: rgba(255, 255, 255, 0.08);
        }
        .collector-mode #checklist td {
            background: transparent;
        }
    }
    body:not(.collector-mode) #checklist {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 0;
    }
    body:not(.collector-mode) #checklist thead {
        display: none;
    }
    body:not(.collector-mode) #checklist tbody {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    body:not(.collector-mode) #checklist tr {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        overflow: visible;
        box-sizing: border-box;
    }
    body:not(.collector-mode) #checklist td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100% !important;
        padding: 8px;
        border: none;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 6px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    body:not(.collector-mode) .item-column,
    body:not(.collector-mode) .quantity-column,
    body:not(.collector-mode) .check-column,
    body:not(.collector-mode) .actions-column {
        width: 100% !important;
        min-width: unset !important;
        padding: 8px !important;
    }
    body:not(.collector-mode) .cell-display {
        display: block;
        font-size: 0.75rem;
        color: rgba(138, 229, 255, 0.8);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 3px;
        white-space: nowrap;
    }
    body:not(.collector-mode) .cell-input {
        min-width: 100% !important;
        width: 100% !important;
        font-size: 0.9rem;
        padding: 9px 8px !important;
        box-sizing: border-box;
    }
    
    /* Editor mode: separate data and actions rows */
    body:not(.collector-mode) .editor-data-row {
        margin-bottom: 2px;
        border-bottom: none !important;
    }
    
    body:not(.collector-mode) .editor-actions-row {
        background: rgba(138, 229, 255, 0.06) !important;
        border: 1px solid rgba(138, 229, 255, 0.15) !important;
        border-top: none !important;
        border-radius: 0 0 10px 10px;
        padding: 0 !important;
    }
    
    body:not(.collector-mode) .editor-actions-cell {
        padding: 10px 12px !important;
        border: none !important;
    }
    
    body:not(.collector-mode) .editor-actions-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    body:not(.collector-mode) .actions-column {
        display: none;
    }
    
    body:not(.collector-mode) .row-actions {
        display: contents;
    }
    
    body:not(.collector-mode) .row-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
        padding: 0 !important;
        background: transparent !important;
    }
    body:not(.collector-mode) .row-actions button {
        font-size: 0.8rem;
        padding: 8px 6px;
        width: 100%;
    }
    body:not(.collector-mode) .row-actions > button:nth-last-child(2) {
        grid-column: 1 / -1;
    }
    
    /* Collector mode: responsive header and layout */
    .collector-mode #checklist { 
        table-layout: fixed;
        width: 100%;
    }
    .collector-mode #checklist thead {
        display: table-header-group;
        margin-bottom: 8px;
    }
    .collector-mode #checklist th {
        font-size: 0.65rem;
        padding: 6px 4px;
        line-height: 1.1;
        color: rgba(138, 229, 255, 0.7);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: left;
        word-break: break-word;
        white-space: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .collector-mode #checklist td { 
        padding: 8px 6px; 
        font-size: 0.85rem; 
        line-height: 1.3;
        vertical-align: middle;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .collector-mode .item-column { width: 100%; }
    .collector-mode .check-column { width: 100%; }
    .collector-mode .quantity-column { width: 100%; }
    .collector-mode .actions-column { width: 100%; }
    
    /* Mobile - collector mode displays items in single rows (all columns in one line) */
    .collector-mode #checklist tbody tr {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        align-items: center;
    }
    
    .collector-mode #checklist td {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px;
        width: auto;
        background: rgba(0, 0, 0, 0.08);
        border-radius: 6px;
        border: none;
        text-align: left;
    }
    
    .collector-mode #checklist td::before {
        display: none;
    }

    /* Data saver / mobile soften visuals */
    @media (max-width: 600px), (prefers-reduced-data: reduce) {
        .collector-mode #checklist tbody tr {
            background: rgba(255, 255, 255, 0.02);
            border-color: rgba(255, 255, 255, 0.08);
        }
        .collector-mode #checklist td {
            background: transparent;
        }
    }
    
    .row-actions { 
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        width: 100%;
    }
    .row-actions > * {
        width: 100%;
        justify-self: stretch;
    }
    /* Make photo button span full width (new line) */
    .row-actions > button:nth-last-child(2) {
        grid-column: 1 / -1;
    }
    .micro-pill { 
        font-size: 0.8rem; 
        padding: 5px 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .cell-display { 
        font-size: 0.85rem;
        line-height: 1.2;
    }
}
.nav-btn {
    width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, rgba(40,50,70,0.9), rgba(80,160,255,0.6)); color: #fff;
    box-shadow: 0 0 10px rgba(80,160,255,0.35);
}
.nav-btn:hover { filter: brightness(1.1); }
.viewer-meta {
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.viewer-desc-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.viewer-desc-label {
    color: var(--accent, #8ae5ff);
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 90px;
}
.viewer-desc-body {
    flex: 1;
}
.viewer-desc-body p {
    margin: 0;
    color: var(--muted, rgba(231, 242, 253, 0.85));
    font-size: 0.95rem;
    line-height: 1.5;
}
.viewer-desc-edit {
    margin-top: 8px;
}
.viewer-desc-edit textarea {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(25,25,35,0.6);
    color: #eaf3ff;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}
.viewer-desc-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.viewer-thumbs {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(60px, 100px);
    gap: 8px; padding: 10px 12px; overflow-x: auto; overflow-y: hidden;
    border-top: 1px solid rgba(255,255,255,0.08);
    max-width: 100%;
    min-height: 90px;
}
.viewer-thumbs img { height: 64px; object-fit: cover; border-radius: 8px; opacity: 0.85; cursor: pointer; }
.viewer-thumbs img.active { outline: 2px solid rgba(80,160,255,0.9); opacity: 1; }

/* Themed scrollbars for viewer thumbs */
.viewer-thumbs::-webkit-scrollbar { height: 10px; }
.viewer-thumbs::-webkit-scrollbar-track { background: rgba(25,25,35,0.6); border-radius: 10px; }
.viewer-thumbs::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(80,160,255,0.9), rgba(40,50,70,0.9));
    border-radius: 10px; box-shadow: inset 0 0 8px rgba(255,255,255,0.15);
}
.viewer-thumbs { scrollbar-color: rgba(80,160,255,0.9) rgba(25,25,35,0.6); scrollbar-width: thin; }

.viewer-focus-trap { position: absolute; opacity: 0; }

/* Fullscreen viewer image */
#viewer-image:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

#viewer-image:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

#viewer-image:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

#panorama-image:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

#panorama-image:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

#panorama-image:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background: #000;
    cursor: zoom-out;
}

/* Ollama Chat Footer */
.ollama-chat {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    pointer-events: none;
}
.ollama-chat.hidden { display: none; }
.ollama-chat .chat-inner {
    margin: 0 auto 10px auto;
    width: min(960px, 94vw);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(30,40,60,0.92), rgba(18,22,30,0.92));
    box-shadow: 0 10px 30px rgba(80,160,255,0.35), inset 0 0 18px rgba(255,255,255,0.06);
    padding: 10px 12px;
    pointer-events: auto;
}
.ollama-chat .chat-title { color: #eaf3ff; font-weight: 600; margin-bottom: 6px; }
.ollama-chat .chat-model-select {
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    color: #eaf3ff; padding: 6px 8px;
}
.chat-help-btn {
    margin-left: 8px;
    width: 20px; height: 20px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
    background: transparent; color: #eaf3ff; cursor: pointer; font-weight: 700;
}
.chat-help-btn:hover { border-color: rgba(138,229,255,0.6); }
.ollama-chat .chat-model-details { font-size: 12px; margin: 2px 0 8px; }
.ollama-chat .chat-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ollama-chat input {
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 10px; background: rgba(20,24,32,0.9); color: #eaf3ff;
}
.ollama-chat .chat-output { margin-top: 8px; max-height: 24vh; overflow: auto; }
.ollama-chat .chat-output::-webkit-scrollbar { width: 10px; }
.ollama-chat .chat-output::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(80,160,255,0.9), rgba(40,50,70,0.9));
    border-radius: 10px;
}
.ollama-chat .chat-output { scrollbar-color: rgba(80,160,255,0.9) rgba(25,25,35,0.6); scrollbar-width: thin; }

/* Chat toggle button (desktop only) */
.chat-toggle {
    position: fixed;
    right: 18px; bottom: 18px;
    width: 42px; height: 42px;
    border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
    background: linear-gradient(135deg, rgba(40,50,70,0.9), rgba(80,160,255,0.6));
    color: #fff; cursor: pointer;
    box-shadow: 0 8px 20px rgba(80,160,255,0.35);
    z-index: 1000;
}
.chat-toggle:hover { filter: brightness(1.1); }
@media (max-width: 992px) { .chat-toggle { display: none; } }

/* Chat progress bar */
.chat-progress {
    margin-top: 6px;
    display: grid; gap: 6px;
}
.chat-progress .bar {
    height: 6px; border-radius: 6px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.chat-progress .bar > span {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, rgba(138,229,255,0.9), rgba(199,125,255,0.9));
    transition: width 200ms ease;
}
.chat-progress .label { font-size: 12px; color: var(--text-medium); }

/* Chat help tooltip */
.chat-help-tooltip { display: none; position: absolute; right: 12px; bottom: 60px; z-index: 1001; }
.chat-help-tooltip .tooltip-inner {
    width: min(460px, 92vw);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(160deg, rgba(30,40,60,0.96), rgba(18,22,30,0.96));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(80,160,255,0.35);
}
.chat-help-tooltip .tooltip-title { font-weight: 600; margin-bottom: 6px; color: #eaf3ff; }
.chat-help-tooltip.is-open { display: block; }
.select-wrap {
    position: relative;
    width: 100%;
}
.select-wrap.tiny .select-display {
    padding: 6px 10px;
    min-height: 28px;
    border-radius: 12px;
    font-size: 12px;
    letter-spacing: 0.02em;
}
.select-wrap.cute .select-display {
    border-radius: 20px;
    border-color: rgba(199, 125, 255, 0.4);
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.12), rgba(138, 229, 255, 0.04));
}
.select-wrap.cute .select-display:hover {
    border-color: rgba(199, 125, 255, 0.7);
    box-shadow: 0 0 15px rgba(199, 125, 255, 0.3);
}
.select-wrap.tiny .select-display .chev {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    background-size: 14px 14px;
}
.lang-row { gap: 6px; }
.lang-row .form-label { font-size: 12px; letter-spacing: 0.12em; }
.select-display {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    min-height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(138, 229, 255, 0.30);
    color: var(--text-high);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
}
.select-display:hover {
    box-shadow: 0 10px 28px rgba(138, 229, 255, 0.22);
}
.select-display .label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.select-display .chev {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%238ae5ff' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.select-menu {
    position: fixed;
    z-index: 1000;
    top: 0; /* set by JS */
    left: 0; /* set by JS */
    width: auto; /* set by JS */
    max-height: 60vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 8px;
    display: none;
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.9), rgba(7, 9, 18, 0.9));
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.48), var(--glow);
}
.select-menu.is-open { display: block; }
.select-option {
    padding: 10px 12px;
    color: var(--text-high);
    cursor: pointer;
    border-radius: 12px;
}
.select-option[aria-disabled='true'] {
    color: var(--muted);
    cursor: not-allowed;
}
.select-option:hover {
    background: radial-gradient(circle at 20% 10%, rgba(138, 229, 255, 0.12), rgba(255, 255, 255, 0.02));
}
.select-option[aria-selected='true'] {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.18), rgba(199, 125, 255, 0.14));
    border-left: 3px solid var(--accent);
}

/* Themed scrollbar (desktop/mobile) */
.select-menu {
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 229, 255, 0.6) rgba(255, 255, 255, 0.06);
}
.select-menu::-webkit-scrollbar { width: 10px; }
.select-menu::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: 12px;
}
.select-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(138, 229, 255, 0.85), rgba(199, 125, 255, 0.65));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}
.select-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(138, 229, 255, 1), rgba(199, 125, 255, 0.85));
}
.select-wrap.is-open .select-menu { display: block; }
.select-option {
    padding: 12px 14px;
    color: var(--text-high);
    cursor: pointer;
}
.select-option[aria-disabled='true'] {
    color: var(--muted);
    cursor: not-allowed;
}
.select-option:hover {
    background: radial-gradient(circle at 20% 10%, rgba(138, 229, 255, 0.12), rgba(255, 255, 255, 0.02));
}
.select-option[aria-selected='true'] {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.18), rgba(199, 125, 255, 0.14));
    border-left: 3px solid var(--accent);
}
.psychedelic-card #list-select {
    color: var(--text-high);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(138, 229, 255, 0.3);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 14px;
    padding: 12px 44px 12px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%238ae5ff' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}
.psychedelic-card #list-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 229, 255, 0.25);
}
.psychedelic-card #list-select:invalid {
    color: var(--muted);
}
.psychedelic-card #list-select option {
    color: #0b0f1a; /* dark text for system dropdown */
    background-color: #ffffff; /* ensure readable options on Windows */
}
.psychedelic-card #list-select option[disabled] {
    color: #8aa0b6;
}

/* Current-list banner unified selector styling */
.current-list-banner .current-list-select {
    min-width: auto;
    width: 100%;
}
.current-list-banner .select-display {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.10), rgba(255,255,255,0.02));
    border-color: rgba(138,229,255,0.25);
    padding: 10px 12px;
    min-height: 40px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Harmonize form control heights in selector card */
.psychedelic-card .form-select,
.psychedelic-card .form-control {
    min-height: 44px;
}

/* Match action button height to select-display */
.psychedelic-card .btn {
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
/* Detail buttons */
.row-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    touch-action: manipulation;
}

.row-actions > * {
    flex-shrink: 0;
}

.row-actions .photo-count {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.85em;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-high);
}
.detail-btn { border-radius: 12px; }
.micro-pill { min-height: 26px; padding: 2px 8px; border-radius: 10px; font-size: 14px; line-height: 1; opacity: 0.8; border: 1px solid rgba(255, 255, 255, 0.12); background: transparent; }
.micro-pill:hover, .micro-pill:focus { opacity: 1; border-color: rgba(138, 229, 255, 0.35); }
.detail-btn.has-value { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(138, 229, 255, 0.25) inset; }
.detail-btn.is-disabled { opacity: 0.6; cursor: default; }
.reorder-btn { width: 28px; min-width: 28px; padding: 2px 0; text-align: center; }

:root {
    /* Color Palette - Enhanced for better contrast and accessibility */
    --bg-night: #04030a;
    --bg-grid: rgba(255, 255, 255, 0.03);
    --accent: #8ae5ff;
    --accent-bright: #a0edff; /* Brighter accent for better contrast */
    --accent-soft: rgba(138, 229, 255, 0.4);
    --muted: rgba(231, 242, 253, 0.85); /* Increased opacity for better readability */
    --card: rgba(16, 20, 34, 0.9);
    --border-soft: rgba(255, 255, 255, 0.1);
    --glow: 0 20px 45px rgba(138, 229, 255, 0.2);
    --text-high: #f6fbff;
    --text-medium: #d4e4f4; /* New: medium contrast text */
    
    /* Button colors for consistent theming */
    --btn-primary: rgba(80, 160, 255, 0.9);
    --btn-primary-hover: rgba(100, 180, 255, 1);
    --btn-secondary: rgba(60, 70, 90, 0.9);
    --btn-secondary-hover: rgba(80, 90, 110, 1);
    --btn-success: rgba(70, 230, 160, 0.9);
    --btn-success-hover: rgba(90, 250, 180, 1);
    
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
    margin: 0;
    background: radial-gradient(circle at top, rgba(138, 229, 255, 0.15) 0%, transparent 45%),
        linear-gradient(180deg, #06050c, #05030a 55%, #000 100%);
    min-height: 100vh;
    color: var(--text-high);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(120deg, transparent, rgba(138, 229, 255, 0.08) 40%, transparent),
        radial-gradient(circle at 20% 10%, rgba(138, 229, 255, 0.25), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 25%);
    pointer-events: none;
    z-index: 0;
}

#header-image {
    width: 100%;
    min-height: 480px;
    position: relative;
    overflow: visible;
    background: #04030a;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

/* Primary background layer (current image + gradient) */
#header-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.35), rgba(100, 200, 255, 0.2)),
                var(--header-bg-url, radial-gradient(circle at center, rgba(138, 229, 255, 0.35), transparent 60%)),
                #04030a;
    background-size: auto, cover, cover;
    background-position: center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Secondary layer (next image, fading in) */
#header-image .header-fade-layer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(138, 229, 255, 0.35), transparent 60%);
    background-size: cover;
    background-position: center;
    z-index: 1.5;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

#header-image .header-fade-layer.active {
    opacity: 1;
}

/* Dark overlay */
#header-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 5, 12, 0.95), rgba(5, 5, 12, 0.25) 60%);
    pointer-events: none;
    z-index: 2;
}

.header-overlay {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

#header-date {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.header-date-line {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.header-date-line--tag {
    font-weight: 700;
}

.header-date-line--time {
    font-size: 1rem;
    letter-spacing: 0.2em;
}

.header-meta .pill {
    padding: 10px 22px;
}

#header-weather {
    opacity: 0.6;
}

.header-meta .language-selector {
    max-width: 140px;
    margin-left: auto;
}

.top-links {
    position: absolute;
    right: 32px;
    top: 20px;
    display: flex;
    gap: 12px;
    z-index: 2;
}

.content-shell {
    width: 100%;
    max-width: 1200px;
    margin: 32px auto 60px;
    padding: 0 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: static;
}

.hero-shell {
    width: min(1100px, 100%);
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--glow);
    text-align: left;
    position: static;
}

.container {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 800px) {
    /* Prevent header overlap on 800px and below */
    #checklist thead {
        display: none;
    }

    .collector-mode #checklist thead {
        display: table-header-group;
        margin-bottom: 6px;
    }

    #checklist th {
        font-size: 0.72rem;
        padding: 6px 4px;
        line-height: 1.1;
        color: rgba(138, 229, 255, 0.7);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        word-break: break-word;
        white-space: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.container {
    margin: 0 auto;
    padding: 0 24px 40px;
    max-width: 100%;
    width: 100%;
}

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

.content-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

.checklist-container {
    padding: 20px;
}

.hero-brand {
    .photo-count {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        font-size: 12px;
        line-height: 1;
        background: linear-gradient(135deg, rgba(30,30,40,0.9), rgba(80,160,255,0.9));
        color: #fff;
        box-shadow: 0 0 10px rgba(80,160,255,0.45), inset 0 0 6px rgba(255,255,255,0.2);
        backdrop-filter: blur(3px);
        cursor: pointer;
    }
    /* removed .photo-count hover and related styles */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.hero-logo-shell img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hero-shell .title {
    font-size: clamp(2.5rem, 1.8vw + 2rem, 3.25rem);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 680px;
}


.card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--glow);
}

.media-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.timelapse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.timelapse-header h2 {
    margin: 0;
}

.timelapse-logo {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.timelapse-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.timelapse-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.timelapse-view {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    width: 100%;
    margin: 0;
}

.frame-shell {
    border-radius: 0;
    border: none;
    background: #000;
    overflow: hidden;
    position: relative;
    z-index: 2;
    min-height: 260px;
    max-height: 70vh;
    touch-action: none;
}

.frame-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
    cursor: zoom-in;
    user-select: none;
}

/* Overlay nav buttons over image at all sizes (use pill styles) */
#tl-prev,
#tl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: auto;
}
#tl-prev { left: 10px; }
#tl-next { right: 10px; }

.frame-shell.is-zoomed img {
    cursor: grab;
}

.frame-shell.is-zoomed img.is-grabbing {
    cursor: grabbing;
}

.frame-shell.immersive {
    min-height: 70vh;
    background: #000;
}

.frame-shell.immersive img {
    object-fit: contain;
    background: #000;
}

.frame-label {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    font-size: 0.9rem;
    color: var(--muted);
}

.timeline {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.timeline button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.timeline button.active {
    background: var(--accent);
    transform: scale(1.4);
}

.timelapse-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    z-index: 100;
}

.list-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    z-index: 101;
}

.list-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.list-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 12, 0.9);
    backdrop-filter: blur(10px);
}

.list-modal-panel {
    position: relative;
    width: min(94vw, 520px);
    padding: 22px;
    background: var(--card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edit-item-modal-panel {
    width: min(90vw, 450px);
    padding: 20px;
}

.edit-item-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.edit-item-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-item-form .form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(227, 242, 253, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-item-form .form-control {
    padding: 11px 13px;
    border: 1px solid rgba(138, 229, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #e3f2fd;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.edit-item-form .form-control:focus {
    border-color: #8ae5ff;
    background: rgba(138, 229, 255, 0.1);
    outline: none;
}

.edit-item-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8ae5ff;
}

.edit-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

.edit-item-actions .pill {
    padding: 10px 18px;
    font-size: 0.9rem;
}

/* In-app notifications */
.app-notifications {
    position: fixed;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}
.app-notification {
    min-width: 280px;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.92), rgba(7, 9, 18, 0.96));
    color: var(--text-high);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    animation: slideIn 240ms ease;
}
.app-notification .message {
    margin: 0;
    font-size: 0.95rem;
}
.app-notification .close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-high);
    border-radius: 10px;
    padding: 4px 8px;
    cursor: pointer;
}
.app-notification.info { border-color: rgba(138, 229, 255, 0.35); }
.app-notification.success { border-color: rgba(70, 230, 160, 0.6); }
.app-notification.warning { border-color: rgba(255, 193, 7, 0.5); }
.app-notification.error { border-color: rgba(255, 99, 71, 0.6); }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.timelapse-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.timelapse-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 12, 0.92);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.timelapse-modal-panel {
    position: relative;
    width: min(95vw, 1080px);
    max-height: 92vh;
    --panel-pad: 28px;
    padding: var(--panel-pad);
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.95), rgba(7, 9, 18, 0.98));
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 2;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
    color: var(--text-high);
    cursor: pointer;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.modal-header .timelapse-logo {
    width: 80px;
    height: 80px;
}

.countdown-card {
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.92), rgba(7, 9, 18, 0.96));
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 22px;
    text-align: left;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--glow);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.countdown-text {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.countdown-box {
    font-size: clamp(2.4rem, 1.1vw + 2rem, 3.2rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 16px;
    padding: 18px 22px;
    border: 1px solid rgba(138, 229, 255, 0.35);
    background: radial-gradient(circle at 20% 10%, rgba(138, 229, 255, 0.12), rgba(255, 255, 255, 0.02));
}

.sub-title {
    margin: 0;
    font-size: 1.5rem;
}

.muted {
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: rgba(138, 229, 255, 0.8);
}

.list-controls {
    background: rgba(4, 4, 13, 0.9);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    padding: 20px 24px;
    box-shadow: 0 30px 45px rgba(0, 0, 0, 0.35);
}

.psychedelic-card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: var(--glow);
    overflow: hidden;
    padding: 28px;
    clip-path: inset(0 0 0 0);
}

.list-selection-card {
    padding: 16px;
    max-width: 100%;
    overflow: visible;
}

.list-selection-card .card-body {
    overflow-x: hidden;
    max-width: 100%;
}

.list-selection-card .tab-content {
    max-width: 100%;
    overflow-x: hidden;
}

.list-selection-card .existing-list-pane,
.list-selection-card .create-list-pane {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}
.psychedelic-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    background: conic-gradient(from 180deg, #8ae5ff, #c77dff, #00ffa2, #8ae5ff);
    filter: blur(28px);
    opacity: 0.25;
    animation: pulseGradient 10s linear infinite;
    pointer-events: none;
}
.psychedelic-card .card-body {
    position: relative;
    z-index: 1;
    padding: 0; /* header/body spacing managed locally */
}

/* Ensure header spacing without Bootstrap .card ancestry */
.psychedelic-card .card-header {
    padding: 0;
    margin-bottom: 12px;
    background: transparent;
    border: none;
}

.psychedelic-pills .nav-link {
    color: var(--muted);
    border: 1px solid transparent;
}
.psychedelic-pills .nav-link.active {
    color: var(--text-high);
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.22), rgba(199, 125, 255, 0.22));
    border-color: rgba(255, 255, 255, 0.18);
}

.psychedelic-card .form-control,
.psychedelic-card .form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(138, 229, 255, 0.3);
    color: var(--text-high);
}
.psychedelic-card .form-control::placeholder {
    color: rgba(231, 242, 253, 0.7);
}
.psychedelic-card .form-control:focus,
.psychedelic-card .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(138, 229, 255, 0.25);
}

@keyframes pulseGradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-primary {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.65), rgba(138, 229, 255, 0.85));
    border: none;
    color: #06030a;
}
.btn-secondary {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.4), rgba(138, 229, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-success {
    background: linear-gradient(135deg, rgba(70, 230, 160, 0.8), rgba(50, 200, 140, 0.9));
    border: none;
}
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-high);
}

.card-title {
    letter-spacing: 0.03em;
}

.subtle {
    font-size: 0.9rem;
}

.form-label {
    color: var(--muted);
}

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

.current-list-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    min-height: auto;
}

.current-list-banner > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
}

.current-list-banner .eyebrow {
    font-size: 0.75rem;
    color: rgba(138, 229, 255, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.current-list-banner .current-list-name {
    font-size: 0.95rem;
    margin: 0;
    color: #e3f2fd;
    font-weight: 500;
    word-break: break-word;
}

.control-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.control-row label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.field-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

select,
input[type='text'],
input[type='number'] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(138, 229, 255, 0.3);
    border-radius: 14px;
    padding: 12px 16px;
    color: var(--text-high);
    font-size: 1rem;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

select:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(138, 229, 255, 0.2);
    outline: none;
}

.mode-row {
    justify-content: center;
}

.mode-row.mode-controls {
    padding: 0.75rem 0;
}

.mode-hint {
    font-size: 0.95rem;
    color: var(--muted);
    display: none;
}

/* Hide mode label in collector mode */
.collector-mode .mode-hint {
    display: none;
}


.editor-only {
    transition: opacity 0.3s ease;
}

.collector-mode .editor-only {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    display: none;
}

.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cell-display {
    display: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cell-input {
    width: 100%;
    min-width: 140px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-high);
    padding: 10px 14px;
    font-size: 1rem;
    transition: border 0.3s ease, background 0.3s ease;
    display: block;
}

/* Editor mode - show as clickable labels instead of inputs */
body:not(.collector-mode) .cell-input {
    display: none;
}

body:not(.collector-mode) .cell-display {
    display: block;
    padding: 9px 12px;
    background: rgba(138, 229, 255, 0.08);
    border: 1px solid rgba(138, 229, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #e3f2fd;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
}

body:not(.collector-mode) .cell-display:hover {
    background: rgba(138, 229, 255, 0.15);
    border-color: rgba(138, 229, 255, 0.4);
    box-shadow: 0 0 10px rgba(138, 229, 255, 0.2);
}

body:not(.collector-mode) .cell-display:active {
    transform: scale(0.98);
}

/* Editor mode column sizes */
body:not(.collector-mode) .item-column {
    min-width: 140px !important;
    width: auto !important;
}

body:not(.collector-mode) .quantity-column {
    min-width: 80px !important;
    width: auto !important;
}

body:not(.collector-mode) #checklist tr {
    height: auto;
}

body:not(.collector-mode) #checklist td {
    padding: 10px 8px;
    vertical-align: top;
}

.cell-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.collector-mode .cell-input {
    display: none;
}

.collector-mode .cell-display {
    display: block;
}

.check-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.check-wrapper input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
}

.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: background 0.3s ease, border 0.3s ease;
}

.check-wrapper input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(138, 229, 255, 0.3);
}
/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON STYLES - Enhanced for accessibility and consistency
   ═══════════════════════════════════════════════════════════════════════════ */

.pill {
    border: none;
    border-radius: 999px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--btn-primary), rgba(138, 229, 255, 0.75));
    color: #06030a;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 2px 8px rgba(138, 229, 255, 0.2);
}

.pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(138, 229, 255, 0.45);
    background: linear-gradient(135deg, var(--btn-primary-hover), rgba(158, 249, 255, 0.85));
}

.pill:focus {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
}

.pill.ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-high);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pill.ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.pill.secondary {
    background: linear-gradient(135deg, var(--btn-secondary), rgba(80, 90, 110, 0.8));
    color: #fff;
}

.pill.secondary:hover {
    background: linear-gradient(135deg, var(--btn-secondary-hover), rgba(100, 110, 130, 0.9));
}

.btn-clear,
.btn-copy-clipboard {
    background: none;
    border: none;
    color: var(--accent-bright); /* Brighter for better visibility */
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-clear:hover,
.btn-copy-clipboard:hover {
    color: var(--accent);
}

.btn-clear:focus,
.btn-copy-clipboard:focus {
    outline: 2px solid var(--accent-bright);
    outline-offset: 2px;
}

.checklist-container {
    background: rgba(5, 5, 13, 0.95);
    border-radius: 28px;
    border: 1px solid var(--border-soft);
    padding: 24px;
    box-shadow: var(--glow);
    overflow: hidden;
    box-sizing: border-box;
}

body:not(.collector-mode) .checklist-container {
    padding: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-high);
    box-sizing: border-box;
}

th {
    text-align: left;
    padding-bottom: 12px;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
}

td {
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: clamp(0.95rem, 0.6vw + 0.9rem, 1.05rem);
    line-height: 1.4;
    vertical-align: top;
}

#checklist tbody tr {
    transition: background 0.4s ease, transform 0.3s ease;
}

#checklist tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

.list-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cell-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-high);
    padding: 10px 12px;
    font-size: 0.95rem;
}

.checklist-container button {
    font-family: inherit;
}

.list-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mode-row .pill.disabled,
.pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.snowflake {
    position: fixed;
    top: -10px;
    font-size: 1rem;
    animation: fall 6s linear infinite;
    z-index: 0;
}

@keyframes fall {
    0% {
        transform: translateY(-10px) translateX(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(-20px);
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .list-selection-card {
        padding: 16px;
        border-radius: 14px;
    }

    .list-selection-card .card-body {
        max-width: 100%;
    }

    .list-selection-card .form-select,
    .list-selection-card .form-control {
        font-size: 0.95rem;
    }

    .timelapse-view {
        grid-template-columns: 1fr;
    }

    .timelapse-actions {
        flex-direction: column;
    }

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

    .list-controls {
        padding: 16px;
        gap: 12px;
    }

    .control-row {
        justify-content: stretch;
        flex-direction: column;
    }

    .control-row input,
    .control-row select {
        width: 100%;
        min-width: unset;
        padding: 10px 12px;
    }

    .hero-brand {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 700px) {
    .frame-shell {
        min-height: 60vh;
    }

    /* Header sizing for 700px and below */
    #checklist th {
        font-size: 0.68rem;
        padding: 6px 4px;
    }

    .timelapse-modal-panel {
        width: 100%;
        max-height: 94vh;
        --panel-pad: 16px;
        padding: var(--panel-pad);
        border-radius: 18px;
        overflow: auto;
    }
    .timelapse-actions {
        justify-content: stretch;
        gap: 8px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 14px 30px;
    }

    .main-container {
        padding: 12px;
    }

    .content-shell {
        padding: 12px;
        gap: 16px;
    }

    .checklist-container {
        padding: 12px;
    }

    #mode-toggle {
        margin: 10px 0;
        padding: 10px 14px !important;
        min-height: 40px;
        font-size: 0.9rem;
    }

    .timelapse-view {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .frame-shell {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 60vh;
        border-radius: 0;
    }
    #tl-prev,
    #tl-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 3;
        pointer-events: auto;
    }
    #tl-prev { left: 8px; }
    #tl-next { right: 8px; }

    .list-controls {
        padding: 14px;
        border-radius: 10px;
        margin: 16px auto;
        gap: 10px;
    }

    .control-row {
        gap: 8px;
    }

    .control-row input,
    .control-row select {
        padding: 9px 10px;
        font-size: 0.9rem;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px 30px;
    }

    .main-container {
        padding: 16px;
    }

    .content-shell {
        padding: 16px;
        gap: 20px;
    }

    .checklist-container {
        padding: 14px;
    }

    #mode-toggle {
        margin: 10px 0;
        padding: 11px 15px !important;
        min-height: 42px;
        font-size: 0.92rem;
    }

    .list-controls {
        grid-template-columns: 1fr;
    }

    .checklist-container {
        overflow: hidden;
        padding: 14px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    body:not(.collector-mode) .checklist-container {
        padding: 12px;
    }

    /* Tablet header sizing */
    #checklist thead {
        display: none;
    }

    .collector-mode #checklist thead {
        display: table-header-group;
    }

    #checklist th {
        font-size: 0.7rem;
        padding: 7px 5px;
        line-height: 1.1;
        color: rgba(138, 229, 255, 0.7);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        word-break: break-word;
        white-space: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    #checklist {
        min-width: 0;
        width: 100%;
    }

    .list-actions {
        flex-direction: column;
    }

    .timelapse-modal-panel {
        width: min(96vw, 100%);
        max-height: 94vh;
        --panel-pad: 16px;
        padding: var(--panel-pad);
        border-radius: 18px;
        overflow: auto;
    }

    .timelapse-actions {
        justify-content: stretch;
        gap: 10px;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 0 12px 30px;
    }

    .main-container {
        padding: 10px;
    }

    .content-shell {
        padding: 10px;
        gap: 12px;
    }

    .checklist-container {
        padding: 10px;
    }

    #mode-toggle {
        margin: 8px 0;
        padding: 9px 12px !important;
        min-height: 38px;
        font-size: 0.85rem;
    }

    .list-controls {
        padding: 12px;
        margin: 12px auto;
        border-radius: 8px;
    }

    .control-row {
        gap: 6px;
    }

    .control-row input,
    .control-row select {
        padding: 8px 9px;
        font-size: 0.85rem;
        min-width: 120px;
    }

    #header-image {
        height: 320px;
    }

    .hero-shell {
        padding: 24px;
    }

    .hero-logo-shell {
        width: 70px;
        height: 70px;
    }

    .header-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-meta .language-selector {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 1400px) {
    .container {
        padding: 0 48px 60px;
    }

    .main-container {
        padding: 32px;
    }

    .content-shell {
        padding: 32px;
    }
}

.collector-mode .list-controls {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: none;
}

.collector-mode .checklist-container {
    background: rgba(3, 3, 11, 0.95);
}

/* Collector info banner shown in collector mode inside checklist container */
.collector-info-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    margin: 4px 0 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.95), rgba(7, 9, 18, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--glow);
}
.collector-mode .collector-info-banner {
    display: flex;
}
.collector-current-name {
    margin: 2px 0 0;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}
.editor-mode-btn {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.35), rgba(138, 229, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
}
.editor-mode-btn:hover {
    box-shadow: 0 12px 28px rgba(138, 229, 255, 0.25);
}
/* General Styles */
body {
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #e3f2fd;
    text-align: center;
    overflow-x: hidden;
}

.top-links {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    gap: 10px;
}

.pill {
    background: linear-gradient(45deg, #00bcd4, #7d53d6);
    color: #fff;
    border: none;
    padding: 12px 28px;
    min-width: 140px;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 25px rgba(0, 188, 212, 0.25);
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(125, 83, 214, 0.35);
}

.pill.danger {
    background: linear-gradient(45deg, #ff4d4d, #ff007f);
}

/* Clipboard Copy Button Styling (Fancy) */
.btn-copy-clipboard {
    background: linear-gradient(45deg, #ff007f, #00bcd4, #7d53d6, #ff00ff, #00ffff); /* Psychedelic gradient */
    border: 2px solid transparent; /* Border transparent */
    padding: 15px 30px; /* Larger padding for a more button-like feel */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 20px; /* Space between the buttons */
    border-radius: 50px; /* Rounded corners */
    box-shadow: 0 0 15px #ff007f, 0 0 30px #00bcd4, 0 0 45px #7d53d6; /* Bright glowing shadows */
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
    background-size: 400% 400%; /* Makes the gradient move */
    animation: psychedelic 5s linear infinite; /* Animated gradient */
}

/* Hover effect for Copy button */
.btn-copy-clipboard:hover {
    transform: scale(1.1); /* Make it grow when hovered */
    box-shadow: 0 0 20px #ff007f, 0 0 40px #00bcd4, 0 0 60px #7d53d6, 0 0 80px #ff00ff; /* More glow on hover */
}

/* Fancy Psychedelic Clear Button */
.btn-clear {
    background: linear-gradient(45deg, #ff007f, #00bcd4, #7d53d6, #ff00ff, #00ffff); /* Psychedelic gradient */
    border: 2px solid transparent; /* Border transparent */
    padding: 15px 30px; /* Larger padding for a more button-like feel */
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    margin-bottom: 30px; /* Add some space at the bottom */
    border-radius: 50px; /* Rounded corners */
    box-shadow: 0 0 15px #ff007f, 0 0 30px #00bcd4, 0 0 45px #7d53d6; /* Bright glowing shadows */
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease-in-out;
    background-size: 400% 400%; /* Makes the gradient move */
    animation: psychedelic 5s linear infinite; /* Animated gradient */
}

/* Hover effect for Clear button */
.btn-clear:hover {
    transform: scale(1.1); /* Make it grow when hovered */
    box-shadow: 0 0 20px #ff007f, 0 0 40px #00bcd4, 0 0 60px #7d53d6, 0 0 80px #ff00ff; /* More glow on hover */
}

/* Keyframes for psychedelic gradient animation */
@keyframes psychedelic {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Header Image */
#header-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    filter: brightness(0.5);
    border-bottom: 3px solid #5e4b8b;
}

/* Fullscreen header image presentation */
#header-image:fullscreen,
#header-image:-webkit-full-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: #000;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    filter: none;
    cursor: zoom-out;
}
#timelapse-image:fullscreen,
#timelapse-image:-webkit-full-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: #000;
    margin: 0;
    border: none;
    box-shadow: none;
    cursor: zoom-out;
    touch-action: none;
    -ms-touch-action: none;
}

#header-image:fullscreen .header-overlay,
#header-image:-webkit-full-screen .header-overlay {
    display: none;
}

/* Titles */
.title {
    font-size: 2.8rem;
    text-transform: uppercase;
    text-shadow: 0 0 15px #7d53d6, 0 0 30px #7d53d6, 0 0 45px #7d53d6;
    animation: glow 1.5s infinite alternate;
}

.sub-title {
    font-size: 1.8rem;
    margin-top: 20px;
    color: #5e4b8b;
    text-shadow: 0 0 15px #5e4b8b;
}

/* Countdown */
.countdown-box {
    font-size: 2rem;
    padding: 15px;
    border: 2px solid #00bcd4;
    background: rgba(0, 0, 0, 0.8);
    width: fit-content;
    margin: 20px auto;
    border-radius: 10px;
    text-shadow: 0 0 15px #00bcd4;
}

/* Checklist */
.checklist-container {
    margin: 20px auto;
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow-x: hidden;
}
.checklist-table {
    width: 100%;
}

/* Item update animation */
@keyframes itemUpdated {
    0% { background-color: rgba(138, 229, 255, 0.3); }
    100% { background-color: transparent; }
}

tr.item-updated {
    animation: itemUpdated 0.6s ease-out;
}

.list-controls {
    margin: 20px auto;
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.control-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.control-row input,
.control-row select {
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #e3f2fd;
    font-size: 0.95rem;
    min-width: 160px;
    transition: all 0.2s ease;
}

.control-row input:focus,
.control-row select:focus {
    border-color: #8ae5ff;
    background: rgba(138, 229, 255, 0.1);
    outline: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.cell-input {
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #e3f2fd;
}

.list-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

th {
    background: rgba(255, 255, 255, 0.1);
}

/* Snowfall Effect */
.snowflake {
    position: fixed;
    top: -10px;
    color: #ffffff;
    font-size: 1.5rem;
    opacity: 0.9;
    animation: fall linear infinite;
}

@keyframes fall {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100vh);
    }
}

/* Glowing Effect */
@keyframes glow {
    from {
        text-shadow: 0 0 10px #5e4b8b, 0 0 20px #5e4b8b;
    }
    to {
        text-shadow: 0 0 25px #5e4b8b, 0 0 45px #5e4b8b;
    }
}

.quantity {
    color: #ff4d4d;  /* Bright red */
    font-weight: bold;
}

.countdown-card {
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.92), rgba(7, 9, 18, 0.96));
    padding: 22px;
    border-radius: 22px;
    margin: 0 auto 20px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--glow);
}

/* Inline countdown inside psychedelic card, hidden by default */
.psychedelic-card .countdown-card-inline {
    display: none;
    background: rgba(6, 6, 13, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 18px;
    box-shadow: var(--glow);
    margin: 0 0 12px;
}
.psychedelic-card .countdown-card-inline .countdown-text {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--muted);
}
.psychedelic-card .countdown-card-inline .countdown-box {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 14px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
}

/* In collector mode, center the external countdown and keep inline hidden */
.collector-mode .container > .countdown-card {
    display: block;
    text-align: center;
}
.collector-mode .psychedelic-card .countdown-card-inline {
    display: none;
}

/* Force white numbers in collector mode for maximum contrast */
.collector-mode .countdown-box {
    color: #ffffff;
}

/* Hide main checklist title in collector mode (keep modal titles) */
.collector-mode .container > .sub-title {
    display: none;
}

.card {
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin .sub-title {
    margin-bottom: 10px;
}

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

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.form-grid input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #e3f2fd;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Show cell-inputs in admin tables (override collector-mode CSS) */
.admin-table .cell-input {
    display: block !important;
    width: 100%;
    min-width: 140px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-high);
    padding: 10px 14px;
    font-size: 1rem;
    transition: border 0.3s ease, background 0.3s ease;
}

.admin-table .cell-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.metric {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
}

.frame-table-wrapper {
    max-height: 320px;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.divider {
    width: 100%;
    height: 1px;
    margin: 18px 0;
    background: rgba(255, 255, 255, 0.08);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.helper {
    opacity: 0.7;
    font-size: 0.9rem;
}

.muted {
    color: rgba(227, 242, 253, 0.75);
    margin: 4px 0 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: #00bcd4;
    margin: 0 0 6px;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.15), rgba(125, 83, 214, 0.12));
  }

.status-chip {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 188, 212, 0.4);
    font-weight: 700;
}

.badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 188, 212, 0.16);
    border: 1px solid rgba(0, 188, 212, 0.4);
    font-size: 0.9rem;
    color: #e3f2fd;
}

.badge.warning {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.35);
}

.phase-grid {
    display: grid;
    gap: 12px;
}

.phase-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.phase-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    width: 100%;
}

.phase-label input {
    width: 100%;
}

.inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px;
}

.inline-form input {
    flex: 1;
    min-width: 220px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #e3f2fd;
}

.pill.secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.pill.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e3f2fd;
}

.template-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.requires-auth.locked {
    position: relative;
    opacity: 0.55;
    pointer-events: none;
}

.requires-auth.locked::after {
    content: 'Unlock with admin password';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(10, 10, 10, 0.4);
    border-radius: 12px;
    color: #e3f2fd;
    font-weight: 700;
}

.actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Default mode panel */
.default-mode-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.85), rgba(7, 9, 18, 0.9));
    box-shadow: var(--glow);
}
.preset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.preset-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.preset-btn.active {
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.22), rgba(199, 125, 255, 0.22));
    border: 1px solid rgba(255, 255, 255, 0.18);
}

select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #e3f2fd;
}

.sb-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 36px 10px 16px;
    min-height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.12), rgba(255, 255, 255, 0.04));
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(138, 229, 255, 0.30);
    color: var(--text-high);
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath fill='%238ae5ff' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    transition: all 0.2s ease;
}

.sb-select:hover {
    border-color: rgba(138, 229, 255, 0.55);
    box-shadow: 0 10px 28px rgba(138, 229, 255, 0.22);
}

.sb-select:focus {
    outline: none;
    border-color: rgba(138, 229, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(138, 229, 255, 0.25);
}

.sb-select.tiny {
    padding: 4px 28px 4px 10px;
    min-height: 28px;
    border-radius: 12px;
    font-size: 12px;
    background-position: right 8px center;
    background-size: 14px;
}

.sb-select.cute {
    border-radius: 20px;
    border-color: rgba(199, 125, 255, 0.4);
    background: linear-gradient(135deg, rgba(199, 125, 255, 0.12), rgba(138, 229, 255, 0.04));
    background-color: rgba(0, 0, 0, 0.35);
}

.sb-select.cute:hover {
    border-color: rgba(199, 125, 255, 0.7);
    box-shadow: 0 0 15px rgba(199, 125, 255, 0.3);
}

.sb-select option {
    background-color: #1a1a1a;
    color: #eaf7ff;
}

.admin-table select {
    width: 120px;
}

.media-card {
    margin-top: 24px;
}

.timelapse-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.timelapse-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
    margin-top: 0;
}

.frame-shell {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    border: none;
    background: #000;
    min-height: 260px;
    max-height: 70vh;
    display: block;
}

.frame-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frame-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 700;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8px, 1fr));
    gap: 4px;
    margin-top: 12px;
}

.timeline button {
    height: 10px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.timeline button:hover {
    background: rgba(0, 188, 212, 0.6);
    transform: translateY(-1px);
}

.timeline button.active {
    background: linear-gradient(90deg, #00bcd4, #7d53d6);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.4);
}

#timelapse-card-admin .inline-form {
    align-items: flex-end;
}


/* Collector mode: read-only detail buttons are still clickable */
.detail-btn.read-only {
    opacity: 0.6;
    cursor: pointer;
}
.detail-btn.read-only.has-value {
    opacity: 0.85;
}

/* Lightweight popover for detail content */
.detail-popover {
    position: absolute;
    z-index: 9999;
    min-width: 200px;
    max-width: 340px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.96), rgba(7, 9, 18, 0.98));
    border: 1px solid rgba(138, 229, 255, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), var(--glow);
    color: var(--text-high);
    backdrop-filter: blur(6px);
}
.detail-tooltip {
    position: absolute;
    z-index: 9999;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.22), rgba(199, 125, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    color: var(--text-high);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}
.detail-popover-title {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: rgba(138, 229, 255, 0.9);
}
.detail-popover-body {
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: normal;
    color: var(--text-high);
    max-height: 260px;
    overflow: auto;
    overscroll-behavior: contain;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 229, 255, 0.6) rgba(255, 255, 255, 0.06);
}
.detail-popover-body::-webkit-scrollbar { width: 8px; }
.detail-popover-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 12px; }
.detail-popover-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(138, 229, 255, 0.85), rgba(199, 125, 255, 0.65));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.detail-popover-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(138, 229, 255, 1), rgba(199, 125, 255, 0.85)); }

/* Generic Markdown content styling */
.md-content {
    font-size: 0.95rem;
}
.md-content p { margin: 0 0 8px; }
.md-content ul, .md-content ol { margin: 8px 0 8px 18px; }
.md-content code, .md-content pre {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px 6px;
    overflow: auto;
    white-space: pre-wrap;
}
.md-content a { color: var(--accent); text-decoration: underline; }

/* Input modal Markdown preview */
.md-preview {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.85), rgba(7, 9, 18, 0.9));
    max-height: 280px;
    overflow: auto;
    overscroll-behavior: contain;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 229, 255, 0.6) rgba(255, 255, 255, 0.06);
}
.md-preview::-webkit-scrollbar { width: 8px; }
.md-preview::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 12px; }
.md-preview::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(138, 229, 255, 0.85), rgba(199, 125, 255, 0.65));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.md-preview::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(138, 229, 255, 1), rgba(199, 125, 255, 0.85)); }
.md-preview-title {
    margin: 0 0 8px;
}
.md-preview-empty {
    font-size: 0.9rem;
}

/* Ensure textarea in modal spans full width */
.inline-form textarea#input-modal-input {
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-high);
    padding: 10px 12px;
}

/* Apply the same luxe styling directly to the input/textarea by id */
#input-modal-input {
    width: 100%;
    min-height: 120px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    color: var(--text-high);
    padding: 10px 12px;
    outline: none;
    resize: vertical;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 229, 255, 0.6) rgba(255, 255, 255, 0.06);
}
#input-modal-input:focus {
    border-color: rgba(138, 229, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(138, 229, 255, 0.25);
}
#input-modal-input::placeholder {
    color: rgba(231, 242, 253, 0.7);
}
#input-modal-input::-webkit-scrollbar { width: 8px; }
#input-modal-input::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 12px; }
#input-modal-input::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(138, 229, 255, 0.85), rgba(199, 125, 255, 0.65));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
}
#input-modal-input::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(138, 229, 255, 1), rgba(199, 125, 255, 0.85)); }



/* Snowboarder style for AI prompts card and editors */
.snow-card {
    background: linear-gradient(135deg, rgba(30,30,50,0.7), rgba(10,10,20,0.7));
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.prompt-form textarea {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #e8f3ff;
    padding: 10px 12px;
    border-radius: 10px;
}
.prompt-form .phase-label { display: block; margin-bottom: 12px; }
.template-actions select.pill.ghost {
    background: rgba(255,255,255,0.08);
    color: #e0f1ff;
    border-color: rgba(255,255,255,0.25);
}
.inline-form .phase-label select {
    min-width: 160px;
}
.admin-table details summary { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════════════════════
   NEWS STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Latest News Container (Discrete Display) */
.latest-news-container {
    margin: 24px 0;
    padding: 0;
}

.latest-news-card {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(111, 66, 193, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.latest-news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd 0%, #6f42c1 100%);
}

.news-badge {
    display: inline-block;
    background: rgba(13, 110, 253, 0.2);
    color: #6ea8fe;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.news-preview {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.75);
}

.news-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#view-all-news-btn {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(111, 66, 193, 0.8) 100%);
    border: 1px solid rgba(138, 229, 255, 0.3);
    color: #fff;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#view-all-news-btn:hover {
    background: linear-gradient(135deg, rgba(33, 130, 253, 0.95) 0%, rgba(131, 86, 213, 0.95) 100%);
    box-shadow: 0 6px 20px rgba(138, 229, 255, 0.35);
    transform: translateY(-1px);
}

.news-date {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* News Modal Styles */
.news-modal-panel {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.news-modal-content {
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    flex: 1;
    min-height: 0;
}

.news-item-card {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.news-item-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.3);
}

.news-item-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.news-item-content {
    margin-bottom: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.news-item-content p:last-child {
    margin-bottom: 0;
}

/* Admin News Management Styles */
.news-form-container {
    margin-top: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.news-form .form-group {
    margin-bottom: 16px;
}

.news-title-input,
.news-category-select,
.news-content-textarea {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
}

.news-content-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
}

.news-title-input:focus,
.news-category-select:focus,
.news-content-textarea:focus {
    outline: none;
    border-color: #0d6efd;
    background: rgba(13, 110, 253, 0.1);
}

.news-table {
    width: 100%;
    margin-top: 20px;
}

.news-table-header-row th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.news-table-body tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.news-table-body tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.news-table-body td {
    padding: 12px;
    vertical-align: top;
}

.news-title-cell strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
    color: #fff;
}

.news-category-cell .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
}

.news-actions-cell {
    white-space: nowrap;
}

.news-actions-cell button {
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .latest-news-card {
        padding: 16px;
    }
    
    .news-title {
        font-size: 1.1rem;
    }
    
    .news-preview {
        font-size: 0.875rem;
    }
    
    .news-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-modal-panel {
        width: 95%;
        max-height: 90vh;
        padding: 16px;
    }
    
    .news-modal-content {
        max-height: none;
        flex: 1;
    }
    
    .sub-title {
        font-size: 1.2rem;
    }
}

/* Admin Login Modal */
.login-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    z-index: 999;
}

.login-modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.login-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 12, 0.92);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.login-modal-panel {
    position: relative;
    width: min(94vw, 420px);
    padding: 32px;
    background: linear-gradient(180deg, rgba(12, 15, 25, 0.95), rgba(7, 9, 18, 0.98));
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 2;
}

.login-modal-panel .sub-title {
    margin: 0 0 10px 0;
    text-align: center;
}

.login-modal-panel .inline-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-modal-panel .inline-form input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #e0f1ff;
}

.login-modal-panel .inline-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-modal-panel .inline-form button {
    align-self: center;
}

/* Admin header with logout section */
.admin-header-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-header-section .admin-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Logout section in header footer */
.logout-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(138, 229, 255, 0.08), rgba(125, 83, 214, 0.06));
    border-radius: 12px;
    border: 1px solid rgba(138, 229, 255, 0.25);
    box-shadow: 0 4px 12px rgba(80, 160, 255, 0.15);
    width: fit-content;
}

.logout-section .muted {
    font-size: 0.85rem;
    letter-spacing: 0.2px;
}

.logout-section .logout-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-width: auto;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .logout-section {
        width: 100%;
        justify-content: space-between;
        padding: 14px;
    }

    .logout-section .logout-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .logout-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .logout-section .logout-btn {
        width: 100%;
    }
}

/* Auth section (status + logout) */
.auth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* Mobile-friendly adjustments around 780px */
@media (max-width: 780px) {
    .checklist-container {
        overflow-x: auto;
        padding: 12px 8px;
    }
    #checklist {
        min-width: 0;
        table-layout: fixed;
        width: 100%;
    }
    #checklist thead { display: table-header-group; }
    #checklist tbody { display: table-row-group; }
    #checklist tbody tr { display: table-row; }
    #checklist tbody td,
    #checklist thead th {
        padding: 10px 8px;
    }
    .item-column { width: 38%; }
    .check-column { width: 14%; }
    .quantity-column { width: 12%; }
    .actions-column { width: 36%; }
    .row-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    .row-actions > * {
        width: 100%;
        justify-self: stretch;
    }
    /* Make photo button span full width (new line) */
    .row-actions > button:nth-last-child(2) {
        grid-column: 1 / -1;
    }
    .micro-pill {
        font-size: 0.85rem;
        padding: 6px 8px;
        min-width: unset;
        white-space: nowrap;
    }
    .reorder-btn {
        width: 100%;
        min-width: unset;
        padding: 6px 4px;
    }
    td,
    th { font-size: 0.9rem; }
}

    /* Chat: keep options accessible and sized for mobile */
    .ollama-chat .chat-inner { width: 98vw; padding: 8px; border-radius: 12px; }
    .ollama-chat .chat-title { display: flex; align-items: center; gap: 6px; }
    .ollama-chat .chat-model-select { max-width: 60vw; }
    .ollama-chat .chat-row { grid-template-columns: 1fr auto; gap: 6px; }
    .ollama-chat input { font-size: 0.95rem; padding: 8px 10px; }

    /* Show chat toggle on mobile, smaller footprint */
    .chat-toggle { display: block; right: 12px; bottom: 12px; width: 36px; height: 36px; }
}

/* Ensure chat toggle is not hidden on mobile */
@media (max-width: 992px) {
    .chat-toggle { display: block; }
}

/* Collector filter toggle button (3-phase toggle) */
.filter-toggle-btn {
    display: none; /* hidden by default, shown in collector mode via JS */
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(80, 160, 255, 0.15), rgba(138, 229, 255, 0.1));
    color: #8ae5ff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(80, 160, 255, 0.25), rgba(138, 229, 255, 0.2));
    border-color: rgba(138, 229, 255, 0.6);
    box-shadow: 0 0 10px rgba(138, 229, 255, 0.3);
}

.filter-toggle-btn:active {
    transform: scale(0.98);
}

.collector-mode .filter-toggle-btn {
    display: inline-block;
}

