/* ===== Font family ===== */
body {
  font-family: 'Roboto', sans-serif !important;
}

/* ===== Aitomate brand palette =====
   Primary:  #910a04  (rojo marca)
   Dark:     #333333  (gris oscuro)
   Light:    #fefefe  (blanco cálido)
   ================================== */

/* ===== Global background ===== */
.page-wrapper,
.page-body {
  background: #f4f6fb;
}

/* ===== Sidebar ===== */
.sidebar-brand {
  background: linear-gradient(180deg, #2b2b2b 0%, #333333 100%);
  border-right: none;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
}

.sidebar-brand .nav-link {
  color: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  margin: 2px 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-brand .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-brand .nav-link.active,
.sidebar-brand .nav-item.active > .nav-link {
  background: rgba(145, 10, 4, 0.35);
  color: #ffffff;
}

.sidebar-brand .nav-link-icon {
  font-size: 1.05rem;
  margin-right: 0.5rem;
}

.navbar-vertical .navbar-nav {
  margin-top: 0.5rem;
  gap: 1px;
}

/* Sidebar dropdown (Insights submenu) */
.sidebar-brand .dropdown-menu {
  background: #2b2b2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.35rem;
}

.sidebar-brand .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  font-size: 0.875rem;
  padding: 0.45rem 0.85rem;
  transition: all 0.2s ease;
}

.sidebar-brand .dropdown-menu .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ===== Logo ===== */
.sidebar-brand-logo {
  max-width: 160px;
  height: auto;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.sidebar-brand .sidebar-brand-logo {
  filter: none;
}

.sidebar-brand-logo:hover {
  opacity: 1;
}

.sidebar-brand-logo img {
  max-width: 140px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fefefe;
  text-decoration: none;
}

/* ===== Topbar ===== */
.navbar:not(.navbar-vertical) {
  background: #ffffff;
  border-bottom: 1px solid #ebedf2;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.navbar .input-group-sm .form-control,
.navbar .input-group-sm .btn,
.navbar .input-group-sm .input-group-text {
  border-radius: 10px;
}
.navbar .input-group-sm .input-group-text {
  border-right: 0;
  background: #f4f6fb;
}
.navbar .input-group-sm .form-control {
  border-left: 0;
  background: #f4f6fb;
}

/* ===== Cards ===== */
.card-soft {
  border: none;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card-soft:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.card-soft .card-body {
  padding: 1.25rem 1.35rem;
}

.card-soft .card-header {
  background: transparent;
  border-bottom: 1px solid #f0f1f5;
  padding: 1rem 1.35rem;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: #910a04;
  border-color: #910a04;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: #7a0903;
  border-color: #7a0903;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(145, 10, 4, 0.25);
}

.btn-outline-secondary {
  border-radius: 8px;
  font-weight: 500;
}

.btn-outline-primary {
  color: #910a04;
  border-color: #910a04;
  border-radius: 8px;
}

.btn-outline-primary:hover {
  background-color: #910a04;
  border-color: #910a04;
}

.btn-sm {
  border-radius: 7px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
}

/* ===== Badges ===== */
.badge {
  border-radius: 20px;
  padding: 0.35em 0.75em;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* ===== Tables ===== */
.table {
  font-size: 0.875rem;
}

.table thead th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8b92a5;
  border-bottom: 2px solid #f0f1f5;
  padding: 0.75rem 0.85rem;
}

.table tbody td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #f5f6f8;
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: #f8f9fc;
}

/* ===== Mono text ===== */
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  color: #555;
}

/* ===== KPI icon bubbles ===== */
.icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(145, 10, 4, 0.10), rgba(145, 10, 4, 0.18));
  color: #910a04;
}

.icon {
  display: inline-block;
  vertical-align: middle;
}

/* ===== Page header ===== */
.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #1e1e2d;
  letter-spacing: -0.01em;
}

.page-subtitle {
  color: #8b92a5;
  font-size: 0.875rem;
}

/* ===== Logbox ===== */
.logbox {
  background: #1a1a2e;
  color: #e0e0e0;
  padding: 1.25rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.65;
  max-height: 500px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Section headers ===== */
.fw-semibold {
  color: #1e1e2d;
}

/* ===== Marca / título ===== */
.brand-title {
  color: #333333;
  letter-spacing: 0.2px;
}

/* ===== Avatar accent ===== */
.avatar.bg-brand {
  background-color: #910a04 !important;
  color: #fefefe;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d0d3db;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b0b3bb;
}

/* ===== Form controls ===== */
.form-control,
.form-select {
  border-radius: 8px;
  border: 1px solid #e0e2e9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #910a04;
  box-shadow: 0 0 0 3px rgba(145, 10, 4, 0.1);
}

/* ===== Empty states ===== */
.text-muted {
  color: #8b92a5 !important;
}

/* ===== Public home ===== */

body.public .hero-public {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0;
}

body.public .hero-image img {
  max-width: 100%;
  height: auto;
}

body.public .hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 520px;
}

body.public .hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

@media (max-width: 900px) {
  body.public .hero-public {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body.public .hero-actions {
    justify-content: center;
  }
}
