/* ═══════════════════════════════════════════════════════
   QOR GLOBAL BASE
   Se aplica a todas las pantallas que usan base.html
═══════════════════════════════════════════════════════ */

:root {
  --qor-primary: #2BA19A;
  --qor-primary-dark: #1a6e69;
  --qor-primary-soft: rgba(43, 161, 154, 0.10);

  --qor-bg: #f1f5f9;
  --qor-surface: #ffffff;
  --qor-border: rgba(15, 23, 42, 0.08);
  --qor-text: #0f172a;
  --qor-muted: #64748b;

  --qor-radius-md: 16px;
  --qor-radius-lg: 22px;

  --qor-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --qor-shadow-md: 0 12px 30px rgba(15, 23, 42, 0.10);
}

body {
  background:
    radial-gradient(circle at top right, rgba(43, 161, 154, 0.08), transparent 28%),
    var(--qor-bg);
  color: var(--qor-text);
}

/* ═══════════════════════════════════════════════════════
   NAVBAR GLOBAL
═══════════════════════════════════════════════════════ */

.qor-global-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  min-height: 76px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--qor-border);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 10px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.qor-global-navbar__inner {
  width: 100%;
  max-width: none;
  min-height: 76px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.qor-global-navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--qor-text);
  text-decoration: none;
}

.qor-global-navbar__brand:hover {
  color: var(--qor-text);
}

.qor-global-navbar__logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(43, 161, 154, 0.12), rgba(43, 161, 154, 0.04));
  border: 1px solid rgba(43, 161, 154, 0.18);
  box-shadow: 0 10px 24px rgba(43, 161, 154, 0.10);
}

.qor-global-navbar__logo-wrap img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.qor-global-navbar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.qor-global-navbar__brand-text strong {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.qor-global-navbar__brand-text small {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--qor-muted);
}

.qor-global-navbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.qor-global-navbar__user {
  min-height: 42px;
  padding: 5px 14px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.qor-global-navbar__user-label {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--qor-muted);
  line-height: 1;
}

.qor-global-navbar__user strong {
  margin-top: 3px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--qor-text);
  line-height: 1;
}

.qor-global-navbar__logout-form {
  margin: 0;
}

.qor-global-navbar__logout {
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: var(--qor-primary-dark);
  background: rgba(43, 161, 154, 0.08);
  border: 1px solid rgba(43, 161, 154, 0.25);

  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

.qor-global-navbar__logout:hover {
  color: #ffffff;
  background: var(--qor-primary);
  border-color: var(--qor-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(43, 161, 154, 0.24);
}

.qor-global-navbar__logout i {
  font-size: 1rem;
}

/* Contenedor base general */
body > .container-fluid.px-4 {
  padding-top: 22px;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Mensajes de Django */
body > .container.mt-3 {
  max-width: none;
  width: calc(100% - 48px);
  margin-left: 24px;
  margin-right: 24px;
}

.alert {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--qor-shadow-sm);
}

/* ═══════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .qor-global-navbar {
    min-height: 66px;
  }

  .qor-global-navbar__inner {
    min-height: 66px;
    padding: 0 14px;
    gap: 12px;
  }

  .qor-global-navbar__logo-wrap {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .qor-global-navbar__logo-wrap img {
    width: 30px;
    height: 30px;
  }

  .qor-global-navbar__brand-text small {
    display: none;
  }

  .qor-global-navbar__user {
    display: none;
  }

  .qor-global-navbar__logout {
    width: 42px;
    padding: 0;
  }

  .qor-global-navbar__logout span {
    display: none;
  }

  body > .container-fluid.px-4 {
    padding-top: 16px;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body > .container.mt-3 {
    width: calc(100% - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }
}