/* Utility classes */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.p-0 { padding: 0; }
.p-4 { padding: 4px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-small { font-size: 12px; }
.text-medium { font-size: 14px; }
.text-large { font-size: 18px; }
.text-xlarge { font-size: 24px; }

.text-muted { color: var(--md-sys-color-on-surface-variant); }
.text-primary { color: var(--md-sys-color-primary); }
.text-error { color: var(--md-sys-color-error); }
.text-success { color: #2E7D32; }

.bg-surface { background-color: var(--md-sys-color-surface); }
.bg-surface-variant { background-color: var(--md-sys-color-surface-variant); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-small { border-radius: var(--md-sys-shape-small); }
.rounded-medium { border-radius: var(--md-sys-shape-medium); }
.rounded-large { border-radius: var(--md-sys-shape-large); }
.rounded-full { border-radius: 999px; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cursor-pointer { cursor: pointer; }
.no-underline { text-decoration: none; }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.filter-bar .md-text-field,
.filter-bar .md-dropdown {
  margin-bottom: 0;
  min-width: 180px;
}

/* Color picker grid */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-grid__item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.color-grid__item--active {
  border-color: var(--md-sys-color-on-surface);
  transform: scale(1.1);
}

/* Theme preview card */
.theme-preview {
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  padding: 24px;
  background-color: var(--md-sys-color-surface);
}

/* Responsive card grid for dizimistas */
.dizimista-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Animations */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.page-leave {
  animation: fadeOut 0.15s ease;
}

/* Filter checkbox group */
.filter-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--md-sys-color-primary);
  cursor: pointer;
}

/* Summary row for dashboard */
.summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Chart bars (CSS only) */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 16px 0;
}

.chart-bar {
  flex: 1;
  background-color: var(--md-sys-color-primary-container);
  border-radius: var(--md-sys-shape-small) var(--md-sys-shape-small) 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.3s ease;
}

.chart-bar__label {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
  color: var(--md-sys-color-on-surface-variant);
}

/* View toggle for mobile table/card */
.view-toggle {
  display: flex;
  gap: 4px;
  background-color: var(--md-sys-color-surface-variant);
  padding: 2px;
  border-radius: var(--md-sys-shape-small);
}

.view-toggle button {
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: var(--md-sys-shape-small);
  cursor: pointer;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 20px;
}

.view-toggle button.active {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
}
