/* ── Layout ── */
        .track-page {
            max-width: 860px;
            margin: 40px auto 80px;
            padding: 0 20px;
        }

        /* ── Search block ── */
        .track-search-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.09);
            padding: 40px;
            text-align: center;
            margin-bottom: 30px;
        }
        .track-search-icon {
            width: 72px; height: 72px;
            background: linear-gradient(135deg, #4361ee, #738ef5);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 32px; color: #fff;
            margin: 0 auto 20px;
            box-shadow: 0 6px 20px rgba(67,97,238,0.3);
        }
        .track-search-card h1 {
            font-size: 24px; color: #2c3e50; margin: 0 0 8px;
        }
        .track-search-card p {
            color: #6c757d; margin: 0 0 28px; font-size: 15px;
        }
        .search-row {
            display: flex; gap: 12px; max-width: 520px; margin: 0 auto;
        }
        .search-row input {
            flex: 1;
            padding: 14px 18px;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            font-size: 15px;
            font-family: monospace;
            letter-spacing: 0.05em;
            transition: border-color 0.2s;
        }
        .search-row input:focus {
            border-color: #4361ee; outline: none;
            box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
        }
        .search-row input::placeholder { font-family: sans-serif; letter-spacing: 0; }
        .btn-search {
            padding: 14px 28px;
            background: #4361ee; color: #fff;
            border: none; border-radius: 10px;
            font-size: 15px; font-weight: 600;
            cursor: pointer; transition: all 0.2s;
            white-space: nowrap;
        }
        .btn-search:hover {
            background: #3a56d4; transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(67,97,238,0.35);
        }

        /* ── Alerts ── */
        .alert {
            padding: 16px 20px; border-radius: 10px;
            margin-bottom: 20px; font-size: 14px;
            display: flex; align-items: flex-start; gap: 12px;
        }
        .alert i { flex-shrink: 0; margin-top: 2px; font-size: 16px; }
        .alert-error   { background: #fff0f0; border: 1px solid #ffd0d0; color: #c0392b; }
        .alert-success { background: #f0fff4; border: 1px solid #b2dfdb; color: #1e7e34; }

        /* ── Ticket card ── */
        .ticket-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.09);
            overflow: hidden;
            margin-bottom: 24px;
        }
        .ticket-card-header {
            padding: 24px 30px;
            border-bottom: 1px solid #f0f0f0;
            display: flex; align-items: flex-start;
            justify-content: space-between; gap: 16px;
            flex-wrap: wrap;
        }
        .ticket-number-big {
            font-size: 22px; font-weight: 700; color: #4361ee;
            font-family: monospace; letter-spacing: 0.04em;
        }
        .ticket-subject-big {
            font-size: 18px; font-weight: 600;
            color: #2c3e50; margin: 6px 0 0;
        }
        .badge-status {
            padding: 6px 16px; border-radius: 20px;
            font-size: 13px; font-weight: 600; white-space: nowrap;
        }
        .status-open        { background: #e3f2fd; color: #1565c0; }
        .status-in_progress { background: #fff3e0; color: #e65100; }
        .status-waiting     { background: #f3e5f5; color: #6a1b9a; }
        .status-resolved    { background: #e8f5e9; color: #2e7d32; }
        .status-closed      { background: #eeeeee; color: #424242; }

        .ticket-meta-row {
            padding: 16px 30px;
            background: #fafbfc;
            border-bottom: 1px solid #f0f0f0;
            display: flex; gap: 24px; flex-wrap: wrap;
            font-size: 13px; color: #6c757d;
        }
        .ticket-meta-row span { display: flex; align-items: center; gap: 6px; }
        .priority-dot {
            width: 8px; height: 8px; border-radius: 50%;
            display: inline-block;
        }

        /* ── Timeline / messages ── */
        .ticket-timeline {
            padding: 24px 30px;
        }
        .timeline-title {
            font-size: 13px; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.1em;
            color: #adb5bd; margin-bottom: 20px;
        }
        .msg-wrap {
            display: flex; gap: 14px; margin-bottom: 22px;
        }
        .msg-wrap:last-child { margin-bottom: 0; }
        .msg-avatar {
            width: 38px; height: 38px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 15px; font-weight: 700; color: #fff;
            flex-shrink: 0;
        }
        .msg-avatar.user    { background: linear-gradient(135deg,#4361ee,#738ef5); }
        .msg-avatar.support { background: linear-gradient(135deg,#28a745,#48c774); }
        .msg-avatar.system  { background: #adb5bd; }
        .msg-bubble {
            flex: 1; background: #f8f9fa;
            border-radius: 0 12px 12px 12px;
            padding: 14px 18px;
            border: 1px solid #e9ecef;
        }
        .msg-bubble.support-bubble {
            background: #f0fff4;
            border-color: #c3e6cb;
            border-radius: 12px 0 12px 12px;
        }
        .msg-wrap.support { flex-direction: row-reverse; }
        .msg-wrap.support .msg-bubble {
            border-radius: 12px 0 12px 12px;
        }
        .msg-meta {
            display: flex; justify-content: space-between;
            align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px;
        }
        .msg-author {
            font-size: 13px; font-weight: 700; color: #2c3e50;
        }
        .msg-author .support-tag {
            font-size: 11px; font-weight: 500;
            color: #28a745; background: #e8f5e9;
            padding: 2px 8px; border-radius: 20px; margin-left: 6px;
        }
        .msg-time {
            font-size: 12px; color: #adb5bd;
        }
        .msg-body {
            font-size: 14px; line-height: 1.65; color: #495057;
        }
        .system-msg {
            text-align: center; color: #868e96;
            font-size: 13px; padding: 10px 16px;
            background: #f1f3f5; border-radius: 30px;
            margin: 12px auto; max-width: 80%;
        }

        /* ── Hidden messages notice (private ticket) ── */
        .private-notice {
            padding: 28px 30px; text-align: center; color: #6c757d;
        }
        .private-notice i { font-size: 36px; color: #dee2e6; margin-bottom: 12px; }

        /* ── Reply form ── */
        .reply-card {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 4px 24px rgba(0,0,0,0.09);
            padding: 28px 30px;
            margin-bottom: 24px;
        }
        .reply-card h3 {
            font-size: 16px; color: #2c3e50;
            margin: 0 0 16px;
            display: flex; align-items: center; gap: 8px;
        }
        .reply-card textarea {
            width: 100%;
            padding: 14px 16px;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            font-size: 14px;
            min-height: 110px;
            resize: vertical;
            transition: border-color 0.2s;
            box-sizing: border-box;
        }
        .reply-card textarea:focus {
            border-color: #4361ee; outline: none;
            box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
        }
        .reply-actions {
            display: flex; justify-content: space-between;
            align-items: center; margin-top: 14px; flex-wrap: wrap; gap: 10px;
        }
        .btn-reply {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 12px 28px;
            background: #4361ee; color: #fff;
            border: none; border-radius: 10px;
            font-size: 15px; font-weight: 600;
            cursor: pointer; transition: all 0.2s;
        }
        .btn-reply:hover {
            background: #3a56d4; transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(67,97,238,0.35);
        }
        .closed-notice {
            padding: 24px 30px; text-align: center;
            color: #6c757d; font-size: 14px;
            background: #f8f9fa; border-radius: 10px;
        }

        /* ── Links ── */
        .track-links {
            display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
        }
        .track-link {
            display: inline-flex; align-items: center; gap: 8px;
            font-size: 14px; font-weight: 600;
            color: #4361ee; text-decoration: none;
        }
        .track-link:hover { text-decoration: underline; }
        .track-link.secondary { color: #6c757d; }

        /* ── Status steps ── */
        .status-steps {
            display: flex; gap: 0;
            background: #fff;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #e9ecef;
            margin-bottom: 24px;
        }
        .status-step {
            flex: 1; padding: 12px 8px;
            text-align: center; font-size: 11px;
            font-weight: 600; color: #adb5bd;
            border-right: 1px solid #e9ecef;
            transition: all 0.3s;
            position: relative;
        }
        .status-step:last-child { border-right: none; }
        .status-step.active {
            background: linear-gradient(135deg,#4361ee,#738ef5);
            color: #fff;
        }
        .status-step.done {
            background: #e8f5e9; color: #2e7d32;
        }
        .status-step i { display: block; font-size: 16px; margin-bottom: 4px; }

        @media (max-width: 640px) {
            .track-search-card { padding: 28px 20px; }
            .search-row { flex-direction: column; }
            .ticket-card-header, .ticket-meta-row, .ticket-timeline { padding: 18px 20px; }
            .reply-card { padding: 20px; }
            .status-steps { display: none; }
            .msg-wrap.support { flex-direction: row; }
            .msg-wrap.support .msg-bubble { border-radius: 0 12px 12px 12px; }
        }
