body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}
body * {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.container.narrow {
  max-width: 800px;
}
.container.wide {
  max-width: 1400px;
}

.header-section {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 30px;
}
.header-section h1 {
  color: #333;
  margin: 0;
}
@media (max-width: 768px) {
  .header-section {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
    -webkit-align-items: flex-start;
        -ms-flex-align: start;
            align-items: flex-start;
    gap: 15px;
  }
}

.header-buttons {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
}
@media (max-width: 768px) {
  .header-buttons {
    width: 100%;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
        -ms-flex-pack: start;
            justify-content: flex-start;
  }
}

h1 {
  color: #333;
  margin: 0;
}

h2 {
  color: #555;
  margin-bottom: 20px;
}

h3 {
  color: #555;
  margin-bottom: 15px;
}

.btn {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  height: 46px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  -webkit-transition: background-color 0.15s ease-in-out;
  transition: background-color 0.15s ease-in-out;
}
.btn.btn-primary {
  background-color: #007bff;
  color: white;
}
.btn.btn-primary:hover {
  background-color: #0056b3;
}
.btn.btn-secondary {
  background-color: #6c757d;
  color: white;
}
.btn.btn-secondary:hover {
  background-color: #545b62;
}
.btn.btn-info {
  background-color: #17a2b8;
  color: white;
}
.btn.btn-info:hover {
  background-color: #138496;
}
.btn-info {
  background-color: #17a2b8;
  border-color: #17a2b8;
  color: white;
}
.btn-info:hover {
  background-color: #138496;
  border-color: #138496;
}
.btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}
.btn-success:hover {
  background-color: rgb(30.1449275362, 125.8550724638, 52);
  border-color: rgb(30.1449275362, 125.8550724638, 52);
}

.deal-form-container,
.search-form-container {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  margin-bottom: 30px;
}
@media (max-width: 768px) {
  .deal-form-container,
  .search-form-container {
    padding: 20px;
  }
}

.search-form-container {
  padding: 20px;
}
@media (max-width: 768px) {
  .search-form-container {
    padding: 15px;
  }
}

.form-group {
  margin-bottom: 20px;
}
.search-form-container .form-group {
  margin-bottom: 15px;
}

.form-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  gap: 20px;
}
.form-row .form-group {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
}
@media (max-width: 768px) {
  .form-row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 10px;
  }
  .deals-page .form-row {
    gap: 0;
  }
}

.form-input {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

.form-button {
  -webkit-flex-shrink: 0;
      -ms-flex-negative: 0;
          flex-shrink: 0;
}

.col-md-6 {
  -webkit-box-flex: 1;
  -webkit-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #333;
}
label .required {
  color: #dc3545;
}
.filter-section label {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  font-weight: normal;
  margin: 0;
  cursor: pointer;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  -webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
  transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
}
.form-control:focus {
  border-color: #007bff;
  outline: 0;
  -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
          box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
  margin-top: 5px;
  font-size: 12px;
}
.form-text.text-muted {
  color: #6c757d;
}

.form-actions {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 10px;
  margin-top: 30px;
  text-align: center;
}

.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}
.table th {
  background-color: #f8f9fa;
  font-weight: bold;
}
.items-page .table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
.table.table-striped tbody tr:nth-child(odd) {
  background-color: #f8f9fa;
}

.account-items-section {
  margin-top: 30px;
}

.filter-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #e9ecef;
  border-radius: 4px;
}
.filter-section input[type=checkbox] {
  margin-right: 8px;
}

.account-id {
  font-weight: bold;
  color: #007bff;
}

.account-name {
  font-weight: 500;
}

.stats-section {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #dee2e6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}
.stat-card h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}
.stat-card p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875em;
  font-weight: bold;
}
.badge.badge-primary {
  background-color: #007bff;
  color: white;
}
.badge.badge-secondary {
  background-color: #6c757d;
  color: white;
}
.badge.badge-success {
  background-color: #28a745;
  color: white;
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.alert.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}
.alert.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}
.alert.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}
.alert.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.template-save-section {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  border-top: 1px solid #dee2e6;
}
.template-save-section h5 {
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}
.template-save-section .text-muted {
  margin-bottom: 20px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9998;
}
.modal::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: -1;
}
.modal .modal-dialog {
  background-color: #fff;
  position: fixed;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  z-index: 9999;
}
.modal .modal-content {
  border-radius: 8px;
  -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
          box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.modal .modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 20px;
}
.modal .modal-header .modal-title {
  font-weight: 600;
  color: #333;
}
.modal .modal-body {
  padding: 20px;
}
.modal .modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 15px 20px;
}

