/* Pallet360 — shell moderno (navbar + sidebar elegantes en blanco) */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700&display=swap");

:root {
  --p360-orange: #ff6a00;
  --p360-orange-soft: rgba(255, 106, 0, 0.12);
  --p360-teal: #1d4c52;
  --p360-bg: #f2f4f7;
  --p360-surface: #ffffff;
  --p360-border: #e5e9ef;
  --p360-border-strong: #d7dde6;
  --p360-text: #111827;
  --p360-muted: #6b7280;
  --p360-sidebar-w: 250px;
  --p360-nav-h: 72px;
  --p360-radius: 14px;
  --p360-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.04);
  --p360-font: "Manrope", system-ui, sans-serif;
  --p360-display: "Sora", "Manrope", system-ui, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--p360-font);
  color: var(--p360-text);
  background: var(--p360-bg);
  -webkit-font-smoothing: antialiased;
}

/* —— Top navbar —— */
.navbar-fixed-top-custom {
  min-height: var(--p360-nav-h);
  height: auto;
  position: sticky;
  top: 0;
  z-index: 1030;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  background: var(--p360-surface) !important;
  border-bottom: 1px solid var(--p360-border);
  box-shadow: none !important;
}

.navbar-fixed-top-custom .container-fluid {
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.navbar-brand.app-brand {
  display: inline-flex;
  align-items: center;
  max-width: min(280px, 58vw);
  margin-right: 0.75rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--p360-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar-brand.app-brand:hover {
  border-color: var(--p360-border-strong);
  box-shadow: var(--p360-shadow);
}

.navbar-brand.app-brand .app-brand-logo {
  display: block;
  width: auto;
  height: clamp(30px, 5.8vw, 44px);
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 575.98px) {
  .navbar-brand.app-brand {
    max-width: min(190px, 62vw);
    padding: 0.28rem 0.5rem;
  }
  .navbar-brand.app-brand .app-brand-logo {
    height: clamp(28px, 8vw, 36px);
  }
}

@media (min-width: 1400px) {
  .navbar-brand.app-brand {
    max-width: 300px;
  }
  .navbar-brand.app-brand .app-brand-logo {
    height: 48px;
  }
}

.navbar-fixed-top-custom .nav-link {
  color: var(--p360-text) !important;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 10px;
  padding: 0.45rem 0.75rem !important;
}

.navbar-fixed-top-custom .nav-link:hover {
  background: var(--p360-bg);
}

.navbar-fixed-top-custom .nav-link.text-danger {
  color: #dc2626 !important;
}

.navbar-toggler {
  border: 1px solid var(--p360-border);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  background: #fff;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px var(--p360-orange-soft);
}

/* —— Layout —— */
.main-wrapper {
  display: flex;
  min-height: calc(100vh - var(--p360-nav-h));
}

.main-content {
  margin-left: var(--p360-sidebar-w);
  flex-grow: 1;
  padding: 1.25rem 1.35rem 2rem;
  width: calc(100% - var(--p360-sidebar-w));
  text-align: left;
  background:
    radial-gradient(1200px 400px at 100% 0%, rgba(255, 106, 0, 0.05), transparent 55%),
    var(--p360-bg);
}

.main-content > .main-content-inner {
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

/* —— Sidebar —— */
.sidebar {
  height: calc(100vh - var(--p360-nav-h));
  position: fixed;
  top: var(--p360-nav-h);
  left: 0;
  width: var(--p360-sidebar-w);
  overflow-y: auto;
  z-index: 1000;
  padding: 0.85rem 0.7rem 1.5rem;
  background: var(--p360-surface);
  border-right: 1px solid var(--p360-border);
  box-shadow: 4px 0 24px rgba(17, 24, 39, 0.03);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 999px;
}

.sidebar .nav {
  gap: 2px;
}

.sidebar .nav-link {
  color: #374151;
  padding: 0.62rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 11px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sidebar .nav-link i {
  width: 1.15rem;
  text-align: center;
  color: var(--p360-muted);
  font-size: 0.92rem;
}

.sidebar .nav-link:hover {
  background: #f8fafc;
  border-color: var(--p360-border);
  color: var(--p360-text);
}

.sidebar .nav-link:hover i {
  color: var(--p360-orange);
}

.sidebar .nav-link.active,
.sidebar a.nav-link[aria-current="page"] {
  background: var(--p360-orange-soft);
  border-color: rgba(255, 106, 0, 0.22);
  color: var(--p360-teal);
}

.sidebar .collapse .nav-link {
  padding-left: 2.35rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--p360-muted);
}

.sidebar .collapse .nav-link:hover {
  color: var(--p360-text);
}

.sidebar .dropdown-toggle::after {
  margin-left: auto;
  opacity: 0.45;
}

.dropdown-menu {
  border: 1px solid var(--p360-border);
  border-radius: 12px;
  box-shadow: var(--p360-shadow);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 8px;
  font-weight: 500;
}

@media (max-width: 991.98px) {
  .sidebar {
    width: min(86vw, 320px);
    position: fixed;
    top: var(--p360-nav-h);
    left: 0;
    height: calc(100vh - var(--p360-nav-h));
    height: calc(100dvh - var(--p360-nav-h));
    z-index: 1040;
    overflow-y: auto;
    border-right: 1px solid var(--p360-border);
    border-bottom: none;
    box-shadow: 8px 0 28px rgba(17, 24, 39, 0.16);
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
  }
  .sidebar.collapse:not(.show) {
    display: block;
  }
  .sidebar.is-open {
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: var(--p360-nav-h);
    right: 0;
    bottom: 0;
    left: 0;
    border: 0;
    padding: 0;
    background: rgba(17, 24, 39, 0.45);
    z-index: 1035;
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }
}
