/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo {
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  display: -ms-flexbox;
  display: flex;

}

.app-brand-logo.demo img {
  width: 180px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 78px !important;
}
/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 254px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}
.actionable-row .row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: .2s ease;
}


.actionable-row:hover .row-actions {
  opacity: 1;
}


.actionable-row .row-actions .btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.actionable-row .row-actions .dropdown {
  display: flex;
}


@media(max-width:768px) {

  .actionable-row .row-actions {
      opacity: 1;
  }

}

.pagination-wrapper {
  width: 100%;
  padding-top: 15px;
}

.pagination-wrapper .navbar-nav-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}


.pagination-wrapper .pagination {
  margin-bottom: 0;
  flex-wrap: wrap;
}


@media (max-width: 768px) {

  .pagination-wrapper .navbar-nav-right {
      flex-direction: column;
      align-items: stretch;
  }


  .pagination-wrapper .navbar-nav {
      justify-content: center;
      text-align: center;
  }


  .pagination-wrapper .pagination {
      justify-content: center;
      margin-top: 10px;
  }


  .pagination-wrapper .page-link {
      padding: 0.35rem 0.6rem;
  }

}

/* ===== PREMIUM HEADER ===== */
.ticket-premium-header {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.ticket-premium-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f5;
}

.ticket-premium-title {
  margin: 0;
  font-weight: 700;
  font-size: 17px;
  color: #1a1a2e;
}

.ticket-premium-title i {
  color: #7367f0;
  margin-right: 6px;
}