.table {
  border-collapse: collapse;
}
.table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  padding: 12px;
  font-weight: 600;
  color: #333;
}
.table td {
  padding: 12px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: middle;
}
.table-hover tbody tr:hover {
  background-color: #f5f5f5;
}

.badge {
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-success {
  background-color: #28a745;
  color: white;
}
.badge-danger {
  background-color: #dc3545;
  color: white;
}

.account-item-dropdown {
  position: relative;
}
.account-item-dropdown .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.account-item-dropdown .dropdown-list .dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  -webkit-transition: background-color 0.15s ease-in-out;
  transition: background-color 0.15s ease-in-out;
}
.account-item-dropdown .dropdown-list .dropdown-item:hover {
  background-color: #f8f9fa;
}
.account-item-dropdown .dropdown-list .dropdown-item:last-child {
  border-bottom: none;
}
.account-item-dropdown .dropdown-list .dropdown-item.selected {
  background-color: #007bff;
  color: white;
}
.account-item-dropdown .dropdown-list .dropdown-item.hidden {
  display: none;
}
.account-item-dropdown #account_item_search:focus {
  border-color: #007bff;
  -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
          box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.account-item-dropdown #account_item_search.has-selection {
  background-color: #e9ecef;
}

.deals-list-container {
  margin-top: 20px;
}
.deals-list-container .table {
  font-size: 14px;
}
.deals-list-container .table th {
  background-color: #343a40;
  color: white;
  font-weight: 600;
  border: none;
  padding: 12px 8px;
}
.deals-list-container .table td {
  padding: 10px 8px;
  vertical-align: middle;
}
.deals-list-container .table-hover tbody tr:hover {
  background-color: #f8f9fa;
}
.deals-list-container .text-right {
  text-align: right;
}
.deals-list-container .badge {
  font-size: 12px;
  padding: 4px 8px;
}
.deals-list-container .pagination {
  margin-top: 20px;
}
.deals-list-container .pagination .page-link {
  color: #007bff;
  border-color: #dee2e6;
}
.deals-list-container .pagination .page-item.active .page-link {
  background-color: #007bff;
  border-color: #007bff;
}

.deals-search-form {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  margin-bottom: 20px;
}
.deals-search-form .card-header {
  background-color: rgb(239.075, 241.35, 243.625);
  border-bottom: 1px solid #dee2e6;
  padding: 12px 20px;
}
.deals-search-form .card-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.deals-search-form .card-body {
  padding: 20px;
}
.deals-search-form form.row {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex-wrap: wrap;
      -ms-flex-wrap: wrap;
          flex-wrap: wrap;
  margin: 0 -10px;
}
.deals-search-form .col-md-3 {
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 25%;
      -ms-flex: 0 0 25%;
          flex: 0 0 25%;
  max-width: 25%;
  padding: 0 10px;
}
@media (max-width: 992px) {
  .deals-search-form .col-md-3 {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 33.333%;
        -ms-flex: 0 0 33.333%;
            flex: 0 0 33.333%;
    max-width: 33.333%;
  }
}
@media (max-width: 768px) {
  .deals-search-form .col-md-3 {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 50%;
        -ms-flex: 0 0 50%;
            flex: 0 0 50%;
    max-width: 50%;
  }
}
@media (max-width: 480px) {
  .deals-search-form .col-md-3 {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 100%;
        -ms-flex: 0 0 100%;
            flex: 0 0 100%;
    max-width: 100%;
  }
}
.deals-search-form .mb-3 {
  margin-bottom: 15px !important;
}
.deals-search-form .form-label {
  display: block;
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  font-size: 13px;
}
.deals-search-form .form-control {
  width: 100%;
  height: 38px;
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}
.deals-search-form .form-control:focus {
  border-color: #007bff;
  outline: none;
  -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
          box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.deals-search-form .search-buttons {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: end;
  -webkit-align-items: flex-end;
      -ms-flex-align: end;
          align-items: flex-end;
  gap: 10px;
  padding: 0 10px;
  -webkit-box-flex: 0;
  -webkit-flex: 0 0 auto;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
}
@media (max-width: 768px) {
  .deals-search-form .search-buttons {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 100%;
        -ms-flex: 0 0 100%;
            flex: 0 0 100%;
    max-width: 100%;
    padding-top: 5px;
  }
}
.deals-search-form .btn {
  height: 38px;
  padding: 6px 20px;
  font-size: 14px;
}
.deals-search-form .btn.btn-primary {
  min-width: 80px;
}
.deals-search-form .btn.btn-secondary {
  min-width: 80px;
}

@media (max-width: 768px) {
  .deals-list-container .table {
    font-size: 12px;
  }
  .deals-list-container .table th,
  .deals-list-container .table td {
    padding: 8px 4px;
  }
  .header-buttons .btn {
    margin-bottom: 5px;
  }
}