.leaflet-popup-content-wrapper {
  background: var(--panel-bg-color);
  border-radius: 18px;
  padding: 0;
  box-shadow:
    inset 3px 3px 6px rgba(255, 255, 255, 0.15),
    inset -3px -3px 6px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  min-width: 260px;
  font-family: "Inter", sans-serif;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: none;
  transition:
    transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    box-shadow 0.3s ease;
}

.leaflet-popup.leaflet-popup-animating .leaflet-popup-content-wrapper {
  transform: scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.leaflet-popup-content-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 80%
  );
  z-index: 0;
  transition: opacity 0.5s ease;
}

.leaflet-popup-content-wrapper:hover::before {
  opacity: 0.7;
}

.leaflet-popup-content {
  margin: 16px;
  color: var(--text-color-dark);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leaflet-popup-content h4 {
  margin: 0;
  font-size: 1.25em;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 70%, white)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content h4 i {
  font-size: 0.95em;
  color: var(--star-color);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.leaflet-popup-content .estate-item-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9em;
  color: var(--text-color);
}

.leaflet-popup-content .estate-item-details span {
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--panel-bg-color) 95%, white),
    color-mix(in srgb, var(--panel-bg-color) 90%, black)
  );
  box-shadow:
    2px 2px 4px rgba(0, 0, 0, 0.1),
    -2px -2px 4px rgba(255, 255, 255, 0.1);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.leaflet-popup-content .estate-item-details span:hover {
  transform: translateY(-1px);
  box-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.15),
    -3px -3px 6px rgba(255, 255, 255, 0.15);
}

.leaflet-popup-content .estate-item-details .badge {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.85em;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    color-mix(in srgb, var(--secondary-color) 80%, white)
  );
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content .estate-item-footer {
  font-size: 0.85em;
  color: var(--text-color);
  padding: 8px 0;
  text-align: center;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--panel-bg-color) 85%, black)
  );
}

.leaflet-popup-content .estate-item-footer p {
  margin: 0;
  font-weight: 500;
}

.popup-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--panel-bg-color) 90%, black)
  );
}

.popup-action-btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 80%, white)
  );
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow:
    2px 2px 5px rgba(0, 0, 0, 0.2),
    -2px -2px 5px rgba(255, 255, 255, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
}

.popup-action-btn:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow:
    3px 3px 7px rgba(0, 0, 0, 0.25),
    -3px -3px 7px rgba(255, 255, 255, 0.15);
  filter: brightness(1.1);
}

.popup-action-btn:active {
  transform: scale(0.95);
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.popup-action-btn[data-action="delete"] {
  background: linear-gradient(
    135deg,
    var(--danger-color),
    color-mix(in srgb, var(--danger-color) 80%, black)
  );
}

.popup-action-btn[data-action="edit"] {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.popup-action-btn[data-action="details"] {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    color-mix(in srgb, var(--secondary-color) 80%, white)
  );
}

.popup-action-btn i {
  font-size: 0.85em;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.leaflet-popup-tip {
  background: linear-gradient(
    135deg,
    var(--panel-bg-color),
    color-mix(in srgb, var(--panel-bg-color) 90%, black)
  );
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: scale(0.6) rotate(45deg);
}

button,
a.button,
label.button {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin: 8px 5px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button:hover,
a.button:hover,
label.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  opacity: 0.95;
}

button.secondary,
a.button.secondary,
label.button.secondary {
  background: var(--gradient-secondary);
}
button.delete,
a.button.delete,
label.button.delete {
  background: linear-gradient(
    to right,
    var(--danger-color),
    color-mix(in srgb, var(--danger-color) 80%, black)
  );
}
button.edit,
a.button.edit,
label.button.edit {
  background: linear-gradient(to right, #3b82f6, #60a5fa);
}

button.small,
a.button.small,
label.button.small {
  padding: 8px 15px;
  font-size: 0.85em;
  border-radius: 6px;
  box-shadow: none;
}

button.small:hover,
a.button.small:hover,
label.button.small:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color-dark);
  font-size: 0.95em;
}

.required-star {
  color: var(--danger-color);
  margin-right: 5px;
  font-weight: bold;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1em;
  color: var(--text-color);
  background-color: var(--panel-bg-color);
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--gradient-secondary);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
  font-weight: 600;
}

.file-input-label:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-medium);
}

#file-names-display {
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--text-color);
}