.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.status-closed { background: #f8d7da; color: #842029; }
.status-closed .status-dot { background: #dc3545; }

.status-waiting { background: #fff3cd; color: #856404; }
.status-waiting .status-dot { background: #ffc107; }

.status-user { background: #cfe2ff; color: #084298; }
.status-user .status-dot { background: #0d6efd; }

.status-progress { background: #d1e7dd; color: #0f5132; }
.status-progress .status-dot { background: #198754; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.ticket-premium-meta {
  color: #6c757d;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ticket-premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.ticket-premium-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 10px;
}

.ticket-premium-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(115, 103, 240, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7367f0;
  font-size: 16px;
  flex-shrink: 0;
}

.ticket-premium-label {
  font-size: 10px;
  color: #868e96;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ticket-premium-value {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  margin-top: 0px;
}

/* ===== ACTIONS ===== */
.ticket-premium-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.action-btn i {
  font-size: 15px;
}

.action-btn-primary {
  background: #7367f0;
  color: #fff;
}
.action-btn-primary:hover {
  background: #5a4bd1;
  color: #fff;
}

.action-btn-danger {
  background: #ea5455;
  color: #fff;
}
.action-btn-danger:hover {
  background: #d32f2f;
  color: #fff;
}

.action-btn-success {
  background: #28c76f;
  color: #fff;
}
.action-btn-success:hover {
  background: #1e9e56;
  color: #fff;
}

.action-btn-warning {
  background: #ff9f43;
  color: #fff;
}
.action-btn-warning:hover {
  background: #e68a2e;
  color: #fff;
}

/* ===== CHAT - KEEPING ORIGINAL STRUCTURE ===== */
.chat-premium-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== CHAT ITEM - EXACTLY ORIGINAL ===== */
.chat-item {
  display: flex;
  margin-bottom: 14px;
  align-items: flex-start;
  gap: 10px;
}

.chat-left {
  justify-content: flex-start !important;
  direction: rtl;
}

.chat-right {
  justify-content: flex-end !important;
  flex-direction: row-reverse;
  direction: ltr;
}

.chat-right .chat-header {
  text-align: left;
}

.chat-content {
  max-width: 75%;
  width: auto;
}

.chat-header {
  font-size: 13px;
  margin-bottom: 4px;
  opacity: 0.7;
  font-weight: 400;
}

.chat-header strong {
  font-weight: 600;
  color: #495057;
}

.chat-header .text-grey {
  color: #adb5bd;
  font-size: 12px;
}

.chat-bubble {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.chat-left .chat-bubble {
  background: #f1f3f5;
  color: #212529;
  border-bottom-left-radius: 4px;
}

.chat-right .chat-bubble {
  background: #e7f0ff;
  color: #1a2332;
  border-bottom-right-radius: 4px;
}

/* ===== AVATAR ===== */
.chat-avatar {
  flex-shrink: 0;
  padding-top: 2px;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, #7367f0, #a855f7);
  box-shadow: 0 2px 6px rgba(115, 103, 240, 0.15);
}

.avatar-user {
  background: linear-gradient(135deg, #6c757d, #868e96) !important;
}

.avatar-admin {
  background: linear-gradient(135deg, #7367f0, #a855f7) !important;
}

/* ===== ATTACHMENT ===== */
.chat-content .btn-outline-primary {
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 10px;
  border-color: #7367f0;
  color: #7367f0;
}
.chat-content .btn-outline-primary:hover {
  background: #7367f0;
  color: #fff;
}

/* ===== REPLY FORM ===== */
.reply-form {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.reply-form .card-header {
  border-bottom: 1px solid #f1f3f5;
  padding: 12px 20px;
  background: #fafbfc !important;
}

.reply-form .card-header h6 {
  font-weight: 600;
  color: #2c3e50;
}

.reply-form .card-body {
  padding: 20px;
}

.reply-form .card-footer {
  padding: 12px 20px;
  border-top: 1px solid #f1f3f5;
  background: #fafbfc !important;
}

.reply-form .form-label {
  font-size: 13px;
  color: #34495e;
}

.reply-form .form-control {
  border-radius: 8px;
  border-color: #dee2e6;
  font-size: 14px;
}

.reply-form .form-control:focus {
  border-color: #7367f0;
  box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.08);
}

.reply-form .input-group-text {
  background: #f8f9fa;
  border-color: #dee2e6;
}

.reply-form .btn-primary {
  border-radius: 8px;
  padding: 8px 28px;
  background: #7367f0;
  border-color: #7367f0;
}
.reply-form .btn-primary:hover {
  background: #5a4bd1;
  border-color: #5a4bd1;
}

.reply-form .text-grey {
  color: #868e96;
  font-size: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ticket-premium-header {
      padding: 14px 16px;
  }
  
  .ticket-premium-grid {
      grid-template-columns: 1fr 1fr;
      gap: 8px;
  }
  
  .ticket-premium-header-top {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .chat-content {
      max-width: 85%;
  }
  
  .chat-bubble {
      font-size: 13px;
      padding: 8px 12px;
  }
  
  .action-btn {
      font-size: 12px;
      padding: 5px 12px;
  }
  
  .reply-form .card-body {
      padding: 14px;
  }
  
  .avatar-circle {
      width: 30px;
      height: 30px;
      font-size: 12px;
  }
}

.message-preview {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #566a7f;
}

@media (max-width: 768px) {
  .message-preview {
      max-width: 120px;
  }
}

/* Templates Popup Styles */
.templates-trigger-btn {
  padding: 12px 25px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.templates-trigger-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5568d3 0%, #6a3e91 100%);
}

.templates-trigger-btn i {
  font-size: 16px;
}

/* Modal Overlay */
.templates-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9998;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.templates-modal-overlay.show {
  display: block !important;
}

/* Modal Container */
.templates-modal {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
  position: fixed;
  animation: slideUp 0.3s ease;
  width: 600px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.templates-modal.show {
  display: flex !important;
}

/* Modal Header */
.templates-modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
}

.templates-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}

.templates-modal-header h3 i {
  font-size: 20px;
}

.templates-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
}

.templates-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Body */
.templates-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Desktop - Modal Body */
@media (min-width: 769px) {
  .templates-modal-body {
      max-height: calc(100vh - 180px);
  }
}

/* Templates List */
.templates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.template-item {
  padding: 15px 20px;
  margin-bottom: 10px;
  background: linear-gradient(to right, #f8f9ff, #ffffff);
  border: 2px solid #e0e7ff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-item:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  transform: translateX(-5px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.template-item:hover .template-number {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.template-item:hover .template-icon {
  color: white;
}

.template-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-number {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.template-title {
  font-weight: bold;
  font-size: 15px;
  color: #333;
}

.template-item:hover .template-title {
  color: white;
}

.template-icon {
  color: #667eea;
  font-size: 18px;
  transition: all 0.3s ease;
}

/* New Template Button */
.template-new-btn {
  margin-top: 15px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 15px;
  text-align: center;
  display: block;
  width: 100%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

.template-new-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
  background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.template-new-btn i {
  margin-left: 8px;
  font-size: 16px;
}

/* New Template Form */
.templates-new-form {
  display: none;
  margin-top: 15px;
  background: #fafbff;
  border: 2px dashed #c3cbff;
  border-radius: 12px;
  padding: 18px 20px;
}

.templates-new-form-head {
  font-weight: bold;
  font-size: 15px;
  color: #667eea;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-new-form-field {
  margin-bottom: 12px;
}

.template-new-label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 5px;
}

.template-new-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.template-new-error {
  background: #fdeaea;
  color: #d9534f;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.template-new-saving {
  opacity: 0.6;
  pointer-events: none;
}

.template-item.highlight-new {
  border-color: #48bb78;
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

/* Empty State */
.templates-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
}

.templates-empty i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 15px;
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from {
      opacity: 0;
  }
  to {
      opacity: 1;
  }
}

@keyframes slideUp {
  from {
      transform: translateY(50px);
      opacity: 0;
  }
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

/* Scrollbar */
.templates-modal-body::-webkit-scrollbar {
  width: 8px;
}

.templates-modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.templates-modal-body::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.templates-modal-body::-webkit-scrollbar-thumb:hover {
  background: #5568d3;
}

/* Desktop - Perfect center alignment using fixed positioning */
@media (min-width: 769px) {
  .templates-modal {
      position: fixed !important;
      top: 50% !important;
      left: 50% !important;
      transform: translate(-50%, -50%) !important;
      width: 600px !important;
      max-width: calc(100vw - 40px) !important;
      max-height: calc(100vh - 40px) !important;
      margin: 0 !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .templates-modal {
      width: 100% !important;
      max-width: 100% !important;
      max-height: 100vh !important;
      height: 100vh !important;
      margin: 0 !important;
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      transform: none !important;
      border-radius: 0;
  }
  
  .templates-modal-header {
      padding: 15px 20px;
  }
  
  .templates-modal-header h3 {
      font-size: 16px;
  }
  
  .templates-modal-close {
      width: 30px;
      height: 30px;
      font-size: 18px;
  }
  
  .templates-modal-body {
      padding: 15px;
      max-height: calc(100vh - 80px);
      flex: 1;
      overflow-y: auto;
  }
  
  .template-item {
      padding: 12px 15px;
      flex-direction: column;
      align-items: flex-start;
      gap: 8px;
  }
  
  .template-content {
      width: 100%;
  }
  
  .template-icon {
      align-self: flex-end;
  }
  
  .template-number {
      width: 28px;
      height: 28px;
      font-size: 13px;
  }
  
  .template-title {
      font-size: 14px;
  }
  
  .template-new-btn {
      padding: 12px 15px;
      font-size: 14px;
  }
}

@media (max-width: 480px) {
  .templates-modal-overlay.show {
      align-items: stretch;
      justify-content: stretch;
      padding: 0;
  }
  
  .templates-modal {
      width: 100%;
      max-width: 100%;
      max-height: 100vh;
      height: 100vh;
      border-radius: 0;
      margin: 0;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
  }
  
  .templates-modal-header {
      padding: 12px 15px;
  }
  
  .templates-modal-header h3 {
      font-size: 14px;
  }
  
  .templates-modal-header h3 i {
      font-size: 16px;
  }
  
  .templates-modal-body {
      padding: 12px;
      max-height: calc(100vh - 70px);
      flex: 1;
      overflow-y: auto;
  }
  
  .template-item {
      padding: 10px 12px;
      margin-bottom: 8px;
  }
  
  .template-number {
      width: 25px;
      height: 25px;
      font-size: 12px;
  }
  
  .template-title {
      font-size: 13px;
  }
  
  .template-new-btn {
      padding: 10px 12px;
      font-size: 13px;
  }
  
  .templates-empty {
      padding: 30px 15px;
  }
  
  .templates-empty i {
      font-size: 36px;
  }
}

.history-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.history-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-header:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3e91 100%);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.history-header:active {
  transform: scale(0.98);
}
.toggle-icon.rotated {
  transform: rotate(180deg);
}
.history-item {
  transition: background 0.2s ease;
}
.history-item:hover {
  background: linear-gradient(to left, #f8f9ff, #ffffff) !important;
}
.history-item:last-child {
  border-bottom: none !important;
}
.history-number {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.history-item:hover .history-number {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* expand chack lists */
/* Region Selector - Vuexy Style */

.mws-form-item.large {
  direction: rtl;
  font-family: inherit;
}


/* عنوان هر منطقه */
.mws-form-item.large > .expand {
  background: #fff;
  border: 1px solid #ebe9f1;
  border-radius: 0.5rem;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5e5873;
  font-size: 14px;
  font-weight: 600;
  transition: all .25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}


/* آیکون باز شدن */
.mws-form-item.large > .expand:before {
  content: "+";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7367f0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  margin-left: 10px;
  transition: .3s;
}


.mws-form-item.large > .expand:hover {
  border-color: #7367f0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(115,103,240,.15);
}


/* وقتی باز شده */
.mws-form-item.large > div:not(.expand) {
  background: #fafafa;
  border-radius: 0.5rem;
  padding: 12px 15px !important;
  margin-bottom: 12px;
  border: 1px solid #ebe9f1;
  animation: regionOpen .25s ease;
}


@keyframes regionOpen {
  from {
      opacity:0;
      transform: translateY(-8px);
  }
  to {
      opacity:1;
      transform:none;
  }
}



/* استایل‌های اصلی */
.address-group {
  margin-bottom: 8px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.address-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
  flex-wrap: wrap;
}

.address-group-header:hover {
  background: #eef0f2;
}

.address-toggle {
  font-size: 12px;
  color: #666;
  transition: transform 0.2s;
  display: inline-block;
  min-width: 16px;
  flex-shrink: 0;
}

.address-group-title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
  flex: 1;
  min-width: 60px;
  word-break: break-word;
}

.address-group-count {
  font-size: 11px;
  color: #999;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.address-items-container {
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
}

.address-items-container.open {
  max-height: 2000px;
  opacity: 1;
}

.address-items-container.closed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.address-item {
  display: flex;
  align-items: center;
  padding: 6px 10px 6px 30px;
  gap: 8px;
  border-top: 1px solid #f5f5f5;
  transition: background 0.15s;
}

.address-item:hover {
  background: #f8f9fa;
}

.address-item input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.address-name {
  font-size: 12px;
  color: #444;
  word-break: break-word;
}

.address-empty-search {
  padding: 12px;
  text-align: center;
  color: #999;
  font-size: 12px;
}

/* استایل چک‌باکس سرگروه */
.address-group-header input[type="checkbox"] {
  cursor: pointer;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.address-group-header input[type="checkbox"][data-indeterminate="true"] {
  opacity: 0.6;
}

/* چیپ‌ها */
.address-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 0;
}

.address-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: #e8e8e8;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  gap: 3px;
  white-space: nowrap;
}

.address-chip:hover {
  background: #d5d5d5;
  transform: scale(0.95);
}

.address-chip-all {
  background: #4CAF50;
  color: white;
}

.address-chip-all:hover {
  background: #43a047;
}

/* بخش انتخاب شده */
.address-selected {
  background: #f8f9fa;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.address-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #333;
  flex-wrap: wrap;
  gap: 5px;
}

.address-count {
  font-weight: bold;
  color: #2196F3;
  font-size: 14px;
}

.total-mobile {
  font-weight: 500;
  color: #4CAF50;
  font-size: 13px;
}

/* بخش جستجو */
.address-search {
  margin-bottom: 10px;
}

.address-search input {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border 0.2s;
  box-sizing: border-box;
}

.address-search input:focus {
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* ===== استایل‌های موبایل ===== */
@media (max-width: 768px) {
  .address-group-header {
      padding: 6px 8px;
      gap: 4px;
  }

  .address-toggle {
      font-size: 11px;
      min-width: 14px;
  }

  .address-group-title {
      font-size: 12px;
      min-width: 50px;
  }

  .address-group-count {
      font-size: 10px;
      padding: 1px 6px;
  }

  .address-group-header input[type="checkbox"] {
      width: 14px;
      height: 14px;
  }

  .address-item {
      padding: 5px 8px 5px 25px;
      gap: 6px;
  }

  .address-item input[type="checkbox"] {
      width: 14px;
      height: 14px;
  }

  .address-name {
      font-size: 11px;
  }

  .address-chip {
      font-size: 10px;
      padding: 2px 8px;
  }

  .address-summary {
      font-size: 12px;
  }

  .address-count {
      font-size: 13px;
  }

  .total-mobile {
      font-size: 12px;
  }

  .address-search input {
      font-size: 12px;
      padding: 6px 10px;
  }

  .address-selected {
      padding: 6px 10px;
  }

  .address-chips {
      gap: 4px;
      padding: 4px 0;
  }
}

/* برای موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
  .address-group-title {
      font-size: 11px;
      min-width: 40px;
  }

  .address-group-count {
      font-size: 9px;
      padding: 1px 5px;
  }

  .address-name {
      font-size: 10px;
  }

  .address-item {
      padding: 4px 6px 4px 20px;
  }

  .address-chip {
      font-size: 9px;
      padding: 2px 6px;
  }
}

.address-name {
  font-size: 12px;
  color: #444;
  cursor: pointer; /* ← نشانگر دست برای کلیک */
  word-break: break-word;
  flex: 1;
}

/* هایلایت متن جستجو */
.highlight {
  background: #ffeb3b;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: bold;
}

/* پیام بدون نتیجه */
.address-no-result {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.address-no-result-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.address-no-result-text {
  font-size: 16px;
  color: #666;
  margin-bottom: 8px;
}

.address-no-result-text strong {
  color: #333;
}

.address-no-result-hint {
  font-size: 13px;
  color: #aaa;
}

/* تعداد نتایج در هدر منطقه هنگام جستجو */
.address-search-match {
  font-size: 11px;
  color: #2196F3;
  background: #e3f2fd;
  padding: 2px 10px;
  border-radius: 12px;
  margin-right: auto;
}

/* در حالت جستجو، هدر قابل کلیک نیست */
.address-group-header.searching {
  cursor: default;
}

.address-group-header.searching:hover {
  background: #f8f9fa;
}

jdp-container {
  z-index: 100000 !important;
}

#global-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  z-index: 2147483647;
}
#global-loader.is-active {
  display: flex;
}
.spinner {
  width: 35px;
  height: 35px;
  border: 4px solid #f3f3f3;
  border-top-color: #3498db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Active link style */
a.main-ajax.active {
  color: #3498db;
  font-weight: bold;
}

/* Mobile touch optimization */
a.main-ajax {
  touch-action: manipulation;
}

.numbers_wrapper label {
  display: inline !important;
}

.numbers_wrapper input {
  box-shadow: none !important;
}

ul.radio_list label {
  float: none !important;
}

li.selected_default_number {
  cursor: pointer;
  background-color: #a0f5a9;
}

li.not_selected_default_number {
  cursor: pointer;
  background-color: #fc9a8c;
}

input.check-one-default {
  display: none;
}

.numbers_wrapper .mws-summary > li .key {
  width: 50%;
}

.select2-container.select2-container--open {
  z-index: 100000;
}

/* ===== iPhone Preview Styles ===== */
.iphone-preview-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.iphone-frame {
  position: relative;
  width: 320px;
  max-width: 100%;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 12px;
  box-shadow:
      0 0 0 2px #2a2a2a,
      0 0 0 4px #3a3a3a,
      0 20px 60px rgba(0, 0, 0, 0.3),
      0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.iphone-frame:hover {
  transform: translateY(-4px);
  box-shadow:
      0 0 0 2px #2a2a2a,
      0 0 0 4px #3a3a3a,
      0 24px 72px rgba(0, 0, 0, 0.35),
      0 12px 28px rgba(0, 0, 0, 0.25);
}

.iphone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.iphone-screen {
  background: #000;
  border-radius: 32px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.iphone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 4px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  background: #000;
}

.iphone-time {
  font-size: 0.8rem;
}

.iphone-icons {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
}

.iphone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1c1c1e;
  border-bottom: 1px solid #2c2c2e;
  color: #fff;
}

.iphone-back,
.iphone-info {
  font-size: 1.2rem;
  color: #0a84ff;
  cursor: default;
  width: 32px;
  text-align: center;
}

.iphone-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.iphone-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2c2c2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e8e93;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.iphone-contact-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  direction: ltr;
  unicode-bidi: embed;
}

.iphone-contact-sub {
  font-size: 0.6rem;
  color: #8e8e93;
}

.iphone-contact-sub .badge {
  font-size: 0.55rem;
  padding: 2px 6px;
}

.iphone-messages {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  background: #000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iphone-date-divider {
  text-align: center;
  font-size: 0.65rem;
  color: #8e8e93;
  padding: 4px 0 8px;
}

.iphone-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
  position: relative;
}

.iphone-bubble-received {
  align-self: flex-start;
  background: #1c1c1e;
  color: #fff;
  border-bottom-left-radius: 4px;
}

.iphone-bubble-text {
  margin-bottom: 4px;
  direction: rtl;
  text-align: right;
}

.iphone-bubble-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.iphone-bubble-time {
  font-size: 0.6rem;
  color: #8e8e93;
  direction: ltr;
}

.iphone-input-bar {
  padding: 8px 12px 16px;
  background: #1c1c1e;
  border-top: 1px solid #2c2c2e;
}

.iphone-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2c2c2e;
  border-radius: 20px;
  padding: 8px 14px;
  color: #8e8e93;
  font-size: 0.8rem;
  gap: 8px;
}

.iphone-input i {
  font-size: 1rem;
  color: #8e8e93;
}

.iphone-input span {
  flex: 1;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
  .iphone-frame {
      width: 100%;
      border-radius: 28px;
      padding: 8px;
  }

  .iphone-screen {
      border-radius: 22px;
      min-height: 440px;
  }

  .iphone-notch {
      width: 90px;
      height: 22px;
  }

  .iphone-bubble {
      max-width: 92%;
      font-size: 0.8rem;
  }
}

/* ===== Charge Table Enhancements ===== */
.log-explain-container .table {
  font-size: 0.85rem;
}

.log-explain-container .table thead th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  color: #6c757d;
}

.log-explain-container .table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

.log-explain-container .badge {
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  display: inline-block;
  margin-bottom: 4px;
}

.user-info-pill {
    transition: all 0.25s ease;
    cursor: default;
}
.user-info-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.buy-credit-btn {
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.25);
}
.buy-credit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), 0.35);
}
.buy-credit-btn:hover .ti-arrow-up-right {
    transform: translate(2px, -2px);
    transition: transform 0.25s ease;
}

/* ===== SweetAlert2 با ظاهر Vuexy ===== */
.swal2-vuexy {
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}
.swal2-vuexy .swal2-title {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #5e5873 !important;
}

/* ===== انیمیشن نقاط سه‌گانه برای بررسی اطلاعات ===== */
.sms-loader-verify {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.sms-loader-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7367f0, #9e95f5);
    animation: smsDotBounce 1.4s ease-in-out infinite;
}
.sms-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.sms-loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes smsDotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== انیمیشن ارسال پیامک ===== */
.sms-sending-animation {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sms-paper-plane svg {
    animation: smsPlaneFly 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(115, 103, 240, 0.4));
}
@keyframes smsPlaneFly {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(15px, -8px) rotate(8deg); }
    50%  { transform: translate(0, -14px) rotate(0deg); }
    75%  { transform: translate(-15px, -8px) rotate(-8deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.sms-progress-bar {
    width: 180px;
    height: 6px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}
.sms-progress-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #7367f0, #9e95f5, #7367f0);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: smsProgress 1.8s ease-in-out infinite;
}
@keyframes smsProgress {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ===== دکمه‌های SweetAlert سازگار با Vuexy ===== */
.swal2-vuexy .btn {
    padding: 10px 24px;
    font-weight: 500;
    border-radius: 6px;
    margin: 0 4px;
}
.swal2-vuexy .btn-success {
    background: linear-gradient(135deg, #28c76f, #48da89);
    border: none;
    color: #fff;
}
.swal2-vuexy .btn-success:hover {
    box-shadow: 0 8px 15px rgba(40, 199, 111, 0.4);
    transform: translateY(-1px);
}
.swal2-vuexy .btn-danger {
    background: linear-gradient(135deg, #ea5455, #f08182);
    border: none;
    color: #fff;
}
.swal2-vuexy .btn-primary {
    background: linear-gradient(135deg, #7367f0, #9e95f5);
    border: none;
    color: #fff;
}

.message-cell {
    max-height: 460px;          /* ارتفاع دلخواه */
    overflow-y: auto;           /* اسکرول عمودی */
    overflow-x: hidden;         /* جلوگیری از اسکرول افقی */
    border-radius: 0.375rem;
    background-color: rgba(var(--bs-primary-rgb), 0.04);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    padding: 0.5rem 0.75rem;
}

.message-text {
    margin: 0;
    font-family: inherit;       /* هم‌خوان با فونت Vuexy */
    font-size: 0.85rem;
    line-height: 1.8;
    white-space: pre-wrap;      /* شکستن خطوط طولانی */
    word-wrap: break-word;
    overflow-wrap: anywhere;    /* شکستن لینک‌های طولانی */
    color: var(--bs-body-color);
    text-align: right;
    direction: rtl;
}

/* اسکرول‌بار ظریف */
.message-cell::-webkit-scrollbar {
    width: 6px;
}
.message-cell::-webkit-scrollbar-thumb {
    background: rgba(var(--bs-primary-rgb), 0.3);
    border-radius: 10px;
}
.message-cell::-webkit-scrollbar-track {
    background: transparent;
}

.swal2-container {
  z-index: 160000;
}