/* e-Office Incident — ธีมร่วมกับ system_summary.php */

:root {
    /* ขนาดตัวอักษร — อ่านง่ายทั้ง Desktop / Mobile */
    --inc-text-xs: 0.875rem;
    --inc-text-sm: 0.9375rem;
    --inc-text-base: 1.0625rem;
    --inc-text-md: 1.125rem;
    --inc-text-lg: 1.25rem;
    --inc-text-xl: 1.375rem;
    --inc-text-2xl: 1.5rem;
    --neon-cyan: #06b6d4;
    --neon-blue: #2563eb;
    --neon-violet: #6366f1;
    --bg-deep: #eef2f6;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --border-neon: rgba(37, 99, 235, 0.18);
    --text-main: #1e293b;
    --text-sub: #475569;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-glow: 0 10px 30px rgba(37, 99, 235, 0.08);
    --sys-gutter: clamp(10px, 2.8vw, 28px);
    --sys-panel-max: min(1100px, 100%);
    --sys-card-radius: clamp(14px, 2.2vw, 28px);
    --sys-card-pad-y: clamp(18px, 3.2vw, 32px);
    --sys-card-pad-x: clamp(14px, 2.4vw, 28px);
    --dark-3d-bg: linear-gradient(135deg, #1b2652 0%, #0d1533 100%);
    --dark-3d-shadow: #050a1b;
}

body {
    background:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.06), transparent 35%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05), transparent 35%),
        linear-gradient(135deg, #e4eaf0 0%, #f1f4f8 50%, #d8e0e9 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    font-family: 'Sarabun', sans-serif !important;
    font-size: var(--inc-text-base);
    line-height: 1.6;
    position: relative;
}

.container.content-wrapper .small,
.container.content-wrapper small {
    font-size: var(--inc-text-sm) !important;
}

.container.content-wrapper h4 {
    font-size: var(--inc-text-xl);
}

.container.content-wrapper h5 {
    font-size: var(--inc-text-lg);
}

.container.content-wrapper h6 {
    font-size: var(--inc-text-md);
}

.container.content-wrapper .form-control,
.container.content-wrapper select.form-control,
.container.content-wrapper textarea.form-control,
.container.content-wrapper .btn {
    font-size: var(--inc-text-base);
}

.container.content-wrapper .btn-sm {
    font-size: var(--inc-text-sm);
}

.cyber-grid {
    position: fixed;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(700px) rotateX(60deg) translateY(0);
    z-index: -2;
    pointer-events: none;
    opacity: 0.75;
    animation: incGridDrift 30s linear infinite;
}

@keyframes incGridDrift {
    from { transform: perspective(700px) rotateX(60deg) translateY(0); }
    to { transform: perspective(700px) rotateX(60deg) translateY(50px); }
}

.container-scroller {
    padding-top: 0;
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: hidden;
}

/* Premium Header — ตรงกับ system_summary.php */
.infographic-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-neon);
    padding: clamp(20px, 4vw, 35px) var(--sys-gutter);
    color: #0f172a;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.infographic-header h1 {
    font-size: clamp(1.75rem, 5vw, 3rem) !important;
    font-weight: 900 !important;
    line-height: 1.45 !important;
    background: linear-gradient(135deg, #0f172a 10%, #1e3a8a 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.08);
    margin: 0 auto 10px !important;
    padding: 0.1em 0 0.15em;
    letter-spacing: -1px;
    display: block;
}

.infographic-header .header-p {
    color: var(--text-sub) !important;
    font-size: var(--inc-text-lg) !important;
    line-height: 1.65 !important;
    max-width: 800px;
    margin: 0 auto 10px !important;
    font-weight: 500;
    display: block;
}

.infographic-header .inc-header-tagline {
    font-size: var(--inc-text-base) !important;
    line-height: 1.6 !important;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.sys-controls {
    position: relative;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    z-index: 100;
    margin: 0 auto 14px;
}

.ctrl-btn {
    background: var(--dark-3d-bg);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: var(--neon-cyan);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: var(--inc-text-base) !important;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    text-decoration: none !important;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.15),
        0 3px 0 var(--dark-3d-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ctrl-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.2),
        0 4px 0 var(--dark-3d-shadow),
        0 0 10px rgba(6, 182, 212, 0.3);
    color: #ffffff;
    text-decoration: none !important;
}

