﻿:root {
  --primary-50: #f1f6fb;
  --primary-100: #dceaf5;
  --primary-200: #bad4e8;
  --primary-300: #89b3d1;
  --primary-400: #4f86ad;
  --primary-500: #173863;
  --primary-600: #173863;
  --primary-700: #123154;
  --primary-800: #0d2745;
  --primary-900: #081d34;
  --neutral-50: #ffffff;
  --neutral-100: #f8fafc;
  --neutral-200: #f1f5f9;
  --neutral-300: #e2e8f0;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-500: #22c55e;
  --success-600: #16a34a;
  --success-700: #15803d;
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  --error-700: #b91c1c;
  --bg: var(--neutral-100);
  --surface: #ffffff;
  --surface-2: var(--neutral-200);
  --text: var(--neutral-900);
  --muted: var(--neutral-600);
  --line: var(--neutral-300);
  --line-strong: var(--neutral-400);
  --primary: var(--primary-500);
  --primary-dark: var(--primary-700);
  --primary-soft: var(--primary-100);
  --primary-faint: var(--primary-50);
  --accent: #f89820;
  --danger: var(--error-600);
  --warning: var(--warning-600);
  --success: var(--success-600);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow: 0 8px 32px rgba(26, 56, 98, 0.07);
  --glass-shadow: 0 8px 32px rgba(26, 56, 98, 0.07);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: grid;
  gap: 14px;
  justify-items: center;
  color: var(--primary);
  font-weight: 700;
}

.loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.enterprise-login-shell {
  min-height: 100vh;
  background: #ffffff;
}

.enterprise-login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.enterprise-login-left,
.enterprise-login-right {
  padding: 2.5rem 2rem;
}

.enterprise-login-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(32px, 12vh, 160px);
  background: #0c1f3a;
  color: #ffffff;
}

.enterprise-login-right {
  display: grid;
  place-items: center;
  background: #ffffff;
}

.enterprise-login-brand,
.sidebar-brand,
.brand-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enterprise-brand-logo,
.sidebar-brand-logo,
.brand-preview-logo {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.enterprise-login-left .enterprise-login-brand {
  align-items: center;
  gap: 10px;
}

.enterprise-login-left .enterprise-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #185fa5;
}

.enterprise-login-left .enterprise-login-brand h1 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #ffffff;
}

.enterprise-login-left .enterprise-login-brand p,
.login-left-middle p {
  margin: 0;
  color: #85b7eb;
  font-size: 13px;
  line-height: 1.55;
}

.login-icon,
.login-input-icon,
.login-note-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-icon {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.login-left-middle {
  max-width: clamp(320px, 34vw, 520px);
}

.login-left-middle h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-family: Outfit, Montserrat, Arial, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}

.login-feature-list {
  display: grid;
  gap: 12px;
}

.login-feature-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b5d4f4;
  font-size: 12px;
  font-weight: 600;
}

.login-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #0c447c;
  color: #b5d4f4;
}

.login-feature-icon .login-icon {
  width: 16px;
  height: 16px;
  color: #b5d4f4;
}

.enterprise-brand-logo img,
.sidebar-brand-logo img,
.brand-preview-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eyebrow,
.settings-callout-label,
.metric-label,
.stat-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.accent {
  color: var(--primary);
}

.enterprise-login-right .eyebrow.accent {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.enterprise-login-brand h1,
.hero-title,
.auth-panel h2,
.topbar h1,
.panel h2,
.panel h3 {
  font-family: Outfit, Montserrat, Arial, sans-serif;
  margin: 0;
  letter-spacing: 0;
}

.hero-badge {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
}

.hero-title {
  max-width: 680px;
  font-size: clamp(38px, 4.1vw, 58px);
  line-height: 1.06;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-grid,
.metrics-grid,
.summary-grid,
.settings-summary-grid,
.form-grid,
.action-grid,
.property-grid,
.unit-grid,
.tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hero-card,
.metric-card,
.stat-card,
.settings-summary-card,
.action-card,
.property-card,
.unit-card,
.tenant-card,
.invoice-card,
.payment-card,
.notice-card,
.property-branding-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-card:hover,
.metric-card:hover,
.stat-card:hover,
.settings-summary-card:hover,
.action-card:hover,
.property-card:hover,
.unit-card:hover,
.tenant-card:hover,
.invoice-card:hover,
.payment-card:hover,
.notice-card:hover,
.property-branding-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--glass-shadow);
  transform: translateY(-1px);
}

