﻿body {
    background: #f5f5f5 !important;
}

.breadcrumb-container {
    padding: 12px 20px !important;
    margin-top: 20px;
}

.breadcrumb {
    background: transparent !important;
    margin-bottom: 0 !important;
    font-size: 19px !important;
    margin-left: -20px;
}

.breadcrumb-item a {
    text-decoration: none !important;
    color: #023177 !important;
    font-weight: 500 !important;
}

.breadcrumb-item.active {
    color: #6c757d !important;
    font-weight: 500 !important;
}

.ticket-card {
    cursor: pointer;
    transition: all 0.2s;
}

    .ticket-card:hover {
        background-color: #f8f9fa;
    }

.stepper-container {
    position: relative;
}

.stepper {
    position: relative;
    padding-left: 30px;
}

    .stepper::before {
        content: '';
        position: absolute;
        left: 8px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #dee2e6;
    }

.stepper-item {
    position: relative;
    padding-bottom: 20px;
}

    .stepper-item:last-child {
        padding-bottom: 0;
    }

    .stepper-item::before {
        content: '';
        position: absolute;
        left: -26px;
        top: 4px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #dee2e6;
        border: 2px solid #fff;
    }

    .stepper-item.completed::before {
        background: #28a745;
        border-color: #28a745;
    }

    .stepper-item.active::before {
        background: #0d6efd;
        border-color: #0d6efd;
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2);
    }

.stepper-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.stepper-remarks {
    color: #212529;
    margin-top: 4px;
}

.stepper-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

:root {
    --amber-bg: #fff3cd;
    --amber-text: #664d03;
    --blue-bg: #cfe2ff;
    --blue-text: #084298;
    --green-bg: #d1e7dd;
    --green-text: #0f5132;
    --purple-bg: #e2d9f3;
    --purple-text: #4b2e83;
    --red-bg: #f8d7da;
    --red-text: #842029;
    --gray-bg: #e2e3e5;
    --gray-text: #41464b;
}

.badge-pending {
    background: var(--amber-bg);
    color: var(--amber-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-inprogress {
    background: var(--blue-bg);
    color: var(--blue-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-resolved {
    background: var(--green-bg);
    color: var(--green-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-closed {
    background: var(--purple-bg);
    color: var(--purple-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-rejected {
    background: var(--red-bg);
    color: var(--red-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-default {
    background: var(--gray-bg);
    color: var(--gray-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

/* Ticket list container */
#ticketsContainer {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

    /* Optional scrollbar styling */
    #ticketsContainer::-webkit-scrollbar {
        width: 6px;
    }

    #ticketsContainer::-webkit-scrollbar-thumb {
        background: #c7c7c7;
        border-radius: 10px;
    }

/* Pagination */
.ticket-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.ticket-page-btn {
    border: none;
    background: #e9ecef;
    color: #212529;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

    .ticket-page-btn:hover {
        background: #d6d8db;
    }

    .ticket-page-btn.active {
        background: #0d6efd;
        color: #fff;
    }

/* ── Custom Modal Overlay (matches IC panel style) ── */
.g-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,20,15,0.55);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
}

    .g-modal-overlay.open {
        display: flex;
    }

.g-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    margin: auto;
}

.g-modal-header {
    background: #0d4f3c;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.g-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    flex: 1;
}

#modalTicketRef {
    color: #fff;
}

.g-modal-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
}

.g-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

    .g-modal-close:hover {
        background: rgba(255,255,255,0.22);
    }

.g-modal-body {
    padding: 20px 24px;
    max-height: 65vh;
    overflow-y: auto;
}

.g-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(0,0,0,0.09);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0f2f5;
}

/* ── Log Grid (progress tracker table) ── */
.log-grid {
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    background: #fff;
}

.log-grid-header {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    background: #f8fafc;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #5a6070;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-align: center;
}

.log-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    align-items: center;
    text-align: center;
}

    .log-grid-row:last-child {
        border-bottom: none;
    }

    .log-grid-header > div:last-child,
    .log-grid-row > div:last-child {
        text-align: left;
        padding-left: 12px;
    }

/* ── Grievance Button ── */
.btn-grievance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.16);
    background: #fff;
    cursor: pointer;
    color: #1a1d23;
    transition: background .15s;
    white-space: nowrap;
    text-decoration: none;
}

    .btn-grievance:hover {
        background: #f0f2f5;
    }

/* ── Custom Stepper ── */
.custom-stepper {
    padding: 4px 0;
}

.cst-item {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.cst-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 24px;
}

.cst-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 10px;
    z-index: 1;
}

.cst-dot-done {
    background: #0d4f3c;
    border: 2px solid #0d4f3c;
}

.cst-dot-active {
    background: #fff;
    border: 2px solid #0d4f3c;
    color: #0d4f3c;
    box-shadow: 0 0 0 4px rgba(13, 79, 60, 0.12);
}

.cst-line {
    flex: 1;
    width: 2px;
    background: rgba(13, 79, 60, 0.2);
    margin: 4px 0;
    min-height: 20px;
}

.cst-content {
    flex: 1;
    padding-top: 2px;
}

.cst-content-mb {
    padding-bottom: 20px;
}

.captcha-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-top: 8px;
    border-radius: 8px;
    background: #eef6ff;
    color: #0f5fd7;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #cfe2ff;
    transition: all .2s ease;
}

    .captcha-refresh-btn i {
        font-size: 12px;
    }

    .captcha-refresh-btn:hover {
        background: #0f5fd7;
        color: #fff;
        border-color: #0f5fd7;
        transform: translateY(-1px);
    }

        .captcha-refresh-btn:hover i {
            transform: rotate(180deg);
            transition: transform .4s ease;
        }

