* {
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --sidebar-item-hover: #f1f5f9;
  --pinned-col-bg: #f1f5f9;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 rgba(0, 0, 0, 0.05);
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Dark Theme */

body.dark-theme {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5),
    0 4px 6px -4px rgb(0 0 0 / 0.5);
  --sidebar-item-hover: #334155;
  --pinned-col-bg: #1e293b;
}

.dark-theme ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dark-theme ::-webkit-scrollbar-thumb {
  background: #64748b;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

body.dark-theme * {
  scrollbar-color: #64748b rgba(255, 255, 255, 0.05);
}

.background-glob {
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle,
      rgba(99, 102, 241, 0.2) 0%,
      rgba(248, 250, 252, 0) 70%);
  z-index: -1;
  filter: blur(80px);
}

/* Login */
.login-card {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card h1 {
  color: var(--text-color);
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.login-header-icon {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  padding: 8px 12px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-muted);
  z-index: 1000;
}

/* Sidebar */
.sidebar {
  width: 15%;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2rem;
  padding-bottom: 0.5rem;
  z-index: 10;
}

.sidebar h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.5rem;
}

.sidebar-footer {
  margin-top: auto;
  width: 100%;
  padding: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-header {
  width: 100%;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-weight: 500;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--sidebar-item-hover);
  color: var(--primary-color);
}