.ctrl-btn.active {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-color: #fca5a5;
    color: white;
    box-shadow:
        0 4px 10px rgba(239, 68, 68, 0.25),
        0 2px 0 #7f1d1d,
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.container.content-wrapper {
    width: 100%;
    max-width: var(--sys-panel-max);
    margin-left: auto;
    margin-right: auto;
    padding: clamp(16px, 3vw, 28px) var(--sys-gutter) 40px;
    box-sizing: border-box;
    font-size: var(--inc-text-base);
}

@media (min-width: 992px) {
    .container.content-wrapper {
        max-width: 100% !important;
        width: 100%;
        padding-left: clamp(16px, 1.8vw, 36px);
        padding-right: clamp(16px, 1.8vw, 36px);
    }
}

/* Panel = clipboard-3d style */
.clipboard-3d.inc-panel,
.inc-panel.clipboard-3d {
    background: linear-gradient(145deg, #f8fbff 0%, #eef3fb 48%, #e8eef8 100%);
    border-radius: var(--sys-card-radius);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: var(--sys-card-pad-y) var(--sys-card-pad-x);
    margin-bottom: 20px;
    position: relative;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.12),
        0 10px 24px rgba(37, 99, 235, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.inc-panel-title {
    font-family: 'K2D', sans-serif;
    font-weight: 700;
    font-size: var(--inc-text-xl);
    color: #1e3a8a;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.12);
}

.inc-panel-title i {
    margin-right: 8px;
    color: var(--neon-blue);
}

/* Side panel — dark 3d accent */
.inc-side-panel {
    background: var(--dark-3d-bg);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    color: #cbd5e1;
    font-size: var(--inc-text-base);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.18),
        0 5px 0 var(--dark-3d-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.inc-side-panel h6 {
    color: #e2e8f0;
    font-weight: 700;
    font-size: var(--inc-text-md);
    margin-bottom: 12px;
}

.inc-side-panel .small,
.inc-side-panel div.small {
    font-size: var(--inc-text-sm) !important;
}

.inc-side-panel .btn {
    margin-bottom: 6px;
}

.inc-side-panel a:not(.btn) {
    color: var(--neon-cyan);
}

/* Forms */
.inc-theme-content .form-control,
.inc-theme-content select.form-control,
.inc-theme-content textarea.form-control {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 10px 14px;
    font-size: var(--inc-text-base);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.inc-theme-content .form-control:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.inc-theme-content label {
    font-weight: 600;
    color: var(--text-main);
    font-size: var(--inc-text-base);
}

.inc-chat-compose {
    border: 2px dashed rgba(37, 99, 235, 0.35);
    border-radius: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.inc-chat-compose:focus {
    border-color: var(--neon-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.inc-suggest-box {
    background: rgba(239, 246, 255, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 12px;
    display: none;
}

.inc-suggest-box.show { display: block; }

@media (max-width: 767px) {
    .inc-suggest-box,
    .inc-suggest-box.show {
        display: none !important;
    }
}

.inc-suggest-item {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.inc-suggest-item:hover {
    border-color: var(--neon-blue);
    background: #f0f9ff;
}

a.inc-suggest-link {
    display: block;
    color: inherit;
    text-decoration: none !important;
    cursor: pointer;
}

a.inc-suggest-link:hover {
    border-color: var(--neon-blue);
    background: #f0f9ff;
}

.inc-reporter-org-box .inc-org-unit,
.inc-reporter-org-box .inc-org-div,
.inc-reporter-org-box .inc-org-dep {
    white-space: nowrap;
}

.inc-reporter-compact {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(255, 255, 255, 0.85) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.inc-reporter-compact-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.inc-reporter-compact-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-size: 1.1rem;
}

.inc-reporter-compact-text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.4;
}

.inc-reporter-compact-line1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.6rem;
}

.inc-reporter-compact-name {
    font-size: 0.95rem;
    color: #1e3a8a;
}

.inc-reporter-compact-meta {
    font-size: var(--inc-text-sm);
    color: #64748b;
}

.inc-reporter-compact-line2 {
    font-size: var(--inc-text-sm);
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inc-reporter-compact-badge {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    line-height: 1.4;
}

@media (max-width: 575px) {
    .inc-reporter-compact-line2 {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

.inc-org-cell {
    line-height: 1.45;
    min-width: 10rem;
    max-width: 14rem;
}

.inc-suggest-go {
    display: block;
    font-size: var(--inc-text-sm);
    color: #2563eb;
    margin-top: 6px;
    font-weight: 600;
}

.inc-dropzone {
    border: 2px dashed rgba(37, 99, 235, 0.35);
    border-radius: 14px;
    padding: 28px 16px;
    text-align: center;
    color: var(--text-sub);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.inc-dropzone:hover,
.inc-dropzone.dragover {
    border-color: var(--neon-blue);
    background: #eff6ff;
    color: #1d4ed8;
}

.inc-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: var(--inc-text-md);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.inc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.inc-btn-secondary {
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: var(--inc-text-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.inc-btn-secondary:hover {
    transform: translateY(-2px);
}

.inc-btn-outline {
    border-radius: 50px;
    font-weight: 600;
}

/* Shortcut chips */
.inc-shortcut-chip {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    border-radius: 50px;
    font-size: var(--inc-text-sm);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: #1e40af;
    text-decoration: none !important;
    transition: all 0.2s;
}

.inc-shortcut-chip:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.inc-permission-desc-choices {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(29, 78, 216, 0.06) 100%);
    border: 2px solid rgba(37, 99, 235, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.15);
}

.inc-permission-desc-choices > .small {
    color: #64748b;
    font-weight: 600;
}

.inc-permission-desc-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 6px;
}

.inc-desc-choice-chip {
    display: inline-flex;
    flex: 1 1 0;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    border: none;
    border-radius: 50px;
    padding: 10px 12px;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    color: #fff !important;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45), 0 0 0 3px rgba(37, 99, 235, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: inc-usage-quick-pulse 2.4s ease-in-out infinite;
}

.inc-desc-choice-chip .typcn {
    font-size: 1.25rem;
    vertical-align: middle;
    line-height: 1;
}

.inc-desc-choice-chip:hover,
.inc-desc-choice-chip:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5), 0 0 0 4px rgba(37, 99, 235, 0.18);
    color: #fff !important;
    outline: none;
}

.inc-desc-choice-chip.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.55), 0 0 0 4px rgba(37, 99, 235, 0.22);
}

.inc-guest-fields {
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

#description,
#btn-usage-quick {
    scroll-margin-top: 72px;
    scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.inc-shortcut-focus-target {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transition: outline-color 0.2s, box-shadow 0.2s;
}

.inc-alert-glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.inc-usage-quick-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(29, 78, 216, 0.06) 100%);
    border: 2px solid rgba(37, 99, 235, 0.35);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.15);
    overflow: visible;
}

.inc-usage-quick-head {
    flex: 1 1 auto;
    min-width: 0;
}

.inc-usage-quick-head strong {
    display: block;
    font-size: 1.05rem;
    color: #1e3a8a;
    margin-right: 0;
    margin-bottom: 4px;
}

.inc-usage-quick-desc {
    display: block;
    font-size: var(--inc-text-sm);
    color: #64748b;
    line-height: 1.45;
}

.inc-usage-quick-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    flex: 0 0 auto;
}

.inc-btn-usage-quick {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45), 0 0 0 3px rgba(37, 99, 235, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: inc-usage-quick-pulse 2.4s ease-in-out infinite;
}

.inc-btn-usage-quick .typcn {
    font-size: 1.25rem;
    vertical-align: middle;
    margin-right: 4px;
}

.inc-btn-usage-quick:hover,
.inc-btn-usage-quick:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.5), 0 0 0 4px rgba(37, 99, 235, 0.18);
    color: #fff !important;
}

.inc-btn-usage-quick:disabled {
    animation: none;
    opacity: 0.75;
}

.inc-usage-dismiss {
    color: #64748b !important;
    text-decoration: none !important;
    font-weight: 600;
    white-space: nowrap;
    align-self: center;
    padding: 4px 8px;
}

.inc-usage-dismiss:hover {
    color: #334155 !important;
    text-decoration: underline !important;
}

@media (min-width: 992px) {
    .inc-usage-quick-panel {
        flex-direction: row;
        align-items: center;
        gap: 16px 20px;
    }

    .inc-usage-quick-head strong {
        display: inline;
        margin-right: 0.35em;
        margin-bottom: 0;
    }

    .inc-usage-quick-desc {
        display: inline;
    }

    .inc-usage-quick-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        max-width: min(100%, 420px);
        flex-shrink: 0;
    }

    .inc-btn-usage-quick {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }

    .inc-usage-dismiss {
        flex: 0 0 100%;
        align-self: flex-end;
        text-align: right;
    }
}

@keyframes inc-usage-quick-pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45), 0 0 0 3px rgba(37, 99, 235, 0.12);
    }
    50% {
        box-shadow: 0 8px 26px rgba(37, 99, 235, 0.55), 0 0 0 5px rgba(37, 99, 235, 0.2);
    }
}

