@font-face {
    font-family: Inter;
    src: url(../assets/font/Inter-VariableFont_opsz\,wght.ttf);
}

* {
    font-family: var(--ff);
}

#headline {
    color: #55B9E1;
    font-family: Inter;
    font-size: var(--font-subtitle);
    font-style: normal;
    font-weight: 600;
    line-height: 87.645%;
    margin-right: 1vw;
    text-align: right;
}
#newLoginEmployee {
    cursor: pointer;
    text-align: center;
}
#head {
    background-color: #fff;
}

hr {
    border: 0.5px solid #B3B3B3;

}

/* Navigation bar for employee dashboard */
#employeeNavContainer {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    box-sizing: border-box;
    position: sticky;
    top: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 100;
}

.fa-solid {
    font-size: var(--font-button);
    margin-right: 1vw;
    padding: 4%;
}

#viewIcons {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 3px;
    margin-left: auto;
    position: relative;
    flex-shrink: 0;
}

#View,
#logIcon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 7px;
    background: transparent;
    padding: 5px;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    transition: background 0.15s;
    opacity: 0.75;
}
#View:hover,
#logIcon:hover {
    background: rgba(85, 185, 225, 0.12);
    opacity: 1;
}

#downloadIcon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 7px;
    background: transparent;
    padding: 5px;
    cursor: pointer;
    display: grid;
    place-items: center;
    fill: #6b7280;
    box-sizing: border-box;
    transition: background 0.15s, fill 0.15s;
    opacity: 0.8;
}
#downloadIcon:hover {
    background: rgba(201, 80, 139, 0.08);
    fill: #C9508B;
    opacity: 1;
}
.download-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    display: none;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0;
    border: none;
    z-index: 40;
}

.download-menu.open {
    display: flex;
}

.download-option {
    width: 100%;
    border: 1px solid rgba(201, 80, 139, 0.25);
    border-radius: 14px;
    background: #fff;
    color: var(--Purple);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.8rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.download-option:hover {
    transform: translateY(-1px);
}
#View svg,
#logIcon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.listV {
    fill: var(--Blue);
}
.selectedView {
    background: rgba(85, 185, 225, 0.15) !important;
    opacity: 1 !important;
    border-radius: 7px;
}

.selectedLog {
    opacity: 1;
}

#viewIcons i {
    color: #6b7280;
    cursor: pointer;
}
.toolbar {
    width: 3vw;
    height: 3vw;
    border-radius: 200px;
    border: 2px solid var(--Purple, #C9508B);
    background: #F7F7F7;
    box-shadow: 3px 4px 8.4px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 0;
    line-height: 0;
}

#viewOptions {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    z-index: 1000;
    display: flex;
    gap: 6px;
    box-sizing: border-box;
}

#searchBar {
    flex: 0 1 280px;
    min-width: 0;
    height: 36px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    padding: 0 14px;
    font-size: var(--font-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
#searchBar:focus {
    border-color: #C9508B;
    background: #fff;
}

#sortOrder {
    height: 5vh;
    border-radius: 12px;
    border: 1px solid #B3B3B3;
    font-size: var(--font-text);
    box-sizing: border-box;
    padding-left: 0.5rem;
}

#feedbackCount {
    font-size: 0.8rem;
    color: #888;
    margin: 0.25rem 1% 0.5rem;
    padding: 0;
}

/* View of all feedback */
#container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    box-sizing: border-box;
    justify-content: center;
    padding: 1%;
    grid-gap: 1vw;
}

.editStatus {
    display: inline-block;
    max-width: 85%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    width: auto;
    padding: 2%;
    color: var(--fwhite);
    border-radius: 12px;
    margin-top: 1vh;
    font-size: var(--md);
    background-color: var(--colorLight);
    cursor: pointer;
}

* {
    font-family: var(--ff);
}

#container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    box-sizing: border-box;
    padding: 2%;
}

.feedbackItem {
    background-color: rgba(0, 0, 0, 0.086);
    margin: 2%;
    padding: 4%;
    border-radius: 12px;
}


/* View of logs */
#logContainer {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    box-sizing: border-box;
    padding: 2%;
}

