/* AistheticDesk Pro - Public Front-End Stylesheet */
.aist-desk-wrap {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	color: #e2e8f0;
}

.aist-desk-wrap *,
.aist-desk-wrap *::before,
.aist-desk-wrap *::after {
	box-sizing: inherit;
}

/* Glassmorphic Form Card */
.aist-ticket-form-card {
	background: linear-gradient(160deg, rgba(13, 20, 50, 0.85) 0%, rgba(8, 12, 30, 0.95) 100%);
	border: 1px solid rgba(46, 180, 255, 0.3);
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(46, 180, 255, 0.08);
	margin-bottom: 30px;
}

.ticket-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 18px;
	margin-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-wrap: wrap;
	gap: 12px;
}

.ticket-badge-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pulsing-dot-green {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #10b981;
	box-shadow: 0 0 10px #10b981;
	animation: aistPulse 2s infinite;
}

@keyframes aistPulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.85); }
}

.ticket-status-pill {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	color: #10b981;
}

.ticket-id-display {
	background: rgba(46, 180, 255, 0.1);
	border: 1px solid rgba(46, 180, 255, 0.3);
	border-radius: 8px;
	padding: 6px 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ticket-id-display .id-label {
	font-size: 0.74rem;
	color: #8fa0c4;
}

.ticket-id-display strong {
	font-family: monospace;
	font-size: 0.92rem;
	color: #2eb4ff;
}

/* Grid & Inputs */
.ticket-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin-bottom: 24px;
}

.ticket-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ticket-field.full-width {
	grid-column: 1 / -1;
}

.ticket-field label {
	font-size: 0.84rem;
	font-weight: 600;
	color: #e2e8f0;
}

.aist-input, .aist-select, .aist-textarea {
	background: rgba(6, 9, 25, 0.85) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	border-radius: 8px !important;
	padding: 10px 14px !important;
	color: #ffffff !important;
	font-size: 0.88rem !important;
	width: 100% !important;
	transition: all 0.2s ease;
}

.aist-input:focus, .aist-select:focus, .aist-textarea:focus {
	outline: none !important;
	border-color: #2eb4ff !important;
	box-shadow: 0 0 12px rgba(46, 180, 255, 0.25) !important;
}

/* Priority Button Group */
.priority-btn-group {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.priority-btn {
	flex: 1;
	min-width: 80px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 9px 10px;
	color: #94a3b8;
	font-size: 0.82rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: center;
}

.priority-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.priority-btn.is-active {
	background: rgba(46, 180, 255, 0.18);
	border-color: #2eb4ff;
	color: #ffffff;
	box-shadow: 0 0 14px rgba(46, 180, 255, 0.3);
}

/* Auto Diagnostics Box */
.aist-diag-toggle-card {
	background: rgba(6, 9, 25, 0.6);
	border: 1px dashed rgba(46, 180, 255, 0.3);
	border-radius: 10px;
	padding: 14px 18px;
}

.diag-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #e2e8f0;
	font-size: 0.86rem;
	cursor: pointer;
}

.diag-checkbox-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #2eb4ff;
}

.diag-pills-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding-left: 26px;
}

.diag-chip {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.72rem;
	color: #7dd3fc;
	font-family: monospace;
}

/* Footer & Buttons */
.ticket-form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-wrap: wrap;
	gap: 14px;
}

.sla-notice {
	font-size: 0.82rem;
	color: #94a3b8;
}

.aist-btn-glow {
	background: linear-gradient(135deg, #2eb4ff 0%, #7c5cff 100%);
	color: #ffffff !important;
	border: none;
	border-radius: 8px;
	padding: 12px 24px;
	font-weight: 700;
	font-size: 0.92rem;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(46, 180, 255, 0.35);
	transition: all 0.25s ease;
}

.aist-btn-glow:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(46, 180, 255, 0.5);
}

/* Filter Bar & List Queue */
.aist-ticket-filter-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 24px 0 16px;
	flex-wrap: wrap;
	gap: 12px;
}

.ticket-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ticket-tab {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
	padding: 7px 14px;
	color: #94a3b8;
	font-size: 0.84rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ticket-tab:hover, .ticket-tab.is-active {
	background: rgba(46, 180, 255, 0.15);
	border-color: #2eb4ff;
	color: #ffffff;
}

.tab-count {
	background: rgba(255, 255, 255, 0.12);
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 0.72rem;
	margin-left: 4px;
}

/* Ticket Cards */
.aist-ticket-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 30px;
}

.aist-ticket-card {
	background: rgba(10, 15, 36, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.2s ease;
}

.aist-ticket-card:hover {
	border-color: rgba(46, 180, 255, 0.35);
}

.ticket-card-main {
	padding: 16px 20px;
	cursor: pointer;
	user-select: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ticket-meta-left, .ticket-meta-right {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ticket-num {
	font-family: monospace;
	font-size: 0.82rem;
	font-weight: 700;
	color: #2eb4ff;
	background: rgba(46, 180, 255, 0.1);
	border: 1px solid rgba(46, 180, 255, 0.25);
	padding: 2px 8px;
	border-radius: 6px;
}

.ticket-status-badge {
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
}

.status-open { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.status-in-progress { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); }
.status-resolved { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }

.ticket-priority-badge {
	font-size: 0.7rem;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 6px;
	text-transform: uppercase;
}

.priority-low { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.priority-medium { background: rgba(250, 204, 21, 0.12); color: #facc15; }
.priority-high { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.priority-urgent { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.4); }

.ticket-dept-badge {
	font-size: 0.72rem;
	color: #94a3b8;
	background: rgba(255, 255, 255, 0.05);
	padding: 2px 8px;
	border-radius: 6px;
}

.ticket-title {
	font-size: 0.98rem;
	font-weight: 600;
	color: #ffffff;
	margin: 2px 0 0;
}

.ticket-time { font-size: 0.74rem; color: #64748b; }
.ticket-chevron { margin-left: auto; color: #64748b; }

/* Thread */
.ticket-thread {
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding: 18px 20px;
	background: rgba(6, 9, 25, 0.65);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.ticket-thread.is-open { display: flex !important; }

.thread-message {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 0.88rem;
	line-height: 1.5;
}

.user-msg { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); }
.staff-msg { background: rgba(46, 180, 255, 0.06); border: 1px solid rgba(46, 180, 255, 0.2); }

.msg-header {
	display: flex;
	justify-content: space-between;
	font-size: 0.76rem;
	margin-bottom: 6px;
	color: #94a3b8;
}

.aist-btn-xs { padding: 6px 12px; font-size: 0.78rem; border-radius: 6px; cursor: pointer; }
.aist-btn-outline { background: transparent; color: #2eb4ff; border: 1px solid rgba(46, 180, 255, 0.4); }
.aist-btn-outline:hover { background: rgba(46, 180, 255, 0.1); border-color: #2eb4ff; }

/* Elementor Metrics */
.aist-desk-metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.metric-card {
	background: #0c122b;
	border: 1px solid rgba(46, 180, 255, 0.2);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
}

.metric-value { font-size: 2rem; font-weight: 800; color: #ffffff; margin-bottom: 6px; }
.metric-value.highlight { color: #2eb4ff; }
.metric-label { font-size: 0.82rem; color: #94a3b8; }

@media (max-width: 768px) {
	.ticket-form-grid { grid-template-columns: 1fr; }
}
