  *{
    transition: 0.4s;
  }
  body {
    font-family: Tahoma, sans-serif;
    font-weight: bold;
    background: #f4f6f8;
    margin: 0;
    padding: 16px;
    direction: rtl;
  }
  h1 { margin-bottom: 12px; }
  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
  }
  .filters {
    display: flex;
    gap: 12px;
    flex-grow: 1;
    align-items: center;
  }
  input, select {
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
  }
  .per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  .summary {
    margin: 10px 0;
    font-weight: bold;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 6px;
  }
  .table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 88%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
  }
  th, td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
  }
  th {
    position: sticky;
    top: 0;
    background: #000000;
    color: #fff;
    z-index: 2;
    font-weight: bold;
  }
  tr:hover { background: #f9f9f9; }
  
  tr:nth-child(even) {
    background-color: #f8f9fa;
  }
  .status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    font-weight: bold;
  }
  .processing { background: #fff3cd; color: #856404; }
  .sent { background: #d4edda; color: #155724; }
  .waiting { background: #f8d7da; color: #721c24; }
  .canceled { background: #dc3545; color: white; }
  .delivered { background: #28a745; color: white; }
  .pagination {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  .pagination button {
    padding: 8px 12px;
    border: none;
    background: #1976d2;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 40px;
  }
  .pagination button:hover:not(:disabled) {
    background: #1565c0;
  }
  .pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
  }
  .page-input {
    width: 60px;
    text-align: center;
  }
  .goto-page {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  /* دکمه مرتب‌سازی */
  .sort-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
  }
  
  .action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .copy-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
  }
  
  .copy-btn:hover {
    background: #218838;
  }
  
  .excel-btn {
    padding: 8px 16px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
  }
  
  .excel-btn:hover {
    background: #138496;
  }
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    background: white;
    padding: 24px;
    max-width: 700px;
    width: 95%;
    max-height: 85%;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
  
  .close {
    float: left;
    cursor: pointer;
    font-size: 24px;
    padding: 2px 10px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    line-height: 1;
  }
  
  .close:hover {
    background: #c82333;
  }
  
  .item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin: 10px 0;
  }
  
  .loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
  }
  
  .details-btn {
    padding: 6px 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
  }
  
  .details-btn:hover {
    background: #218838;
  }
  
  #dateBtn{
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    cursor: pointer;
  }

  #dateBtn:hover{
    background: #0c488d;
  }

  .torobPay{
    background: #9CE76A;
  }

  .zarinPal{
    background: gold;
  }
#modalContainer{
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

#loginModal {
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    position: relative;
    width: 350px;
    max-width: 90%;
    z-index: 1000;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#loginModal input[type="text"],
#loginModal input[type="password"] {
    width: calc(100% - 24px);
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    text-align: left;
    direction: ltr;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#loginModal input[type="text"]:focus,
#loginModal input[type="password"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#submitLogin {
    width: 50%;
    padding: 5px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

#submitLogin:hover {
    background-color: #0056b3;
}

#submitLogin:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

#loginModal input::placeholder {
    color: #aaa;
    text-align: right;
}


body.modal-open {
    overflow: hidden;
}

.switch {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 25px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 30px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

#searchInput{
    width: 120px;
}