/* Detail Feedback Pop up */
#feedbackDetailPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    padding: 2%;
    z-index: 100;
}

/* Toolbar */
.tool-nav {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
}

.tool-main {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #6b7280;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    z-index: 1;
}
.tool-main:hover,
.tool-nav.is-open .tool-main {
    background: rgba(201, 80, 139, 0.08);
}
.tool-main svg {
    width: 20px !important;
    height: 20px !important;
}

.tool-actions {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.tool-nav.is-open .tool-actions {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
}

.tool-action {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #6b7280;
    transition: background 0.15s;
    outline: none;
    flex-shrink: 0;
}
.tool-action:hover {
    background: rgba(201, 80, 139, 0.1);
}
.tool-action svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}


/* Taskbar */
#taskbar {
    position: fixed;
    bottom: 5vh;
    right: 0;
    width: 40%;
    height: 8vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 2%;
    box-sizing: border-box; 
    z-index: 2;
}

#newFeedbackBtn {
    width: 10vh;
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 4.5rem;
    box-sizing: border-box;
    color: var(--Purple);
    border-radius: 50%;
    stroke-width: 1px;
    stroke: var(--Purple);
    background-color: #fff;
    filter: drop-shadow(0 4px 15.6px rgba(0, 0, 0, 0.25));
    border: 1px solid var(--Purple);
    text-align: center;
    cursor: pointer;
}

/* Formular */
#checkBoxGeolocation {
    margin-right: 1vw;
    transform: scale(1.7);
    fill: #D9D9D9;
    border-radius: 999px;
    margin-left: 1.5vw;
}

#geoText {
    color: #000;
    font-family: Inter;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;

}

#headerField,
#contactField {
    width: 100%;
    position: relative;
    border-radius: 12px;
    font-size: 1.3rem;
    background: #fff;
    padding: 1.5%;
    z-index: 1;


    border: 1.5px solid var(--Purple);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}


.inputLabels {
    margin-top: 3vh;
}

#buttonGrid {
    width: 100%;
    display: grid;
    grid-template-columns: 45% 55%;
    box-sizing: border-box;
    margin-top: 3vh;
}

.save {
    border-radius: 12px;
    margin-right: 1vw;
    color: var(--fgrey);


    border: 1.5px solid var(--Purple);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.submit {
    border-radius: 12px;
    background: var(--Purple);
    border: none;
    color: white;
}
#submitButton {
    width: 100%;
     cursor: pointer;
    text-transform: uppercase;
    font-size: var(--lg);
    text-align: center;
    padding: 3%;
    font-weight: bold;
    margin-top: 4%;
}

.submit,
.save {
    cursor: pointer;
    text-transform: uppercase;
    font-size: var(--lg);
    text-align: center;
    padding: 3%;
    font-weight: bold;
}

.fa-images {
    text-align: center;
}

.inputLabels {
    color: #000;
    font-size: var(--lg);
    padding-left: 1vw;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
}

#feedbackContainer div {
    margin-bottom: 1vh;
}

#errorMessageContact {
    color: red;
    font-size: var(--md);
    margin-top: 1vh;
    text-align: left;
    display: none;
}

#feedbackHeadline {
    font-size: var(--xxl);
    margin-bottom: 3vh;
}

i {
    font-size: 3rem;
    margin-bottom: 3vh;
    color: black;
    opacity: 0.3;
}

#uploadImage {
    width: 100%;
    display: grid;
    border-radius: 16px;
    border: 4px dashed #999;
    background: rgba(255, 255, 255, 0);
    padding: 10%;
    overflow: hidden;
    /* <- verhindert, dass der Rahmen rausläuft */
}

#feedbackContainer,
#uploadImage,
#headerField,
#descriptionField,
#emailTelefonField,
#contactField {
    box-sizing: border-box;
    margin-bottom: 3vh;
}

#descriptionField {
    width: 100%;
    height: 25vh;
    resize: none;
    overflow-x: hidden;
    padding: 1.5%;
    border: 2px solid transparent;
    border-image: none;
    border-radius: 12px;
    font-size: 1.1rem;

    border: 1.5px solid var(--Purple);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

