/* eBas / Grupo Selico — shell theme (login, header, menus) */
:root {
  --ebas-bg: #0f1419;
  --ebas-bg-mid: #1a2332;
  --ebas-header: #111827;
  --ebas-sidebar: #1f2937;
  --ebas-sidebar-nested: #374151;
  --ebas-sidebar-deep: #4b5563;
  --ebas-accent: #3da9f4;
  --ebas-accent-hover: #2b93db;
  --ebas-primary: #2f8fd6;
  --ebas-surface: #ffffff;
  --ebas-muted: #6b7280;
  --ebas-border: rgba(255, 255, 255, 0.08);
  --ebas-radius: 12px;
  --ebas-radius-sm: 8px;
  --ebas-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  --ebas-shadow-sm: 0 4px 14px rgba(15, 20, 25, 0.1);
  --ebas-transition: 0.2s ease;
}

/* Bootstrap soft overrides */
.btn-primary {
  background-color: var(--ebas-primary);
  border-color: var(--ebas-primary);
  border-radius: var(--ebas-radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.6rem 1.1rem;
  transition: background-color var(--ebas-transition), border-color var(--ebas-transition), box-shadow var(--ebas-transition);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ebas-accent-hover);
  border-color: var(--ebas-accent-hover);
  box-shadow: 0 0 0 0.2rem rgba(61, 169, 244, 0.25);
}

.form-control {
  border-radius: var(--ebas-radius-sm);
  border-color: #d1d5db;
  padding: 0.65rem 0.9rem;
  min-height: 2.75rem;
  transition: border-color var(--ebas-transition), box-shadow var(--ebas-transition);
}
.form-control:focus {
  border-color: var(--ebas-accent);
  box-shadow: 0 0 0 0.2rem rgba(61, 169, 244, 0.2);
}

.ebas-login-panel a,
.ebas-app-header a {
  transition: color var(--ebas-transition);
}

/* —— Login shell —— */
body.ebas-login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--ebas-bg) 0%, var(--ebas-bg-mid) 55%, #243044 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ebas-login {
  width: 100%;
  max-width: 960px;
}

.ebas-login-card {
  background: transparent !important;
  border-radius: var(--ebas-radius) !important;
  box-shadow: var(--ebas-shadow) !important;
  overflow: hidden;
  border: 1px solid var(--ebas-border);
}

.ebas-login-card > .row {
  min-height: 480px;
}

.ebas-login-card .bg {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: var(--ebas-radius) 0 0 var(--ebas-radius) !important;
}
.ebas-login-card .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(15, 20, 25, 0.35), rgba(61, 169, 244, 0.25));
}

.ebas-login-panel {
  background: var(--ebas-surface) !important;
  border-radius: 0 var(--ebas-radius) var(--ebas-radius) 0 !important;
  padding: 2.5rem !important;
}

.ebas-login-panel img {
  max-height: 72px;
  width: auto;
}

.ebas-login-panel h3 {
  font-size: 1.35rem;
  font-weight: 650;
  color: #111827;
  letter-spacing: -0.02em;
}

.ebas-login-panel .my-3,
.ebas-login-panel .my-3 a {
  font-size: 0.9rem;
  color: var(--ebas-muted);
}
.ebas-login-panel .my-3 a:hover {
  color: var(--ebas-accent);
}

@media (max-width: 991.98px) {
  .ebas-login-panel {
    border-radius: var(--ebas-radius) !important;
  }
}

/* —— App header (home + modules) —— */
header.bg-dark,
header.ebas-app-header {
  background: var(--ebas-header) !important;
  border-bottom: 2px solid var(--ebas-accent);
  box-shadow: none;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
  position: relative;
  z-index: 20;
}

header.bg-dark img,
header.ebas-app-header img {
  height: auto;
  max-height: 48px;
  width: auto;
  flex-shrink: 0;
}

/* Module name next to logo — always readable */
header.bg-dark a.d-flex.align-items-center,
header.bg-dark a.text-decoration-none.d-flex {
  flex-wrap: nowrap !important;
  min-width: 0;
  max-width: 100%;
}

header.bg-dark strong,
header.ebas-app-header strong {
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-left: 0.65rem;
  font-size: 0.92rem;
  color: #fff !important;
  white-space: nowrap;
  opacity: 0.95;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 0.65rem;
  line-height: 1.2;
}

