/* ==========================================================================
   PNRU IT Support - design system
   Layout: fixed dark top bar, fixed left sidebar, light canvas for content.
   ========================================================================== */

:root {
    --ink: #171740;
    --ink-2: #23234f;

    --primary: #7c5cf0;
    --primary-600: #6b46ec;
    --primary-soft: #efeafe;
    --primary-grad: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);

    --bg: #f7f6fc;
    --surface: #ffffff;
    --border: #edeaf6;
    --text: #1f2340;
    --muted: #7c7b95;

    --blue: #3b82f6;
    --blue-soft: #e3edff;
    --amber: #f59e0b;
    --amber-soft: #fdf0d7;
    --green: #10b981;
    --green-soft: #d8f5ea;
    --pink: #ec4899;
    --pink-soft: #fce4f0;
    --violet: #8b5cf6;
    --violet-soft: #ece5fe;

    --sidebar-w: 244px;
    --topbar-h: 62px;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(23, 23, 64, .04), 0 8px 24px rgba(23, 23, 64, .06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: "Noto Sans Thai", "Sarabun", "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
}

a {
    text-decoration: none;
}

/* ---------- Top bar ---------------------------------------------------- */

.topbar {
    height: var(--topbar-h);
    background: var(--ink);
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
}

/* The logo is a self-contained circle with its own background, so it needs no tile behind it. */
.topbar .brand .mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
}

.topbar .brand .mark img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.topbar .spacer {
    flex: 1;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.user-chip .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    display: grid;
    place-items: center;
    font-size: 17px;
}

.user-chip .who {
    line-height: 1.2;
}

.user-chip .who .name {
    font-size: 14px;
    font-weight: 600;
}

.user-chip .who .role {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

.logout-btn {
    background: rgba(255, 255, 255, .1);
    border: none;
    color: rgba(255, 255, 255, .85);
    border-radius: 9px;
    padding: 7px 13px;
    font-size: 13px;
    cursor: pointer;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

/* ---------- Shell ------------------------------------------------------ */

.shell {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - var(--topbar-h));
}

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--surface);
    align-self: stretch;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--topbar-h);
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
}

.sidenav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidenav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #55536e;
    font-size: 14.5px;
    transition: background .15s, color .15s;
}

.sidenav a .ico {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f4f2fa;
    color: var(--muted);
    font-size: 15px;
}

.sidenav a:hover {
    background: #faf9fe;
    color: var(--text);
}

.sidenav a.active {
    background: var(--primary-soft);
    color: var(--primary-600);
    font-weight: 600;
}

.sidenav a.active .ico {
    background: #fff;
    color: var(--primary);
}

.side-foot {
    margin-top: auto;
    padding-top: 20px;
}

.help-card {
    background: linear-gradient(160deg, #4c1d95 0%, #2e1065 100%);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
    color: #fff;
}

.help-card h6 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
}

.help-card p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .72);
    margin: 0 0 12px;
}

.help-card .btn-help {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border-radius: 9px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
}

.help-card .mascot {
    font-size: 34px;
    margin-top: 12px;
    color: rgba(255, 255, 255, .82);
}

.side-copy {
    text-align: center;
    color: #a9a7bd;
    font-size: 11.5px;
    line-height: 1.7;
    padding: 14px 0 2px;
}

.content {
    flex: 1;
    min-width: 0;
    background: var(--bg); 
    padding: 26px 30px 40px;
    min-height: calc(100vh - var(--topbar-h));
}

/* ---------- Page header ------------------------------------------------ */

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-head h1 {
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 4px;
}

.page-head .sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

/* ---------- Buttons ---------------------------------------------------- */

.btn {
    border-radius: 11px;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: filter .15s, background .15s;
}

.btn-primary {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: 0 6px 18px rgba(139, 92, 246, .32);
}

.btn-primary:hover {
    filter: brightness(1.06);
    color: #fff;
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: #55536e;
}

