/* CaVeSal® IA — estilos compartidos (tokens de marca, ver manual-historia-clinica.html) */
:root {
  --navy: #0D1B2D;
  --teal: #0EA5B7;
  --teal-lt: #e6f7f9;
  --slate: #4a6274;
  --mist: #f2f7f9;
  --border: #d0e8ed;
  --gold: #c9a227;
  --error: #b3261e;
  --error-bg: #fdecea;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--mist);
  color: var(--navy);
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: #0b8a99; }
input, button, select { font-family: inherit; }

.cv-header {
  background: linear-gradient(135deg, #0D1B2D, #0EA5B7);
  color: #fff;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cv-header .cv-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cv-header .cv-brand .cv-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.cv-header .cv-brand .cv-subtitle {
  font-size: .82rem;
  opacity: .85;
}

.cv-header .cv-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cv-pill {
  font-size: .74rem;
  background: rgba(255, 255, 255, .18);
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.cv-pill.cv-pill-link {
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: inherit;
}
.cv-pill.cv-pill-link:hover { background: rgba(255, 255, 255, .3); }

.cv-main {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 44px 20px;
  gap: 24px;
  flex-wrap: wrap;
}

.cv-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(14, 165, 183, .15);
}

.cv-field { display: flex; flex-direction: column; gap: 6px; }
.cv-field label { font-size: .78rem; font-weight: 600; color: var(--slate); }
.cv-field input, .cv-field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: .9rem;
  color: var(--navy);
  background: #fff;
}
.cv-field input:focus, .cv-field select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.cv-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
}
.cv-btn:hover { background: #0b8a99; }
.cv-btn:disabled { background: #9bd3da; cursor: not-allowed; }

.cv-btn-secondary {
  background: #fff;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.cv-btn-secondary:hover { background: var(--teal-lt); }

.cv-note {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .78rem;
  line-height: 1.4;
}
.cv-note-warn { background: #fff8e6; border-left: 3px solid var(--gold); color: var(--slate); }
.cv-note-tip { background: var(--teal-lt); border-left: 3px solid var(--teal); color: var(--navy); }
.cv-note-error { background: var(--error-bg); border-left: 3px solid var(--error); color: var(--error); }

.cv-footer {
  text-align: center;
  font-size: .76rem;
  color: var(--slate);
  padding: 16px;
}

.cv-hidden { display: none !important; }

.cv-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cv-spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