#emailTelefonField {
    width: 100%;
    height: 5vh;
    resize: none;
    overflow-x: hidden;
    padding: 4%;
    margin-top: 2vh;
    background: var(--light);
    color: var(--fdark);


    border: 1.5px solid var(--Purple);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    font-size: var(--lg);
    font-family: var(--ff);

}

#submitFeedbackButton {
    width: 100%;
    margin-top: 2vh;
    margin-bottom: 1vh;
    color: var(--fwhite);
    padding: 1%;
    text-align: center;
    background-color: black;
    transition: 0.5s transform;
}

#submitFeedbackButton:hover {
    cursor: pointer;
    transform: translate(0, 10px);
}



#formularContainer {
    position: relative;
    width: 100%;
    top: 5%;
    right: 0;
    padding: 2%;
    z-index: 20;
}

/* Center the feedback container */
#feedbackContainer {
  

    padding: 2%;
    display: grid;
    grid-template-columns: 1fr 1fr;    
    grid-gap: 2%;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
}
#outerBox {
    width: 80%;
    /* 👈 maximale Höhe */
    overflow-y: auto;
    /* 👈 vertikales Scrollen */
    overflow-x: hidden;
    /* optional */

    position: fixed;
    top: 50%;
    left: 50%;
    border-radius: 24px;
    background: #F2F2F2;
    transform: translate(-50%, -50%);

    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
}
#outerBox h1{
    margin: 2%;
    color: var(--Purple);
}
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
    z-index: 3;
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
}


/*Preview*/
#imagePreview {
    width: 100%;
    /* never grow beyond this viewport height; becomes scrollable if content exceeds */
    height: 33.5vh;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(0, auto); /* prevent grid rows from forcing container growth */
    gap: 0.5rem;
    grid-column: 1 / -1;
    background-color: #d9d9d9;
    margin-top: 1vh;
    margin-bottom: 3vh;
    box-sizing: border-box;
    justify-content: center;
    border-radius: 12px;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smoother scrolling on mobile */

    /* remove any other conflicting max-height rules */
}

.preview-image {
    position: relative;
    width: 100%;
    height: 10vh;
    margin: 1vh;
        overflow: visible;

}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.fa-circle-xmark {
    position: absolute;

    top: 0;
    left: 0;

    font-size: 1.2rem;

    color: red;
    background: white;

    border-radius: 50%;
    padding: 2px;

    cursor: pointer;
    opacity: 1;

    z-index: 2;
}

/* MDN conform form validation styling */
/* Standardzustand */
#feedbackContainer.was-validated input:invalid,
#feedbackContainer.was-validated textarea:invalid {
    border: 2px solid red;
}

#feedbackContainer input,
#feedbackContainer textarea {
    border: 1.5px solid var(--Purple);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================================================
   Responsive Design - Tablet Landscape / Small Desktop (max 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    #container {
        grid-template-columns: 1fr 1fr;
    }

    #feedbackDetailPopup {
        width: 75%;
    }

    #headline {
        font-size: 3rem;
    }

    .toolbar {
        width: 4vw;
        height: 4vw;
    }

    #outerBox {
        width: 90%;
    }
}

/* ==========================================================================
   Responsive Design - Tablet Portrait (max 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    #employeeNavContainer {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
    }

    #headline {
        font-size: 2.5rem;
        text-align: center;
    }

    #searchBar {
        height: 36px;
        font-size: 1rem;
    }

    #sortOrder {
        margin-left: 0;
        width: 100%;
    }

    #container {
        grid-template-columns: 1fr 1fr;
        padding: 2% 1rem;
        gap: 2vw;
        box-sizing: border-box;
    }

    #feedbackDetailPopup {
        width: 85%;
        padding: 3%;
    }

    #feedbackContainer {
        grid-template-columns: 1fr;
    }

    #outerBox {
        width: 92%;
    }

    #taskbar {
        width: 50%;
        bottom: 4vh;
    }

    #newFeedbackBtn {
        width: 8vh;
        height: 8vh;
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   Responsive Design - Tablet Portrait / Large Mobile (max 768px)
   ========================================================================== */
