/* =========================================================
   DailyVoice UI - Clean Production Stylesheet
   Target: index.php current structure
   ========================================================= */

/* ==================== FONT ==================== */
@font-face {
  font-family: "YekanBakh";
  src: url("./font/YekanBakh-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==================== TOKENS ==================== */
:root {
  --bg: #f4f7fa;
  --bg2: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f8fafc;

  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --line: #e2e8f0;
  --line-strong: #cbd5e1;

  --primary: #c0392b;
  --primary-2: #a93226;
  --primary-soft: #fdf2f2;
  --primary-mid: #fce4e4;

  --blue: #2563eb;
  --blue-soft: #eff6ff;

  --success: #16a34a;
  --success-soft: #dcfce7;

  --danger: #dc2626;
  --danger-soft: #fee2e2;

  --warning: #d97706;
  --warning-soft: #fef3c7;

  --purple: #7c3aed;
  --purple-soft: #f5f3ff;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.18);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;

  --touch: 44px;
  --sidebar: 260px;
  --content-pad: 32px;

  --ease: 180ms ease;
}

/* ==================== RESET / BASE ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  background: var(--bg);
  scroll-behavior: smooth;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

body {
  min-height: 100dvh;
  position: relative;
  font-family: "YekanBakh", Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img,
svg,
video,
canvas,
iframe,
audio {
  display: block;
  max-width: 100%;
}

audio {
  width: 100%;
  max-width: 100%;
}

main,
section,
aside,
div,
form {
  min-width: 0;
}

.hidden,
.is-hidden-inline {
  display: none !important;
}

/* ==================== UTILITIES ==================== */
.full {
  width: 100%;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--text-muted);
}

.scrollable-y {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==================== SAFETY ==================== */
.modal-container,
.modal-body,
.app-layout,
.main-content,
.fixed-sidebar,
.workspace-grid,
.card,
.list-card,
.detail-card,
.ticket-detail-wrapper,
.recordings-list,
.audio-preview-item,
.audio-preview-item audio,
#track-result-container,
#track-result-content {
  max-width: 100%;
}

#success-tracking-code,
.ticket-list-item,
.chat-bubble,
.attach-chip,
.meta-pill,
.badge,
.unread-badge,
.info-card,
.tracking-code-box__code,
#track-result-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ==================== BACKGROUND ==================== */
.bg-orb,
.bg-grid {
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(84px);
  opacity: 0.5;
  z-index: 0;
}

.orb-1 {
  top: -8%;
  right: -8%;
  width: min(44vw, 520px);
  height: min(44vw, 520px);
  background: var(--primary-mid);
}

.orb-2 {
  left: -8%;
  bottom: -8%;
  width: min(36vw, 440px);
  height: min(36vw, 440px);
  background: var(--blue-soft);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ==================== COMMON SURFACES ==================== */
.glass-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.card,
.list-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 20px;
}

.empty-state,
.detail-empty {
  padding: 42px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-muted);
  text-align: center;
}

/* ==================== TYPOGRAPHY ==================== */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-head h1,
.panel-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.page-head p,
.panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.panel-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-head-inline h3 {
  margin: 0;
  font-size: 17px;
}

.panel-head-spaced {
  margin-bottom: 20px;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  outline: none;
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.btn:active {
  transform: scale(0.985);
}

.btn-xl {
  min-height: 52px;
  padding: 13px 22px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(192, 57, 43, 0.2);
}

.btn-primary:hover {
  background: var(--primary-2);
  box-shadow: 0 10px 24px rgba(192, 57, 43, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-soft);
}

.btn-outline {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-soft);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}

.btn-icon {
  flex: 0 0 auto;
}

/* ==================== FORMS ==================== */
.input-wrap,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-light);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}

