/* ============================================================
   sicome-base.css  –  estilos compartidos en todas las páginas
   ============================================================ */

:root {
  --color-principal:        #eb5900;
  --color-principal-palido: color-mix(in srgb, var(--color-principal) 30%, white);
  --color-ok:               #2e7d32;
  --color-ok-palido:        #e8f5e9;
  --color-inc:              #c62828;
  --color-inc-palido:       #ffebee;
  --color-warn:             #f57f17;
  --color-warn-palido:      #fff8e1;
  --color-pend:             #1565c0;
  --radio:                  12px;
  --sombra:                 0 2px 12px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  background: #f0f0f0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ── NAVBAR ── */
.navbar { background: var(--color-principal); box-shadow: 0 2px 8px rgba(0,0,0,.20); }
.navbar-brand { width: 100%; overflow: hidden; }
.navbar .navbar-item,
.navbar-brand .navbar-item      { color: white; font-weight: 600; }
.navbar .navbar-item:hover,
.navbar-brand .navbar-item:hover{ background: rgba(255,255,255,.15) !important; color: white; }
.navbar-item .icon i {
  color: white; border: 1px solid rgba(255,255,255,.6);
  border-radius: 5px; padding: 5px;
}
.navbar-burger span { background: white; }

/* Texto de marca: ocupa el espacio disponible y trunca con ellipsis */
.navbar-brand > .navbar-item:first-child {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
.navbar-brand > .navbar-item:first-child strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Área de usuario: logout siempre visible, nombre trunca */
#navbar-user-area {
  flex-shrink: 0;
  align-items: center;
  gap: .4rem;
  max-width: 50%;
  overflow: hidden;
}
#nav-username {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#btn-logout { flex-shrink: 0; }

/* ── CONTENEDOR PRINCIPAL ── */
#app { max-width: 760px; margin: 0 auto; padding: 1rem; }

/* ── SECCIÓN HEADER ── */
.section-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.sh-icon {
  background: var(--color-principal); color: white;
  border-radius: 8px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.section-header h2 { font-size: 1.15rem; font-weight: 700; color: #333; margin: 0; }
.section-header p  { font-size: .82rem; color: #888; margin: .1rem 0 0; }

/* ── BOTONES ── */
.btn-primary {
  background: var(--color-principal); color: white;
  border: none; border-radius: 10px; padding: 14px;
  font-size: 1rem; font-weight: 600; width: 100%;
  cursor: pointer; transition: opacity .2s;
}
.btn-primary:hover   { opacity: .88; }
.btn-primary:disabled{ opacity: .5; cursor: not-allowed; }

.btn-volver {
  background: white; color: var(--color-principal);
  border: 2px solid var(--color-principal); border-radius: 10px;
  padding: 10px 18px; font-size: .9rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: .4rem;
  transition: background .2s; margin-bottom: 1rem;
}
.btn-volver:hover { background: var(--color-principal-palido); }

.btn-finalizar {
  background: var(--color-principal); color: white;
  border: none; border-radius: 12px; padding: 16px 24px;
  font-size: 1.05rem; font-weight: 700; width: 100%;
  cursor: pointer; margin-top: 1.25rem;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  box-shadow: 0 4px 14px rgba(235,89,0,.35);
  transition: opacity .2s, transform .1s;
}
.btn-finalizar:hover   { opacity: .9; }
.btn-finalizar:active  { transform: scale(.98); }
.btn-finalizar:disabled{ opacity: .5; cursor: not-allowed; }

/* ── INPUTS BULMA override ── */
.input:focus, .textarea:focus {
  border-color: var(--color-principal);
  box-shadow: 0 0 0 2px var(--color-principal-palido);
}
.field label { font-weight: 600; color: #444; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333; color: white; border-radius: 99px;
  padding: .7rem 1.4rem; font-size: .88rem; font-weight: 600;
  z-index: 2000; opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  white-space: nowrap; display: flex; align-items: center; gap: .5rem;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.toast-ok    { background: var(--color-ok); }
.toast.toast-inc   { background: var(--color-inc); }
.toast.toast-error { background: #b71c1c; }

/* ── SPINNER ── */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: white;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── CHIPS ── */
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: 3px 9px; border-radius: 99px;
  font-size: .74rem; font-weight: 600;
}
.chip-ok  { background: var(--color-ok-palido);  color: var(--color-ok); }
.chip-inc { background: var(--color-inc-palido); color: var(--color-inc); }
.chip-pend{ background: #f0f0f0; color: #888; }
.chip-pendiente      { background: #e3ecfc; color: var(--color-pend); }
.chip-revisada       { background: var(--color-ok-palido);  color: var(--color-ok); }
.chip-conIncidencias { background: var(--color-inc-palido); color: var(--color-inc); }
.chip-subsanada      { background: var(--color-warn-palido);color: var(--color-warn); }
.chip-error          { background: #f0f0f0; color: #888; }

/* ── MODALES (overlay base) ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 999;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-confirm-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-confirm-overlay.open { display: flex; }
.modal-confirm-box {
  background: white; border-radius: 16px;
  padding: 1.75rem 1.5rem; max-width: 380px; width: 90%;
  text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; transform:scale(.95); } to { opacity:1; transform:scale(1); } }
.modal-confirm-icon  { font-size: 2.5rem; margin-bottom: .75rem; }
.modal-confirm-title { font-size: 1.1rem; font-weight: 700; color: #333; margin-bottom: .5rem; }
.modal-confirm-msg   { font-size: .88rem; color: #888; margin-bottom: 1.25rem; }
.modal-confirm-btns  { display: flex; gap: .7rem; }
.btn-confirm-si {
  flex: 1; background: var(--color-principal); color: white;
  border: none; border-radius: 10px; padding: 12px;
  font-weight: 700; font-size: .95rem; cursor: pointer;
}
.btn-confirm-no {
  flex: 1; background: #f0f0f0; color: #555;
  border: none; border-radius: 10px; padding: 12px;
  font-weight: 600; font-size: .95rem; cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (min-width: 600px) {
  #app { padding: 1.5rem; }
  .modal-overlay { align-items: center; }
}