/* Status, chat, timeline (view/track) */
.inc-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--inc-text-sm);
    font-weight: 700;
    color: #fff;
}

.inc-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 14px;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.inc-chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 88%;
}

.inc-chat-row.reporter {
    align-self: flex-start;
}

.inc-chat-row.admin {
    align-self: flex-end;
    margin-left: auto;
}

.inc-chat-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.inc-chat-row .inc-bubble {
    width: auto;
    max-width: calc(100% - 40px);
    flex: 0 1 auto;
}

.inc-bubble {
    width: fit-content;
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: var(--inc-text-base);
    line-height: 1.6;
    word-break: break-word;
}

.inc-bubble.reporter {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.inc-bubble.admin {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    border: 1px solid #93c5fd;
    border-bottom-right-radius: 4px;
}

.inc-bubble.internal {
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px dashed #f59e0b;
    border-bottom-right-radius: 4px;
}

.inc-reporter-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inc-reporter-head .inc-chat-avatar {
    width: 28px;
    height: 28px;
}

.inc-line-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.inc-line-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    font-weight: 700;
    font-size: 0.9rem;
}

.inc-line-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.inc-line-map-overlay[hidden] {
    display: none !important;
}

body.inc-line-map-open {
    overflow: hidden;
}

.inc-line-map-dialog {
    width: min(100%, 480px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.inc-line-map-head,
.inc-line-map-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.inc-line-map-foot {
    border-bottom: 0;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.inc-line-map-body {
    padding: 16px;
}

.inc-line-map-close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
}

.inc-internal-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b45309;
    margin-bottom: 6px;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 6px;
}

.inc-chat-attach {
    margin: 8px 0 4px;
}

.inc-chat-attach img {
    max-width: min(100%, 320px);
    max-height: 240px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: block;
    cursor: pointer;
}

.inc-chat-attach video {
    max-width: min(100%, 360px);
    border-radius: 10px;
}

.inc-attach-file {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    text-decoration: none !important;
}

.inc-compose-inner {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.inc-compose-inner.has-preview {
    flex-direction: row;
    align-items: stretch;
}

.inc-compose-previews {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    max-height: 200px;
    overflow-y: auto;
}

.inc-compose-inner.has-preview .inc-compose-previews {
    border-bottom: none;
    border-right: 1px solid #e2e8f0;
}

.inc-compose-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.inc-compose-preview-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.inc-compose-preview-file {
    width: 72px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: var(--inc-text-xs);
    text-align: center;
    color: #64748b;
    overflow: hidden;
}

.inc-compose-preview-file i {
    font-size: 1.4rem;
    color: #2563eb;
}

.inc-compose-preview-file span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inc-compose-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    border: none;
    font-size: var(--inc-text-sm);
    line-height: 1.2;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

.inc-compose-preview-remove:hover {
    background: #ef4444;
}

.inc-compose-input,
.inc-chat-compose textarea.inc-compose-input {
    border: none;
    border-radius: 0;
    flex: 1;
    min-height: 72px;
    resize: vertical;
    box-shadow: none !important;
}

.inc-compose-input:focus {
    outline: none;
    box-shadow: none !important;
}

.inc-compose-inner.has-preview .inc-compose-input {
    min-height: 88px;
}

.inc-chat-compose textarea {
    resize: vertical;
    min-height: 72px;
}

.inc-bubble-meta {
    font-size: var(--inc-text-xs);
    color: #64748b;
    margin-top: 4px;
}

.inc-bubble.admin .inc-bubble-meta {
    text-align: right;
}

.inc-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.inc-timeline li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: var(--inc-text-base);
}

.inc-timeline li strong {
    font-size: var(--inc-text-md);
}

.inc-timeline li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-blue);
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}

.inc-kpi {
    text-align: center;
    padding: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #f8fbff, #fff);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-glow);
}

.inc-kpi .val {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e40af;
    font-family: 'K2D', sans-serif;
}

.inc-kpi .lbl {
    font-size: var(--inc-text-sm);
    color: var(--text-sub);
}

/* คำร้องของฉัน — ตัวกรองแบบย่อ (พับได้บนมือถือ) */
.inc-my-options {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.85);
}

.inc-my-options-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
    font-size: var(--inc-text-sm);
    color: #64748b;
    user-select: none;
}

.inc-my-options-summary::-webkit-details-marker {
    display: none;
}