.form-help-text {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.checkbox-group {
  margin-bottom: 16px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-row input {
  width: 16px;
  min-height: auto;
  margin-top: 7px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

/* ==================== MESSAGE ==================== */
.message {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.message.success {
  display: block;
  background: var(--success-soft);
  color: #166534;
  border: 1px solid #bbf7d0;
}

.message.error {
  display: block;
  background: var(--danger-soft);
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==================== INLINE FIELD VALIDATION HINTS ==================== */
.field-error {
  outline: 2px solid var(--danger);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

input.field-error,
textarea.field-error,
select.field-error {
  outline: none;
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px var(--danger-soft) !important;
}

.field-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
  animation: slideUpFade 0.25s ease;
}

.field-hint::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.wizard-hint-text {
  margin: -10px 0 14px;
  color: var(--text-muted);
  font-size: 12.5px;
}

/* ==================== LANDING / GUEST HOME ==================== */
.landing-page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: 100%;
  padding: 32px 20px;
}

.landing-header {
  width: 100%;
  max-width: 620px;
  margin-bottom: 28px;
  text-align: center;
}

.shield-logo {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.shield-logo svg {
  width: 56px;
  height: 56px;
}

.landing-header h1 {
  margin: 0 0 12px;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.5;
  color: var(--text);
}

.landing-header p {
  margin: 0 auto;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 2;
}

.landing-main-card {
  width: 100%;
  max-width: 520px;
  padding: 24px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-report-anonymous {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 78px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  text-align: right;
  box-shadow: 0 14px 28px rgba(192, 57, 43, 0.22);
  transition: transform var(--ease), box-shadow var(--ease);
}

.btn-report-anonymous:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(192, 57, 43, 0.28);
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.icon-fingerprint {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
}

.text-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.text-group strong {
  font-size: 16px;
  line-height: 1.5;
}

.text-group small {
  font-size: 12px;
  opacity: 0.84;
}

.icon-arrow {
  flex: 0 0 auto;
  opacity: 0.9;
}

.track-anonymous-box {
  width: 100%;
}

.track-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 8px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.track-form:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.track-form input {
  flex: 1;
  min-height: 42px;
  padding: 8px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  box-shadow: none !important;
}

.track-form input:focus {
  border: 0;
  box-shadow: none !important;
}

.btn-search-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}

.btn-search-icon:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.btn-search-icon:active {
  transform: scale(0.95);
}

.login-link-container {
  margin: 22px 0 28px;
  text-align: center;
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  transition: color var(--ease);
}

.btn-text-link:hover {
  color: var(--primary);
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 620px;
}

.feature-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 82px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.feature-box strong {
  font-size: 13px;
}

.feature-box span {
  color: var(--text-light);
  font-size: 11px;
}

/* ==================== MODALS ==================== */
@keyframes overlayEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: overlayEnter 160ms ease;
}

.modal-container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  max-height: min(92dvh, 100%);
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalEnter 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sm {
  max-width: 440px;
}

.modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}

.modal-close:hover {
  background: var(--danger-soft);
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-container .panel-head {
  margin: 0;
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-center-text {
  text-align: center;
}

/* ==================== WIZARD MODAL ==================== */
.wizard-modal {
  max-width: 760px;
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 8px;
}

.wizard-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wizard-title h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.5;
}

.btn-close-text {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.btn-close-text:hover {
  border-color: var(--primary-mid);
  background: var(--primary-soft);
  color: var(--primary);
}

.wizard-subtitle {
  margin: 0;
  padding: 0 22px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.wizard-stepper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 22px 18px;
  border-bottom: 1px solid var(--line);
}

.step {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  width: 72px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.step-circle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
  transition: all var(--ease);
}

.step span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}

.step-line {
  flex: 1 1 auto;
  height: 2px;
  min-width: 20px;
  margin-top: 16px;
  background: var(--line);
}

.step.active .step-circle {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.08);
}

.step.active span {
  color: var(--primary);
  font-weight: 800;
}

.step.completed .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.wizard-form h3 {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.7;
}

.wizard-step-content {
  animation: modalEnter 180ms ease;
}

.input-large {
  min-height: 54px !important;
  padding: 14px 16px !important;
  font-size: 16px !important;
}

.minimal-border {
  border-radius: 18px !important;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.w-next-btn {
  flex: 1;
}

/* ==================== RADIO CARDS ==================== */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.radio-card .radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  transition: all var(--ease);
}

.radio-card:hover .radio-label {
  border-color: var(--primary-mid);
  background: var(--surface-soft);
}

.radio-card input:checked + .radio-label,
.radio-card input:checked ~ .radio-label {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 8px 18px rgba(192, 57, 43, 0.12);
}

/* ==================== WIZARD CHAT INPUT ==================== */
.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  background: var(--surface-soft);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.chat-input-wrapper:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.chat-attach-btn {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.chat-attach-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.chat-textarea {
  flex: 1;
  min-height: 42px;
  max-height: 132px;
  padding: 10px 4px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  overflow-y: hidden;
  line-height: 1.7;
  scrollbar-width: thin;
}

.chat-textarea:focus {
  border: 0 !important;
  box-shadow: none !important;
}

.chat-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.chat-mic-btn {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--danger);
  background: transparent;
  color: var(--danger);
  pointer-events: auto;
  transition: background var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.chat-mic-btn:hover {
  background: var(--danger-soft);
}

.chat-mic-btn.recording {
  background: var(--danger-soft);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

.chat-mic-btn.is-disabled,
.chat-mic-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.chat-attach-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.chat-textarea.is-disabled-field,
.chat-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-hint {
  margin: 8px 4px 0;
  font-size: 12.5px;
  color: var(--text-muted);
  min-height: 1px;
}

/* حالت «در حال ضبط»: باکس ورودی کامل به نوار ضبط صدا تبدیل می‌شود */
.chat-input-wrapper.is-recording {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.recording-canvas-holder {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 42px;
  pointer-events: none;
}

.recording-canvas-holder canvas.voice-visualizer-canvas {
  margin: 0 auto;
  pointer-events: none;
}

.recording-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--danger);
  font-weight: 800;
  font-size: 13px;
}

.recording-meta .voice-timer {
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: center;
  color: var(--text);
}

.recording-meta-text {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12.5px;
}

.recording-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--danger);
  font-weight: 800;
}

/* ==================== WIZARD SUBMIT BUTTON ==================== */
.wizard-submit-btn {
  flex: 2;
  gap: 10px;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.submit-send-icon {
  transform: rotate(180deg);
}

/* ==================== ATTACHMENT PREVIEW ==================== */
.attach-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}

.attach-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.attach-preview-item svg {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.attach-preview-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-preview-item__remove {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.attach-preview-item__remove:hover {
  background: var(--danger);
  color: #fff;
}

.attach-preview-item__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background var(--ease), color var(--ease);
}

.attach-preview-item__icon svg {
  color: inherit;
}

.attach-preview-item__icon svg.hidden {
  display: none;
}

.attach-preview-item.is-done .attach-preview-item__icon {
  background: var(--success-soft);
  color: var(--success);
}

.attach-preview-item__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.attach-preview-item__body .attach-preview-item__name {
  flex: none;
}

.attach-preview-item__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.attach-preview-item__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 1s ease;
}

.attach-preview-item.is-done .attach-preview-item__bar-fill {
  width: 100% !important;
  background: var(--success);
}

/* ==================== UPLOAD DOCUMENTS BOX ==================== */
.upload-docs-box {
  margin-top: 16px;
  padding: 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.upload-docs-box__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.upload-docs-box__head strong {
  font-size: 14px;
  color: var(--text);
}

.upload-docs-box__head span {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.9;
}

.upload-docs-box__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--ease);
}

.upload-docs-box__btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ==================== TRACKING CODE COPY ==================== */
.tracking-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-copy-code {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn-copy-code:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-mid);
}