@media (max-width: 768px) {
    #employeeNavContainer {
        flex-wrap: wrap;
        padding: 8px 10px;
        gap: 6px;
        top: 56px;
    }

    #headline {
        font-size: 2rem;
        grid-column: 1 / -1;
    }

    #searchBar {
        flex: 1 1 100%;
        height: 36px;
    }

    #viewIcons {
        margin-left: 0;
    }

    #container {
        grid-template-columns: 1fr;
        padding: 3%;
    }

    .feedbackItem {
        margin: 1%;
        padding: 5%;
    }

    .tool-actions {
        max-width: 75vw;
        overflow-x: auto;
    }

    .download-menu {
        min-width: 180px;
    }

    #feedbackDetailPopup {
        width: 92%;
        padding: 4%;
    }

    #outerBox {
        width: 95%;
        max-height: 90vh;
    }

    #outerBox h1 {
        font-size: 1.4rem;
    }

    #headerField,
    #contactField,
    #descriptionField {
        font-size: 1.05rem;
    }

    #buttonGrid {
        grid-template-columns: 1fr;
        gap: 1.5vh;
    }

    .save,
    .submit {
        font-size: 1rem;
        padding: 4%;
    }

    #imagePreview {
        grid-template-columns: repeat(3, 1fr);
        height: auto;
        max-height: 30vh;
    }

    #taskbar {
        width: 100%;
        bottom: 3vh;
        justify-content: center;
        padding-right: 0;
    }

    #newFeedbackBtn {
        width: 7vh;
        height: 7vh;
        font-size: 3rem;
    }
}

/* ==========================================================================
   Responsive Design - Mobile (max 480px)
   ========================================================================== */
@media (max-width: 480px) {
    #employeeNavContainer {
        top: 56px;
    }

    #headline {
        font-size: 1.6rem;
    }

    #searchBar {
        font-size: 0.95rem;
        padding-left: 3vw;
    }

    #sortOrder {
        font-size: 0.95rem;
        padding-left: 3vw;
    }

    #container {
        padding: 4%;
        gap: 2vh;
    }

    .feedbackItem {
        padding: 6%;
    }

    .tool-actions {
        max-width: 80vw;
    }

    .download-option {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }

    #feedbackDetailPopup {
        width: 95%;
        padding: 5%;
    }

    .editStatus {
        font-size: 0.85rem;
        padding: 3% 4%;
    }

    #outerBox {
        width: 96%;
        max-height: 92vh;
        border-radius: 18px;
    }

    #outerBox h1 {
        font-size: 1.2rem;
    }

    #feedbackContainer {
        padding: 3%;
    }

    #headerField,
    #contactField,
    #descriptionField {
        font-size: 0.95rem;
        padding: 3%;
    }

    .inputLabels {
        font-size: 1rem;
    }

    #imagePreview {
        grid-template-columns: repeat(2, 1fr);
    }

    #newFeedbackBtn {
        width: 6vh;
        height: 6vh;
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   Filter Panel (FR-24) — Compact Toolbar + Expandable Popup
   ========================================================================== */

#filterPanel {
    position: relative;
    margin: 0.5rem 0;
}

.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.45rem 0.25rem;
}

.filter-toolbar__left,
.filter-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filter toggle button */
.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
    height: 36px;
}

.filter-toggle-icon {
    flex-shrink: 0;
}

.filter-toggle-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.filter-toggle-btn.filter-toggle-btn--active {
    border-color: var(--Purple, #C9508B);
    color: var(--Purple, #C9508B);
}

/* Filter badge */
.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--Blue, #55B9E1);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

/* Filter popup */
.filter-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    min-width: 340px;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
    padding: 0;
}

.filter-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.35rem 0.7rem;
}

.filter-popup__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.filter-popup__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0.15rem 0.3rem;
}
.filter-popup__close:hover {
    color: #374151;
}

.filter-popup__body {
    padding: 0.2rem 1.35rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.filter-popup__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-popup__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-popup__footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.35rem;
    border-top: 1px solid #eee;
}

