html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html, body { height: 100%; }
body { margin: 0; background: #f5f7fb; }

/* ---- Shell layout ---- */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: #ffffff;
  border-right: 1px solid #e5e7eb;
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.app-sidebar .brand {
  padding: 0 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-sidebar .brand img { max-height: 40px; width: auto; }
.app-sidebar .brand img.brand-img { max-height: 90px; width: auto; }

.app-sidebar .nav-section {
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .05em;
  color: #9ca3af;
  padding: .75rem 1.25rem .25rem;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem 1.25rem;
  color: #4b5563;
  border-left: 3px solid transparent;
  border-radius: 0;
}
.app-sidebar .nav-link:hover {
  background: #f3f4f6;
  color: #111827;
}
.app-sidebar .nav-link.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-left-color: #1d4ed8;
  font-weight: 600;
}
.app-sidebar .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; }

/* ---- Main area ---- */
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-topbar .greeting .h6 { margin: 0; line-height: 1.1; }
.app-topbar .greeting small { color: #6b7280; }

.app-topbar .user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.app-topbar .user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #d1d5db;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; color: #374151; font-size: .85rem;
}
.app-topbar .user-chip .name { line-height: 1; font-size: .9rem; font-weight: 600; }
.app-topbar .user-chip .role { line-height: 1; font-size: .72rem; color: #6b7280; }

.app-content { padding: 1.5rem; flex: 1; }
.app-footer {
  padding: .75rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  font-size: .85rem;
}

/* ---- Cards & badges polish ---- */
.card { border: 1px solid #e5e7eb; border-radius: .5rem; }

/* ---- Buttons (Nestle Juridico palette) ---- */
.btn-mylegal-primary {
  background-color: #F58220;
  border-color: #F58220;
  color: #fff;
}
.btn-mylegal-primary:hover, .btn-mylegal-primary:focus {
  background-color: #E07719;
  border-color: #E07719;
  color: #fff;
}
.btn-mylegal-primary:active {
  background-color: #C76914 !important;
  border-color: #C76914 !important;
  color: #fff !important;
}

.btn-mylegal-danger {
  background-color: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
.btn-mylegal-danger:hover, .btn-mylegal-danger:focus {
  background-color: #861818;
  border-color: #861818;
  color: #fff;
}
.btn-mylegal-danger:active {
  background-color: #6f1414 !important;
  border-color: #6f1414 !important;
  color: #fff !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