.btn-copy-code.copied {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
  animation: pulse-record 1.1s infinite;
}

/* ==================== SUCCESS / TRACKING ==================== */
.success-title {
  margin: 0;
  color: var(--success);
  font-size: 22px;
}

.success-subtitle,
.success-message-text {
  color: var(--text-muted);
}

.success-message-text {
  margin: 0 0 20px;
}

.tracking-code-box {
  margin-bottom: 20px;
  padding: 22px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tracking-code-box__label {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.tracking-code-box__code {
  display: block;
  color: var(--primary);
  font-size: 26px;
  letter-spacing: 4px;
  line-height: 1.4;
  user-select: all;
}

.track-result-box {
  margin-top: 18px;
}

.track-result-box__content {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

/* ==================== APP LAYOUT ==================== */
.app-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.fixed-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100dvh;
  padding: 20px 16px;
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.main-content {
  min-height: 100dvh;
  padding: 24px var(--content-pad);
  overflow-y: auto;
  background: var(--bg);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-block h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.brand-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.side-user {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px;
  border: 1px solid var(--primary-mid);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
}

.side-user strong {
  font-size: 14px;
}

.side-user span,
.side-user small {
  color: var(--text-muted);
  font-size: 12px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-link {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  text-align: right;
  font-weight: 700;
  transition: all var(--ease);
}

.side-link:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.side-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset -3px 0 0 var(--primary);
}

.side-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.page-section {
  display: none;
  animation: modalEnter 180ms ease;
}

.page-section.active {
  display: block;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}


.employee-report-launch {
  padding: 18px 16px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.employee-report-launch__text {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

.guest-track-head {
  margin-bottom: 12px;
}

.guest-track-head__title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

/* ==================== EMPLOYEE NEW TICKET ==================== */
.selection-view {
  padding: 28px 0;
  text-align: center;
}

.selection-view__text {
  margin: 0 0 20px;
  color: var(--text-muted);
}

.message-type-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.message-type-btn {
  min-width: 210px;
}

.recording-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
}

.recording-panel__label {
  display: block;
  margin-bottom: 14px;
}

.recordings-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.audio-preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.audio-preview-item audio {
  flex: 1 1 240px;
  min-width: 0;
}

/* ==================== WORKSPACE ==================== */
.workspace-grid,
.full-height-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.wide-grid {
  grid-template-columns: 360px minmax(0, 1fr);
}

.full-height-grid {
  height: calc(100dvh - 126px);
}

.scrollable-list,
.scrollable-detail {
  height: 100%;
  min-width: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scrollable-list {
  padding: 16px;
}

.scrollable-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

/* ==================== TICKET LIST ==================== */
.ticket-list-standard {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-list-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.ticket-list-item:hover {
  transform: translateX(-2px);
  border-color: var(--primary-mid);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.ticket-list-item.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset -4px 0 0 var(--primary);
}

.ticket-list-top,
.ticket-list-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-list-top {
  font-size: 13px;
  font-weight: 800;
}

.ticket-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 11px;
}

.ticket-list-bottom {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--text-light);
  font-size: 11px;
}

/* ==================== DETAIL VIEW ==================== */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.detail-header h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.55;
}

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill {
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg2);
  color: var(--text-muted);
  font-size: 11px;
}

.detail-side-meta {
  color: var(--text-light);
  font-size: 12px;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.info-card span {
  color: var(--text-muted);
  font-size: 11px;
}

.info-card strong {
  font-size: 13px;
}

.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}

.attach-chip:hover {
  background: var(--blue);
  color: #fff;
}

/* ==================== CHAT THREAD ==================== */
.chat-card {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.chat-header {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
  font-weight: 800;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  padding: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.chat-row {
  display: flex;
  min-width: 0;
}

.chat-right {
  justify-content: flex-start;
}

.chat-left {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(76%, 100%);
  min-width: 0;
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  font-size: 14px;
  line-height: 1.75;
  margin: 5px 0;
}

.bubble-user {
  background: #e5e7eb;
  color: #111827;
  border-bottom-right-radius: 6px;
}

.bubble-admin {
  background: var(--blue);
  color: #fff;
  border-bottom-left-radius: 6px;
}

.chat-author {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.78;
}

.chat-time {
  margin-top: 6px;
  font-size: 10px;
  text-align: left;
  opacity: 0.65;
}

.chat-bubble audio {
  height: 38px;
  margin-top: 8px;
}

.reply-box-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reopen-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  background: var(--warning-soft);
}

/* ==================== BADGES ==================== */
.inline-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge,
.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: nowrap;
  font-weight: 800;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
}

.badge-new {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-progress {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-answered {
  background: var(--purple-soft);
  color: #6d28d9;
}

.badge-closed {
  background: var(--success-soft);
  color: #166534;
}

.badge-reopened {
  background: #ffedd5;
  color: #c2410c;
}

.unread-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
}

.unread-badge.orange {
  background: var(--warning);
}

.meta-mini {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10px;
}

.meta-mini.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.meta-mini.gray {
  background: var(--line);
  color: var(--text-muted);
}

/* ==================== ADMIN DASHBOARD ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card,
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card span,
.kpi-card span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong,
.kpi-card strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
}

.stat-card.accent-blue {
  border-color: var(--blue);
}

.stat-card.accent-blue strong {
  color: var(--blue);
}

.stat-card.accent-red {
  border-color: var(--danger);
}

.stat-card.accent-red strong {
  color: var(--danger);
}

.stat-card.accent-gold {
  border-color: var(--warning);
}

.stat-card.accent-gold strong {
  color: var(--warning);
}

.stat-card.accent-purple {
  border-color: var(--purple);
}

.stat-card.accent-purple strong {
  color: var(--purple);
}

.admin-panels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.chart-box,
.heatmap-box {
  min-height: 280px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-muted);
  overflow-y: auto;
}

.trend-bars,
.heatmap-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.trend-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.trend-bar-label {
  flex: 0 0 58px;
  color: var(--text-muted);
}

.trend-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.trend-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.heatmap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
}

/* ==================== FILTERS / ARCHIVE ==================== */
.filter-card {
  margin-bottom: 24px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  align-items: end;
}

.filters-grid .form-group {
  margin-bottom: 0;
}

.ticket-grid-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.archive-mini-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--ease);
}

.archive-mini-card:hover {
  border-color: var(--primary);
  background: var(--surface-soft);
}

/* ==================== ADMIN IDENTITY ==================== */
.admin-identity-box {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  background: var(--warning-soft);
}

.admin-identity-box h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--warning);
  font-size: 16px;
}

