:root {
  --accent:       #0A84FF;
  --accent-dark:  #0060D0;
  --bg:           #F2F4F8;
  --surface:      #FFFFFF;
  --surface-2:    #F7F8FA;
  --border:       rgba(0,0,0,0.07);
  --text:         #111214;
  --text-sub:     #7C7C82;
  --success:      #30D158;
  --warning:      #FF9F0A;
  --danger:       #FF453A;
  --sidebar-w:    240px;
  --radius-card:  20px;
  --radius-btn:   14px;
  --shadow:       0 2px 16px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── LAYOUT ── */
.layout {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 32px 12px;
  flex-shrink: 0;
}

.brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-sub);
  padding: 0 12px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: none;
  background: none;
  color: var(--text-sub);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover  { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: #EBF4FF; color: var(--accent); }
.nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer { margin-top: auto; padding: 0 4px; }

.lang-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: var(--text-sub);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lang-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 52px 48px 40px;
  display: flex;
  flex-direction: column;
}

.page-header { margin-bottom: 32px; }

.header-date {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0.8;
}

.page-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

/* ── TAB PANES ── */
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp 0.25s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
  min-width: 0;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.stat-card.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  border: none;
  box-shadow: 0 8px 32px rgba(10, 132, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.stat-card.accent::after {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  pointer-events: none;
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-value small { font-size: 14px; font-weight: 600; opacity: 0.6; margin-left: 4px; }

.tenant-card {
  background: #1E1E20;
  border-color: rgba(255,255,255,0.06);
} 

/* ── ASSET CARDS ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.card-sub   { font-size: 13px; color: var(--text-sub); margin-bottom: 16px; }

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-blue  { background: #EBF4FF; color: var(--accent); }
.badge-gray  { background: var(--surface-2); color: var(--text-sub); }
.badge-green { background: #E5F9EC; color: var(--success); }
.badge-red   { background: #FFECEB; color: var(--danger); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(10,132,255,0.25);
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: #EBEBF0; }
.btn-ghost { background: none; color: var(--text-sub); border: 1px solid var(--border); }

.btn-add {
  width: auto;
  padding: 16px 28px;
  border-radius: var(--radius-card);
  border: 2px dashed var(--border);
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: block;
  margin: 0;
}
.btn-add:hover { border-color: var(--accent); color: var(--accent); }

/* ── FORMS ── */
.ios-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-btn);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 12px;
}

.ios-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-box {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 40px;
  max-height: 90dvh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 { font-size: 20px; font-weight: 800; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
}

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-danger  { background: #FFECEB; color: var(--danger); }
.alert-warning { background: #FFF5E5; color: var(--warning); }

/* ── UTILS ── */
.hidden { display: none !important; }

/* ── BOTTOM TAB BAR (mobile only) ── */
.tab-bar { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }

  .main-content { padding: 28px 16px 96px; }

  .page-title { font-size: 24px; }

  .tab-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: none;
    background: none;
    color: var(--text-sub);
    font-family: inherit;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.15s, transform 0.15s;
  }
  .tab-btn span:first-child { font-size: 22px; }
  .tab-btn.active { color: var(--accent); transform: translateY(-2px); }

  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 769px) {
  .modal-overlay { align-items: center; }
  .modal-box { border-radius: 28px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #111113;
    --surface:   #1C1C1E;
    --surface-2: #2C2C2E;
    --border:    rgba(255,255,255,0.08);
    --text:      #F5F5F7;
    --text-sub:  #8E8E93;
    --shadow:    0 2px 16px rgba(0,0,0,0.3);
  }

  .sidebar {
    background: #161618;
    border-right-color: rgba(255,255,255,0.05);
  }

  .brand {
    color: var(--text);
    opacity: 0.9;
  }

  .lang-btn {
    background: #2C2C2E;
    border-color: rgba(255,255,255,0.1);
    color: #8E8E93;
  }

  body {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

  .nav-item.active {
    background: rgba(10,132,255,0.15);
  }

  .stat-card {
    background: #1E1E20;
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  }

  .stat-card.accent {
    box-shadow: 0 8px 40px rgba(10, 132, 255, 0.45);
  }

  .stat-value {
    color: var(--text);
  }

  .tab-bar {
    background: rgba(28,28,30,0.92);
    border-top-color: rgba(255,255,255,0.06);
  }

  .modal-box {
    background: #1C1C1E;
  }

  .ios-input {
    color: var(--text);
  }
 
  .space-y-3 {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  .space-y-3 > * + * {
    margin-top: 0;
  }
}

.tenant-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tenant-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

}