/* ============================================================
   TICKET DESK – additions on top of style.css (same theme)
   ============================================================ */

/* ---------- Status tabs above lists ---------- */
.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.status-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e3e6f0;
    color: #555;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s ease;
}

.status-tabs a:hover { border-color: #3c8dbc; color: #3c8dbc; }

.status-tabs a.active {
    background: #3c8dbc;
    border-color: #3c8dbc;
    color: #fff;
}

.status-tabs a .tab-count {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 0 7px;
    font-size: 11px;
}

.status-tabs a.active .tab-count { background: rgba(255, 255, 255, 0.25); }

/* ---------- Labels ---------- */
.ticket-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.ticket-no {
    font-family: Consolas, Menlo, monospace;
    font-weight: 700;
    color: #3c8dbc;
    white-space: nowrap;
}

/* ---------- Progress ---------- */
.ticket-progress {
    min-width: 110px;
}

.ticket-progress .progress {
    height: 8px;
    margin: 4px 0 0;
    border-radius: 4px;
    background: #eef1f5;
    box-shadow: none;
}

.ticket-progress small { font-weight: 700; color: #666; }

/* Progress inside a list cell: always fits the column (fixed-layout tables) */
.progress-cell {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.2;
}

.progress-cell b { font-size: 13px; color: #2c3e50; }
.progress-cell small { display: block; color: #888; font-size: 11px; white-space: nowrap; }

.progress-cell .progress {
    width: 100%;
    height: 7px;
    margin: 4px 0;
    border-radius: 4px;
    background: #e9edf2;
    box-shadow: none;
}

/* ---------- Ticket header card ---------- */
.ticket-hero {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ticket-hero h2 {
    margin: 6px 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
}

.ticket-hero .hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #777;
    font-size: 13px;
}

.ticket-hero .hero-meta i { color: #3c8dbc; margin-right: 4px; }

.ticket-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.ticket-description {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #444;
}

/* ---------- Task (record) cards ---------- */
.task-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-left: 4px solid #d2d6de;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease;
}

.task-card:hover { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05); }

.task-card.status-pending   { border-left-color: #777777; }
.task-card.status-on_going  { border-left-color: #3c8dbc; }
.task-card.status-on_hold   { border-left-color: #f39c12; }
.task-card.status-completed { border-left-color: #00a65a; }
.task-card.status-cancelled { border-left-color: #dd4b39; opacity: 0.75; }

.task-card .task-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.task-card .task-title {
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    margin: 0 0 4px;
}

.task-card .task-meta {
    font-size: 12px;
    color: #888;
}

.task-card .task-meta img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 4px;
}

.task-card .task-desc {
    margin: 10px 0 0;
    color: #555;
    white-space: pre-wrap;
    font-size: 13px;
}

.task-card .task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

/* ---------- Complaints ---------- */
.complaint-item {
    background: #fffaf0;
    border: 1px solid #fbe3b4;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 13px;
}

.complaint-item.is-resolved {
    background: #f4fbf6;
    border-color: #cdebd6;
}

.complaint-item .complaint-reply {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #39cccc;
}

/* ---------- Timeline (AdminLTE timeline, softened) ---------- */
.ticket-timeline { margin: 0; }
.ticket-timeline > li > .timeline-item { border-radius: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.ticket-timeline > li > .timeline-item > .timeline-body { font-size: 13px; color: #555; white-space: pre-wrap; }
.ticket-timeline .timeline-header { font-size: 13px !important; }

/* ---------- Assign repeater (drawer) ---------- */
.assign-row {
    position: relative;
    background: #f9fafc;
    border: 1px dashed #d2d6de;
    border-radius: 12px;
    padding: 14px 14px 4px;
    margin-bottom: 12px;
}

.assign-row .assign-row-no {
    position: absolute;
    top: -10px;
    left: 14px;
    background: #3c8dbc;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 9px;
}

.assign-row .remove-assign-row {
    position: absolute;
    top: 8px;
    right: 10px;
}

.merge-option {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: normal;
    width: 100%;
}

.merge-option:hover { border-color: #3c8dbc; }
.merge-option input { margin-top: 4px; }

/* ---------- Team chat ---------- */
.team-chat .team-chat-messages { height: 340px; }
.team-chat .team-chat-note { font-size: 12px; margin: 0 0 8px; }
.team-chat .direct-chat-text { font-size: 13px; }

/* ---------- Dashboard ---------- */
/* style.css (>=1200px) forces every table's first column to 50px and fixed layout,
   meant for "S No". The dashboard's first column is the ticket number, so undo it here. */
table.table.dash-table {
    table-layout: auto !important;
}

table.table.dash-table th,
table.table.dash-table td {
    padding: 10px 15px !important;
    vertical-align: middle !important;
}

table.table.dash-table th:first-child,
table.table.dash-table td:first-child {
    width: 1% !important;
    white-space: nowrap !important;
}
.dash-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f4f4f4;
}

.dash-list-item:last-child { border-bottom: 0; }

@media (max-width: 767px) {
    .ticket-hero .hero-actions { justify-content: flex-start; margin-top: 12px; }
    .task-card .task-head { flex-direction: column; }
}