.inc-my-options-summary::before {
    content: '▸';
    font-size: 11px;
    color: #94a3b8;
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.inc-my-options[open] > .inc-my-options-summary::before {
    transform: rotate(90deg);
}

.inc-my-options-title {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    white-space: nowrap;
}

.inc-my-options-title .typcn {
    font-size: 1rem;
}

.inc-my-quick-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.inc-my-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    border: none;
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

.inc-my-chip .typcn {
    font-size: 12px;
}

button.inc-my-chip {
    cursor: pointer;
}

.inc-my-chip-unread {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.inc-my-chip-unread.active {
    background: #2563eb;
    color: #fff;
}

.inc-my-chip-rating {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.inc-my-chip-rating.active {
    background: #f59e0b;
    color: #fff;
}

.inc-my-options-body {
    padding: 0 10px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.inc-my-filter-actions {
    padding-top: 8px;
    justify-content: flex-start;
    gap: 6px;
}

.inc-my-refresh-btn {
    border-radius: 999px;
}

@media (max-width: 767px) {
    .inc-my-options-body {
        padding: 0 8px 8px;
    }

    .inc-my-filter-actions {
        flex-wrap: wrap;
        gap: 5px;
    }

    .inc-my-filter-actions .inc-filter-unread-toggle {
        font-size: 11px;
        padding: 3px 8px;
    }

    .inc-my-filter-label,
    .inc-my-refresh-label {
        display: none;
    }

    .inc-my-refresh-btn {
        padding: 4px 10px;
    }

    .inc-queue-sound-hint {
        display: none !important;
    }

    .inc-my-new-btn-header {
        padding: 7px 12px;
        font-size: var(--inc-text-xs);
    }

    .inc-panel-title-row {
        margin-bottom: 12px;
        padding-bottom: 10px;
        gap: 8px;
    }

    .inc-panel-title-row .inc-panel-title {
        font-size: var(--inc-text-lg);
    }
}

@media (min-width: 768px) {
    .inc-my-options {
        background: transparent;
        border-color: rgba(148, 163, 184, 0.2);
    }

    .inc-my-options-summary {
        padding: 6px 4px 8px;
    }

    .inc-my-options-body {
        border-top: none;
        padding: 0 0 4px;
    }
}

.inc-filter-rating-toggle {
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
}

.inc-queue-kpi-rating {
    cursor: pointer;
    border-color: rgba(245, 158, 11, 0.4);
}

.inc-queue-kpi-rating .inc-queue-kpi-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.inc-queue-kpi-rating .val {
    color: #b45309;
}

.inc-queue-kpi-rating:hover,
.inc-queue-kpi-rating.active {
    border-color: rgba(245, 158, 11, 0.65);
    background: linear-gradient(160deg, #fffbeb 0%, #ffffff 100%);
}

.inc-queue-kpi-rating.active {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

.inc-my-ticket-card-rating-pending {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(160deg, #fffbeb 0%, #ffffff 100%);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12), 0 4px 14px rgba(245, 158, 11, 0.1);
}

.inc-my-ticket-card-unread.inc-my-ticket-card-rating-pending {
    border-color: rgba(59, 130, 246, 0.45);
    background: linear-gradient(160deg, #eff6ff 0%, #fffbeb 55%, #ffffff 100%);
}

.inc-rating-pending-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: var(--inc-text-sm);
    color: #92400e;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.inc-rating-pending-preview-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.inc-rating-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--inc-text-xs);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    white-space: nowrap;
    flex-shrink: 0;
}

.inc-my-ticket-open-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--inc-text-base);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inc-my-ticket-open-secondary:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.inc-queue-toast.inc-queue-toast-rating {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.45);
}

.inc-panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.12);
}

.inc-panel-title-row .inc-panel-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    flex: 1;
    min-width: 0;
}

.inc-my-new-btn {
    width: auto;
    border-radius: 50px;
    font-weight: 700;
    padding: 10px 20px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.inc-my-new-btn-header {
    padding: 8px 18px;
    font-size: var(--inc-text-sm);
}

.inc-my-list-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.inc-my-list-count {
    font-size: var(--inc-text-sm);
    font-weight: 600;
    color: #475569;
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 14px;
    border-radius: 999px;
}

.inc-my-ticket-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.inc-my-ticket-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 18px;
    padding: 16px 18px 18px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.inc-my-ticket-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.14);
}

.inc-my-ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.inc-my-ticket-no {
    font-size: var(--inc-text-sm);
    font-weight: 700;
    color: #1e40af;
    background: rgba(37, 99, 235, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.inc-my-ticket-subject {
    font-size: var(--inc-text-lg);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    line-height: 1.45;
    word-break: break-word;
    font-family: 'K2D', 'Sarabun', sans-serif;
}

.inc-my-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.inc-my-ticket-meta-item {
    font-size: var(--inc-text-sm);
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(148, 163, 184, 0.1);
    padding: 5px 10px;
    border-radius: 8px;
}

.inc-my-ticket-meta-item.inc-meta-urgent {
    color: #dc2626;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.08);
}

.inc-my-ticket-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.inc-my-ticket-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--inc-text-sm);
    color: #94a3b8;
}

.inc-my-ticket-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inc-my-ticket-stars {
    display: inline-flex;
    gap: 2px;
}

.inc-my-ticket-stars .inc-star-glyph {
    font-size: var(--inc-text-md);
    color: #d1d5db;
}

.inc-star-display .inc-star-glyph,
.inc-my-ticket-stars .inc-star-glyph {
    color: #d1d5db;
}

/* สีดาวตามระดับความพึงพอใจ — แสดงผลหลังประเมินแล้ว */
.inc-star-display--1 .inc-star-glyph-filled,
.inc-my-ticket-stars.inc-star-display--1 .inc-star-glyph-filled {
    color: #dc2626;
    text-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.inc-star-display--2 .inc-star-glyph-filled,
.inc-my-ticket-stars.inc-star-display--2 .inc-star-glyph-filled {
    color: #ea580c;
    text-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.inc-star-display--3 .inc-star-glyph-filled,
.inc-my-ticket-stars.inc-star-display--3 .inc-star-glyph-filled {
    color: #ca8a04;
    text-shadow: 0 2px 8px rgba(202, 138, 4, 0.4);
}

.inc-star-display--4 .inc-star-glyph-filled,
.inc-my-ticket-stars.inc-star-display--4 .inc-star-glyph-filled {
    color: #16a34a;
    text-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
}

.inc-star-display--5 .inc-star-glyph-filled,
.inc-my-ticket-stars.inc-star-display--5 .inc-star-glyph-filled {
    color: #059669;
    text-shadow: 0 2px 8px rgba(5, 150, 105, 0.45);
}

.inc-my-ticket-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--inc-text-base);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inc-my-ticket-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    color: #fff;
    text-decoration: none;
}

.inc-my-ticket-empty,
.inc-my-ticket-loading {
    font-size: var(--inc-text-base);
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .clipboard-3d.inc-panel,
    .inc-panel.clipboard-3d {
        padding: 16px 14px;
    }
}

@media (min-width: 768px) {
    .inc-my-ticket-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .inc-my-ticket-card {
        padding: 20px 22px 22px;
        min-height: 220px;
    }

    .inc-my-ticket-subject {
        font-size: var(--inc-text-xl);
    }

    .inc-my-ticket-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .inc-my-ticket-extra {
        flex: 1;
        margin-bottom: 0;
        justify-content: flex-start;
        gap: 16px;
    }

    .inc-my-ticket-open {
        width: auto;
        min-width: 148px;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .inc-my-ticket-open-secondary {
        width: auto;
        min-width: 148px;
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (min-width: 1200px) {
    .inc-my-ticket-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .inc-my-ticket-card {
        padding: 22px 24px 24px;
    }
}

.inc-queue-table {
    font-size: var(--inc-text-base);
}

.inc-queue-table thead th {
    font-size: var(--inc-text-sm);
    background: rgba(30, 58, 138, 0.08);
    border: none;
    color: #1e3a8a;
    font-weight: 700;
}

.inc-queue-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inc-queue-filters {
    background: linear-gradient(145deg, #f8fbff, #fff);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-glow);
}

.inc-queue-filters-head h6 {
    font-size: var(--inc-text-md);
    font-weight: 800;
    color: #1e3a8a;
    font-family: 'K2D', 'Sarabun', sans-serif;
    margin-bottom: 14px;
}

.inc-queue-filters-head h6 .typcn {
    color: #2563eb;
    margin-right: 4px;
}

.inc-queue-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
}

.inc-filter-group {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
}

.inc-filter-group-compact {
    flex: 1 1 240px;
}

.inc-filter-group-title {
    font-size: var(--inc-text-xs);
    font-weight: 800;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inc-filter-group-title .typcn {
    margin-right: 2px;
    font-size: 1.1em;
}

.inc-filter-group-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inc-queue-filters .inc-filter-label {
    font-size: var(--inc-text-xs);
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

.inc-queue-filters .inc-filter-field {
    flex: 1 1 88px;
    min-width: 88px;
}

.inc-filter-field-wide {
    flex: 1 1 140px;
    min-width: 140px;
}

.inc-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 0 2px;
}

.inc-queue-kpi-panel {
    background: linear-gradient(145deg, #fff, #f8fbff);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 16px 18px 18px;
    box-shadow: var(--shadow-glow);
}

.inc-queue-kpi-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    font-size: var(--inc-text-md);
    font-weight: 800;
    color: #1e3a8a;
    font-family: 'K2D', 'Sarabun', sans-serif;
}

.inc-queue-kpi-head .typcn {
    color: #2563eb;
    margin-right: 4px;
}

.inc-queue-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.inc-queue-kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.inc-queue-kpi-card .val {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: 'K2D', sans-serif;
    color: #1e40af;
}

.inc-queue-kpi-card .lbl {
    font-size: var(--inc-text-xs);
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.35;
}

.inc-queue-kpi-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.inc-queue-kpi-total {
    background: linear-gradient(135deg, #eff6ff, #fff);
    border-color: rgba(37, 99, 235, 0.2);
}

.inc-queue-kpi-total .inc-queue-kpi-icon {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.inc-queue-kpi-sla {
    background: linear-gradient(135deg, #fef2f2, #fff);
    border-color: rgba(239, 68, 68, 0.2);
}

.inc-queue-kpi-sla .inc-queue-kpi-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.inc-queue-kpi-sla .val {
    color: #dc2626;
}

.inc-queue-kpi-status {
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding-top: 18px;
}

.inc-queue-kpi-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.inc-queue-kpi-status:hover,
.inc-queue-kpi-status.active {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.inc-queue-kpi-status.active {
    background: linear-gradient(135deg, #eff6ff, #fff);
}

.inc-queue-kpi-status.inc-queue-kpi-empty {
    opacity: 0.72;
}

.inc-queue-kpi-status.inc-queue-kpi-empty .val {
    color: #94a3b8 !important;
}

@media (max-width: 767px) {
    .inc-filter-actions {
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .inc-queue-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .inc-queue-kpi-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Legacy aliases */
.inc-wrap { font-family: 'Sarabun', sans-serif; }
.inc-card {
    background: linear-gradient(145deg, #f8fbff 0%, #eef3fb 48%, #e8eef8 100%);
    border-radius: var(--sys-card-radius);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: var(--sys-card-pad-y) var(--sys-card-pad-x);
    margin-bottom: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.inc-hero { display: none; }

/* Header กะทัดรัด — ทุกหน้า Incident (tablet/mobile, เมนูบนซ่อน ใช้ bottom nav) */
@media (max-width: 991px) {
    body.incident-portal .infographic-header {
        padding: 12px var(--sys-gutter) 14px;
        border-radius: 0 0 18px 18px;
    }

    body.incident-portal .infographic-header h1 {
        font-size: clamp(1.25rem, 4.5vw, 1.65rem) !important;
        line-height: 1.2 !important;
        margin-bottom: 6px !important;
        letter-spacing: -0.5px;
    }

    body.incident-portal .infographic-header .header-p {
        font-size: var(--inc-text-sm) !important;
        line-height: 1.4 !important;
        margin-bottom: 6px !important;
    }

    body.incident-portal .infographic-header .inc-header-tagline {
        font-size: var(--inc-text-sm) !important;
        line-height: 1.4 !important;
    }

    body.incident-portal .container.content-wrapper {
        padding-top: 12px;
    }
}

/* Header กะทัดรัดมาก — smartphone (ทุกหน้า Incident) */
@media (max-width: 576px) {
    body.incident-portal .infographic-header {
        padding: 8px 12px 10px;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 4px 16px rgba(37, 99, 235, 0.04);
    }

    body.incident-portal .infographic-header h1 {
        font-size: 1.2rem !important;
        line-height: 1.15 !important;
        margin-bottom: 4px !important;
    }

    /* คำบรรยายองค์กรยาว — มีใน footer แล้ว */
    body.incident-portal .infographic-header .header-p {
        display: none;
    }

    body.incident-portal .infographic-header .inc-header-tagline {
        font-size: 0.8125rem !important;
        line-height: 1.35 !important;
        opacity: 0.85 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    body.incident-portal .container.content-wrapper {
        padding-top: 10px;
        padding-bottom: 32px;
    }

    body.incident-portal .inc-permission-desc-choices {
        padding: 10px 12px;
    }

    body.incident-portal .inc-permission-desc-actions {
        gap: 6px;
    }

    body.incident-portal .inc-desc-choice-chip {
        padding: 8px 6px;
        font-size: 0.75rem;
        border-radius: 12px;
        gap: 3px;
    }

    body.incident-portal .inc-desc-choice-chip .typcn {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .inc-chat-row {
        max-width: 96%;
    }

    .inc-chat-row .inc-bubble {
        max-width: calc(100% - 36px);
    }

    .inc-star-btn {
        min-width: 52px;
        min-height: 60px;
        max-width: 64px;
        padding: 8px 4px 6px;
    }

    .inc-star-glyph {
        font-size: 2.1rem;
    }

    #rating-wrap {
        position: relative;
        z-index: 10;
    }
}

.inc-line-user-bar {
    background: var(--bg-panel);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    box-shadow: var(--shadow-glow);
}

.inc-line-user-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
}

.inc-line-user-bar-left {
    display: flex;
    align-items: center;
    gap: 8px 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.inc-line-user-bar-identity {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.inc-line-user-bar-identity .inc-line-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.inc-line-user-bar-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.inc-line-user-bar-linked {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: var(--inc-text-xs);
    font-weight: 600;
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 6px;
    padding: 3px 8px;
    line-height: 1.3;
}

.inc-line-user-bar-linked .typcn {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.inc-line-linked-short {
    display: none;
}

.inc-line-user-bar-logout {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 4px 10px;
    font-size: var(--inc-text-xs);
    align-self: center;
}

@media (max-width: 767px) {
    .inc-line-user-bar {
        padding: 8px 10px;
    }

    .inc-line-user-bar-inner {
        align-items: flex-start;
        gap: 6px 8px;
    }

    .inc-line-user-bar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .inc-line-user-bar-identity {
        width: 100%;
        padding-right: 4px;
    }

    .inc-line-user-bar-identity .inc-line-avatar {
        width: 28px;
        height: 28px;
    }

    .inc-line-user-bar-linked {
        max-width: 100%;
        padding: 2px 7px;
        font-size: 0.7rem;
    }

    .inc-line-linked-long {
        display: none;
    }

    .inc-line-linked-short {
        display: inline;
    }

    .inc-line-user-bar-logout {
        padding: 3px 8px;
        font-size: 0.7rem;
        margin-top: 2px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .inc-line-linked-long {
        display: none;
    }

    .inc-line-linked-short {
        display: inline;
    }
}

.inc-rating-panel {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 45%, #fff7ed 100%);
    border: 2px solid rgba(245, 158, 11, 0.45);
    border-radius: var(--radius-md);
    padding: 20px 20px 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
    position: relative;
    z-index: 2;
    color-scheme: light;
    color: #92400e;
}

.inc-rating-icon {
    font-size: 1.75rem;
    color: #f59e0b;
    margin-bottom: 6px;
}

.inc-rating-title {
    font-weight: 800;
    color: #92400e;
    font-size: var(--inc-text-lg);
    font-family: 'K2D', 'Sarabun', sans-serif;
}

.inc-rating-subtitle {
    color: #b45309;
    font-size: var(--inc-text-base);
    margin: 4px 0 14px;
}

.inc-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 10px;
    font-size: var(--inc-text-base);
}

.inc-star-rating {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
    margin: 12px 0 14px;
    flex-wrap: nowrap;
}

.inc-star-btn {
    background: #fff;
    border: 2px solid #fde68a;
    border-radius: 14px;
    padding: 10px 6px 8px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: rgba(245, 158, 11, 0.25);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-width: 56px;
    min-height: 64px;
    flex: 1 1 0;
    max-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 5;
}

.inc-star-btn:active,
.inc-star-btn.active {
    transform: scale(1.06);
}

.inc-star-btn:disabled {
    cursor: default;
    opacity: 0.7;
    transform: none;
}

.inc-star-glyph {
    font-size: 2.4rem;
    line-height: 1;
    color: #d1d5db;
    pointer-events: none;
    display: block;
    text-shadow: none;
}

/* สีดาวแต่ละระดับบนปุ่มประเมิน — แสดงตั้งแต่ก่อนเลือก */
.inc-star-btn[data-star="1"] { border-color: rgba(220, 38, 38, 0.35); }
.inc-star-btn[data-star="2"] { border-color: rgba(234, 88, 12, 0.35); }
.inc-star-btn[data-star="3"] { border-color: rgba(202, 138, 4, 0.4); }
.inc-star-btn[data-star="4"] { border-color: rgba(22, 163, 74, 0.35); }
.inc-star-btn[data-star="5"] { border-color: rgba(5, 150, 105, 0.35); }

.inc-star-btn[data-star="1"] .inc-star-glyph { color: #dc2626; }
.inc-star-btn[data-star="2"] .inc-star-glyph { color: #ea580c; }
.inc-star-btn[data-star="3"] .inc-star-glyph { color: #ca8a04; }
.inc-star-btn[data-star="4"] .inc-star-glyph { color: #16a34a; }
.inc-star-btn[data-star="5"] .inc-star-glyph { color: #059669; }

.inc-star-btn[data-star="1"] .inc-star-num { color: #dc2626; }
.inc-star-btn[data-star="2"] .inc-star-num { color: #ea580c; }
.inc-star-btn[data-star="3"] .inc-star-num { color: #ca8a04; }
.inc-star-btn[data-star="4"] .inc-star-num { color: #16a34a; }
.inc-star-btn[data-star="5"] .inc-star-num { color: #059669; }

.inc-star-btn[data-star="1"].active {
    border-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
}
.inc-star-btn[data-star="1"].active .inc-star-glyph {
    text-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
}

.inc-star-btn[data-star="2"].active {
    border-color: #ea580c;
    background: #fff7ed;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
}
.inc-star-btn[data-star="2"].active .inc-star-glyph {
    text-shadow: 0 2px 8px rgba(234, 88, 12, 0.45);
}

.inc-star-btn[data-star="3"].active {
    border-color: #ca8a04;
    background: #fefce8;
    box-shadow: 0 6px 16px rgba(202, 138, 4, 0.28);
}
.inc-star-btn[data-star="3"].active .inc-star-glyph {
    text-shadow: 0 2px 8px rgba(202, 138, 4, 0.45);
}

.inc-star-btn[data-star="4"].active {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.28);
}
.inc-star-btn[data-star="4"].active .inc-star-glyph {
    text-shadow: 0 2px 8px rgba(22, 163, 74, 0.45);
}

.inc-star-btn[data-star="5"].active {
    border-color: #059669;
    background: #ecfdf5;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}
.inc-star-btn[data-star="5"].active .inc-star-glyph {
    text-shadow: 0 2px 8px rgba(5, 150, 105, 0.45);
}

.inc-star-rating[data-rating-level] .inc-star-btn:not(.active) {
    opacity: 0.42;
}
.inc-star-rating[data-rating-level] .inc-star-btn:not(.active) .inc-star-glyph {
    color: #d1d5db;
    text-shadow: none;
}
.inc-star-rating[data-rating-level] .inc-star-btn:not(.active) .inc-star-num {
    color: #9ca3af;
}

.inc-star-num {
    font-size: var(--inc-text-xs);
    font-weight: 700;
    pointer-events: none;
    line-height: 1;
}

.inc-star-display {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.inc-star-display .inc-star-glyph {
    font-size: 2rem;
}

.inc-rating-live-label {
    font-size: var(--inc-text-base);
    color: #78716c;
    min-height: 1.5em;
    margin-bottom: 8px;
}

.inc-rating-live-label.has-value {
    color: #92400e;
    font-weight: 600;
}

.inc-rating-live-label.is-sending {
    color: #b45309;
    font-weight: 700;
}

.inc-rating-confirm {
    margin-bottom: 10px;
}

.inc-rating-submit-btn {
    font-weight: 700;
    padding: 10px 28px;
    border-radius: 999px;
    font-size: var(--inc-text-base);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.inc-rating-scale {
    display: flex;
    justify-content: space-between;
    font-size: var(--inc-text-xs);
    color: #a8a29e;
    max-width: 320px;
    margin: 0 auto;
    padding-top: 4px;
}

.inc-rating-done .inc-rating-label {
    font-size: var(--inc-text-md);
    color: #78350f;
    font-weight: 600;
    margin-top: 6px;
}

.inc-rating-waiting .inc-rating-subtitle {
    color: #78716c;
}

.inc-rating-edit .inc-rating-subtitle {
    color: #c2410c;
    font-weight: 600;
}

.inc-line-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(6, 182, 212, 0.35);
}

/* คิวคำร้อง / ตั้งค่า — การ์ดแบบ incident_my (มือถือและเดสก์ท็อป) */
.inc-my-ticket-org {
    font-size: var(--inc-text-sm);
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.inc-my-ticket-card-critical {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(160deg, #fff5f5 0%, #ffffff 100%);
}

.inc-my-ticket-card-unread {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(160deg, #eff6ff 0%, #ffffff 100%);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12), 0 4px 14px rgba(59, 130, 246, 0.08);
}

.inc-unread-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--inc-text-xs);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    white-space: nowrap;
    animation: inc-unread-pulse 2s ease-in-out infinite;
}

.inc-unread-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: var(--inc-text-sm);
    color: #1e40af;
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.inc-unread-preview-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.inc-unread-preview-text .typcn {
    opacity: 0.7;
}

.inc-unread-preview .inc-unread-badge {
    flex-shrink: 0;
    margin-left: auto;
}

@keyframes inc-unread-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.inc-ctrl-btn-badge-wrap {
    position: relative;
}

.inc-nav-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 2px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.35);
}

.ctrl-btn.active .inc-nav-unread-badge {
    background: #fff;
    color: #b91c1c;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.inc-filter-unread-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--inc-text-sm);
    font-weight: 600;
    color: #1e40af;
    cursor: pointer;
    user-select: none;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.06);
}

.inc-filter-unread-toggle input {
    margin: 0;
}

.inc-queue-sound-btn.active {
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.55);
    background: rgba(59, 130, 246, 0.08);
}

.inc-queue-kpi-unread {
    cursor: pointer;
    border-color: rgba(59, 130, 246, 0.35);
}

.inc-queue-kpi-unread .inc-queue-kpi-icon {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.inc-queue-kpi-unread .val {
    color: #2563eb;
}

.inc-queue-kpi-unread:hover,
.inc-queue-kpi-unread.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.inc-queue-kpi-unread.active {
    background: linear-gradient(160deg, #eff6ff 0%, #ffffff 100%);
}

.inc-queue-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(92vw, 480px);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: var(--inc-text-sm);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.45);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.inc-queue-toast.inc-queue-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.inc-queue-toast .typcn {
    font-size: 1.25rem;
}

.inc-card-action-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.inc-card-action-row .inc-my-ticket-open,
.inc-card-action-row .inc-my-ticket-open-secondary {
    width: 100%;
}

.inc-card-delete {
    width: 100%;
    font-weight: 600;
}

.inc-settings-card-title {
    font-size: var(--inc-text-lg);
    font-weight: 700;
    color: #0f172a;
    font-family: 'K2D', 'Sarabun', sans-serif;
    line-height: 1.35;
    word-break: break-word;
}

.inc-line-user-card-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.inc-line-user-card-profile .inc-line-avatar,
.inc-line-user-card-profile .inc-line-avatar-fallback {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.inc-line-id-text {
    display: block;
    font-size: var(--inc-text-xs);
    color: #94a3b8;
    word-break: break-all;
    line-height: 1.35;
    margin-top: 2px;
}

.inc-line-user-mapped {
    font-size: var(--inc-text-sm);
    color: #334155;
    margin-bottom: 12px;
    line-height: 1.45;
}

.inc-line-user-mapped .badge {
    vertical-align: middle;
}

/* LINE user list — search, filters, compact rows (mobile-friendly) */
.inc-line-user-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 14px;
}

.inc-line-user-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.inc-line-user-search-icon {
    position: absolute;
    left: 10px;
    font-size: 1.1rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.inc-line-user-search-wrap .form-control {
    padding-left: 2rem;
    padding-right: 2rem;
    border-radius: 10px;
}

.inc-line-user-search-clear {
    position: absolute;
    right: 4px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.inc-line-user-search-clear:hover {
    color: #64748b;
    background: rgba(148, 163, 184, 0.15);
}

.inc-line-user-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inc-line-user-filter {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #fff;
    color: #475569;
    font-size: var(--inc-text-xs);
    font-weight: 700;
    padding: 7px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.inc-line-user-filter:hover {
    border-color: rgba(37, 99, 235, 0.35);
    color: #1e40af;
}

.inc-line-user-filter.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.inc-line-user-filter-count {
    display: inline-block;
    min-width: 1.25em;
    margin-left: 2px;
    opacity: 0.85;
}

.inc-line-user-toolbar-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inc-line-user-per-page {
    width: auto;
    min-width: 64px;
    border-radius: 8px;
}

.inc-line-user-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inc-line-user-row {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.inc-line-user-row-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inc-line-user-row-profile {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.inc-line-user-row-profile .inc-line-avatar,
.inc-line-user-row-profile .inc-line-avatar-fallback {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.inc-line-user-row-text {
    flex: 1;
    min-width: 0;
}

.inc-line-user-row-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.inc-line-user-row-name {
    font-size: var(--inc-text-md);
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.inc-line-user-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 7px;
    border-radius: 999px;
    vertical-align: middle;
    white-space: nowrap;
}

.inc-line-user-status-pending {
    background: #fef3c7;
    color: #b45309;
}

.inc-line-user-status-ok {
    background: #e2e8f0;
    color: #475569;
}

.inc-line-user-status-op {
    background: #dcfce7;
    color: #15803d;
}

.inc-line-user-row-mapped {
    font-size: var(--inc-text-sm);
    color: #334155;
    margin-top: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.inc-line-user-row-org {
    font-size: var(--inc-text-xs);
    color: #64748b;
    margin-top: 2px;
    line-height: 1.35;
}

.inc-line-user-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 6px;
    font-size: var(--inc-text-xs);
    color: #94a3b8;
}

.inc-line-user-row-meta .typcn {
    margin-right: 2px;
}

.inc-line-user-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inc-line-user-row-actions .btn {
    flex: 1 1 auto;
    min-width: 88px;
}

.inc-line-user-pagination {
    margin-top: 14px;
}

.inc-line-user-pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    font-size: var(--inc-text-sm);
    padding: 0.3rem 0.55rem;
}

.inc-line-map-results {
    max-height: min(50vh, 320px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 576px) {
    .inc-line-user-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .inc-line-user-toolbar-search {
        flex: 1 1 220px;
        min-width: 200px;
    }

    .inc-line-user-toolbar-filters {
        flex: 1 1 280px;
    }

    .inc-line-user-toolbar-meta {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .inc-line-user-row-main {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .inc-line-user-row-actions {
        flex-direction: column;
        flex-shrink: 0;
        width: auto;
    }

    .inc-line-user-row-actions .btn {
        flex: 0 0 auto;
        min-width: 96px;
    }
}

@media (min-width: 768px) {
    .inc-card-action-row {
        flex-direction: row;
        align-items: center;
        width: auto;
        flex-shrink: 0;
    }

    .inc-card-action-row .inc-my-ticket-open,
    .inc-card-action-row .inc-my-ticket-open-secondary {
        width: auto;
        min-width: 148px;
    }

    .inc-card-delete {
        width: auto;
    }
}

/* Analytics — equal-height chart panels */
.inc-analytics-chart-row {
    display: flex;
    flex-wrap: wrap;
}

.inc-analytics-chart-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.inc-analytics-chart-row > [class*="col-"] > .inc-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.inc-analytics-chart-row .inc-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 220px;
    height: 220px;
}

.inc-analytics-chart-row .inc-chart-foot {
    flex-shrink: 0;
    margin-top: 8px;
}

.inc-analytics-chart-row .inc-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    height: 220px;
}

/* Analytics insights */
.inc-insights-meta strong {
    color: #334155;
}

.inc-insights-group {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.55);
}

.inc-insights-group:last-child {
    margin-bottom: 0;
}

.inc-insights-group-title {
    font-family: 'K2D', sans-serif;
    font-weight: 700;
    font-size: var(--inc-text-md);
    margin-bottom: 8px;
}

.inc-insights-group-title .typcn {
    margin-right: 6px;
}

.inc-insights-urgent {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 242, 242, 0.65);
}

.inc-insights-urgent .inc-insights-group-title {
    color: #dc2626;
}

.inc-insights-watch {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(255, 251, 235, 0.7);
}

.inc-insights-watch .inc-insights-group-title {
    color: #d97706;
}

.inc-insights-overview {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(240, 253, 244, 0.65);
}

.inc-insights-overview .inc-insights-group-title {
    color: #16a34a;
}

.inc-insight-tickets {
    list-style: disc;
}

.inc-insight-action {
    font-weight: 600;
    white-space: nowrap;
}

.inc-line-push-recipient-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    background: rgba(248, 250, 252, 0.8);
}

.inc-line-push-recipient-item {
    margin-bottom: 0.45rem;
}

.inc-line-push-recipient-item:last-child {
    margin-bottom: 0;
}

.inc-line-push-recipient-disabled .custom-control-label {
    opacity: 0.72;
}