.hero-card h3,
.action-card h3,
.property-card h3,
.unit-card h3,
.tenant-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.hero-card p,
.action-card p,
.auth-panel p,
.panel p,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-visual {
  width: min(100%, 430px);
  margin-top: 4px;
  opacity: 0.96;
}

.auth-panel {
  width: min(100%, clamp(340px, 28vw, 440px));
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-panel h2 {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.auth-panel p {
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.stack-md {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 700;
}

.login-field {
  gap: 8px;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-label-row a {
  color: #185fa5;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.login-input-wrap {
  position: relative;
  display: block;
}

.login-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #98a2b3;
  pointer-events: none;
}

.login-input-wrap input {
  padding-left: 38px;
}

.login-submit.primary-button {
  width: 100%;
  min-height: 0;
  padding: 11px 13px;
  border-radius: 8px;
  background: #0c1f3a;
  border-color: #0c1f3a;
  color: #ffffff;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.4;
}

.login-note-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #98a2b3;
}

.field span {
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 11px 15px;
  outline: none;
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px var(--primary-50);
  background: #ffffff;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.nav-item,
.nav-group-toggle,
.settings-tab {
  min-height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-800));
  color: #ffffff;
  border-color: var(--primary-500);
  box-shadow: var(--shadow-md);
}

.primary-button:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-900));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 56, 99, 0.25);
}

.secondary-button {
  background: var(--neutral-200);
  color: var(--neutral-700);
  border-color: var(--neutral-200);
}

.secondary-button:hover {
  background: var(--neutral-300);
  color: var(--neutral-900);
  border-color: var(--neutral-300);
}

.ghost-button {
  background: #ffffff;
  color: var(--neutral-700);
  border-color: var(--line);
}

.ghost-button:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
  color: var(--primary-700);
}

.danger-button {
  background: var(--error-50);
  color: var(--error-600);
  border-color: var(--error-100);
}

.danger-button:hover {
  background: var(--error-600);
  color: #ffffff;
  border-color: var(--error-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.25);
}

.full-width {
  width: 100%;
}

.auth-note,
.form-note,
.empty-state {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: var(--neutral-900);
  border-right: 1px solid var(--neutral-200);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.02);
}

.sidebar .sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--neutral-100);
  gap: 12px;
}

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  color: var(--primary-700);
  font-weight: 800;
}

.sidebar-brand-text {
  min-width: 0;
}

