@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700;800&family=JetBrains+Mono:wght@400;600;700&family=Plus+Jakarta+Sans:wght@500;700;800&display=swap');

:root {
  --cs-primary: #49225B;
  --cs-primary-2: #6E3482;
  --cs-primary-3: #A56ABD;
  --cs-bg-soft: #F5EBFA;
  --cs-border: #E7DBEF;
}

body {
  font-family: "DM Sans", sans-serif;
  background: color-mix(in srgb, var(--cs-bg-soft) 32%, white);
}

.font-display { font-family: "Plus Jakarta Sans", sans-serif; }
.font-mono { font-family: "JetBrains Mono", monospace; }

.cs-sidebar {
  background: linear-gradient(180deg, var(--cs-primary) 0%, var(--cs-primary-2) 100%);
}

.cs-main {
  min-height: 100vh;
  background: color-mix(in srgb, var(--cs-bg-soft) 28%, white);
}

.cs-card {
  border: 0;
  border-radius: 0.95rem;
  background: white;
  box-shadow: 0 8px 24px rgba(73, 34, 91, 0.08);
}

.cs-muted {
  color: #7d6f86;
}

.cs-rich-text p { margin: 0 0 0.6em 0; }
.cs-rich-text p:last-child { margin-bottom: 0; }
.cs-rich-text strong, .cs-rich-text b { font-weight: 700; }
.cs-rich-text em, .cs-rich-text i { font-style: italic; }
.cs-rich-text u { text-decoration: underline; }
.cs-rich-text ul, .cs-rich-text ol {
  margin: 0 0 0.6em 0;
  padding-left: 1.35em;
}
.cs-rich-text ul { list-style: disc; }
.cs-rich-text ol { list-style: decimal; }
.cs-rich-text li { margin: 0.1em 0; }
.cs-rich-text h1, .cs-rich-text h2, .cs-rich-text h3,
.cs-rich-text h4, .cs-rich-text h5, .cs-rich-text h6 {
  color: #49225B;
  margin: 0.6em 0 0.3em 0;
  font-weight: 700;
  line-height: 1.25;
}
.cs-rich-text h1 { font-size: 1.25em; }
.cs-rich-text h2 { font-size: 1.15em; }
.cs-rich-text h3 { font-size: 1.05em; }
.cs-rich-text blockquote {
  margin: 0.6em 0;
  padding: 0.4em 0.8em;
  border-left: 3px solid #6E3482;
  color: #4a3b57;
  background: #F5EBFA;
  border-radius: 0 0.4rem 0.4rem 0;
}
.cs-rich-text a { color: #6E3482; text-decoration: underline; }
.cs-rich-text .ql-align-center { text-align: center; }
.cs-rich-text .ql-align-right { text-align: right; }
.cs-rich-text .ql-align-justify { text-align: justify; }
.cs-rich-text {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cs-rich-text * {
  max-width: 100%;
}
.cs-rich-text pre,
.cs-rich-text code {
  white-space: pre-wrap;
  word-break: break-word;
}
.cs-rich-text img,
.cs-rich-text iframe,
.cs-rich-text table {
  max-width: 100%;
}
.cs-rich-text table {
  display: block;
  overflow-x: auto;
}

.cs-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(110, 52, 130, 0.18);
  border-color: rgba(110, 52, 130, 0.45);
}

.cs-btn-primary {
  background: linear-gradient(135deg, var(--cs-primary), var(--cs-primary-2));
  color: #fff;
}

.cs-status-pendiente {
  background: #fef9c3;
  color: #854d0e;
}

.cs-status-aprobada,
.cs-status-pagada {
  background: #dcfce7;
  color: #166534;
}

.cs-status-rechazada,
.cs-status-anulada {
  background: #fee2e2;
  color: #991b1b;
}

.cs-input, .cs-select, .cs-textarea {
  width: 100%;
  border: 1px solid #e4d8ec;
  border-radius: 0.65rem;
  background: white;
  padding: 0.56rem 0.75rem;
  font-size: 0.92rem;
}

.cs-textarea { min-height: 120px; }

.cs-chip-active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.cs-chip {
  color: rgba(255, 255, 255, 0.75);
}

.cs-chip:hover { background: rgba(255, 255, 255, 0.1); color: white; }

@keyframes cs-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cs-toast-item {
  animation: cs-fade-up 0.2s ease-out;
}

/** Reparto Equipo CS — chips selección en ingresos */
.js-reparto-elige.reparto-chip-on {
  border: 2px solid var(--cs-primary-2);
  background: var(--cs-bg-soft);
  color: #1e293b;
}
.js-reparto-elige.reparto-chip-off {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}
.js-reparto-elige.reparto-chip-off .font-medium {
  color: #64748b;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