header.bg-dark .nav-link,
header.ebas-app-header .nav-link {
  border-radius: 4px;
  padding: 0.4rem 0.65rem !important;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.9;
  transition: background-color 0.15s ease;
}

header.bg-dark .nav-link:hover,
header.ebas-app-header .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  opacity: 1;
}

header.bg-dark a.text-white:hover,
header.ebas-app-header a.text-white:hover {
  color: #fff !important;
}

header.bg-dark > .container,
header.bg-dark > .container-fluid {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  max-width: 100%;
}

header.bg-dark .nav .nav-link {
  line-height: 1.15;
}

header.bg-dark .nav .nav-link svg {
  margin-bottom: 0.1rem !important;
}

/* Soften page body */
body.bg-light {
  background-color: #eceff2 !important;
}

/*
 * Module name badge (BANCOS, CONTABILIDAD, etc.)
 * Old CSS used z-index:-1 so the sidebar covered it.
 * Title now also lives in the header; hide the floating chip.
 */
.module-indicator {
  display: none !important;
}

/* Sidebar stays 200px — do not expand over header/title */
.container > .row > .col-2.vh-100,
.container > .row > [class*="col-"][style*="width: 200px"] {
  padding-right: 0 !important;
  flex: 0 0 200px;
  max-width: 200px;
  position: relative;
  z-index: 1;
}

/* Home page soft content area */
body.ebas-home {
  background: #eceff2 !important;
}

body.ebas-home .ebas-app-header img.ebas-home-logo,
.ebas-home-logo {
  width: auto !important;
  height: 78px !important;
  max-height: 78px !important;
}

.ebas-home-intro {
  text-align: center;
  padding: 1.75rem 1rem 0.25rem;
}

.ebas-home-intro h1 {
  font-size: 1.35rem;
  font-weight: 650;
  color: #1c2430;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.ebas-home-intro p {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Footer unificado */
.ebas-footer {
  background: #111827;
  color: #e5e7eb;
  border-top: 2px solid #3da9f4;
  padding: 0.85rem 0;
}

.ebas-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.ebas-footer-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #e5e7eb !important;
  text-decoration: none !important;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  min-width: 0;
}

a.ebas-footer-item:hover {
  background: rgba(61, 169, 244, 0.12);
  color: #fff !important;
}

.ebas-footer-item svg {
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.85;
}

.ebas-footer-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  line-height: 1.2;
}

.ebas-footer-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  .ebas-footer-grid {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  body.ebas-home .ebas-app-header img.ebas-home-logo,
  .ebas-home-logo {
    height: 64px !important;
    max-height: 64px !important;
  }
}

/* Dashboard */
.ebas-dash-intro h1 {
  font-size: 1.4rem;
  font-weight: 650;
  color: #1c2430;
  margin: 0 0 0.35rem;
}
.ebas-dash-intro p {
  margin: 0;
  color: #6b7280;
}
.ebas-dash-section {
  font-size: 1rem;
  font-weight: 650;
  color: #1c2430;
  margin: 0 0 0.85rem;
}
.ebas-dash-card {
  display: block;
  background: #fff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  height: 100%;
}
.ebas-dash-card-link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ebas-dash-card-link:hover {
  border-color: #3da9f4;
  box-shadow: 0 4px 14px rgba(15, 20, 25, 0.08);
  color: inherit;
}
.ebas-dash-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.ebas-dash-card strong {
  display: block;
  font-size: 1rem;
  color: #111827;
}
.ebas-dash-card small {
  display: block;
  margin-top: 0.35rem;
  color: #3da9f4;
  font-size: 0.8rem;
}
.ebas-dash-mod {
  display: block;
  background: #fff;
  border: 1px solid #d8dee6;
  border-left: 3px solid #2c5f8a;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ebas-dash-mod:hover {
  background: #f7fafc;
  border-left-color: #3da9f4;
  color: inherit;
  text-decoration: none;
}
.ebas-dash-mod strong {
  display: block;
  font-size: 0.95rem;
  color: #111827;
  margin-bottom: 0.2rem;
}
.ebas-dash-mod span {
  display: block;
  font-size: 0.82rem;
  color: #6b7280;
}

body.ebas-home .footer {
  border-top: 1px solid #e5e7eb;
  background: #fff !important;
}

body.ebas-home .footer .text-muted,
body.ebas-home .footer a {
  color: #4b5563 !important;
}
body.ebas-home .footer a:hover {
  color: var(--ebas-accent) !important;
}