.admin-identity-box p {
  margin: 0 0 14px;
  font-size: 13px;
}


.attach-chip { margin-top: 8px; }
.video-chip video { max-width: 250px; border-radius: 8px; border: 1px solid #ddd; background: #000; }
.audio-chip audio { height: 40px; max-width: 100%; outline: none; }
.image-chip img { max-width: 250px; max-height: 250px; border-radius: 8px; border: 1px solid #ddd; }
.file-chip a {
    color: #0052cc; font-weight: 500; text-decoration: none;
    background: rgba(0,82,204,0.05); padding: 4px 8px;
    border-radius: 6px; display: inline-block;
}


/* ==================== RECORDING ANIMATIONS ==================== */
@keyframes pulse-record {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.42);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

@keyframes eq-pulse {
  from { height: 6px; }
  to { height: 100%; }
}

.btn-recording {
  animation: pulse-record 1.5s infinite;
  background: var(--danger) !important;
  color: #fff !important;
  border-color: var(--danger) !important;
}

.voice-equalizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 30px;
  margin-top: 14px;
}

.voice-equalizer span {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
  animation: eq-pulse 0.5s infinite alternate;
}

.voice-equalizer span:nth-child(1) { animation-delay: 0.1s; }
.voice-equalizer span:nth-child(2) { animation-delay: 0.3s; }
.voice-equalizer span:nth-child(3) { animation-delay: 0.2s; }
.voice-equalizer span:nth-child(4) { animation-delay: 0.4s; }
.voice-equalizer span:nth-child(5) { animation-delay: 0.1s; }

/* ==================== MOBILE BOTTOM NAV ==================== */
.bottom-nav {
  display: none;
}

.bottom-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.mobile-employee-logout {
    display: none;
}

@media (max-width: 768px) {
    .mobile-employee-logout {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1200;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        height: 38px;
        padding: 0 12px;
        border: 1px solid rgba(220, 38, 38, 0.16);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.88);
        color: #dc2626;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
    }

    .mobile-employee-logout:active {
        transform: scale(0.96);
        background: #dc2626;
        color: #fff;
    }

    .mobile-employee-logout svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
    }


}
.identity-box .select2-container {
    width: 100% !important;
    direction: rtl;
}