.filter-popup__btn {
    border: none;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.filter-popup__btn--text {
    background: none;
    color: #6b7280;
    padding: 0.5rem 0.6rem;
}
.filter-popup__btn--text:hover {
    color: #374151;
}

.filter-popup__btn--reset {
    background: none;
    color: var(--Purple, #C9508B);
    padding: 0.5rem 0.6rem;
}
.filter-popup__btn--reset:hover {
    color: #b0447a;
}

.filter-popup__btn--apply {
    margin-left: auto;
    background: var(--Blue, #55B9E1);
    color: #fff;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    font-size: 0.88rem;
}
.filter-popup__btn--apply:hover {
    background: #3ea8d4;
}

/* Shared filter controls */
.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.filter-group--dates {
    gap: 0.4rem;
}

.filter-label {
    font-size: var(--sm);
    font-weight: 600;
    color: var(--fgrey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

/* Toolbar sort dropdown — borderless, text-style */
.filter-toolbar #sortOrder {
    border: none;
    background: transparent;
    font-size: var(--sm);
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
    outline: none;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: var(--sm);
    color: var(--lighter-Text);
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    accent-color: var(--Blue, #55B9E1);
    width: 17px;
    height: 17px;
    cursor: pointer;
    border-radius: 4px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    user-select: none;
}
.filter-chip:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}
.filter-chip--active {
    background: var(--Purple, #C9508B);
    border-color: var(--Purple, #C9508B);
    color: #fff;
}
.filter-chip--active:hover {
    background: #b0447a;
    border-color: #b0447a;
    color: #fff;
}

.filter-assignee {
    font-weight: 600;
    color: var(--Purple);
}

#filterPriority {
    width: 100%;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: var(--sm);
    padding: 0 0.6rem;
    background: #fff;
    cursor: pointer;
    color: #374151;
}

.filter-date-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: var(--sm);
    color: var(--fgrey);
}

.filter-date-separator {
    font-size: var(--sm);
    color: var(--fgrey);
    padding: 0 0.1rem;
}

/* Popup checkbox label */
.filter-popup .filter-checkbox {
    font-size: 0.85rem;
    color: #374151;
    padding: 0.15rem 0;
}

.filter-date-label input[type="date"] {
    height: 30px;
    border-radius: 8px;
    border: 1px solid #B3B3B3;
    font-size: var(--sm);
    padding: 0 0.4rem;
    background: #fff;
    cursor: pointer;
}

@media (max-width: 768px) {
    .filter-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        padding: 0.5rem 0.25rem;
    }

    .filter-toolbar__left,
    .filter-toolbar__right {
        width: 100%;
        gap: 0.6rem;
    }

    .filter-popup {
        left: 0;
        right: 0;
        max-width: none;
        min-width: 0;
    }
}

/* ==========================================================================
   Dashboard UX States: Loading / Empty / Error / Toast
   ========================================================================== */

/* Loading state */
.dashboard-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: #999;
    font-size: 1rem;
}

.dashboard-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--Blue, #55B9E1);
    border-radius: 50%;
    animation: dashboard-spin 0.8s linear infinite;
}

@keyframes dashboard-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.dashboard-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: #aaa;
    font-size: 1rem;
    text-align: center;
}

