body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

/* Layout */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e7e9ee;
  background: #f5f6f8;
  padding: 0 24px;
}

.app-sidebar {
  transition: transform 0.28s ease;
}

.app-sidebar__inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  border-right: 1px solid #e7e9ee;
  background: #ffffff;
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 18px;
}

.brand-mark {
  display: flex;
  height: 32px;
  width: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
}

.app-sidebar__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #5b6472;
}

.app-nav-link:hover {
  background: #f5f7fb;
  color: #111827;
}

.app-nav-link.active {
  background: #0f172a;
  color: #ffffff;
}

.app-sidebar__footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #edf0f4;
  padding: 14px;
}

/* Reusable components */
.app-card {
  border: 1px solid #e7e9ee;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.app-card--dark {
  border-color: #0f172a;
  background: #111b32;
  color: #fff;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.app-btn--dark {
  background: #111b32;
  color: #fff;
}

.app-btn--dark:hover {
  background: #0b1428;
}

.app-btn--light {
  border-color: #dce2ea;
  background: #fff;
  color: #1f2937;
}

.app-form-label {
  margin-bottom: 6px;
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #465063;
}

.form-input {
  width: 100%;
  border: 1px solid #d8dde6;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  font-size: 14px;
  color: #111827;
}

.form-input:focus {
  outline: none;
  border-color: #9cb6ff;
  box-shadow: 0 0 0 3px rgba(61, 105, 255, 0.12);
}

.app-search {
  display: flex;
  width: min(420px, 45vw);
  align-items: center;
  gap: 8px;
  border: 1px solid #d9dde6;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.app-search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 14px;
}

.app-search input:focus {
  outline: none;
}

.app-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.app-table thead th {
  border-bottom: 1px solid #eceff4;
  color: #677181;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-table td {
  border-bottom: 1px solid #f0f2f6;
  color: #1f2937;
}

.status-pill {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
}

.status-paid {
  background: #dcfce7;
  color: #15803d;
}

.status-partial {
  background: #fef3c7;
  color: #a16207;
}

.status-unpaid,
.status-pending {
  background: #fee2e2;
  color: #b91c1c;
}

.status-completed {
  background: #dcfce7;
  color: #15803d;
}

.app-modal {
  border-left: 1px solid #e7e9ee;
  background: #fff;
}

/* Utility */
.password-toggle {
  color: #94a3b8;
}

.password-toggle:hover {
  color: #475569;
}

.form-checkbox {
  height: 16px;
  width: 16px;
  accent-color: #111b32;
}

body.sidebar-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .app-topbar {
    height: 68px;
    padding: 0 16px;
  }
}