.price-in-words {
  font-size: 0.85em;
  color: var(--success-color);
  margin-top: 8px;
  min-height: 1.2em;
  font-weight: 500;
  text-align: right;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  background-color: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
}

.tab {
  flex: 1;
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  color: var(--text-color-dark);
  font-weight: 500;
  text-align: center;
  background-color: var(--panel-bg-color);
}

.tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: bold;
  background-color: color-mix(
    in srgb,
    var(--bg-color) 50%,
    var(--panel-bg-color)
  );
}

.tab:hover {
  background: color-mix(in srgb, var(--bg-color) 50%, var(--panel-bg-color));
  color: var(--primary-color);
}

.tab-content {
  display: none;
  padding-top: 10px;
}
.tab-content.active {
  display: block;
}

.checkbox {
  --background: var(--checkbox-background);
  --border: var(--checkbox-border);
  --border-hover: var(--checkbox-border-hover);
  --border-active: var(--checkbox-border-active);
  --tick: var(--checkbox-tick);
  position: relative;
  display: inline-block;
  vertical-align: middle;
}
.checkbox input,
.checkbox svg {
  width: 24px;
  height: 24px;
  display: block;
}
.checkbox input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  outline: none;
  background: var(--background);
  border: none;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 6px;
  transition:
    box-shadow 0.3s,
    background 0.3s;
  box-shadow: inset 0 0 0 var(--s, 1px) var(--b, var(--border));
}
.checkbox input:hover {
  --s: 2px;
  --b: var(--border-hover);
}
.checkbox input:checked {
  --b: var(--border-active);
  background: var(--primary-color);
}
.checkbox svg {
  pointer-events: none;
  fill: none;
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: var(--tick);
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  transform: scale(var(--scale, 1)) translateZ(0);
}
.checkbox.path input:checked + svg {
  --s: 2px;
  transition-delay: 0.4s;
  --a: 16.1 86.12;
  --o: 102.22;
}
.checkbox.path svg {
  stroke-dasharray: var(--a, 86.12);
  stroke-dashoffset: var(--o, 86.12);
  transition:
    stroke-dasharray 0.6s,
    stroke-dashoffset 0.6s;
}
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.checkbox-container label[for] {
  display: inline;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: normal;
  color: var(--text-color);
}

.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--panel-bg-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.spinner-overlay {
  display: none !important;
}

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.customer-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
  border-radius: 50%;
  padding: 3px;
  vertical-align: middle;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.customer-circle:hover {
  color: var(--accent-color);
  background: color-mix(in srgb, var(--primary-color) 18%, transparent);
  transform: scale(1.2);
}

.customer-circle i {
  transition: transform 0.2s ease;
}

.customer-circle:hover i {
  transform: rotate(-8deg);
}

.customer-circle-overlay {
  position: absolute;
  top: 52px;
  left: 12px;
  z-index: 4;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  font-size: 0.95em;
}

.customer-circle-overlay:hover {
  background: var(--primary-color);
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.custom-modal-content {
  background-color: var(--panel-bg-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-large);
  text-align: center;
  max-width: 450px;
  width: 90%;
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.custom-modal-overlay.active .custom-modal-content {
  transform: translateY(0);
  opacity: 1;
}
.custom-modal-content h3 {
  color: var(--text-color-dark);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5em;
  font-weight: 700;
}
.custom-modal-content p {
  color: var(--text-color);
  margin-bottom: 25px;
  font-size: 1.1em;
}
#custom-alert-message {
  white-space: pre-line;
}
.custom-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.custom-modal-buttons button {
  flex: 1;
  max-width: 150px;
  padding: 12px 20px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
}
.custom-modal-buttons button.confirm-btn {
  background: var(--gradient-primary);
}
.custom-modal-buttons button.cancel-btn {
  background: var(--gradient-secondary);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.pagination button {
  background-color: var(--secondary-color);
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s;
  font-weight: 600;
  box-shadow: var(--shadow-light);
}
.pagination button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
body[data-theme="dark"] .pagination button:disabled {
  background-color: #555;
  color: #888;
}
.pagination button.active {
  background: var(--primary-color);
  box-shadow: var(--shadow-large);
  transform: scale(1.05) translateY(-2px);
  font-weight: bold;
  color: #fff;
}

.image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.image-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.image-modal-content {
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  border-radius: 8px;
  box-shadow: var(--shadow-large);
}
.image-modal-overlay.active .image-modal-content {
  transform: scale(1);
}
.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}
.image-modal-close:hover {
  color: #bbb;
}

.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 50px;
  top: 2px;
}
.theme-switch input {
  display: none;
}
.theme-slider {
  background: var(--gradient-secondary);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 24px;
}
.theme-slider:hover {
  background: var(--gradient-primary);
}
.theme-slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 16px;
  border-radius: 50%;
}
input:checked + .theme-slider {
  background: var(--gradient-primary);
}
input:checked + .theme-slider:before {
  transform: translateX(26px);
}
.theme-switch-wrapper i {
  font-size: 18px;
  color: var(--text-color-dark);
}
body[data-theme="dark"] .theme-switch-wrapper i {
  color: #ffffff;
}