.dashboard-clear-filters {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: 1.5px solid var(--Purple, #C9508B);
    background: #fff;
    color: var(--Purple, #C9508B);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dashboard-clear-filters:hover {
    background: #fdf0f6;
}

/* Error state */
.dashboard-error {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: var(--Red, #E2001A);
    font-size: 1rem;
    text-align: center;
}

.dashboard-retry {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: none;
    background: var(--Red, #E2001A);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Toast / Snackbar */
.dashboard-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(0.75rem);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

.dashboard-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.dashboard-toast--success { background: var(--Green, #4caf50); }
.dashboard-toast--error   { background: var(--Red, #E2001A); }
.dashboard-toast--info    { background: var(--Blue, #55B9E1); }

/* ── Citizen Public Feed ─────────────────────────────────────────────── */

#feed-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* 6.2 Sort toggle */
#sort-controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin: 1.5rem auto 1rem;
    max-width: 760px;
    padding: 0 1rem;
}

#sort-controls button {
    padding: 0.45rem 1.1rem;
    border: 1.5px solid var(--Blue, #55B9E1);
    border-radius: 999px;
    background: transparent;
    color: var(--Blue, #55B9E1);
    font-size: var(--sm, 0.85rem);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

#sort-controls button:hover {
    background: rgba(85, 185, 225, 0.12);
}

#sort-controls button.active {
    background: var(--Blue, #55B9E1);
    color: #fff;
}

/* 6.1 Feed card */
.public-feedback-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.1rem 1.25rem;
    max-width: 700px;
    margin: 0 auto 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: var(--lg, 1.05rem);
    font-weight: 700;
    color: var(--Text, #000);
    margin: 0;
    flex: 1;
}

.card-description {
    font-size: var(--md, 0.95rem);
    color: var(--lighter-Text, #333);
    line-height: 1.5;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feed-meta {
    font-size: var(--sm, 0.8rem);
    color: var(--fgrey, #595959);
}

/* 6.3 Vote widget */
.vote-widget {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.vote-widget.vote-disabled {
    opacity: 0.85;
}

.upvote-btn,
.downvote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1.5px solid var(--Blue, #55B9E1);
    border-radius: 50%;
    background: transparent;
    color: var(--Blue, #55B9E1);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}

.upvote-btn:hover:not(:disabled) {
    background: rgba(85, 185, 225, 0.12);
}

.downvote-btn {
    border-color: #E2001A;
    color: #E2001A;
}

.downvote-btn:hover:not(:disabled) {
    background: rgba(226, 0, 26, 0.08);
}

.upvote-btn.vote-active-up {
    background: var(--Blue, #55B9E1);
    color: #fff;
}

.downvote-btn.vote-active-down {
    background: #E2001A;
    color: #fff;
    border-color: #E2001A;
}

.upvote-btn:disabled,
.downvote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.vote-score {
    min-width: 2rem;
    text-align: center;
    font-size: var(--sm, 0.82rem);
    font-weight: 700;
    color: var(--fgrey, #595959);
}

.vote-score.score-negative {
    color: #E2001A;
}

.vote-message {
    font-size: var(--sm, 0.8rem);
    color: var(--fgrey, #595959);
    font-style: italic;
}

/* Card image gallery */
.card-image-gallery {
    display: flex;
    gap: 0.5rem;
    overflow: hidden;
    margin: 0.5rem 0;
}

.card-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: zoom-in;
    transition: opacity 0.15s;
}

.card-thumb:hover {
    opacity: 0.85;
}

/* 6.4 Priority badges */
.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: var(--sm, 0.75rem);
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.priority-urgent { background: #E53E3E; }
.priority-high   { background: #DD6B20; }
.priority-medium { background: #D69E2E; }
.priority-low    { background: #718096; }

/* 6.5 Empty / Error states */
.feed-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--fgrey, #595959);
    font-size: var(--md, 0.95rem);
    text-align: center;
}

.feed-state-icon {
    font-size: 2.5rem;
    line-height: 1;
}

/* 6.6 Auth modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.75rem 1.75rem;
    max-width: 400px;
    width: 92%;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.modal-box h2 {
    font-size: var(--lg, 1.1rem);
    font-weight: 700;
    color: var(--Text, #000);
    margin: 0;
}

.modal-box p {
    font-size: var(--sm, 0.85rem);
    color: var(--fgrey, #595959);
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--fgrey, #595959);
    line-height: 1;
    padding: 0.1rem 0.3rem;
}

.modal-close:hover { color: var(--Text, #000); }

.modal-step {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-step.hidden { display: none; }

.modal-step input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: var(--md, 0.95rem);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.modal-step input:focus { border-color: var(--Blue, #55B9E1); }

.modal-step button {
    padding: 0.6rem 1.25rem;
    background: var(--Blue, #55B9E1);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: var(--md, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.modal-step button:hover { opacity: 0.88; }

.modal-error {
    font-size: var(--sm, 0.82rem);
    color: var(--Red, #E2001A);
    min-height: 1.1em;
}

