/* ============================================================
   Zupportly Admin Styles — v5
   ============================================================ */
.zupportly-settings-wrap,
.post-type-zupportly_ticket #poststuff { color:#2c3338; max-width:1240px; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.et-status-badge {
	display:inline-flex; align-items:center; gap:5px;
	font-size:11px; font-weight:700; padding:3px 10px;
	border-radius:20px; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap;
}
.et-status-badge::before { content:''; display:inline-block; width:5px; height:5px; border-radius:50%; background:currentColor; }
.et-status-new      { color:#0073aa; background:#e8f4fb; border:1px solid #b3d9f0; }
.et-status-progress { color:#d46b08; background:#fff7e6; border:1px solid #ffd591; }
.et-status-solved   { color:#1a7f37; background:#e6f4ea; border:1px solid #a8d9b0; }
.et-status-closed   { color:#50575e; background:#f0f0f1; border:1px solid #c3c4c7; }

.et-agent-chip { display:inline-block; background:#f0f0f1; border:1px solid #dcdcde; border-radius:12px; padding:2px 10px; font-size:12px; color:#3c434a; }
.et-assigned-agent-badge { display:inline-block; background:#f0f6fb; border:1px solid #b3d4fc; border-radius:12px; padding:4px 14px; font-size:13px; font-weight:600; color:#2271b1; margin-top:4px; }
.zupportly-agent-avatar-img { vertical-align:middle; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.zupportly-page-header {
	display:flex; align-items:center; gap:16px; margin-bottom:24px;
	padding:20px 28px; background:linear-gradient(135deg,#1e3a5f 0%,#2271b1 100%);
	border-radius:12px; color:#fff; flex-wrap:wrap;
}
.zupportly-header-icon .dashicons { font-size:36px; width:36px; height:36px; color:rgba(255,255,255,.85); }
.zupportly-header-text h1 { color:#fff; margin:0 0 4px; font-size:22px; }
.zupportly-header-text p  { color:rgba(255,255,255,.8); margin:0; font-size:14px; }
.zupportly-rate-btn {
	display:inline-flex; align-items:center; gap:3px;
	background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.35);
	color:#fff; text-decoration:none; padding:8px 14px; border-radius:8px;
	font-size:13px; font-weight:600; white-space:nowrap; transition:background .2s;
}
.zupportly-rate-btn:hover { background:rgba(255,255,255,.25); color:#fff; }
.zupportly-rate-btn .dashicons { font-size:14px; width:14px; height:14px; color:#fbbf24; }

/* Notices */
.zupportly-notice { display:flex; align-items:center; gap:10px; padding:12px 18px; border-radius:8px; margin-bottom:20px; font-size:14px; }
.zupportly-notice-success { background:#e6f4ea; border:1px solid #a8d9b0; color:#1a7f37; }
.zupportly-notice-error   { background:#fce8e8; border:1px solid #f5c2c2; color:#a00; }
.zupportly-notice .dashicons { font-size:20px; width:20px; height:20px; }

/* Quick Start */
.zupportly-quickstart-banner { display:flex; align-items:flex-start; gap:14px; background:#fff8e1; border:1px solid #ffe082; border-left:5px solid #ffb300; border-radius:8px; padding:16px 20px; margin-bottom:24px; }
.zupportly-qs-icon .dashicons { font-size:24px; width:24px; height:24px; color:#f59e0b; margin-top:2px; }
.zupportly-qs-content { flex:1; font-size:14px; color:#3c3c3c; line-height:1.6; }
.zupportly-shortcode-block { display:inline-flex; align-items:center; gap:0; margin-top:10px; border:2px solid #ffb300; border-radius:6px; overflow:hidden; background:#fff; }
.zupportly-shortcode-block code { padding:8px 14px; font-size:15px; font-weight:700; color:#1e3a5f; background:#fff; border:none; font-family:'Courier New',monospace; user-select:all; }
.zupportly-copy-btn { display:flex; align-items:center; gap:5px; padding:8px 14px; background:#ffb300; color:#1a1a1a; border:none; cursor:pointer; font-size:13px; font-weight:600; white-space:nowrap; }
.zupportly-copy-btn:hover { background:#f59e0b; }
.zupportly-copy-btn .dashicons { font-size:16px; width:16px; height:16px; }

/* Cards */
.zupportly-card { background:#fff; border:1px solid #dcdcde; border-radius:10px; margin-bottom:24px; box-shadow:0 1px 4px rgba(0,0,0,.06); overflow:hidden; }
.zupportly-card-header { display:flex; align-items:flex-start; gap:14px; background:#f8f9fa; border-bottom:1px solid #dcdcde; padding:18px 22px; }
.zupportly-card-header > .dashicons { font-size:22px; width:22px; height:22px; color:#2271b1; margin-top:2px; flex-shrink:0; }
.zupportly-card-header h2 { margin:0 0 4px; font-size:16px; color:#1d2327; }
.zupportly-card-header p  { margin:0; font-size:13px; color:#646970; line-height:1.5; }
.zupportly-card-body { padding:22px; }

/* ============================================================
   SETTINGS — UNIFIED AGENT TABLE
   ============================================================ */
.zt-add-agent-link {
	display:inline-flex; align-items:center; gap:4px;
	margin-left:10px; font-size:12px; color:#2271b1; text-decoration:none;
}
.zt-add-agent-link:hover { text-decoration:underline; }
.zt-add-agent-link .dashicons { font-size:14px; width:14px; height:14px; }

.zt-agents-table { width:100%; border-collapse:collapse; }
.zt-agents-table thead tr { background:#f8f9fa; }
.zt-agents-table th {
	padding:10px 16px; font-size:11px; font-weight:700; text-transform:uppercase;
	letter-spacing:.06em; color:#646970; border-bottom:2px solid #e5e7eb; text-align:left;
}
.zt-agents-table td { padding:14px 16px; border-bottom:1px solid #f0f0f1; vertical-align:middle; }
.zt-agents-table tbody tr:last-child td { border-bottom:none; }
.zt-agents-table tbody tr:hover td { background:#fafbfc; }
.zt-col-agent  { width:35%; }
.zt-col-bubble { width:35%; }
.zt-col-avatar { width:18%; }
.zt-col-actions{ width:12%; }

.zt-agent-identity { display:flex; align-items:center; gap:12px; }
.zt-av-wrap { width:44px; height:44px; border-radius:50%; flex-shrink:0; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.zt-av-img     { width:44px; height:44px; border-radius:50%; object-fit:cover; border:2px solid #e8f0fb; }
.zt-av-initials { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,#2271b1,#1e3a5f); color:#fff; font-size:18px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.zt-agent-wp-name { display:block; font-size:14px; color:#1d2327; margin-bottom:2px; }
.zt-agent-email   { display:block; font-size:12px; color:#9ca3af; }

.zt-bubble-name-wrap { display:flex; align-items:center; gap:8px; }
.zt-bubble-name-input {
	flex:1; padding:7px 11px; border:1.5px solid #e2e8f0; border-radius:7px;
	font-size:13px; transition:border-color .2s, box-shadow .2s; max-width:260px;
}
.zt-bubble-name-input:focus { border-color:#2271b1; box-shadow:0 0 0 2px rgba(34,113,177,.12); outline:none; }
.zt-bubble-save-status { font-size:11px; color:#1a7f37; font-weight:600; white-space:nowrap; opacity:0; transition:opacity .3s; }
.zt-bubble-save-status.saved { opacity:1; }
.zt-field-hint { font-size:11px; color:#9ca3af; margin:4px 0 0; line-height:1.4; }

.zt-av-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.zt-upload-avatar-btn, .zt-remove-avatar-btn { display:inline-flex !important; align-items:center; gap:4px; font-size:12px !important; padding:5px 10px !important; height:auto !important; line-height:1.4 !important; }
.zt-upload-avatar-btn .dashicons, .zt-remove-avatar-btn .dashicons { font-size:13px; width:13px; height:13px; }
.zt-remove-avatar-btn { color:#d63638 !important; border-color:#d63638 !important; }
.zt-remove-avatar-btn:hover { background:#fce8e8 !important; }

/* Empty state */
.zupportly-empty-agents { text-align:center; padding:40px 20px; color:#8c8f94; border:2px dashed #dcdcde; border-radius:8px; margin-bottom:16px; }
.zupportly-empty-agents .dashicons { font-size:40px; width:40px; height:40px; display:block; margin:0 auto 10px; color:#c3c4c7; }

/* Field groups */
.zupportly-field-group { display:flex; flex-direction:column; gap:8px; }
.zupportly-field-group label { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:#1d2327; }
.zupportly-field-group label .dashicons { color:#2271b1; font-size:16px; width:16px; height:16px; }
.zupportly-field-group input[type="url"] { width:100%; max-width:480px; border-radius:6px; border:1px solid #c3c4c7; padding:8px 12px; font-size:14px; }
.zupportly-field-group input:focus { border-color:#2271b1; box-shadow:0 0 0 1px #2271b1; outline:none; }
.zupportly-save-row { margin-top:8px; }
.zupportly-save-row .button-primary { padding:8px 24px; font-size:14px; height:auto; border-radius:6px; }

/* ============================================================
   CREATE TICKET PAGE — Agent Picker
   ============================================================ */
.zupportly-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media(max-width:700px){.zupportly-form-grid{grid-template-columns:1fr;}}
.zupportly-field-group textarea { max-width:100%; resize:vertical; width:100%; border-radius:6px; border:1px solid #c3c4c7; padding:8px 12px; font-size:14px; }
.zupportly-field-group input[type="text"],
.zupportly-field-group input[type="email"] { width:100%; max-width:100%; border-radius:6px; border:1px solid #c3c4c7; padding:8px 12px; font-size:14px; }

.zt-agent-picker { display:flex; flex-wrap:wrap; gap:10px; }
.zt-agent-option { display:flex; align-items:center; gap:8px; padding:10px 14px; border:2px solid #e5e7eb; border-radius:10px; cursor:pointer; transition:border-color .2s,background .2s; font-size:13px; background:#fff; }
.zt-agent-option input[type="radio"] { display:none; }
.zt-agent-option:hover { border-color:#2271b1; background:#f0f6fb; }
.zt-agent-selected, .zt-agent-option:has(input:checked) { border-color:#2271b1; background:#e8f4fb; }
.zt-agent-option .zupportly-agent-avatar { width:32px; height:32px; font-size:14px; }

/* ============================================================
   TICKET LIST PAGE
   Strategy: keep WP's native <table> layout but style it beautifully.
   Column widths are forced via inline <style> injected in admin_head
   (see admin.php) because WP's <colgroup> overrides CSS width.
   ============================================================ */

/* -- Table shell -- */
.post-type-zupportly_ticket #wpbody-content .wrap { max-width:1300px; }
.post-type-zupportly_ticket .wp-list-table {
	border-collapse:separate !important;
	border-spacing:0 5px !important;
	background:transparent !important;
	border:none !important;
	box-shadow:none !important;
}

/* -- Header row -- */
.post-type-zupportly_ticket .wp-list-table thead th,
.post-type-zupportly_ticket .wp-list-table tfoot th {
	background:#f0f2f5 !important;
	border:none !important;
	padding:9px 14px !important;
	font-size:11px !important;
	font-weight:700 !important;
	text-transform:uppercase !important;
	letter-spacing:.06em !important;
	color:#5a6370 !important;
}
.post-type-zupportly_ticket .wp-list-table thead th:first-child,
.post-type-zupportly_ticket .wp-list-table tfoot th:first-child { border-radius:8px 0 0 8px !important; }
.post-type-zupportly_ticket .wp-list-table thead th:last-child,
.post-type-zupportly_ticket .wp-list-table tfoot th:last-child  { border-radius:0 8px 8px 0 !important; }
/* Remove WP default sort arrow borders */
.post-type-zupportly_ticket .wp-list-table thead th a,
.post-type-zupportly_ticket .wp-list-table thead th span { color:inherit !important; }

/* -- Body rows — each is a white card -- */
.post-type-zupportly_ticket .wp-list-table tbody tr,
.post-type-zupportly_ticket .wp-list-table tbody tr.alternate {
	background:#fff !important;
}
.post-type-zupportly_ticket .wp-list-table tbody td {
	background:transparent !important;
	border-top:1px solid #e9ecf0 !important;
	border-bottom:1px solid #e9ecf0 !important;
	border-left:none !important;
	border-right:none !important;
	padding:14px 14px !important;
	vertical-align:middle !important;
	font-size:13px;
	line-height:1.4;
}
/* Left edge of row = rounded + status accent border */
.post-type-zupportly_ticket .wp-list-table tbody td:first-child {
	border-left:4px solid #d1d5db !important;
	border-radius:9px 0 0 9px !important;
}
/* Right edge */
.post-type-zupportly_ticket .wp-list-table tbody td:last-child {
	border-right:1px solid #e9ecf0 !important;
	border-radius:0 9px 9px 0 !important;
}
/* Hover */
.post-type-zupportly_ticket .wp-list-table tbody tr:hover td {
	background:#f6f9ff !important;
}
.post-type-zupportly_ticket .wp-list-table tbody tr:hover td:first-child {
	border-left-color:#2271b1 !important;
}

/* Status-coloured left border — uses the status badge class inside the row */
.post-type-zupportly_ticket .wp-list-table tbody tr:has(.et-status-new)      td:first-child { border-left-color:#0073aa !important; }
.post-type-zupportly_ticket .wp-list-table tbody tr:has(.et-status-progress) td:first-child { border-left-color:#d46b08 !important; }
.post-type-zupportly_ticket .wp-list-table tbody tr:has(.et-status-solved)   td:first-child { border-left-color:#1a7f37 !important; }
.post-type-zupportly_ticket .wp-list-table tbody tr:has(.et-status-closed)   td:first-child { border-left-color:#9ca3af !important; }

/* -- Title column -- */
.post-type-zupportly_ticket .column-title .row-title {
	font-size:14px; font-weight:600; color:#1d2327; text-decoration:none; display:block;
}
.post-type-zupportly_ticket .column-title .row-title:hover { color:#2271b1; }
.post-type-zupportly_ticket .column-title .row-actions { font-size:11px; margin-top:3px; }

/* -- Ticket # chip -- */
.zt-nr-chip {
	display:inline-block; background:#eef2ff; color:#4338ca;
	border:1px solid #c7d2fe; border-radius:5px;
	padding:3px 9px; font-size:11px; font-weight:700;
	font-family:monospace; letter-spacing:.03em; white-space:nowrap;
}

/* -- Customer cell -- */
.zt-customer-cell { line-height:1.35; }
.zt-customer-cell strong { display:block; font-size:13px; color:#1d2327; }
.zt-customer-cell span   { display:block; font-size:11px; color:#9ca3af; }

/* -- Agent cell -- */
.zt-agent-cell { display:flex; align-items:center; gap:7px; }
.zt-unassigned { font-size:12px; color:#bbb; font-style:italic; }

/* -- Date cell -- */
.zt-date-cell { font-size:12px; color:#646970; white-space:nowrap; }

/* -- Filter / tablenav bar -- */
.post-type-zupportly_ticket .tablenav .alignleft.actions {
	display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
input[name="zupportly_ticket_number"] {
	padding:5px 10px; border:1px solid #c3c4c7;
	border-radius:6px; font-size:13px; width:190px;
}
.post-type-zupportly_ticket select[name="zupportly_status_filter"],
.post-type-zupportly_ticket select[name="m"] {
	border-radius:6px !important; padding:4px 8px !important;
	font-size:13px !important;
}

/* ============================================================
   TICKET DETAIL PAGE
   ============================================================ */
.zt-details-grid { display:flex; flex-direction:column; gap:0; }
.zt-detail-row { display:flex; align-items:flex-start; gap:12px; padding:10px 0; border-bottom:1px solid #f0f0f1; font-size:13px; }
.zt-detail-row:last-child { border-bottom:none; }
.zt-detail-label { display:flex; align-items:center; gap:5px; min-width:140px; color:#646970; font-weight:600; flex-shrink:0; }
.zt-detail-label .dashicons { font-size:14px; width:14px; height:14px; }
.zt-detail-value { display:flex; align-items:center; gap:6px; flex:1; flex-wrap:wrap; }
.zt-ticket-nr { background:#f0f6fb; color:#2271b1; padding:2px 8px; border-radius:4px; font-size:13px; font-weight:700; }
.zt-email-link { font-size:12px; color:#2271b1; text-decoration:none; }
.zt-email-link:hover { text-decoration:underline; }
.zt-attachment-thumb img { max-width:100px; border-radius:6px; border:1px solid #dcdcde; margin-top:2px; }
.zt-message-body { background:#f8f9fa; border:1px solid #e2e8f0; border-radius:8px; padding:14px 16px; font-size:14px; line-height:1.6; white-space:pre-wrap; word-wrap:break-word; color:#1d2327; }

/* Conversation thread */
.zt-conversation { display:flex; flex-direction:column; gap:16px; padding:4px 0 20px; }
.zt-msg-row { display:flex; gap:10px; align-items:flex-start; }
.zt-msg-agent  { flex-direction:row-reverse; }
.zt-msg-customer { flex-direction:row; }
.zt-msg-avatar { width:36px; height:36px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; color:#fff; }
.zt-avatar-agent    { background:linear-gradient(135deg,#2271b1,#1e3a5f); }
.zt-avatar-customer { background:linear-gradient(135deg,#059669,#065f46); }
.zt-msg-bubble { max-width:80%; padding:10px 14px; border-radius:10px; font-size:13px; line-height:1.5; word-break:break-word; }
.zt-msg-agent  .zt-msg-bubble { background:#e8f4fb; border:1px solid #b3d4fc; border-top-right-radius:2px; }
.zt-msg-customer .zt-msg-bubble { background:#f0fdf4; border:1px solid #a7f3d0; border-top-left-radius:2px; }
.zt-msg-author { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-bottom:4px; color:#646970; }
.zt-msg-image-wrap img { max-width:160px; border-radius:6px; margin-top:8px; display:block; border:1px solid #dcdcde; }
.zt-msg-agent .zt-msg-body { align-items:flex-end; display:flex; flex-direction:column; }
.zt-no-replies { text-align:center; padding:30px; color:#8c8f94; }
.zt-no-replies .dashicons { font-size:36px; width:36px; height:36px; display:block; margin:0 auto 8px; color:#c3c4c7; }

/* Reply form */
.zt-reply-form-wrap { background:#fff; border:1px solid #dcdcde; border-radius:10px; overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.06); }
.zt-reply-form-header { background:#f8f9fa; border-bottom:1px solid #dcdcde; padding:12px 16px; font-size:14px; font-weight:700; color:#1d2327; }
.zt-reply-composer textarea { width:100% !important; border:none !important; box-shadow:none !important; padding:14px 16px !important; min-height:110px; font-size:14px; resize:vertical; background:#fff; }
.zt-reply-toolbar { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; background:#f8f9fa; border-top:1px solid #f0f0f1; flex-wrap:wrap; gap:8px; }
.zt-attach-btn { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#646970; cursor:pointer; padding:6px 10px; border:1px solid #dcdcde; border-radius:6px; background:#fff; transition:border-color .2s; }
.zt-attach-btn:hover { border-color:#2271b1; color:#2271b1; }
.zt-attach-btn .dashicons { font-size:15px; width:15px; height:15px; }
.zt-reply-as { font-size:12px; color:#646970; display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.zt-reply-as code { background:#f0f0f1; padding:1px 5px; border-radius:3px; font-size:11px; }

/* Blocked / Assignment */
.zupportly-reply-blocked { display:flex; align-items:center; gap:10px; padding:14px 18px; background:#fff3cd; border:1px solid #ffc107; border-left:4px solid #f59e0b; border-radius:8px; font-size:13px; color:#856404; margin-top:16px; }
.zupportly-reply-blocked .dashicons { font-size:20px; width:20px; height:20px; flex-shrink:0; }
.zupportly-current-agent { margin:0 0 12px; padding-bottom:12px; border-bottom:1px solid #f0f0f1; font-size:13px; }

/* ============================================================
   AGENT DASHBOARD
   ============================================================ */
.zupportly-stats-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; margin-bottom:24px; }
@media(max-width:1024px){.zupportly-stats-grid{grid-template-columns:repeat(3,1fr);}}
@media(max-width:600px){.zupportly-stats-grid{grid-template-columns:repeat(2,1fr);}}
.zupportly-stat-card { background:#fff; border:1px solid #dcdcde; border-radius:10px; padding:18px 16px; display:flex; align-items:center; gap:14px; box-shadow:0 1px 4px rgba(0,0,0,.06); transition:transform .15s,box-shadow .15s; }
.zupportly-stat-card:hover { transform:translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,.1); }
.zupportly-stat-icon { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.zupportly-stat-icon .dashicons { font-size:22px; width:22px; height:22px; }
.zupportly-stat-total .zupportly-stat-icon    { background:#e8f4fb; color:#0073aa; }
.zupportly-stat-new .zupportly-stat-icon      { background:#e8f4fb; color:#0073aa; }
.zupportly-stat-progress .zupportly-stat-icon { background:#fff7e6; color:#d46b08; }
.zupportly-stat-solved .zupportly-stat-icon   { background:#e6f4ea; color:#1a7f37; }
.zupportly-stat-closed .zupportly-stat-icon   { background:#f0f0f1; color:#50575e; }
.zupportly-stat-body { display:flex; flex-direction:column; }
.zupportly-stat-number { font-size:28px; font-weight:700; line-height:1; color:#1d2327; }
.zupportly-stat-label  { font-size:12px; color:#646970; margin-top:3px; }
.zupportly-dashboard-cols { display:grid; grid-template-columns:1fr 340px; gap:24px; align-items:start; }
@media(max-width:900px){.zupportly-dashboard-cols{grid-template-columns:1fr;}}
.zupportly-dash-table { width:100%; border-collapse:collapse; }
.zupportly-dash-table thead tr { background:#f8f9fa; }
.zupportly-dash-table th { padding:10px 14px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#646970; border-bottom:2px solid #dcdcde; text-align:left; }
.zupportly-dash-table td { padding:12px 14px; border-bottom:1px solid #f0f0f1; font-size:13px; vertical-align:middle; }
.zupportly-dash-table tbody tr:last-child td { border-bottom:none; }
.zupportly-dash-table tbody tr:hover td { background:#f8f9fa; }
.zupportly-view-link { color:#2271b1; font-weight:600; text-decoration:none; white-space:nowrap; }
.zupportly-view-link:hover { text-decoration:underline; }
.zupportly-empty-state { text-align:center; padding:36px 20px; color:#8c8f94; }
.zupportly-empty-state .dashicons { font-size:40px; width:40px; height:40px; display:block; margin:0 auto 10px; color:#c3c4c7; }
.zupportly-recent-list { margin:0; padding:0; list-style:none; }
.zupportly-recent-list li { display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid #f0f0f1; }
.zupportly-recent-list li:last-child { border-bottom:none; }
.zupportly-recent-list a { display:flex; align-items:center; gap:8px; flex:1; text-decoration:none; color:#1d2327; min-width:0; }
.zupportly-recent-list a:hover .zupportly-recent-title { color:#2271b1; }
.zupportly-recent-nr    { font-size:11px; font-weight:700; color:#2271b1; white-space:nowrap; }
.zupportly-recent-title { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; }
.zupportly-recent-badge { flex-shrink:0; }
.zupportly-team-list { margin:0; padding:0; list-style:none; }
.zupportly-team-list li { display:flex; align-items:center; gap:10px; padding:10px 18px; border-bottom:1px solid #f0f0f1; }
.zupportly-team-list li:last-child { border-bottom:none; }
.zupportly-agent-avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,#2271b1,#1e3a5f); color:#fff; font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.zupportly-agent-name       { flex:1; font-size:13px; font-weight:600; }
.zupportly-agent-open-count { font-size:12px; color:#646970; white-space:nowrap; }

/* ============================================================
   ADMIN CONVERSATION — MESSAGE TIMESTAMPS  (v1.1)
   ============================================================ */
.zt-msg-time {
	font-size:10px; font-weight:400; color:#9ca3af;
	margin-left:8px; letter-spacing:.02em; white-space:nowrap;
}
.zt-msg-agent .zt-msg-time { color:rgba(255,255,255,.55); }

/* ============================================================
   SETTINGS — CHAT BUBBLE TOGGLE SWITCH  (v1.1)
   ============================================================ */
.zupportly-toggle-row {
	display:flex; align-items:center; gap:16px;
}
.zupportly-toggle-switch {
	position:relative; display:inline-block;
	width:52px; height:28px; flex-shrink:0; cursor:pointer;
}
/* hide the duplicate hidden input visually, keep functional */
.zupportly-toggle-switch input[type="hidden"] { position:absolute; opacity:0; width:0; height:0; }
.zupportly-toggle-switch input[type="checkbox"] { opacity:0; width:0; height:0; }
.zupportly-toggle-slider {
	position:absolute; inset:0;
	background:#c3c4c7; border-radius:28px;
	transition:background .25s;
	cursor:pointer;
}
.zupportly-toggle-slider::before {
	content:''; position:absolute;
	width:20px; height:20px; left:4px; top:4px;
	background:#fff; border-radius:50%;
	transition:transform .25s;
	box-shadow:0 1px 4px rgba(0,0,0,.2);
}
.zupportly-toggle-switch input[type="checkbox"]:checked + .zupportly-toggle-slider {
	background:#2271b1;
}
.zupportly-toggle-switch input[type="checkbox"]:checked + .zupportly-toggle-slider::before {
	transform:translateX(24px);
}
.zupportly-toggle-switch input[type="checkbox"]:focus + .zupportly-toggle-slider {
	box-shadow:0 0 0 3px rgba(34,113,177,.25);
}
.zupportly-toggle-label strong { display:block; font-size:14px; color:#1d2327; margin-bottom:2px; }

/* ============================================================
   v1.2 — PRIORITY BADGES (admin list + details)
   ============================================================ */
.zt-priority-badge {
	display:inline-flex; align-items:center;
	padding:3px 10px; border-radius:20px;
	font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap;
}
.zt-priority-low    { background:#f3f4f6; color:#1f2937; border:1px solid #9ca3af; font-weight:600; }
.zt-priority-medium { background:#dbeafe; color:#1e3a8a; border:1px solid #93c5fd; font-weight:600; }
.zt-priority-high   { background:#fef3c7; color:#78350f; border:1px solid #f59e0b; font-weight:600; }
.zt-priority-urgent { background:#fee2e2; color:#7f1d1d; border:1px solid #f87171; font-weight:700; }

/* ============================================================
   v1.2 — UNREAD DOT
   ============================================================ */
.zt-unread-dot {
	display:inline-block; width:8px; height:8px;
	background:#ef4444; border-radius:50%;
	vertical-align:middle; margin-left:4px;
	box-shadow:0 0 0 2px rgba(239,68,68,.25);
	flex-shrink:0;
}
/* Highlight unread rows in dashboard "Needs Attention" table */
.zt-row-unread td { background:#fffbeb !important; }
.zt-row-unread td:first-child { border-left-color:#f59e0b !important; }

/* ============================================================
   v1.2 — PRIORITY FILTER DROPDOWN
   ============================================================ */
.post-type-zupportly_ticket select[name="zupportly_priority_filter"] {
	border-radius:6px !important; padding:4px 8px !important; font-size:13px !important;
}

/* ============================================================
   v1.2 — ADMIN MENU BADGE (ticket count)
   ============================================================ */
.zupportly-menu-badge {
	display:inline-block;
	background:#ef4444; color:#fff;
	font-size:10px; font-weight:700;
	border-radius:10px; padding:1px 6px;
	min-width:18px; text-align:center;
	margin-left:4px; line-height:1.6;
	vertical-align:middle;
}

/* ============================================================
   v1.1 — EMBED SHORTCODE CARDS (settings page)
   ============================================================ */
.zt-sc-embed-grid {
	display:grid; grid-template-columns:1fr 1fr; gap:16px;
}
@media(max-width:700px){ .zt-sc-embed-grid{ grid-template-columns:1fr; } }

.zt-sc-embed-item {
	display:flex; align-items:flex-start; gap:14px;
	background:#f8f9fa; border:1.5px solid #e2e8f0;
	border-radius:12px; padding:18px 20px;
}
.zt-sc-embed-icon {
	width:42px; height:42px; border-radius:10px; flex-shrink:0;
	display:flex; align-items:center; justify-content:center;
}
.zt-sc-embed-icon .dashicons { font-size:22px; width:22px; height:22px; }
.zt-sc-embed-icon--blue   { background:#e8f4fb; color:#0073aa; }
.zt-sc-embed-icon--indigo { background:#eef2ff; color:#4338ca; }

.zt-sc-embed-content { flex:1; min-width:0; }
.zt-sc-embed-title { font-size:14px; font-weight:700; color:#1d2327; margin-bottom:4px; }
.zt-sc-embed-desc  { font-size:13px; color:#646970; line-height:1.5; margin-bottom:10px; }

.zt-sc-embed-row {
	display:flex; align-items:center; gap:8px; flex-wrap:wrap;
}
.zt-sc-embed-row code {
	background:#fff; border:1.5px solid #dcdcde; border-radius:6px;
	padding:6px 12px; font-size:13px; font-weight:700;
	color:#1e1b4b; font-family:'Courier New',monospace;
	user-select:all; flex:1; min-width:0;
	white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.zt-sc-copy-btn {
	display:inline-flex; align-items:center; gap:5px;
	padding:7px 13px; background:#2271b1; color:#fff;
	border:none; border-radius:6px; cursor:pointer;
	font-size:12px; font-weight:700; white-space:nowrap;
	flex-shrink:0; transition:background .15s;
}
.zt-sc-copy-btn:hover { background:#135e96; }
.zt-sc-copy-btn .dashicons { font-size:14px; width:14px; height:14px; }

.zt-section-label .dashicons { font-size:14px; width:14px; height:14px; color:#2271b1; }
.zt-section-label:first-of-type { margin-top:0; }



/* ============================================================
   SETTINGS PAGE — CHAT BUBBLE TOGGLE (no form, standalone)
   ============================================================ */
.zt-bubble-save-status {
	font-size:12px; color:#15803d; font-weight:700;
	opacity:0; transition:opacity .25s;
}
.zt-bubble-save-status.saved { opacity:1; }

/* ============================================================
   SETTINGS — COLOURED CARD ACCENTS (replaces section labels)
   Each settings card gets a coloured left-border + tinted header
   ============================================================ */

/* Agents — blue */
.zupportly-settings-wrap .zupportly-card:nth-of-type(1) {
	border-left: 4px solid #2271b1;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(1) .zupportly-card-header {
	background: linear-gradient(135deg, #e8f4fb 0%, #f0f7fc 100%);
	border-bottom-color: #b3d4fc;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(1) .zupportly-card-header > .dashicons {
	color: #2271b1;
}

/* Chat Bubble — indigo/purple */
.zupportly-settings-wrap .zupportly-card:nth-of-type(2) {
	border-left: 4px solid #4f46e5;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(2) .zupportly-card-header {
	background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
	border-bottom-color: #c7d2fe;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(2) .zupportly-card-header > .dashicons {
	color: #4f46e5;
}

/* Shortcodes — teal/green */
.zupportly-settings-wrap .zupportly-card:nth-of-type(3) {
	border-left: 4px solid #0891b2;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(3) .zupportly-card-header {
	background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
	border-bottom-color: #a5f3fc;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(3) .zupportly-card-header > .dashicons {
	color: #0891b2;
}

/* Ticket View URL — amber/orange */
.zupportly-settings-wrap .zupportly-card:nth-of-type(4) {
	border-left: 4px solid #d97706;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(4) .zupportly-card-header {
	background: linear-gradient(135deg, #fffbeb 0%, #fef9ee 100%);
	border-bottom-color: #fcd34d;
}
.zupportly-settings-wrap .zupportly-card:nth-of-type(4) .zupportly-card-header > .dashicons {
	color: #d97706;
}

/* ============================================================
   TICKET VIEW URL — compact hint row
   ============================================================ */
.zt-url-hint-row {
	display: flex; align-items: flex-start; gap: 8px;
	background: #fffbeb; border: 1.5px solid #fcd34d;
	border-left: 4px solid #d97706;
	border-radius: 8px; padding: 10px 14px;
	font-size: 13px; color: #78350f; line-height: 1.55;
	margin-bottom: 16px;
}
.zt-url-hint-row .dashicons {
	font-size: 16px; width: 16px; height: 16px;
	color: #d97706; flex-shrink: 0; margin-top: 1px;
}
.zt-url-hint-row code {
	background: #fef3c7; padding: 1px 5px;
	border-radius: 3px; font-size: 12px; color: #92400e;
}
