        /* ============================================================
           🎫 TICKETS — قائمة + thread + new ticket
           ============================================================ */
        .tk-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
        .tk-row {
            background: #fff; border: 1px solid #f1f5f9; border-radius: 18px;
            padding: 12px 14px; cursor: pointer; transition: all .2s;
            display: flex; gap: 12px; align-items: flex-start;
        }
        .tk-row:hover { border-color: rgba(0,184,148,0.4); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
        .tk-row.unread { border-color: var(--brand); background: var(--brand-soft); }
        .tk-row .tk-icon {
            width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; font-size: 1rem;
        }
        .tk-row .tk-body { flex: 1; min-width: 0; line-height: 1.3; }
        .tk-row .tk-subject { font-weight: 800; font-size: 0.92rem; color: #0f172a; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tk-row .tk-meta { font-size: 0.7rem; color: #64748b; font-weight: 600; display: flex; gap: 6px; align-items: center; }
        .tk-row .tk-time { font-size: 0.65rem; color: #94a3b8; font-weight: 700; flex-shrink: 0; margin-top: 4px; }
        .tk-status {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 2px 8px; border-radius: 999px;
            font-size: 0.62rem; font-weight: 800;
            text-transform: uppercase; letter-spacing: 0.04em;
        }
        .tk-status.open { background: #fef3c7; color: #92400e; }
        .tk-status.in_progress { background: #dbeafe; color: #1d4ed8; }
        .tk-status.resolved { background: #d1fae5; color: #065f46; }
        .tk-status.closed { background: #f1f5f9; color: #475569; }

        /* Thread view */
        .tk-thread {
            display: flex; flex-direction: column; gap: 10px;
            padding: 12px 4px;
            max-height: 50vh; overflow-y: auto;
        }
        .tk-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
        .tk-msg.customer { align-self: flex-start; flex-direction: row; }
        .tk-msg.staff { align-self: flex-end; flex-direction: row-reverse; }
        .tk-msg.system { align-self: center; max-width: 100%; }
        .tk-msg-avatar {
            width: 28px; height: 28px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.72rem; font-weight: 800; flex-shrink: 0;
        }
        .tk-msg.customer .tk-msg-avatar { background: var(--brand-soft); color: var(--brand-dark); }
        .tk-msg.staff .tk-msg-avatar { background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; }
        .tk-msg-bubble {
            padding: 9px 13px; border-radius: 16px;
            font-size: 0.86rem; line-height: 1.45; font-weight: 600;
            box-shadow: var(--shadow-sm);
        }
        .tk-msg.customer .tk-msg-bubble {
            background: var(--brand-soft); color: #064e3b;
            border-bottom-left-radius: 4px;
        }
        .tk-msg.staff .tk-msg-bubble {
            background: #fff; color: #0f172a;
            border: 1px solid #e2e8f0;
            border-bottom-right-radius: 4px;
        }
        .tk-msg.system .tk-msg-bubble {
            background: #f1f5f9; color: #64748b;
            font-size: 0.72rem; font-weight: 700;
            text-align: center; padding: 6px 12px;
        }
        .tk-msg-time { font-size: 0.6rem; color: #94a3b8; font-weight: 700; margin-top: 3px; padding: 0 4px; }
        .tk-msg-attachments {
            margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap;
        }
        .tk-msg-attachments img {
            width: 60px; height: 60px; object-fit: cover; border-radius: 10px;
            border: 1px solid rgba(0,0,0,0.08); cursor: pointer;
        }

        .tk-input-bar {
            display: flex; gap: 8px; align-items: flex-end;
            padding: 10px 0;
            border-top: 1px solid #f1f5f9;
            margin-top: 8px;
        }
        .tk-input-bar textarea {
            flex: 1; background: #f8fafc; border: 1px solid #e2e8f0;
            border-radius: 14px; padding: 10px 12px;
            font-size: 0.88rem; font-weight: 600; outline: none;
            resize: none; max-height: 100px; min-height: 38px;
            transition: border-color .2s;
        }
        .tk-input-bar textarea:focus { border-color: var(--brand); background: #fff; }
        .tk-input-bar .send-btn {
            width: 42px; height: 42px; border-radius: 12px;
            background: linear-gradient(135deg, var(--brand), var(--brand-dark));
            color: #fff; display: flex; align-items: center; justify-content: center;
            font-size: 0.95rem; flex-shrink: 0;
            box-shadow: 0 6px 14px -3px rgba(0,184,148,0.45);
            transition: all .2s;
        }
        .tk-input-bar .send-btn:hover { transform: translateY(-1px); }
        .tk-input-bar .send-btn:active { transform: scale(0.95); }
        .tk-input-bar .attach-btn {
            width: 38px; height: 38px; border-radius: 12px;
            background: #f1f5f9; color: #64748b;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; cursor: pointer;
            transition: all .2s;
        }
        .tk-input-bar .attach-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }

        .tk-empty {
            padding: 50px 20px; text-align: center;
            color: #94a3b8;
        }
        .tk-empty i { font-size: 3rem; opacity: 0.3; margin-bottom: 10px; display: block; }

        .tk-category-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
            margin-bottom: 14px;
        }
        .tk-category-card {
            border: 1.5px solid #e2e8f0; border-radius: 14px;
            padding: 12px; cursor: pointer; text-align: center;
            transition: all .2s; background: #fff;
        }
        .tk-category-card i {
            font-size: 1.4rem; margin-bottom: 6px; display: block;
        }
        .tk-category-card .lbl { font-size: 0.78rem; font-weight: 800; color: #475569; }
        .tk-category-card:hover { border-color: rgba(0,184,148,0.4); transform: translateY(-1px); }
        .tk-category-card.selected {
            border-color: var(--brand);
            background: linear-gradient(135deg, var(--brand-soft), #d4f7ed);
            box-shadow: 0 4px 12px -2px rgba(0,184,148,0.25);
        }
        .tk-category-card.selected i { color: var(--brand-dark); }
        .tk-category-card.selected .lbl { color: var(--brand-dark); }

        .tk-attach-preview {
            display: flex; gap: 6px; flex-wrap: wrap;
            margin-top: 8px;
        }
        .tk-attach-preview .ap-item {
            position: relative;
            width: 60px; height: 60px; border-radius: 10px;
            overflow: hidden;
        }
        .tk-attach-preview .ap-item img { width: 100%; height: 100%; object-fit: cover; }
        .tk-attach-preview .ap-rm {
            position: absolute; top: 2px; right: 2px;
            width: 18px; height: 18px; border-radius: 50%;
            background: rgba(0,0,0,0.6); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.6rem; cursor: pointer;
        }

        /* ============================================================
           ⭐ RATING — 3-star order rating
           ============================================================ */
        .rating-cta-card {
            background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
            border: 1px solid #fde68a; border-radius: 22px;
            padding: 14px;
            display: flex; align-items: center; gap: 12px;
            box-shadow: var(--shadow-sm);
            cursor: pointer; transition: all .25s;
        }
        .rating-cta-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .rating-cta-card .icon {
            width: 50px; height: 50px; border-radius: 14px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff; display: flex; align-items: center; justify-content: center;
            font-size: 1.4rem; flex-shrink: 0;
            box-shadow: 0 6px 16px -4px rgba(217,119,6,0.45);
        }
        .rating-cta-card .body { flex: 1; line-height: 1.25; }
        .rating-cta-card .body .t { font-weight: 900; font-size: 0.96rem; color: #92400e; }
        .rating-cta-card .body .s { font-size: 0.72rem; color: #b45309; font-weight: 700; margin-top: 3px; }
        .rating-cta-card .arrow {
            width: 32px; height: 32px; border-radius: 50%;
            background: rgba(217,119,6,0.15); color: #92400e;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.78rem; flex-shrink: 0;
        }

        .rating-done-card {
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border: 1px solid rgba(16,185,129,0.3); border-radius: 22px;
            padding: 14px; display: flex; align-items: center; gap: 12px;
        }
        .rating-done-card .icon {
            width: 44px; height: 44px; border-radius: 12px;
            background: var(--brand); color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.05rem; flex-shrink: 0;
        }
        .rating-done-card .body { flex: 1; line-height: 1.25; }
        .rating-done-card .body .t { font-weight: 900; font-size: 0.92rem; color: #065f46; }
        .rating-done-card .body .stars { display: flex; gap: 3px; margin-top: 4px; color: #f59e0b; font-size: 0.78rem; }

        .rating-row {
            background: #fff; border: 1px solid #f1f5f9; border-radius: 18px;
            padding: 14px;
            display: flex; align-items: center; gap: 14px;
        }
        .rating-row .ico {
            width: 44px; height: 44px; border-radius: 13px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem; flex-shrink: 0;
        }
        .rating-row .body { flex: 1; line-height: 1.2; }
        .rating-row .body .t { font-weight: 800; font-size: 0.92rem; color: #0f172a; }
        .rating-row .body .s { font-size: 0.7rem; color: #64748b; font-weight: 600; margin-top: 2px; }
        .rating-stars { display: flex; gap: 4px; flex-shrink: 0; }
        .rating-star {
            width: 30px; height: 30px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.2rem;
            color: #cbd5e1;
            cursor: pointer;
            transition: all .15s;
        }
        .rating-star:hover { transform: scale(1.15); }
        .rating-star.active { color: #f59e0b; }
        .rating-stars[data-tone="emerald"] .rating-star.active { color: #10b981; }
        /* ============ Abu El-Abed Chat Screen ============ */
        .abu-chat-header {
            background: linear-gradient(135deg, #022c22 0%, #064e3b 40%, var(--brand-dark) 100%);
            box-shadow: 0 4px 14px rgba(2,44,34,0.25);
            position: relative;
            overflow: hidden;
        }
        .abu-chat-header::before {
            content: '';
            position: absolute; inset: 0;
            background:
                radial-gradient(circle at 15% 20%, rgba(74,176,79,0.35), transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(0,184,148,0.35), transparent 50%);
            pointer-events: none;
        }
        .abu-chat-header > * { position: relative; z-index: 1; }

        .abu-status-dot {
            position: absolute;
            bottom: 0; right: 0;
            width: 12px; height: 12px;
            background: #34d399;
            border: 2.5px solid #064e3b;
            border-radius: 50%;
            box-shadow: 0 0 0 0 rgba(52,211,153,0.7);
            animation: abu-status-pulse 2s infinite;
        }
        @keyframes abu-status-pulse {
            0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.7); }
            70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
            100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
        }

        .abu-pulse-dot {
            display: inline-block;
            width: 6px; height: 6px;
            background: #34d399;
            border-radius: 50%;
            animation: abu-pulse-fade 2s infinite;
        }
        @keyframes abu-pulse-fade {
            0%, 100% { opacity: 0.4; }
            50% { opacity: 1; }
        }

        .abu-header-btn {
            width: 38px; height: 38px;
            border-radius: 12px;
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.12);
            display: flex; align-items: center; justify-content: center;
            transition: all .2s;
            cursor: pointer;
        }
        .abu-header-btn:hover { background: rgba(255,255,255,0.18); transform: scale(1.05); }
        .abu-header-btn:active { transform: scale(0.92); }

        /* Input Area */
        .abu-input-area {
            background: linear-gradient(180deg, #f8fafc 0%, #f0f7f1 100%);
            border-top: 1px solid rgba(0,184,148,0.12);
            padding: 12px 10px max(10px, env(safe-area-inset-bottom));
            z-index: 20;
            box-shadow: 0 -8px 24px -8px rgba(15,23,42,0.06);
        }
        .abu-input-wrapper {
            background: #fff;
            border: 1.5px solid #e2e8f0;
            border-radius: 22px;
            box-shadow: 0 2px 6px rgba(15,23,42,0.04);
            display: flex;
            align-items: flex-end;
            padding: 2px 10px;
            transition: border-color .2s, box-shadow .2s;
        }
        .abu-input-wrapper:focus-within {
            border-color: var(--brand);
            box-shadow: 0 0 0 3px rgba(0,184,148,0.12), 0 4px 12px rgba(0,184,148,0.08);
        }

        .abu-action-btn {
            width: 42px; height: 42px;
            border-radius: 14px;
            background: #fff;
            color: #64748b;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 2px 6px rgba(15,23,42,0.06);
            border: 1px solid rgba(15,23,42,0.04);
            transition: all .2s;
            font-size: 0.95rem;
        }
        .abu-action-btn:hover { color: var(--brand); border-color: rgba(0,184,148,0.25); transform: translateY(-1px); }
        .abu-action-btn:active { transform: scale(0.92); }

        .abu-send-btn, .abu-mic-btn {
            width: 46px; height: 46px;
            border-radius: 16px;
            color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 1rem;
            box-shadow: 0 6px 16px -2px rgba(0,184,148,0.45);
            transition: all .2s;
            background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
        }
        .abu-send-btn:hover, .abu-mic-btn:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 8px 22px -2px rgba(0,184,148,0.55); }
        .abu-send-btn:active, .abu-mic-btn:active { transform: scale(0.92); }

        /* Message bubbles enhancement (keeping JS render structure) */
        #chat-box .flex.w-full > .relative { transition: transform .15s; }
        #chat-box .flex.w-full > .relative:hover { transform: translateY(-1px); }
        #chat-box .bg-\[\#dcf8c6\] {
            background: linear-gradient(135deg, #dcf8c6 0%, #c8f0a8 100%) !important;
            box-shadow: 0 2px 8px rgba(74,176,79,0.12) !important;
        }
        #chat-box .bg-white {
            box-shadow: 0 2px 6px rgba(15,23,42,0.05), 0 1px 2px rgba(15,23,42,0.04) !important;
        }