::placeholder {
    color: #6c757d;
    opacity: 1;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 34px;
    color: #d1d5db;
    cursor: pointer;
    transition: .2s ease;
    line-height: 1;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
    transform: scale(1.08);
}

.btn-feedback {
    background: #0d6efd;
    color: #fff;
    border: none;
}

.btn-feedback:hover {
    background: #0b5ed7;
}

.btn-view-feedback {
    background: #f59e0b;
    color: #fff;
    border: none;
}

.btn-view-feedback:hover {
    background: #d97706;
}

.g-note {
    font-size: 12px;
    color: #9099a8;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #0d4f3c;
}

.ticket-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

@media (max-width: 575.98px) {
    .ticket-card {
        flex-direction: column;
        gap: 8px;
    }
    .ticket-card .tid,
    .ticket-card .ttle,
    .ticket-card .tmt {
        text-align: left;
    }
}

.ticket-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.ticket-feedback-actions {
    display: flex;
    gap: 6px;
}

.sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-grievance.primary {
    background: #0d4f3c;
    color: #fff;
    border-color: #0d4f3c;
}

.btn-grievance.primary:hover {
    background: #0a3d2e;
}

.btn-grievance.warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}

.btn-grievance.warning:hover {
    background: #d97706;
}

.btn-grievance.btn-attachment {
    background: #2563eb;
    color: #fff;
    border: none;
}

    .btn-grievance.btn-attachment:hover {
        background: #1d4ed8;
    }

.btn-grievance.btn-forwarding {
    background: #0d9488;
    color: #fff;
    border: none;
}

    .btn-grievance.btn-forwarding:hover {
        background: #0f766e;
    }

/* ── Forwarding Stepper ── */
.step-status-row {
    margin-bottom: 4px;
}

.step-date {
    font-size: 12px;
    color: #7b8794;
    margin-bottom: 4px;
}

.fwd-stepper {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.fwd-step {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 22px;
}

.fwd-step:last-child {
    padding-bottom: 0;
}

.fwd-step::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.10);
}

.fwd-step:last-child::after {
    display: none;
}

.fwd-step-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
    flex-shrink: 0;
}

.fwd-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #185FA5;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.fwd-dot.resolved {
    border-color: #3B6D11;
    background: #edf7e7;
}

.fwd-dot.rejected {
    border-color: #A32D2D;
    background: #fdecec;
}

.fwd-dot.pending {
    border-color: #BA7517;
    background: #fff6df;
}

.fwd-dot.inprogress {
    border-color: #185FA5;
    background: #eaf3ff;
}

.fwd-step-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.fwd-route {
    font-size: 14px;
    font-weight: 500;
    color: #1a1d23;
    margin-bottom: 2px;
}

.fwd-route .arrow {
    color: #9099a8;
    margin: 0 4px;
}

.fwd-remarks {
    margin-top: 6px;
    font-size: 13px;
    color: #5a6070;
    font-style: italic;
    line-height: 1.5;
    background: #f8faf9;
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 2px solid #185FA5;
}

.fwd-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.fwd-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid rgba(13, 79, 60, 0.15);
    border-top-color: #185FA5;
    border-radius: 50%;
    animation: fwd-spin .7s linear infinite;
}

@keyframes fwd-spin {
    to { transform: rotate(360deg); }
}