.theme-toggle-fixed {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  background: var(--panel-bg-color);
  padding: 8px 12px;
  border-radius: 24px;
  box-shadow: var(--shadow-light);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}
.theme-toggle-fixed:hover {
  background: var(--gradient-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}
.theme-toggle-fixed i {
  font-size: 18px;
  color: var(--text-color-dark);
}
body[data-theme="dark"] .theme-toggle-fixed {
  background: var(--panel-bg-color);
}
body[data-theme="dark"] .theme-toggle-fixed:hover {
  background: var(--gradient-primary);
}
body[data-theme="dark"] .theme-toggle-fixed i.fa-moon {
  color: #ffffff;
}
body[data-theme="dark"] .theme-toggle-fixed i.fa-sun {
  color: #ffffff;
}
body[data-theme="light"] .theme-toggle-fixed i.fa-sun {
  color: var(--warning-color);
}
body[data-theme="light"] .theme-toggle-fixed i.fa-moon {
  color: var(--text-color-dark);
}

.panel-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  opacity: 0.15;
}
.panel-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-medium);
  opacity: 1;
}

.featured-star {
  color: var(--star-color);
  font-size: 1em;
  vertical-align: middle;
}
h4 .featured-star {
  font-size: 0.9em;
}

.has-tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted var(--text-color);
}

.details-tooltip {
  visibility: hidden;
  opacity: 0;
  width: max-content;
  max-width: 220px;
  background-color: var(--panel-bg-color);
  color: var(--text-color);
  text-align: right;
  border-radius: 8px;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.3s;
  box-shadow: var(--shadow-medium);
  pointer-events: none;
}

.details-tooltip::after {
  content: " ";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--panel-bg-color) transparent transparent transparent;
}

.details-tooltip::before {
  content: " ";
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: var(--border-color) transparent transparent transparent;
  z-index: -1;
}

.has-tooltip:hover .details-tooltip {
  visibility: visible;
  opacity: 1;
}

.details-tooltip p {
  margin: 4px 0;
  font-size: 0.9em;
  white-space: nowrap;
}

.inline-error-message {
  color: var(--danger-color);
  font-size: 0.8em;
  font-weight: 500;
  margin-top: 5px;
  min-height: 1.2em;
  display: none;
  transition: all 0.3s ease;
}

input.input-error,
select.input-error,
textarea.input-error {
  border-color: var(--danger-color) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger-color) 20%, transparent) !important;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 10px;
  background-color: var(--bg-color);
  border-radius: 8px;
}

.requests-list-section {
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.request-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.request-card:hover {
  box-shadow: var(--shadow-light);
}

.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.request-card-header h4 {
  margin: 0;
  color: var(--text-color-dark);
}

.request-card-body p {
  margin: 4px 0;
  font-size: 0.9em;
}

.request-card-body p strong {
  min-width: 90px;
  display: inline-block;
}

.request-card-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

#stats-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-top: 15px;
}

.chart-card {
  background-color: var(--panel-bg-color);
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-color);
}

.chart-card h4 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text-color-dark);
  text-align: center;
  font-size: 1.1em;
}

canvas {
  max-height: 250px;
  width: 100% !important;
}

@media (max-width: 768px) {
  .panel-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  .detail-header-actions button {
    flex: 1;
    margin: 0;
  }
  .tabs {
    flex-wrap: wrap;
  }
  .tab {
    flex: 1 1 48%;
    margin-bottom: 5px;
  }
  .theme-toggle-fixed {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
  }
  .theme-toggle-fixed i {
    font-size: 16px;
  }
}

