body {
  font-family: "Segoe UI", "Inter", sans-serif;
  margin: 0;
}

main > :first-child {
  margin-top: 0 !important;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
}

.input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}

.table-base {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table-base thead th {
  text-align: left;
  color: #475569;
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.7rem;
}

.table-base tbody td {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.7rem;
  vertical-align: middle;
}

.table-base tbody tr:hover {
  background: #f8fafc;
}

.table-base thead th.table-th-left {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base thead th.table-th-center {
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base thead th.table-th-right {
  padding: 0.75rem 1rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base tbody td.table-td-left {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: middle;
  font-size: 0.875rem;
  color: #334155;
}

.table-base tbody td.table-td-center {
  padding: 0.75rem 1rem;
  text-align: center;
  vertical-align: middle;
  font-size: 0.875rem;
  color: #334155;
}

.table-base tbody td.table-td-right {
  padding: 0.75rem 1rem;
  text-align: right;
  vertical-align: middle;
  font-size: 0.875rem;
  color: #334155;
}

.table-base tbody td.table-status-cell {
  padding: 0.75rem 1rem;
  text-align: center;
  vertical-align: middle;
}

.table-status-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-base thead th.table-actions-th {
  width: 260px;
  min-width: 260px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base thead th.table-actions-th-sm {
  width: 220px;
  min-width: 220px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base thead th.table-actions-th-lg {
  width: 320px;
  min-width: 320px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.table-base tbody td.table-actions-td {
  width: 260px;
  min-width: 260px;
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.table-base tbody td.table-actions-td-sm {
  width: 220px;
  min-width: 220px;
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.table-base tbody td.table-actions-td-lg {
  width: 320px;
  min-width: 320px;
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.table-actions-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  border-radius: 0.7rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: #1d4ed8;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1e40af;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-danger {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.btn-danger:hover {
  background: #ffe4e6;
}

.actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: wrap;
  white-space: nowrap;
}

.actions-cell form {
  display: inline-flex;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  min-width: 72px;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  padding: 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.action-btn-neutral {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.action-btn-neutral:hover {
  background: #f8fafc;
}

.action-btn-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.action-btn-warn:hover {
  background: #fef3c7;
}

.action-btn-danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.action-btn-danger:hover {
  background: #ffe4e6;
}

.action-btn-primary {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.action-btn-primary:hover {
  background: #dbeafe;
}

.actions-status-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0.65rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.25rem 0.45rem;
}

.actions-status-group form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.select-table {
  height: 2rem;
  min-width: 120px;
  border-radius: 0.6rem;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  color: #334155;
}

.select-table:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.metric-card {
  border-radius: 1rem;
  border: 1px solid #dbeafe;
  background: linear-gradient(160deg, #ffffff, #f8fbff);
  padding: 1rem;
}

.metric-label {
  color: #64748b;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.metric-value {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 700;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
}

.status-open {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-invoiced {
  background: #fef3c7;
  color: #92400e;
}

.status-paid {
  background: #dcfce7;
  color: #166534;
}

.status-canceled {
  background: #fee2e2;
  color: #991b1b;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
}

.nav-link {
  display: block;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: #cbd5e1;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0 0.75rem;
}

.sidebar-footer {
  border-top: 1px solid #1e293b;
  padding: 1rem;
}

.nav-link:hover {
  background: #1e293b;
  color: #f8fafc;
}

.nav-link-active {
  background: #1e40af;
  color: #ffffff;
}

.nav-link-danger {
  color: #fda4af;
}

.nav-link-danger:hover {
  background: #3a1f2a;
  color: #ffe4e6;
}

.mobile-link {
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  color: #334155;
}

.mobile-link-active {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: #eff6ff;
}

.mobile-link-danger {
  border-color: #fecdd3;
  color: #be123c;
  background: #fff1f2;
}

@media print {
  .print\:hidden {
    display: none !important;
  }

  body {
    background: white !important;
  }

  .card,
  .print-card {
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
  }
}