.btn-ghost:hover {
    background: #faf9fe;
    color: var(--text);
}

.btn-sm {
    padding: 7px 13px;
    font-size: 13px;
    border-radius: 9px;
}

/* ---------- Cards ------------------------------------------------------ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-body {
    padding: 20px;
}

.card-foot {
    border-top: 1px solid var(--border);
    padding: 13px;
    text-align: center;
}

.card-foot a {
    color: var(--primary-600);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Stat tiles ------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.stat .ico {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-size: 23px;
}

.stat .value {
    font-size: 27px;
    font-weight: 700;
    line-height: 1.1;
}

.stat .label {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: 2px;
}

.stat .trend {
    font-size: 12px;
    margin-top: 7px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend .up {
    color: var(--green);
    font-weight: 600;
}

.trend .down {
    color: var(--pink);
    font-weight: 600;
}

.trend .flat {
    color: var(--muted);
    font-weight: 600;
}

/* Tint helpers shared by stat tiles and the category legend. */
.t-violet { background: var(--violet-soft); color: var(--violet); }
.t-blue   { background: var(--blue-soft);   color: var(--blue); }
.t-amber  { background: var(--amber-soft);  color: var(--amber); }
.t-green  { background: var(--green-soft);  color: var(--green); }
.t-pink   { background: var(--pink-soft);   color: var(--pink); }

/* ---------- Two column panels ------------------------------------------ */

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 18px;
    margin-bottom: 20px;
}

@media (max-width: 1100px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Donut ------------------------------------------------------ */

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.donut {
    width: 168px;
    height: 168px;
    flex: 0 0 168px;
    border-radius: 50%;
    position: relative;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 30px;
    background: var(--surface);
    border-radius: 50%;
}

.legend {
    flex: 1;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
}

.legend-row .dot {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex: 0 0 11px;
}

.legend-row .name {
    flex: 1;
    min-width: 0;
    color: #55536e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-row .n {
    font-weight: 600;
    color: var(--text);
}

/* ---------- Tables ----------------------------------------------------- */

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

.table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f5f3fa;
    font-size: 14px;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: #fbfaff;
}

.table .ref {
    color: var(--primary-600);
    font-weight: 600;
    white-space: nowrap;
}

.table .muted {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.table-scroll {
    overflow-x: auto;
}

.row-go {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    display: grid;
    place-items: center;
}

.row-go:hover {
    background: var(--primary-soft);
    color: var(--primary-600);
}

.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.empty i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: #cfcbe2;
}

/* ---------- Badges ----------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-submitted   { background: var(--blue-soft);   color: #1d63d1; }
.badge-progress    { background: var(--amber-soft);  color: #b46806; }
.badge-completed   { background: var(--green-soft);  color: #07845e; }
.badge-cancelled   { background: var(--pink-soft);   color: #c8266f; }
.badge-neutral     { background: #efedf7;            color: #5d5b78; }

/* ---------- Banner ----------------------------------------------------- */

