:root {
  --resivio-navy: #142B4A;
  --resivio-navy-dark: #0D1E35;
  --resivio-emerald: #159B72;
  --resivio-emerald-dark: #0F7A59;
  --resivio-gold: #E9A23B;
  --resivio-bg: #F4F7FA;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--resivio-bg);
  color: #1E293B;
}

.wrap {
  width: min(100% - 32px, 1240px);
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .wrap {
    width: min(100% - 120px, 1240px);
  }
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  z-index: 100;
}

.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 12px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  border-radius: 8px;
  clip-path: none;
  overflow: visible;
  background: #0F7A59;
  color: #FFFFFF;
  outline: 3px solid #142B4A;
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #142B4A;
  outline-offset: 3px;
}

.resivio-gradient a:focus-visible,
.resivio-gradient button:focus-visible,
#download a:focus-visible,
#download button:focus-visible,
.closing a:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 3px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.btn-primary {
  background-color: #0F7A59;
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 122, 89, 0.25);
}

.btn-primary:hover {
  background-color: #0B5E44;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 122, 89, 0.25);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: #142B4A;
  border: 1px solid #CBD5E1;
}

.btn-secondary:hover {
  background-color: #F8FAFC;
  transform: translateY(-1px);
}

.resivio-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 5px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 14px;
  color: #0F172A;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.resivio-input:focus {
  border-color: #0F7A59;
  box-shadow: 0 0 0 3px rgba(21, 155, 114, 0.14);
}

.resivio-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(20, 43, 74, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* Global 5px radius across cards, inputs, buttons, and containers */
.rounded,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-3xl {
  border-radius: 5px !important;
}

/* Collapsible Portal Sidebar */
#portalSidebar {
  transition: width 180ms ease;
}

#portalSidebar.sidebar-collapsed {
  width: 76px;
}

#portalSidebar.sidebar-collapsed .sidebar-text {
  display: none;
}

#portalSidebar.sidebar-collapsed .sidebar-nav-link {
  justify-content: center;
  padding-inline: 0;
}

#portalSidebar.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 20px 12px;
}

#portalSidebar.sidebar-collapsed #sidebarToggle {
  display: none;
}

/* Force single-column mobile layout inside Resident Mobile App Shell even on desktop monitors */
.mobile-app-body {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
.mobile-app-body::-webkit-scrollbar {
  width: 4px;
}
.mobile-app-body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.mobile-app-body .grid {
  grid-template-columns: 1fr !important;
}
.mobile-app-body .grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.mobile-app-body .grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.mobile-app-body [class*="col-span-"] {
  grid-column: span 1 / span 1 !important;
}

#portalSidebar.sidebar-collapsed .sidebar-user-row {
  justify-content: center;
}

.resivio-card-hover:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 12px 28px rgba(20, 43, 74, 0.08);
}

.resivio-gradient {
  background:
    radial-gradient(circle at 82% 20%, rgba(21, 155, 114, 0.26) 0%, transparent 45%),
    radial-gradient(circle at 18% 85%, rgba(233, 162, 59, 0.12) 0%, transparent 40%),
    linear-gradient(145deg, #0D1E35 0%, #142B4A 55%, #183862 100%);
}

.hero-grid-bg {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.nav-link-active {
  color: #0F7A59 !important;
}

@keyframes resivioEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-enter] {
  animation: resivioEnter 420ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  [data-enter] {
    animation: none !important;
  }

  .btn-primary,
  .btn-secondary,
  .resivio-card {
    transition: none !important;
  }
}

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
  }
}

/* Global Design Consistency (5px radius + accessible focus rings) */
.rounded-lg,
.rounded-xl,
.rounded-2xl {
  border-radius: 5px !important;
}

:focus-visible {
  outline: 2px solid var(--resivio-emerald);
  outline-offset: 2px;
}