/* Hub Dietrich — skin SaaS dark para widgets Django / classes legadas */

:root {
  color-scheme: dark;
}

/* ---- Nav ---- */
.nav-link {
  display: block;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #a1a1aa;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: #f4f4f5;
  background: rgba(255, 255, 255, 0.04);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 50;
  min-width: 16rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #18181f;
  padding: 0.4rem;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.65);
}
.nav-dropdown.open > .nav-dropdown-menu {
  display: block;
}
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    margin-top: 0.25rem;
    box-shadow: none;
  }
}
.nav-dropdown-item {
  display: block;
  border-radius: 0.625rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  color: #d4d4d8;
}
.nav-dropdown-item:hover {
  background: rgba(45, 212, 191, 0.1);
  color: #2dd4bf;
}

/* ---- Buttons ---- */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-light,
.btn-ghost,
button[type="submit"].btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.875rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:active,
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary,
.btn.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  color: #042f2e;
  box-shadow: 0 8px 24px -10px rgba(45, 212, 191, 0.55);
}
.btn-primary:hover {
  filter: brightness(1.05);
  color: #042f2e;
}
.btn-secondary,
.btn-outline-primary,
.btn-outline-light,
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
}
.btn-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-light:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.btn-success {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}
.btn-danger,
.btn-outline-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  border-radius: 0.65rem;
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-group {
  display: inline-flex;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-group .btn {
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-group .btn:last-child {
  border-right: 0;
}

/* ---- Cards / layout leftovers ---- */
.card {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #121216;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.04), 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: #f4f4f5;
}
.card-body {
  padding: 1.25rem;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e4e4e7;
}
.border-primary,
.border-secondary,
.border-success {
  border-color: rgba(255, 255, 255, 0.06) !important;
}
.container,
.container-fluid {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.row > [class*="col"] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.col,
.col-12,
.col-md-12 {
  flex: 1 1 100%;
  max-width: 100%;
}
.col-md-2 { flex: 1 1 100%; }
.col-md-3 { flex: 1 1 100%; }
.col-md-4 { flex: 1 1 100%; }
.col-md-6 { flex: 1 1 100%; }
.col-md-8 { flex: 1 1 100%; }
.col-md-10 { flex: 1 1 100%; }
.g-3 { row-gap: 0.75rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 0.75rem !important; }
.p-3 { padding: 0.75rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-muted { color: #a1a1aa !important; }
.text-primary { color: #2dd4bf !important; }
.text-success { color: #4ade80 !important; }
.text-danger { color: #f87171 !important; }
.text-warning { color: #fbbf24 !important; }
.text-white { color: #fff !important; }
.fw-semibold, .fw-bold { font-weight: 600 !important; }
.small, .form-text { font-size: 0.8125rem; color: #a1a1aa; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.bg-light {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #e4e4e7 !important;
}
.border { border: 1px solid rgba(255, 255, 255, 0.08) !important; }
.rounded { border-radius: 0.875rem !important; }

@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 16.666%; max-width: 16.666%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
  .col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
}

/* ---- Forms (Django widgets) ---- */
label,
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a1a1aa;
}
.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
select,
textarea {
  width: 100%;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #18181f;
  color: #f4f4f5;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}
.form-control[readonly],
input[readonly] {
  background: #14141a;
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.08);
  cursor: default;
  opacity: 1;
}
.form-control:disabled,
input:disabled,
select:disabled {
  background: #14141a;
  color: #71717a;
  opacity: 1;
}
.form-control.is-invalid,
.form-select.is-invalid,
.is-invalid {
  border-color: rgba(248, 113, 113, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15) !important;
}
.invalid-feedback,
.text-danger.small,
.errorlist {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #fca5a5;
  list-style: none;
  padding: 0;
}
input[type="checkbox"],
.form-check-input {
  width: 1rem;
  height: 1rem;
  accent-color: #2dd4bf;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-check-label {
  margin: 0;
  color: #d4d4d8;
}
select option {
  background: #18181f;
  color: #f4f4f5;
}

/* ---- Tables ---- */
.table-responsive {
  overflow-x: auto;
  border-radius: 1rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #71717a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}
.table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  vertical-align: middle;
}
.table-striped tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.table-hover tbody tr:hover {
  background: rgba(45, 212, 191, 0.05);
}
.align-middle td {
  vertical-align: middle;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bg-success { background: rgba(34, 197, 94, 0.15) !important; color: #86efac !important; }
.bg-secondary { background: rgba(161, 161, 170, 0.15) !important; color: #d4d4d8 !important; }
.bg-warning { background: rgba(245, 158, 11, 0.15) !important; color: #fcd34d !important; }
.bg-info { background: rgba(45, 212, 191, 0.15) !important; color: #5eead4 !important; }
.bg-danger { background: rgba(239, 68, 68, 0.15) !important; color: #fca5a5 !important; }
.bg-primary { background: rgba(45, 212, 191, 0.15) !important; color: #5eead4 !important; }
.bg-light { background: rgba(255, 255, 255, 0.06) !important; color: #e4e4e7 !important; }
.text-dark { color: inherit !important; }

/* ---- Alerts ---- */
.alert {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #18181f;
  color: #e4e4e7;
}
.alert-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}
.alert-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
}
.alert-danger,
.alert-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}
.alert-info,
.alert-debug {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.1);
  color: #99f6e4;
}

/* ---- Misc Bootstrap leftovers ---- */
.opacity-75 { opacity: 0.75; }
.table-sm td, .table-sm th { padding: 0.5rem 0.75rem; }
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kanban-column {
  min-width: 260px;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #121216;
  padding: 0.75rem;
}
.kanban-card {
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #1f1f28;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}
.kanban-card-edit {
  color: #2dd4bf;
  font-size: 0.75rem;
}

.card.text-white.bg-primary,
.card.text-white.bg-success,
.card.text-white.bg-secondary {
  background: #121216 !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #f4f4f5 !important;
}
.card.text-white.bg-primary .card-title { color: #2dd4bf; }
.card.text-white.bg-success .card-title { color: #4ade80; }
.card.text-white.bg-secondary .card-title { color: #a1a1aa; }
.card.text-white .card-text,
.card.text-white .opacity-75 {
  color: #a1a1aa !important;
  opacity: 1 !important;
}
.card.text-white h3 {
  color: #fafafa !important;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