.banner {
    background: linear-gradient(110deg, #efe9fe 0%, #f6f1ff 55%, #fdeef8 100%);
    border: 1px solid #e6dffb;
    border-radius: var(--radius);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.banner .glyph {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 18px;
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: var(--primary);
}

.banner .lead {
    flex: 1;
    min-width: 230px;
}

.banner .lead h5 {
    margin: 0 0 3px;
    font-size: 17px;
    font-weight: 700;
}

.banner .lead p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13.5px;
}

.banner .info {
    background: rgba(255, 255, 255, .72);
    border-radius: 13px;
    padding: 14px 18px;
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

.banner .info .item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner .info i {
    font-size: 19px;
    color: var(--primary);
}

.banner .info .k {
    font-size: 13px;
    font-weight: 600;
}

.banner .info .v {
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------- Forms ------------------------------------------------------ */

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 18px;
}

@media (max-width: 1100px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field .req {
    color: var(--pink);
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    background: #fcfbfe;
    color: var(--text);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(124, 92, 240, .13);
}

.textarea {
    resize: vertical;
    min-height: 110px;
}

.input.error,
.select.error,
.textarea.error {
    border-color: var(--pink);
}

.hint {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 5px;
}

.err {
    font-size: 12.5px;
    color: #c8266f;
    margin-top: 5px;
}

.pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---------- Alerts ----------------------------------------------------- */

.alert {
    border-radius: 12px;
    padding: 13px 17px;
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--green-soft);
    border-color: #b6ecd8;
    color: #07684b;
}

.alert-error {
    background: var(--pink-soft);
    border-color: #f8cbe1;
    color: #b02063;
}

.alert-info {
    background: var(--primary-soft);
    border-color: #ddd2fc;
    color: #5b34d6;
}

/* ---------- Detail page ------------------------------------------------ */

.meta-list {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 11px 14px;
    font-size: 14px;
}

.meta-list dt {
    color: var(--muted);
    font-weight: 500;
}

.meta-list dd {
    margin: 0;
}

.prose {
    white-space: pre-wrap;
    margin: 0;
    line-height: 1.75;
}

.timeline {
    list-style: none;
    margin: 0;
    padding-left: 20px;
    border-left: 2px solid #eeebf7;
}

.timeline > li {
    position: relative;
    padding: 0 0 20px 14px;
}

.timeline > li:last-child {
    padding-bottom: 0;
}

.timeline > li::before {
    content: "";
    position: absolute;
    left: -23px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #eeebf7;
}

.timeline .when {
    font-size: 12.5px;
    color: var(--muted);
}

.timeline .by {
    font-size: 13px;
    color: var(--muted);
    margin-top: 5px;
}

.timeline .note {
    white-space: pre-wrap;
    margin-top: 6px;
    background: #faf9fe;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
}

.files {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.file {
    width: 132px;
    text-align: center;
}

.file .thumb {
    height: 92px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #faf9fe;
    display: grid;
    place-items: center;
    overflow: hidden;
    margin-bottom: 7px;
}

.file .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file .thumb i {
    font-size: 27px;
    color: var(--primary);
}

.file .fname {
    font-size: 12.5px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file .fsize {
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------- Filters / pagination --------------------------------------- */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    /* กันไว้อีกชั้น ถึงจะแสดงเลขหน้าแบบจำกัดจำนวนแล้ว แถวนี้ก็ต้องไม่ดันหน้าเว็บให้กว้างขึ้นได้ */
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.pager a {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: #55536e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
}

.pager a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.pager a.nav {
    padding: 0 8px;
    color: var(--primary-600);
}

.pager a:hover {
    border-color: var(--primary);
}

/* ช่วงเลขหน้าที่ถูกข้าม */
.pager .gap {
    min-width: 20px;
    text-align: center;
    color: var(--muted);
    user-select: none;
}

.pager .count {
    margin-left: 6px;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------- Auth pages ------------------------------------------------- */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 20%, #2b2168 0%, var(--ink) 60%);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 412px;
    background: var(--surface);
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

/* The auth card is already white, so the logo needs no tile - just room to breathe. */
.auth-card .mark {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
}

.auth-card .mark img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.auth-card h1 {
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
}

.auth-card .sub {
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
    margin: 0 0 22px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12.5px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.w-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Utilities -------------------------------------------------- */

.mt-3  { margin-top: 18px; }
.mb-3  { margin-bottom: 18px; }
.stack { display: flex; gap: 10px; flex-wrap: wrap; }

/* The sidebar is the only navigation, so on narrow screens it becomes a horizontal strip
   above the content rather than disappearing. */
@media (max-width: 900px) {
    .shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: none;
        position: static;
        max-height: none;
        padding: 10px 12px;
        overflow-x: auto;
    }

    .sidenav {
        flex-direction: row;
        gap: 6px;
    }

    .sidenav a {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .sidenav a .ico {
        display: none;
    }

    .side-foot {
        display: none;
    }

    .content {
        border-top-left-radius: 0;
        padding: 20px 16px 32px;
        width: 100%;
    }

    .user-chip .who {
        display: none;
    }
}

/* ==========================================================================
   แบบประเมินการใช้บริการ - the 1-5 satisfaction form and the way it reads back.
   ========================================================================== */

.eval-item {
    padding: 16px 0;
    border-bottom: 1px dashed var(--border);
}

.eval-item:first-child {
    padding-top: 0;
}

.eval-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.eval-q {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.55;
}

/* หมายเลขหมวด - keeps the wrapped question text aligned past the number. */
.eval-no {
    flex: none;
    min-width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-600);
    font-weight: 700;
    font-size: 12.5px;
}

.rating {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 36px;
}

/* The input stays in the layout so keyboard focus lands somewhere real, but is drawn by the span. */
.rating input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating span {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 62px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.rating b {
    font-size: 15px;
    line-height: 1;
}

.rating small {
    font-size: 11px;
    color: var(--muted);
}

.rating label:hover span {
    border-color: var(--primary);
}

.rating input:checked + span {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-600);
}

.rating input:checked + span small {
    color: var(--primary-600);
}

.rating input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* --- ผลการประเมินที่ส่งแล้ว --- */

.eval-answer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}

.eval-answer:last-child {
    border-bottom: 0;
}

.eval-answer .val {
    flex: none;
    font-weight: 700;
    color: var(--primary-600);
    font-variant-numeric: tabular-nums;
}

.eval-total {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--muted);
}

.eval-total b {
    font-size: 26px;
    color: var(--primary-600);
    font-variant-numeric: tabular-nums;
}

/* Average as a proportion of the 1-5 scale, for scanning a report column at a glance. */
.eval-bar {
    position: relative;
    height: 8px;
    min-width: 90px;
    border-radius: 99px;
    background: var(--primary-soft);
    overflow: hidden;
}

.eval-bar i {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    border-radius: 99px;
    background: var(--primary-grad);
}

/* Checkbox list — used for pairing an evaluation form with ticket categories. */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-list label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.45;
    cursor: pointer;
}

.check-list input {
    flex: none;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* การกระจายของคะแนนในรายงานผลประเมิน */
.dist {
    display: grid;
    grid-template-columns: 78px 1fr 96px;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
}

.dist .k {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.dist .k b {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.dist .k small,
.dist .n small {
    font-size: 11.5px;
    color: var(--muted);
}

.dist .track {
    height: 10px;
    border-radius: 99px;
    background: var(--primary-soft);
    overflow: hidden;
}

.dist .track i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--primary-grad);
}

.dist .n {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ข้อเสนอแนะในรายงานวางเป็นบล็อก ไม่ใช่บรรทัดเดียวเหมือนคำตอบรายหัวข้อ */
.card-body > .eval-answer > span:first-child {
    min-width: 0;
}

.card-body > .eval-answer .prose {
    margin: 4px 0 0;
}

/* ==========================================================================
   เรื่องที่ยังไม่ได้เปิดอ่าน ในคิวของผู้ดูแล
   แยกด้วยแถบซ้าย ความหนา และจุด ไม่พึ่งสีอย่างเดียว เพื่อให้ยังอ่านออกตอนพิมพ์
   และสำหรับคนที่แยกสีได้ไม่ดี
   ========================================================================== */

.table tbody tr.unread > td {
    background: #fbfaff;
}

.table tbody tr.unread > td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}

.table tbody tr.unread > td:nth-child(3) {
    font-weight: 600;
}

/* อ่านแล้ว: ถอยความเด่นลง ไม่ถึงกับจาง เพราะยังต้องอ่านออก */
.table tbody tr.seen .ref {
    font-weight: 500;
}

.table tbody tr.seen > td:nth-child(3) {
    color: var(--muted);
}

.unread-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--primary);
    vertical-align: middle;
}
