/* ========== ADMIN CSS — Dark Theme (WTorres palette) ========== */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-sidebar: #121a2b;
  --text: #f1f5f9;
  --text-soft: #94a3b8;
  --text-white: #f8fafc;
  --border: rgba(148, 163, 184, 0.12);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
  --sidebar-w: 260px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Montserrat", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ========== LOGIN ========== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #121a2b 100%);
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo__img {
  max-height: 72px;
  width: auto;
  max-width: 100%;
  margin-bottom: 1rem;
}

.login-logo .mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.login-logo p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  padding: 0.25rem;
}

.password-toggle:hover { color: var(--text); }

.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-full { width: 100%; }

.btn-sm { padding: 0.5rem 0.85rem; font-size: 0.82rem; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(59, 130, 246, 0.08); }

.btn-ghost { color: var(--text-soft); }
.btn-ghost:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ========== LAYOUT ========== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.3s ease;
  border-right: 1px solid var(--border);
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-header__img {
  height: 42px;
  width: auto;
  max-width: 100%;
  display: block;
}

.sidebar-header .mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.sidebar-header span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

.nav-section {
  padding: 0 1rem;
  margin-bottom: 0.5rem;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
  padding: 0.5rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  transition: all var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  color: var(--primary-light);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.breadcrumb span { color: var(--text); font-weight: 500; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.page-content {
  padding: 2rem;
}

/* ========== CARDS / STATS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.2);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.stat-icon.green { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.stat-icon.yellow { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.stat-icon.red { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.12); color: #22d3ee; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 0.15rem;
}

/* ========== TABLES ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.card-body { padding: 1.5rem; }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

th { white-space: nowrap; }

td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.wrap {
  white-space: normal;
  word-break: break-word;
}

/* Properties table — fit desktop without scroll */
.table-wrap:has(.properties-table) {
  overflow-x: hidden;
}

.properties-table {
  table-layout: fixed;
  width: 100%;
}

.properties-table th,
.properties-table td {
  padding: 0.55rem 0.6rem;
  font-size: 0.82rem;
}

.properties-table th:nth-child(1) { width: 44px; }
.properties-table th:nth-child(2) { width: 110px; }
.properties-table th:nth-child(3) { width: auto; }
.properties-table th:nth-child(4) { width: 12%; }
.properties-table th:nth-child(5) { width: 12%; }
.properties-table th:nth-child(6) { width: 14%; }
.properties-table th:nth-child(7) { width: auto; }
.properties-table th:nth-child(8) { width: 130px; padding-right: 5px; }
.properties-table td:nth-child(8) { padding-right: 10px; }

.properties-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.properties-table td.title-col {
  white-space: normal;
  word-break: break-word;
}

.properties-table .table-img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
}

.properties-table .table-actions {
  gap: 0.25rem;
}

.properties-table .table-actions .btn {
  padding: 0.35rem;
  width: 28px;
  height: 28px;
}

.properties-table .table-actions .btn svg {
  width: 15px;
  height: 15px;
}

th {
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.5);
  white-space: nowrap;
}

tr:hover td { background: rgba(59, 130, 246, 0.03); }

.table-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.5);
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

/* ========== BADGES ========== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: rgba(34, 197, 94, 0.12); color: #4ade80; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.badge-info { background: rgba(6, 182, 212, 0.12); color: #22d3ee; }
.badge-primary { background: rgba(59, 130, 246, 0.12); color: var(--primary-light); }
.badge-gray { background: rgba(148, 163, 184, 0.1); color: var(--text-soft); }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.25s ease;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ========== TOAST ========== */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideIn 0.3s ease;
  min-width: 280px;
  border-left: 4px solid;
  color: var(--text);
}

.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-info { border-color: var(--info); }

@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ========== FILTERS ========== */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 220px;
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  outline: none;
  font-size: 0.88rem;
  color: var(--text);
}

.search-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input input::placeholder {
  color: var(--text-soft);
}

.search-input svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-soft);
}

.filter-select {
  padding: 0.65rem 2rem 0.65rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  color: var(--text);
}

.filter-select:focus { border-color: var(--primary); }

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-soft);
}

.pagination-btns {
  display: flex;
  gap: 0.35rem;
}

.pagination-btns button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all var(--transition);
  color: var(--text);
}

.pagination-btns button:hover { border-color: var(--primary); color: var(--primary); }
.pagination-btns button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination-btns button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== TABS ========== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 0;
  overflow-x: auto;
}

.tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ========== IMAGE UPLOAD ========== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(15, 23, 42, 0.4);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.05);
}

.upload-zone svg {
  width: 48px;
  height: 48px;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.upload-zone p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.upload-zone strong {
  color: var(--primary);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: grab;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item.primary {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.image-item-actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.35rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.image-item:hover .image-item-actions { opacity: 1; }

.image-item-actions button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.image-item-actions button:hover { background: rgba(255, 255, 255, 0.3); }

.image-item .primary-badge {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-soft);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ========== SKELETON ========== */
.skeleton {
  background: linear-gradient(110deg, #1e293b 8%, #252d3d 18%, #1e293b 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.skeleton-text { height: 14px; margin-bottom: 0.5rem; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 0.75rem; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }

/* ========== FEATURE CHECKBOXES ========== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.feature-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.88rem;
  color: var(--text);
}

.feature-check:hover { border-color: var(--primary); }
.feature-check input:checked + span { color: var(--primary); font-weight: 600; }
.feature-check:has(input:checked) { border-color: var(--primary); background: rgba(59, 130, 246, 0.06); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
  }
  .main-content { margin-left: 0; }
  .menu-toggle { display: flex; }
  .topbar { padding: 0 1rem; }
  .page-content { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .search-input { min-width: 0; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .card-header { flex-direction: column; align-items: flex-start; }
}

/* ========== CHARTS ========== */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) { .chart-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.chart-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  width: 100px;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 6px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  min-width: fit-content;
  transition: width 0.6s ease;
}

/* ========== MISC ========== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