#upload-progress-container {
  width: 100%;
  background-color: var(--border-color);
  border-radius: 8px;
  margin: 15px 0;
  overflow: hidden;
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
}

#upload-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.4s ease;
}

#upload-progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  color: var(--text-color-dark);
  font-weight: bold;
  text-shadow: 0 1px 1px var(--panel-bg-color);
}

/* .dashboard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-form label {
    margin-bottom: 8px; 
}

.dashboard-form input,
.dashboard-form select {
    width: 100%;
}

.dashboard-form button {
    margin-top: 10px;
    width: 100%;
} */

.filter-group {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.filter-group-header {
  background: var(--bg-color);
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-color-dark);
  transition: background 0.2s;
}

.filter-group-header:hover {
  background: color-mix(in srgb, var(--bg-color) 90%, black);
}

.filter-group-header i {
  transition: transform 0.3s;
}

.filter-group.active .filter-group-header i {
  transform: rotate(180deg);
}

.filter-group-content {
  max-height: 0;
  padding: 0 15px;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s;
  background: var(--panel-bg-color);
}

.filter-group.active .filter-group-content {
  max-height: 200px;
  padding: 15px;
}

.filter-group-content .price-inputs {
  display: flex;
  gap: 10px;
}
#custom-alert-modal {
  z-index: 99999 !important;
}
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.custom-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.custom-modal-content {
  background-color: var(--panel-bg-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow-large);
  text-align: center;
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-color);
}

.custom-modal-overlay.active .custom-modal-content {
  transform: translateY(0);
  opacity: 1;
}

.custom-modal-content::-webkit-scrollbar {
  width: 6px;
}

.custom-modal-content::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 10px;
}

.custom-modal-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

@media (max-width: 768px) {
  .custom-modal-content {
    padding: 20px;
    max-width: 95%;
    max-height: 85vh;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .custom-modal-content {
    padding: 16px;
    max-width: 98%;
    max-height: 80vh;
    border-radius: 12px;
  }
}

/* ===== admin.css ===== */
/* مودال مدیریت بنگاه */

#agency-modal .custom-modal-content,
#admin-edit-modal .custom-modal-content,
#password-modal .custom-modal-content,
#edit-profile-modal .custom-modal-content {
  max-width: 600px;
  width: 90%;
  text-align: right;
  padding: 30px;
}

#agency-modal .custom-modal-content h3,
#admin-edit-modal .custom-modal-content h3,
#password-modal .custom-modal-content h3,
#edit-profile-modal .custom-modal-content h3 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 25px;
}

#agency-modal .custom-modal-content .form-row,
#admin-edit-modal .custom-modal-content .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

#agency-modal .custom-modal-content .form-row .form-group.full-width {
  grid-column: 1 / -1;
}

#agency-modal .custom-modal-content hr {
  margin: 20px 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

#agency-modal .custom-modal-content h4 {
  margin: 15px 0 10px 0;
  color: var(--text-color-dark);
  font-size: 1.1em;
}

#agency-modal .custom-modal-content .custom-modal-buttons {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

#agency-modal .custom-modal-content .custom-modal-buttons button {
  flex: 1;
  max-width: 180px;
}

@media (max-width: 768px) {
  #agency-modal .custom-modal-content,
  #admin-edit-modal .custom-modal-content,
  #password-modal .custom-modal-content,
  #edit-profile-modal .custom-modal-content {
    padding: 20px;
    max-width: 95%;
  }

  #agency-modal .custom-modal-content .form-row,
  #admin-edit-modal .custom-modal-content .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #agency-modal .custom-modal-content .custom-modal-buttons {
    flex-direction: column;
    gap: 10px;
  }

  #agency-modal .custom-modal-content .custom-modal-buttons button {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  #agency-modal .custom-modal-content,
  #admin-edit-modal .custom-modal-content,
  #password-modal .custom-modal-content,
  #edit-profile-modal .custom-modal-content {
    padding: 16px;
    max-width: 98%;
    max-height: 80vh;
  }

  #agency-modal .custom-modal-content .form-row {
    gap: 8px;
  }

  #agency-modal .custom-modal-content .form-group label {
    font-size: 0.9em;
  }

  #agency-modal .custom-modal-content .form-group input,
  #agency-modal .custom-modal-content .form-group select {
    font-size: 0.9em;
    padding: 10px;
  }
}