.nav-link i {
  width: 20px;
  text-align: center;
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 100%;
  margin: 0;
  background: transparent;
  padding-bottom: 2rem;
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

header h1 {
  font-size: 2rem;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
}

header p {
  margin: 0;
  color: var(--text-muted);
}

.controls-wrapper {
  display: flex;
  gap: 1rem;
}

/* DataTables Overrides */
.table-container {
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  overflow: hidden;
}

.dataTables_scrollBody {
  min-height: 200px;
}

.dataTables_scrollBody thead tr {
  visibility: collapse !important;
  height: 0 !important;
}

.dataTables_scrollBody thead th {
  height: 0 !important;
}

.dataTables_scrollBody thead input {
  display: none !important;
}

table.dataTable {
  border-collapse: collapse !important;
}

table.dataTable thead th {
  border-bottom: 2px solid var(--border-color) !important;
  background-color: var(--bg-color);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

table.dataTable tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  vertical-align: middle;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: 0.3rem;
  transition: all 0.2s;
}

.btn-icon:hover {
  background-color: var(--sidebar-item-hover);
  color: var(--primary-color);
}

.btn-icon.delete:hover {
  color: #ef4444;
  background-color: #fee2e2;
}

/* Fixed Columns Styling */
.DTFC_LeftBodyLiner {
  background-color: white !important;
}

.DTFC_LeftWrapper {
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.actions-col {
  background-color: var(--card-bg) !important;
}

table.dataTable.no-footer {
  border-bottom: 1px solid var(--border-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.hidden {
  display: none !important;
}

.modal-content {
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--card-bg);
  border-radius: 1rem;
  width: 90%;
  padding: 2rem;
  margin: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  height: auto;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Public View specific styles */
.public-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background: var(--bg-color);
}

.public-header {
  background: var(--card-bg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  z-index: 100;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.public-title-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: fit-content;
}

.public-logo {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.public-title-area h1 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

.public-search-container {
  flex-grow: 1;
}

.public-search-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.public-search-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.public-search-form .form-group label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.public-search-form input {
  height: 42px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.public-search-form input:focus {
  background: var(--card-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.public-search-form .btn-primary {
  height: 42px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

@media (max-width: 992px) {
  .public-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
  }

  .public-title-area {
    justify-content: center;
  }

  .public-search-form {
    flex-direction: column;
    gap: 0.75rem;
  }

  .public-search-form .form-group {
    width: 100%;
  }

  .public-search-form .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

.grid-break {
  grid-column: 1 / -1;
  height: 0;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem 1.5rem;
}

.grid-form .full-width {
  grid-column: 1 / -1;
  border: none;
  margin: 5px 0;
}

.grid-form .textareas-fullwidth {
  grid-column: 1 / -1;
  display: flex;
  gap: 30px;
}

.grid-form .textareas-fullwidth .textarea-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid-form .textareas-fullwidth .textarea-wrapper label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.grid-form .textareas-fullwidth textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  padding: 0.6rem;
  font-family: inherit;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-actions.full-width {
  grid-column: 1 / -1;
  margin-top: 1rem;
  text-align: right;
}

.grid-form .form-actions .full-width-btn {
  width: 100%;
  display: block;
  padding: 12px;
  font-size: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: inherit;
  background-color: var(--card-bg);
  color: var(--text-color);
}

/* DataTables Search Input Styling (Global Search) - Kept if needed elsewhere, though 'f' is hidden */
.dataTables_filter input {
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-left: 0.5rem;
}

.dataTables_filter input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* Column Filters Styling */
.filters input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.3rem;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
  background-color: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
}

.filters input:focus {
  background-color: var(--card-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filters input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.filters th {
  padding: 8px 10px !important;
  background-color: var(--bg-color) !important;
}

.zone-label div {
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  border: 1px solid #999;
}

#resultsModal #resultsTable tbody tr {
  cursor: pointer;
}

#dedicolaTableDetail,
#resultsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

#dedicolaTableDetail thead th,
#resultsTable thead th {
  background-color: var(--bg-color);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

#dedicolaTableDetail tbody td,
#resultsTable tbody td {
  padding: 10px;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

#dedicolaTableDetail tbody tr:nth-child(even),
#resultsTable tbody tr:nth-child(even) {
  background-color: var(--bg-color);
}

#dedicolaTableDetail tbody tr:hover,
#resultsTable tbody tr:hover {
  background-color: var(--sidebar-item-hover);
}

.map-container {
  background: var(--bg-color);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  margin-top: 1rem;
}

.cell {
  rx: 8;
  ry: 8;
  transition: all 0.2s;
  cursor: pointer;
}

.cell:hover {
  filter: brightness(0.95);
  stroke: var(--primary-color) !important;
  stroke-width: 2px !important;
}

.tooltip {
  pointer-events: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  line-height: 1.4;
  z-index: 2000;
  min-width: 180px;
  color: var(--text-color);
}

.tooltip strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--primary-color);
  font-size: 1rem;
}

.zone-selector {
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.zone-selector:hover {
  border-color: var(--primary-color);
}

.zone-selector:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
}

.toast {
  min-width: 300px;
  background: var(--card-bg);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
  pointer-events: auto;
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast i {
  font-size: 1.25rem;
}

.toast.success i {
  color: #10b981;
}

.toast.error i {
  color: #ef4444;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

.toast-message {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Validation Styles */
.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
  border-color: #ef4444 !important;
  background-color: #fff1f2 !important;
}

.form-group label.required::after {
  content: " *";
  color: #ef4444;
}

.confirm-modal-content {
  max-width: 400px;
  text-align: center;
  padding: 2.5rem 2rem;
}

.confirm-icon {
  font-size: 3.5rem;
  color: #ef4444;
  margin-bottom: 1.5rem;
}

.confirm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.confirm-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-secondary {
  background-color: var(--sidebar-item-hover);
  color: var(--text-color);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* ag-Grid Map Styles */
.map-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  padding: 4px 0;
}

.cell-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ag-theme-alpine {
  --ag-header-background-color: var(--bg-color);
  --ag-header-foreground-color: var(--text-muted);
  --ag-header-cell-font-weight: 700;
  --ag-font-size: 13px;
  --ag-font-family: 'Inter', sans-serif;
  --ag-border-color: var(--border-color);
  --ag-background-color: var(--card-bg);
  --ag-foreground-color: var(--text-color);
  --ag-data-color: var(--text-color);
}

.body.dark-theme .ag-theme-alpine {
  --ag-header-background-color: #0f172a;
}

.ag-theme-alpine .ag-cell {
  border-right: 1px solid var(--ag-border-color) !important;
}

.ag-theme-alpine .ag-row {
  border-bottom: 1px solid var(--ag-border-color) !important;
}

/* Custom Tooltip Styling */
.ag-tooltip-custom {
  background-color: #1e293b;
  color: white;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  font-size: 0.85rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  line-height: 1.5;
}

.ag-tooltip-custom strong {
  display: block;
  margin-bottom: 4px;
  color: #818cf8;
  font-size: 0.95rem;
}

#modalEdicola .modal-content {
  padding: 2rem;
  width: fit-content;
  min-width: 800px;
  max-width: 90%;
}

/* Theme Switch */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 1rem 0.5rem;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 44px;
}

.theme-switch input {
  display: none;
}

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

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

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

.theme-switch-wrapper em {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 500;
}

/* DT Dark Table fixes */
.dark-theme table.dataTable tbody tr {
  background-color: var(--card-bg) !important;
}

.dark-theme .dataTables_wrapper .dataTables_length,
.dark-theme .dataTables_wrapper .dataTables_filter,
.dark-theme .dataTables_wrapper .dataTables_info,
.dark-theme .dataTables_wrapper .dataTables_processing,
.dark-theme .dataTables_wrapper .dataTables_paginate {
  color: var(--text-muted) !important;
}

.dark-theme .paginate_button {
  color: var(--text-color) !important;
}

.dark-theme .dataTables_scrollHead {
  background-color: var(--bg-color) !important;
}

.dark-theme table.dataTable.display tbody tr.odd>.sorting_1,
.dark-theme table.dataTable.order-column.stripe tbody tr.odd>.sorting_1 {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.dark-theme .zone-selector {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.dark-theme .filters input {
  color: white !important;
  background-color: var(--bg-color) !important;
}

.dark-theme .filters input:focus {
  background-color: var(--card-bg) !important;
}

.dark-theme table.dataTable tbody td.dataTables_empty {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

/* --- Responsive Styles --- */

.mobile-toggle,
.mobile-close {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
  z-index: 1001;
}

.mobile-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 0.5rem;
  }

  .mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .main-content {
    padding: 4.5rem 1rem 1rem 1rem !important;
    width: 100% !important;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .controls-wrapper {
    width: 100%;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .table-container {
    padding: 0.75rem;
    border-radius: 0.5rem;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: 10px;
  }

  .grid-form {
    grid-template-columns: 1fr !important;
  }
}


@media (max-width: 768px) {
  .DTFC_LeftWrapper {
    display: none !important;
  }
}


/* Flex for modal actions */
.form-actions.full-width {
  display: flex !important;
  gap: 1rem !important;
  justify-content: flex-end !important;
  text-align: left !important;
}

.form-actions.full-width button {
  flex: 1 !important;
}

.btn-danger {
  background-color: #ef4444 !important;
  color: white !important;
}


/* Top Modal Delete Button Styling */
.modal-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.btn-delete-top {
  background: #ef444415 !important;
  color: #ef4444 !important;
  border: 1px solid #ef444430 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  transition: all 0.2s !important;
  flex: none !important;
  /* Prevent from taking full width */
}

.btn-delete-top:hover {
  background: #ef444425 !important;
  transform: translateY(-1px);
}

.modal-title-container {
  flex-grow: 1;
  text-align: center;
}

.close-btn-placeholder {
  width: 110px;
  /* Balance the delete button space */
}


.modal-header-actions h2 {
  margin: 0 !important;
  font-size: 1.5rem !important;
}

.modal-header-actions .close-btn {
  position: static !important;
  margin: 0 !important;
  padding: 0 0.5rem !important;
  line-height: 1 !important;
}