.sidebar-brand-name {
  color: var(--primary-900);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar-brand-subtitle {
  color: var(--neutral-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 16px;
  overflow-y: auto;
}

.nav-section-label {
  padding: 16px 16px 8px;
  color: var(--neutral-400);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-cluster,
.nav-group-items {
  display: grid;
  gap: 8px;
}

.nav-divider {
  height: 1px;
  background: var(--neutral-200);
}

.nav-item,
.nav-group-toggle {
  width: 100%;
  background: transparent;
  color: var(--neutral-600);
  border-color: transparent;
  border-left-width: 3px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 16px;
  padding-left: 13px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.nav-item span {
  flex: 1;
}

.nav-icon {
  flex: 0 0 auto;
  color: var(--neutral-500);
  opacity: 0.72;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-item:hover,
.nav-group-toggle:hover {
  background: var(--neutral-50);
  color: var(--primary-700);
  transform: translateX(4px);
}

.nav-item:hover .nav-icon,
.nav-group-toggle:hover .nav-icon {
  color: var(--primary-600);
  opacity: 1;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-50) 0%, #ffffff 100%);
  color: var(--primary-700);
  border-left-color: var(--primary-600);
  font-weight: 700;
}

.nav-item.active .nav-icon {
  color: var(--primary-600);
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-md);
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.admin-details {
  display: grid;
  min-width: 0;
}

.admin-details span:first-child {
  color: var(--neutral-900);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-details span:last-child {
  color: var(--neutral-500);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-logout-button {
  background: var(--neutral-900);
  border-color: var(--neutral-900);
  color: #ffffff;
}

.sidebar-logout-button:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  color: #ffffff;
}

.content-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 28px;
}

.topbar-actions,
.table-actions,
.form-actions,
.inline-actions,
.card-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.content-body {
  padding: 28px;
}

.section-stage {
  display: grid;
  gap: 18px;
}

.panel,
.data-panel,
.settings-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.panel-header,
.section-header,
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel h2,
.panel h3 {
  font-size: 20px;
}

.metric-value,
.stat-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 800;
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.dashboard-summary-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
  align-items: stretch;
  gap: 18px;
}

.dashboard-summary-copy,
.dashboard-summary-metrics,
.dashboard-summary-actions,
.dashboard-main-column {
  display: grid;
  gap: 16px;
}

.dashboard-summary-copy,
.dashboard-summary-actions {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.dashboard-hero-kicker,
.dashboard-spotlight-label,
.dashboard-kpi-label,
.dashboard-progress-meta span {
  color: var(--neutral-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-summary-heading {
  display: grid;
  gap: 8px;
}

.dashboard-summary-heading h2 {
  margin: 0;
  color: var(--neutral-900);
  font-family: Outfit, Montserrat, Arial, sans-serif;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.dashboard-summary-heading p {
  max-width: 44ch;
  margin: 0;
  color: var(--neutral-600);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-summary-meta {
  margin: 0;
  color: var(--neutral-700);
  font-size: 14px;
  line-height: 1.6;
}

.dashboard-hero-badges,
.dashboard-summary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-summary-actions {
  grid-column: 1 / -1;
  flex-direction: row;
  align-content: start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-summary-actions .primary-button,
.dashboard-summary-actions .ghost-button {
  width: auto;
  justify-content: center;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(23, 56, 99, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--primary-700);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-summary-card,
.dashboard-kpi-card,
.dashboard-action-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.dashboard-summary-metrics {
  grid-template-columns: 1fr;
}

.dashboard-summary-card {
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 18px;
}

.dashboard-summary-card strong {
  color: var(--neutral-900);
  font-size: 24px;
  line-height: 1.05;
}

.dashboard-summary-card p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-kpi-grid,
.dashboard-action-grid {
  display: grid;
  gap: 14px;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-kpi-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-kpi-card:hover,
.dashboard-action-card:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.dashboard-kpi-card-portfolio {
  border-color: rgba(23, 56, 99, 0.16);
}

.dashboard-kpi-card-inventory {
  border-color: rgba(79, 134, 173, 0.2);
}

.dashboard-kpi-card-success {
  border-color: rgba(22, 163, 74, 0.22);
}

.dashboard-kpi-card-warning {
  border-color: rgba(217, 119, 6, 0.22);
}

.dashboard-kpi-value {
  color: var(--neutral-900);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-kpi-note {
  color: var(--neutral-600);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dashboard-panel {
  display: grid;
  gap: 16px;
}

.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-progress-list,
.dashboard-feed,
.dashboard-risk-list {
  display: grid;
  gap: 14px;
}

.dashboard-progress-row {
  display: grid;
  gap: 8px;
}

.dashboard-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-progress-meta strong,
.dashboard-feed-side strong,
.dashboard-risk-side strong {
  color: var(--neutral-900);
  font-size: 14px;
}

.dashboard-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--neutral-200);
}

.dashboard-progress-fill {
  height: 100%;
  border-radius: inherit;
}

.dashboard-progress-fill-success {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.dashboard-progress-fill-warning {
  background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%);
}

.dashboard-progress-fill-portfolio {
  background: linear-gradient(90deg, #173863 0%, #4f86ad 100%);
}

.dashboard-progress-caption {
  color: var(--neutral-500);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-feed-item,
.dashboard-risk-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-200);
}

.dashboard-feed-item:last-child,
.dashboard-risk-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dashboard-feed-main,
.dashboard-risk-main,
.dashboard-risk-side,
.dashboard-feed-side {
  display: grid;
  gap: 4px;
}

.dashboard-feed-main strong,
.dashboard-risk-main strong,
.dashboard-action-card strong {
  color: var(--neutral-900);
  font-size: 14px;
}

.dashboard-feed-side,
.dashboard-risk-side {
  justify-items: end;
  text-align: right;
}

.dashboard-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-action-card {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-action-card span {
  color: var(--neutral-600);
  font-size: 13px;
  line-height: 1.6;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-link-button {
  border: 0;
  background: transparent;
  color: var(--primary-700);
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.table-link-button:hover {
  color: var(--primary-900);
  text-decoration: underline;
}

.property-selector-list {
  display: grid;
  gap: 12px;
}

.property-selector-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.property-selector-card.active {
  border-color: var(--primary-300);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-50) 100%);
}

.property-selector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.property-selector-name {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: var(--neutral-900);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.property-selector-name:hover {
  color: var(--primary-700);
}

.property-selector-address {
  color: var(--neutral-600);
  font-size: 13px;
  line-height: 1.5;
}

.property-selector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.property-selector-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 11px;
  font-weight: 700;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

tbody tr:hover {
  background: var(--primary-50);
}

.badge,
.status-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.status-paid,
.status-active,
.badge-success {
  background: #ecfdf3;
  color: var(--success);
}

.status-overdue,
.status-vacant,
.badge-danger {
  background: #fff1f0;
  color: var(--danger);
}

.status-pending,
.badge-warning {
  background: #fffaeb;
  color: var(--warning);
}

.settings-shell,
.settings-tab-panels {
  display: grid;
  gap: 18px;
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-tab {
  background: #ffffff;
  border-color: var(--line);
  color: var(--muted);
}

.settings-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.settings-callout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--primary-200);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-lg);
  background: var(--primary-50);
}

.settings-callout.compact {
  padding: 10px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-100);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.error {
  background: var(--error-50);
  color: var(--error-700);
  border-color: var(--error-100);
}

.modal-backdrop,
.window-backdrop,
.action-window-backdrop,
.property-task-modal-backdrop,
.property-modal-backdrop,
.unit-modal-backdrop,
.property-action-window-backdrop {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal,
.window-panel,
.action-window,
.property-task-modal,
.property-modal,
.unit-modal,
.property-action-window {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 18px;
}

.property-task-modal,
.property-modal,
.unit-modal {
  width: min(860px, calc(100vw - 32px));
  padding: 0;
}

.unit-modal.compact {
  width: min(520px, calc(100vw - 32px));
}

.property-task-modal-head,
.property-modal-head,
.unit-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--neutral-100), #ffffff);
}

.property-task-modal-head h2,
.property-modal-head h2,
.unit-modal-head h2 {
  margin: 4px 0;
  font-family: Outfit, Montserrat, Arial, sans-serif;
  font-size: 24px;
  color: var(--neutral-900);
}

.property-task-modal-head p,
.property-modal-head p,
.unit-modal-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.property-task-modal-body,
.property-modal-body,
.unit-modal-body {
  display: grid;
  gap: 18px;
  padding: 22px 26px 26px;
}

.property-task-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.property-task-section {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.modal-actions {
  margin-top: 12px;
}

.action-window {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}

.action-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--neutral-100), #ffffff);
}

.action-window-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--muted);
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.action-window-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px 20px;
  background: #ffffff;
}

.action-window-button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--text);
  padding: 11px 13px;
  text-align: left;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.action-window-button:hover {
  border-color: var(--primary-200);
  background: var(--primary-faint);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow);
}

.action-window-button.danger {
  border-color: #fecdca;
  color: var(--danger);
}

.action-window-button.danger:hover {
  background: #fff1f0;
}

.search-row,
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.search-row input,
.filter-row input,
.filter-row select {
  max-width: 320px;
}

@media (max-width: 980px) {
  .enterprise-login-layout,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-bar,
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-login-layout {
    min-height: 100vh;
  }

  .enterprise-login-left,
  .enterprise-login-right {
    padding: 28px;
  }

  .enterprise-login-left {
    min-height: auto;
    gap: 28px;
  }

  .login-left-middle {
    max-width: 560px;
  }

  .login-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .enterprise-login-right {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 52vh;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .dashboard-kpi-card,
  .dashboard-summary-card,
  .dashboard-action-card {
    padding: 18px;
  }

  .dashboard-summary-copy,
  .dashboard-summary-actions {
    padding: 18px;
  }

  .dashboard-summary-actions {
    flex-direction: column;
  }

  .dashboard-summary-actions .primary-button,
  .dashboard-summary-actions .ghost-button {
    width: 100%;
  }

  .dashboard-summary-heading h2 {
    font-size: 22px;
  }

  .dashboard-summary-metrics,
  .dashboard-kpi-grid,
  .dashboard-action-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-head,
  .dashboard-feed-item,
  .dashboard-risk-item,
  .dashboard-progress-meta {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-feed-side,
  .dashboard-risk-side {
    justify-items: start;
    text-align: left;
  }

  .enterprise-login-left,
  .enterprise-login-right,
  .content-body,
  .topbar,
  .sidebar {
    padding: 18px;
  }

  .enterprise-login-left {
    gap: 22px;
  }

  .login-left-middle h2 {
    font-size: 20px;
  }

  .login-feature-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .login-feature-row {
    font-size: 12px;
  }

  .auth-panel {
    width: 100%;
  }

  .auth-panel h2 {
    font-size: 20px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button {
    width: 100%;
  }

  .topbar-actions,
  .form-actions,
  .inline-actions,
  .card-actions {
    width: 100%;
  }

  .action-window-list {
    grid-template-columns: 1fr;
  }

  .property-task-modal-head,
  .property-modal-head,
  .unit-modal-head {
    padding: 18px;
  }

  .property-task-modal-body,
  .property-modal-body,
  .unit-modal-body {
    padding: 18px;
  }

.property-task-summary {
    grid-template-columns: 1fr;
  }
}

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

.topbar-heading {
  min-width: 0;
}

.mobile-nav-toggle,
.mobile-logout-button,
.mobile-bottom-nav,
.mobile-nav-backdrop,
.mobile-nav-sheet {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  }

  .topbar-title-group {
    flex: 1;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 22px;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-toggle,
  .mobile-logout-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    background: #ffffff;
    color: var(--neutral-700);
    box-shadow: var(--shadow-sm);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-nav-toggle svg,
  .mobile-logout-button svg {
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
  }

  .mobile-logout-button {
    width: 42px;
    padding: 0;
    color: var(--error-600);
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .primary-button,
  .topbar-actions .ghost-button,
  .topbar-actions .secondary-button {
    width: 100%;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 85;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  }

  .mobile-nav-item {
    min-width: 0;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--neutral-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
  }

  .mobile-nav-item .nav-icon {
    width: 19px;
    height: 19px;
    color: currentColor;
    opacity: 1;
  }

  .mobile-nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-item.active {
    background: var(--neutral-900);
    color: #ffffff;
  }

  .mobile-nav-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: block;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
  }

  .mobile-nav-sheet:not([hidden]) {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 95;
    display: block;
    padding: 12px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
  }

  .mobile-nav-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 12px;
    color: var(--neutral-700);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-nav-sheet-header button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--neutral-200);
    border-radius: 999px;
    background: var(--neutral-50);
    color: var(--neutral-700);
    font-size: 22px;
    line-height: 1;
  }

  .mobile-more-nav {
    display: grid;
    gap: 8px;
  }

  .mobile-more-item {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    background: var(--neutral-50);
    color: var(--neutral-700);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-more-item.active {
    background: var(--neutral-900);
    border-color: var(--neutral-900);
    color: #ffffff;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .content-body {
    padding: 18px clamp(14px, 4vw, 24px) calc(100px + env(safe-area-inset-bottom));
  }
}
