@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@500;600;700;800&display=swap');

:root {
  --hub-sidebar-width: 72px;
  --hub-sidebar-expanded-width: 224px;
  --hub-topbar-height: 52px;
  --hub-topbar-bg: rgba(255, 255, 255, 0.94);
  --hub-topbar-ink: #1b2533;
  --hub-topbar-muted: #778190;
  --hub-topbar-primary: #f4b000;
  --hub-topbar-primary-dark: #d89a00;
  --hub-topbar-border: rgba(135, 150, 169, 0.22);
  --hub-topbar-shadow: 0 18px 44px rgba(26, 45, 72, 0.12);
}

body.has-hub-sidebar {
  padding-left: calc(var(--hub-sidebar-width) + 14px);
  padding-top: calc(var(--hub-topbar-height) + 10px);
}

body.has-hub-sidebar.hub-sidebar-expanded {
  --hub-sidebar-width: var(--hub-sidebar-expanded-width);
}

body.has-hub-sidebar .sticky-stack {
  top: calc(var(--hub-topbar-height) + 12px);
}

.hub-topbar {
  position: fixed;
  top: 0;
  left: var(--hub-sidebar-width);
  right: 0;
  z-index: 1095;
  background: var(--hub-topbar-bg);
  border-bottom: 1px solid var(--hub-topbar-border);
  box-shadow: var(--hub-topbar-shadow);
  backdrop-filter: blur(18px);
  font-family: "Mulish", "Segoe UI", sans-serif;
}

.hub-topbar-inner {
  min-height: var(--hub-topbar-height);
  padding: 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hub-topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hub-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-weather-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--hub-topbar-border);
  border-radius: 999px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 14px 30px rgba(21, 36, 58, 0.08);
}

.hub-weather-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4b000 0%, #d89a00 100%);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.hub-weather-trigger-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.hub-weather-trigger-copy strong {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 800;
}

.hub-weather-trigger-copy small {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hub-topbar-muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.hub-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--hub-sidebar-width);
  z-index: 1100;
  background: var(--hub-topbar-bg);
  border-right: 1px solid var(--hub-topbar-border);
  box-shadow: var(--hub-topbar-shadow);
  backdrop-filter: blur(18px);
  font-family: "Mulish", "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 12px 10px 14px;
  transition: width 0.18s ease;
}

.hub-sidebar-bottom,
.hub-sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.hub-sidebar-nav {
  gap: 10px;
}

.hub-sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 48px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: var(--hub-topbar-muted);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.hub-sidebar-link-button {
  appearance: none;
  cursor: pointer;
}

.hub-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--hub-topbar-ink);
  text-decoration: none;
  min-width: 0;
}

.hub-topbar-logo {
  height: 26px;
  width: auto;
}

.hub-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hub-topbar-border);
  border-radius: 999px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 14px 30px rgba(21, 36, 58, 0.08);
  text-decoration: none;
}

.hub-home-link i {
  font-size: 1rem;
}

.hub-message-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hub-topbar-border);
  border-radius: 999px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 14px 30px rgba(21, 36, 58, 0.08);
}

.hub-message-trigger i {
  font-size: 1rem;
}

.hub-message-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hub-sidebar-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(196, 205, 215, 0.6);
  border-radius: 14px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 10px 22px rgba(21, 36, 58, 0.08);
}

.hub-sidebar-toggle i {
  font-size: 1.15rem;
}

.hub-sidebar-link {
  background: rgba(245, 248, 250, 0.9);
  border-color: rgba(196, 205, 215, 0.36);
  box-shadow: 0 10px 22px rgba(21, 36, 58, 0.06);
  padding: 0 14px;
  gap: 12px;
}

.hub-sidebar-link i {
  font-size: 1.2rem;
  min-width: 20px;
  text-align: center;
}

.hub-sidebar-link-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.83rem;
  font-weight: 800;
  transition: opacity 0.16s ease, max-width 0.16s ease;
}

.hub-sidebar-link:hover,
.hub-sidebar-link:focus-visible {
  transform: translateY(-1px);
  color: var(--hub-topbar-primary);
  border-color: rgba(244, 176, 0, 0.24);
  box-shadow: 0 16px 28px rgba(244, 176, 0, 0.12);
}

.hub-sidebar-link.is-active {
  color: #fff;
  background: linear-gradient(180deg, #2a425d 0%, #1b2d42 100%);
  border-color: rgba(27, 45, 66, 0.84);
  box-shadow: 0 18px 32px rgba(24, 41, 60, 0.18);
}

body.hub-sidebar-expanded .hub-sidebar-link-label {
  opacity: 1;
  max-width: 160px;
}

.hub-user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0;
  border: 1px solid var(--hub-topbar-border);
  border-radius: 18px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 14px 30px rgba(21, 36, 58, 0.08);
}

.hub-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--hub-topbar-border);
  border-radius: 999px;
  background: #fff;
  color: var(--hub-topbar-ink);
  box-shadow: 0 14px 30px rgba(21, 36, 58, 0.08);
}

.hub-user-chip-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.hub-user-chip-copy strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 800;
}

.hub-user-chip-copy small {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hub-topbar-muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.hub-user-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(244, 176, 0, 0.16);
}

.hub-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4b000 0%, #d89a00 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.hub-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-picker-modal {
  border: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 54px rgba(17, 24, 39, 0.18);
}

