:root {
  --kt-bg: #ffffff;
  --kt-bg-muted: #fafafa;
  --kt-border: #e5e5e5;
  --kt-text: #000000;
  --kt-text-muted: #737373;
  --kt-font-sans: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  font-family: var(--kt-font-sans);
}

.dark {
  --kt-bg: #0a0a0a;
  --kt-bg-muted: #171717;
  --kt-border: #2a2a2a;
  --kt-text: #ffffff;
  --kt-text-muted: #a3a3a3;
}

.kt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  transition: all 0.1s;
  cursor: pointer;
  border-width: 1px;
  border-radius: 9999px;
}

.kt-btn-primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

.kt-btn-primary:hover {
  background: #222;
  border-color: #222;
}

.kt-btn-secondary {
  background: #fff;
  color: #000;
  border-color: #000;
}

.kt-btn-secondary:hover {
  background: #f5f5f5;
}

.dark .kt-btn-secondary {
  background: #000;
  color: #fff;
  border-color: #fff;
}

.dark .kt-btn-secondary:hover {
  background: #111;
}

.kt-btn-danger {
  background: #000;
  color: #fff;
  border-color: #000;
}

.kt-btn-danger:hover {
  background: #222;
}

.kt-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.kt-card {
  background: var(--kt-bg);
  border: 1px solid var(--kt-border);
  overflow: hidden;
  border-radius: 1rem;
}

.kt-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--kt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kt-card-body {
  padding: 1.5rem;
}

.kt-title {
  color: var(--kt-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kt-subtitle {
  color: var(--kt-text-muted);
  font-size: 0.875rem;
}

.kt-text-muted {
  color: var(--kt-text-muted);
}

.kt-surface-muted {
  background: var(--kt-bg-muted);
  border: 1px solid var(--kt-border);
}

.kt-link {
  color: var(--kt-text-muted);
  text-decoration: none;
  transition: color 0.1s;
}

.kt-link:hover {
  color: var(--kt-text);
}

.kt-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d1d1;
  background: #fff;
  color: #000;
}

.kt-input:focus {
  outline: none;
  border-color: #000;
}

.dark .kt-input {
  background: #111;
  border-color: #444;
  color: #fff;
}

.kt-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000;
  margin-bottom: 0.25rem;
}

.dark .kt-label {
  color: #e5e5e5;
}

.kt-select {
  appearance: none;
}

.kt-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.kt-badge-success,
.kt-badge-danger {
  background: #000;
  color: #fff;
}

.kt-badge-warning,
.kt-badge-info {
  background: #f5f5f5;
  color: #000;
  border: 1px solid #ddd;
}

.kt-badge-gray {
  background: #f5f5f5;
  color: #555;
}

.dark .kt-badge-info {
  background: #1a1a1a;
  color: #ccc;
  border-color: #333;
}

.dark .kt-badge-gray {
  background: #1a1a1a;
  color: #888;
}

.kt-table {
  width: 100%;
  font-size: 0.875rem;
  text-align: left;
  color: #111;
}

.dark .kt-table {
  color: #ccc;
}

.kt-table thead {
  background: #fafafa;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #555;
  border-bottom: 1px solid #e5e5e5;
}

.dark .kt-table thead {
  background: #111;
  color: #777;
  border-color: #2a2a2a;
}

.kt-table th,
.kt-table td {
  padding: 0.75rem 1rem;
}

.kt-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.dark .kt-table tbody tr {
  border-color: #1e1e1e;
}

.kt-table tbody tr:hover {
  background: #fafafa;
}

.dark .kt-table tbody tr:hover {
  background: #111;
}

.kt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.kt-modal {
  background: #fff;
  border: 1px solid #e5e5e5;
  width: 100%;
  max-width: 28rem;
  z-index: 50;
  overflow: hidden;
}

.dark .kt-modal {
  background: #0a0a0a;
  border-color: #2a2a2a;
}

.kt-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  transition: all 0.1s;
  text-decoration: none;
}

.kt-sidebar-item:hover {
  background: #f5f5f5;
  color: #000;
}

.dark .kt-sidebar-item:hover {
  background: #1a1a1a;
  color: #fff;
}

.kt-sidebar-item.active {
  background: #000;
  color: #fff;
}

.dark .kt-sidebar-item.active {
  background: #fff;
  color: #000;
}

#main-content {
  opacity: 1;
  transition: opacity 0.32s ease;
}

body.page-transitioning #main-content,
body.htmx-swapping #main-content,
body.htmx-settling #main-content {
  opacity: 0.2;
}

[x-cloak] {
  display: none !important;
}