.identity-box .select2-container--default .select2-selection--single {
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
}

.identity-box .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333;
    line-height: 42px;
    padding-right: 12px;
    padding-left: 32px;
    text-align: right;
}

.identity-box .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

.identity-box .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    left: 8px;
    right: auto;
}

.identity-box .select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 8px;
    direction: rtl;
    text-align: right;
}

.identity-box .select2-search--dropdown .select2-search__field {
    direction: rtl;
    text-align: right;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    outline: none;
}

.identity-box .select2-results__option {
    padding: 9px 12px;
    font-size: 0.9rem;
    text-align: right;
}

.identity-box .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #f0b429;
    color: #111;
}

@media (min-width: 769px) {
  body,
  input,
  button,
  textarea,
  select {
    font-size: 14px;
  }

  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="file"],
  textarea,
  select {
    font-size: 14px;
  }

  .modal-overlay {
    align-items: center;
    padding: 20px;
  }

  .modal-container {
    max-height: 90dvh;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 230px;
    --content-pad: 24px;
  }

  .workspace-grid,
  .full-height-grid {
    grid-template-columns: 310px minmax(0, 1fr);
  }

  .wide-grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .workspace-grid,
  .full-height-grid,
  .wide-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .scrollable-list,
  .scrollable-detail {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .landing-page {
    justify-content: flex-start;
    padding: 26px 16px 22px;
  }

  .landing-main-card {
    padding: 18px;
    border-radius: 22px;
  }

  .landing-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: 520px;
  }

  .feature-box {
    min-height: 55px;
    padding: 10px 6px;
    gap: 3px;
  }

  .feature-box strong {
    font-size: 11px;
    line-height: 1.4;
  }

  .feature-box span {
    font-size: 9.5px;
  }

  .modal-container {
    max-height: 94dvh;
  }

  .modal-body {
    padding: 16px;
  }

  .wizard-header {
    padding: 16px 16px 8px;
  }

  .wizard-title h2 {
    font-size: 17px;
  }

  .wizard-subtitle {
    padding: 0 16px 14px;
  }

  .wizard-stepper {
    padding: 0 12px 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .wizard-stepper::-webkit-scrollbar {
    display: none;
  }

  .step {
    width: 62px;
  }

  .step span {
    font-size: 10px;
  }

  .step-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .step-line {
    min-width: 12px;
    margin-top: 14px;
  }

  .radio-grid {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .chat-input-wrapper {
    border-radius: 22px;
    padding: 7px;
  }

  .chat-attach-btn,
  .chat-mic-btn {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .wizard-submit-btn {
    flex: 1;
  }

  .app-layout {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .fixed-sidebar {
    display: none;
  }

  .main-content {
    min-height: auto;
    padding: 16px 14px 20px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .page-head h1,
  .panel-head h2 {
    font-size: 20px;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar > * {
    flex: 1 1 100%;
  }

  .scrollable-list,
  .scrollable-detail {
    padding: 14px;
  }

  .workspace-grid,
  .full-height-grid,
  .wide-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .ticket-list-item {
    border-radius: var(--radius-sm);
  }

  .chat-bubble {
    max-width: 92%;
  }

  .message-type-btn {
    width: 100%;
    min-width: 0;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .bottom-nav-item {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 6px 4px;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    transition: all var(--ease);
  }

  .bottom-nav-item svg {
    width: 23px;
    height: 23px;
    transition: transform var(--ease), color var(--ease);
  }

  .bottom-nav-item.active {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .bottom-nav-item.active svg {
    transform: translateY(-1px);
  }
}

@media (max-width: 480px) {
  .landing-header h1 {
    font-size: 22px;
  }

  .landing-header p {
    font-size: 13px;
  }

  .btn-report-anonymous {
    min-height: 74px;
    padding: 14px;
  }

  .icon-fingerprint {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .text-group strong {
    font-size: 14px;
  }

  .text-group small {
    font-size: 11px;
  }

  .modal-sm {
    max-width: 100%;
  }

  .modal-container .panel-head {
    padding: 18px 16px 14px;
  }

  .tracking-code-box__code {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .ticket-list-top,
  .ticket-list-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline-actions,
  .reopen-box,
  .message-type-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-actions > *,
  .reopen-box > *,
  .message-type-actions > * {
    width: 100%;
  }

  .chat-thread {
    max-height: none;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .audio-preview-item {
    flex-direction: column;
    align-items: stretch;
  }
}