.hub-weather-modal {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 54px rgba(17, 24, 39, 0.18);
}

.hub-message-modal,
.hub-order-preview-modal {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 54px rgba(17, 24, 39, 0.18);
}

.hub-profile-form {
  gap: 0.9rem;
}

.hub-profile-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.2rem 0.1rem 0.35rem;
}

.hub-profile-avatar-picker {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid rgba(244, 176, 0, 0.22);
  box-shadow: 0 8px 20px rgba(31, 49, 79, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
}

.hub-profile-avatar-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hub-profile-avatar-fallback {
  color: #64748b;
  font-weight: 700;
  font-size: 1.05rem;
}

.hub-profile-avatar-hint {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 2px 4px;
}

.hub-profile-identify {
  min-width: 0;
}

.hub-profile-tabs {
  gap: 0.45rem;
}

.hub-settings-tabs {
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.hub-settings-tabs .nav-link {
  border: 1px solid transparent;
  color: #64748b;
}

.hub-settings-tabs .nav-link.active {
  border-color: rgba(244, 176, 0, 0.22);
  background: rgba(244, 176, 0, 0.08);
  color: #0f5f82;
}

.hub-profile-tabs .nav-link {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
}

.hub-profile-tab-content {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 0.85rem;
}

.hub-message-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hub-message-inline-count {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 800;
}

.hub-message-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hub-message-item {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.hub-message-item.is-unread {
  border-color: rgba(244, 176, 0, 0.28);
  box-shadow: 0 14px 32px rgba(244, 176, 0, 0.1);
}

.hub-message-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.hub-message-item-head strong {
  font-size: 0.96rem;
}

.hub-message-item-head span {
  color: var(--hub-topbar-muted);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.hub-message-item-body {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hub-message-item-actions {
  margin-top: 0.85rem;
}

.hub-order-preview-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  background: #f8fafc;
}

.compras-preview-page {
  padding: 0;
  background: #f8fafc;
}

.compras-preview-shell {
  max-width: none;
}

.hub-weather-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hub-weather-chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: #0f172a;
  font-weight: 800;
}

.hub-weather-chip-mini i {
  color: #0284c7;
}

.hub-weather-modal-status:empty {
  display: none;
}

.hub-weather-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.hub-weather-modal-day {
  border: 1px solid rgba(196, 205, 215, 0.56);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  background: rgba(248, 250, 252, 0.9);
}

.hub-weather-modal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.hub-weather-modal-day-top strong {
  font-size: 0.85rem;
  text-transform: capitalize;
}

.hub-weather-modal-day-top i {
  color: var(--hub-topbar-primary);
}

.hub-weather-modal-day-desc {
  margin-top: 0.55rem;
  color: #475569;
  font-size: 0.8rem;
}

.hub-weather-modal-day-temp {
  margin-top: 0.55rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.hub-picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 205, 215, 0.56);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
}

.hub-picker-search i {
  color: var(--hub-topbar-muted);
  font-size: 0.95rem;
}

.hub-picker-search .form-control {
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.hub-picker-search .form-control:focus {
  box-shadow: none;
}

.hub-picker-results {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.hub-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(196, 205, 215, 0.56);
  border-radius: 14px;
  background: #fff;
  color: var(--hub-topbar-ink);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.hub-picker-item:hover,
.hub-picker-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.hub-picker-item.is-selected {
  border-color: rgba(27, 45, 66, 0.8);
  background: #fff;
  box-shadow: 0 12px 20px rgba(27, 45, 66, 0.08);
}

.hub-picker-item i {
  font-size: 1.2rem;
  color: var(--hub-topbar-primary);
}

.hub-picker-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hub-picker-item-main strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hub-topbar-ink);
}

.hub-picker-item-main small {
  color: var(--hub-topbar-muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.hub-picker-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(216, 154, 0, 0.14);
  color: #111827;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub-picker-empty,
.hub-picker-loading {
  padding: 18px 16px;
  border: 1px dashed rgba(196, 205, 215, 0.72);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.82);
  color: var(--hub-topbar-muted);
  text-align: center;
  font-weight: 700;
}

@media (max-width: 767px) {
  :root {
    --hub-sidebar-width: 64px;
    --hub-sidebar-expanded-width: 188px;
  }

  body.has-hub-sidebar {
    padding-left: calc(var(--hub-sidebar-width) + 10px);
    padding-top: calc(var(--hub-topbar-height) + 12px);
  }

  .hub-topbar {
    left: var(--hub-sidebar-width);
  }

  .hub-topbar-inner {
    padding: 8px 12px;
  }

  .hub-sidebar {
    padding: 10px 8px 10px;
  }

  .hub-user-btn {
    width: 100%;
    height: 42px;
    border-radius: 14px;
  }

  .hub-user-chip-copy {
    display: none;
  }

  .hub-weather-trigger-copy {
    display: none;
  }

  .hub-weather-trigger {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  .hub-weather-trigger-icon {
    width: 28px;
    height: 28px;
  }

  .hub-sidebar-link {
    height: 42px;
    border-radius: 14px;
    padding: 0 11px;
  }

  .hub-user-chip {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  .hub-picker-item {
    padding: 12px 14px;
  }

  .hub-picker-item-main strong {
    font-size: 0.88rem;
  }

  .hub-weather-modal-grid {
    grid-template-columns: 1fr;
  }
}
