/* =================================================
   RESET BÁSICO
================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: #f4f6f9;
  color: #111827;
}

/* =================================================
   TIPOGRAFÍA
================================================= */
h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

p {
  margin: 0;
  color: #374151;
}

small {
  font-size: 12px;
  color: #6b7280;
}

/* =================================================
   LINKS
================================================= */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =================================================
   CONTENEDORES
================================================= */
.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* =================================================
   TABLAS
================================================= */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table thead {
  background: #f8fafc;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
}

.table th {
  color: #374151;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.table td {
  border-bottom: 1px solid #f1f5f9;
}

.table tr:hover td {
  background: #f9fafb;
}

/* =================================================
   FORMULARIOS
================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field span {
  font-size: 13px;
  color: #374151;
}

input,
select,
textarea {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.15);
}

/* =================================================
   BOTONES
================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: #2563eb;
  color: #fff;
}

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

.btn--danger {
  background: #dc2626;
  color: #fff;
}

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

.btn--ghost {
  background: transparent;
  color: #2563eb;
}

.btn--ghost:hover {
  background: rgba(37,99,235,.08);
}

/* =================================================
   BADGES / ESTADOS
================================================= */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge--borrador {
  background: #fff7ed;
  color: #9a3412;
}

.badge--timbrada {
  background: #ecfdf5;
  color: #065f46;
}

.badge--cancelada {
  background: #fef2f2;
  color: #7f1d1d;
}

.badge--soft {
  background: #f1f5f9;
  color: #334155;
}

/* =================================================
   MENSAJES
================================================= */
.msg {
  margin-top: 10px;
  font-size: 13px;
}

.msg--error {
  color: #b91c1c;
}

.msg--success {
  color: #047857;
}

/* =================================================
   UTILIDADES
================================================= */
.muted {
  color: #6b7280;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}
