/* ===========================================================================
   Feedback page — matched to the approved Carisma design.
   =========================================================================== */

.fb-page { display: flex; flex-direction: column; gap: 14px; }

/* -------------------------------- banner --------------------------------- */
.fb-banner {
    background: linear-gradient(120deg, #f7ecef 0%, #faf3ee 55%, #f6f3fb 100%);
    border: 1px solid #f1e6e8; border-radius: 18px; padding: 12px 24px;
}
.fb-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; margin-bottom: 4px; color: #6b5f63; }
.fb-crumb a { color: #6b5f63; text-decoration: none; }
.fb-crumb a:hover { color: var(--primary-color); text-decoration: underline; }
.fb-crumb strong { color: #1c1416; font-weight: 700; }
.fb-crumb__sep { color: #cdbfc3; }
.fb-title { font-size: 1.5rem; font-weight: 800; color: #1c1416; margin: 0 0 2px; }
.fb-sub { color: #6b5f63; font-size: .88rem; margin: 0; }

/* ------------------------------ tabs + average ----------------------------- */
.fb-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.fb-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-tab {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 6px 16px; border: 1px solid #e3d9dc; border-radius: 999px; background: #fff;
    font: inherit; font-size: .94rem; font-weight: 600; color: #2b2f36;
}
.fb-tab:hover { border-color: var(--primary-color); }
.fb-tab__count { min-width: 28px; text-align: center; padding: 1px 9px; border-radius: 999px; background: #f1ebed; font-size: .8rem; font-weight: 700; }
.fb-tab.is-active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; box-shadow: 0 2px 6px rgba(122, 31, 43, .3); }
.fb-tab.is-active .fb-tab__count { background: #fff; color: var(--primary-color); }
.fb-tab__tick { font-size: .85rem; }
.fb-avg { color: #6b5f63; font-size: .94rem; }
.fb-avg strong { margin: 0 6px 0 8px; font-size: 1.5rem; font-weight: 700; color: #8a5a00; }

/* ------------------------------- rating scale ------------------------------ */
.fb-scale {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px;
    background: #fff; border: 1px solid #eef0f3; border-radius: 12px; padding: 10px 20px; font-size: .92rem; color: #3d3236;
}
.fb-scale__label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: #6b5f63; }
.fb-scale__item { display: inline-flex; align-items: center; gap: 8px; }

/* ---------------------------------- stars --------------------------------- */
.fb-star { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; cursor: pointer; color: #c9ced6; line-height: 0; }
.fb-star .star-svg { width: 22px; height: 22px; fill: none; stroke: currentColor; }
.fb-scale .fb-star { cursor: default; }
.fb-scale .fb-star .star-svg { width: 18px; height: 18px; }
.fb-star.is-on { color: #e0a93c; }
.fb-star.is-on .star-svg { fill: currentColor; }
.fb-stars { display: inline-flex; align-items: center; gap: 10px; }
.fb-stars .fb-star:hover { color: #e0a93c; transform: scale(1.12); }
.fb-stars__text { min-width: 120px; font-size: .84rem; color: #3d3236; white-space: nowrap; }
.fb-stars__text.is-none { color: #8a8f99; }

/* --------------------------------- card ----------------------------------- */
.fb-card {
    background: #fff; border: 1px solid #eef0f3; border-top: 3px solid #e9c7d2; border-radius: 16px;
    box-shadow: 0 1px 2px rgba(20, 20, 40, .04);
}
.fb-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; }
.fb-card__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.2rem; font-weight: 700; color: #1c1416; }
.fb-card__sub { font-size: .9rem; font-weight: 500; color: #6b5f63; }
.fb-accent { width: 4px; height: 20px; border-radius: 3px; background: var(--primary-color); }
.fb-card__actions { display: flex; align-items: center; gap: 18px; }
.fb-link { border: 0; background: none; padding: 0; color: var(--primary-color); font: inherit; font-weight: 600; cursor: pointer; }
.fb-link:hover { text-decoration: underline; }
.fb-export {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; cursor: pointer;
    border: 1px solid var(--primary-color); border-radius: 10px; background: var(--primary-color); color: #fff;
    font: inherit; font-size: .94rem; font-weight: 600;
}
.fb-export:hover { filter: brightness(1.08); }
.fb-export .material-symbols-rounded { font-size: 19px; }

/* --------------------------------- table ---------------------------------- */
.fb-scroll { overflow: auto; max-height: 560px; border-top: 1px solid #ece6e2; }
.fb-table { width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0; font-size: .94rem; color: #3d3236; }
.fb-table th {
    position: sticky; z-index: 3; background: #f6ecef; color: #5a2636; text-align: left;
    font-size: .74rem; font-weight: 700; letter-spacing: .06em; padding: 0 12px;
}
.fb-hrow th { top: 0; height: 56px; border-bottom: 1px solid #ece6e2; }
.fb-frow th { top: 56px; height: 62px; background: #f9f1f3; border-bottom: 1px solid #ece6e2; font-weight: 400; letter-spacing: 0; }
.fb-table td { padding: 8px 12px; border-bottom: 1px solid #f2eeef; vertical-align: middle; height: 54px; }
.fb-table tbody tr:nth-child(even) td { background: #fcf8f9; }
.fb-table tbody tr:hover td { background: #f9eef2; }
.fb-r { text-align: right; }
.fb-num { font-variant-numeric: tabular-nums; }
.fb-strong { font-weight: 500; }
.fb-job { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--primary-color); }
.fb-empty { text-align: center; color: #8a8f99; padding: 28px !important; }

/* Frozen columns: "Received from" and "Job name" stay in view while the table scrolls sideways.
   Fixed widths so the second column knows where to stick; every frozen cell has an opaque background. */
.fb-table th:nth-child(1), .fb-table td:not(.fb-empty):nth-child(1) { position: sticky; left: 0; width: 130px; min-width: 130px; max-width: 130px; box-sizing: border-box; }
.fb-table th:nth-child(2), .fb-table td:not(.fb-empty):nth-child(2) { position: sticky; left: 130px; width: 300px; min-width: 300px; max-width: 300px; box-sizing: border-box; box-shadow: 1px 0 0 #ece6e2; }
.fb-table td:not(.fb-empty):nth-child(1), .fb-table td:not(.fb-empty):nth-child(2) { z-index: 2; background: #fff; }
.fb-table tbody tr:nth-child(even) td:not(.fb-empty):nth-child(-n+2) { background: #fcf8f9; }
.fb-table tbody tr:hover td:not(.fb-empty):nth-child(-n+2) { background: #f9eef2; }
.fb-table th:nth-child(-n+2) { z-index: 5; }           /* header cells sit above the frozen body cells */

.fb-fl { min-width: 0; }
.fb-fl input[type="search"] {
    width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px; border: 1px solid #d9dde3; border-radius: 10px;
    background: #fff; font: inherit; font-size: .9rem; outline: none;
}
.fb-fl input[type="search"]:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(122, 31, 43, .12); }

.fb-comment {
    width: 190px; height: 42px; box-sizing: border-box; padding: 0 12px;
    border: 1px solid #d9dde3; border-radius: 10px; background: #fff; font: inherit; font-size: .9rem; outline: none;
}
.fb-comment:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(122, 31, 43, .12); }

/* Per-row Save button: only active once a rating is picked and something changed. */
.fb-td--save { width: 96px; text-align: right; }
.fb-save {
    height: 40px; min-width: 76px; padding: 0 16px; cursor: pointer;
    border: 1px solid var(--primary-color); border-radius: 10px; background: var(--primary-color); color: #fff;
    font: inherit; font-size: .9rem; font-weight: 600;
}
.fb-save:hover:not(:disabled) { filter: brightness(1.08); }
.fb-save:disabled { opacity: .4; cursor: not-allowed; }
.fb-save.is-saved:disabled { opacity: 1; background: #e3f3ea; border-color: #bfe3cd; color: #0d6a40; cursor: default; }
.fb-star:disabled, .fb-comment:disabled { opacity: .6; cursor: not-allowed; }

/* --------------------------------- footer --------------------------------- */
.fb-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid #ece6e2; }
.fb-foot__text { font-size: .9rem; color: #6b5f63; }
.fb-size { height: 44px; padding: 0 12px; border: 1px solid #d9dde3; border-radius: 10px; background: #fff; font: inherit; font-size: .92rem; cursor: pointer; }
.fb-pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fb-pager__btn, .fb-pager__nav {
    min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid #d9dde3; border-radius: 10px; background: #fff;
    font: inherit; font-size: .96rem; font-weight: 500; color: #2b2f36; cursor: pointer;
}
.fb-pager__btn:hover, .fb-pager__nav:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
.fb-pager__btn.is-on { background: var(--primary-color); border-color: var(--primary-color); color: #fff; font-weight: 700; }
.fb-pager__nav:disabled { opacity: .45; cursor: not-allowed; }

/* --------------------------------- toast ---------------------------------- */
.fb-toast {
    position: fixed; right: 24px; bottom: 24px; z-index: 3500; pointer-events: none;
    background: #1c1416; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem;
    animation: fb-toast 2.5s ease forwards;
}
.fb-toast--error { background: #b42318; animation-duration: 6s; }
@keyframes fb-toast { 0%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }
