:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #3d8bfd;
  --accent-hover: #5ba3ff;
  --success: #34c759;
  --danger: #ff5c5c;
  --warn: #ffb020;
  --radius: 10px;
  --font: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(160deg, #0c1018 0%, #152238 50%, #0f1419 100%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--surface2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.user-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--surface2);
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.flash {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.flash-success {
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid rgba(52, 199, 89, 0.35);
}

.flash-error {
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.35);
}

.flash-info {
  background: rgba(61, 139, 253, 0.12);
  border: 1px solid rgba(61, 139, 253, 0.3);
}

.page-head {
  margin-bottom: 1.5rem;
}

.page-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.muted {
  color: var(--muted);
}

.muted.small {
  font-size: 0.85rem;
}

.auth-card {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.auth-switch {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Bikram Sambat hint under AD date / billing period (invoices page) */
.invoice-bs-line {
  margin: -0.15rem 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.35;
  max-width: 36rem;
}

.invoice-cell-bs {
  font-size: 0.88rem;
  line-height: 1.35;
  max-width: 14rem;
}

.invoice-bs-fieldset {
  border: 1px solid var(--surface2, #2a3344);
  border-radius: 10px;
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 0.75rem;
}

.invoice-bs-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}

.form input,
.form select,
.form textarea {
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.25);
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--surface2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-danger {
  background: rgba(255, 92, 92, 0.2);
  color: #ff8a8a;
  border: 1px solid rgba(255, 92, 92, 0.35);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 92, 92, 0.3);
}

.btn-small {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.warn-panel {
  border-color: rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.06);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.messaging-template-panel {
  margin-top: 1.25rem;
}

.messaging-template-panel .code-hint {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
}

.messaging-template-panel .h3-inline {
  margin: 1.25rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--surface2);
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
  background: rgba(61, 139, 253, 0.06);
}

.row-overdue {
  background: rgba(255, 92, 92, 0.06);
}

.inline-form {
  display: inline;
}

.actions {
  white-space: nowrap;
}

.actions .inline-form {
  margin-left: 0.25rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(52, 199, 89, 0.2);
  color: var(--success);
}

.badge-warn {
  background: rgba(255, 176, 32, 0.2);
  color: var(--warn);
}

.badge-partial {
  background: rgba(61, 139, 253, 0.2);
  color: var(--accent-hover);
}

.no-wrap {
  white-space: nowrap;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}

.report-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.report-filter-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.report-stats {
  margin-top: 0.75rem;
}

.table-scroll {
  overflow-x: auto;
}

.req {
  color: var(--danger);
}

.label-text {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.tenant-form-head,
.tenant-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 820px) {
  .form-layout {
    grid-template-columns: 1fr;
  }
}

.form-aside .aside-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.form-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.photo-preview-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  margin-bottom: 0.75rem;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-preview-wrap.photo-placeholder {
  border: 1px dashed var(--surface2);
}

.tenant-photo-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.tenant-photo-preview.is-hidden {
  display: none;
}

.file-input-label input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input-label {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.form-main .card-section {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.field-grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.field-grid .span-2 {
  grid-column: 1 / -1;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.family-table-wrap {
  overflow-x: auto;
}

.family-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.family-table th,
.family-table td {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid var(--surface2);
  vertical-align: middle;
}

.family-table input,
.family-table select,
.family-relation-select {
  width: 100%;
  min-width: 100px;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.family-table select,
.family-relation-select {
  min-height: 2.2rem;
  cursor: pointer;
  box-sizing: border-box;
}

.doc-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.doc-list-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--surface2);
}

.doc-upload-row {
  margin-top: 0.5rem;
}

.form-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.tenant-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.tenant-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tenant-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  align-items: start;
}

@media (max-width: 520px) {
  .tenant-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .tenant-card-photo {
    margin: 0 auto;
  }
}

.tenant-card-photo {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}

.tenant-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tenant-card-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.tenant-card-name {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.tenant-card-meta {
  margin: 0.2rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.tenant-card-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.tenant-actions-details {
  position: relative;
}

.tenant-actions-details > summary {
  list-style: none;
  cursor: pointer;
}

.tenant-actions-details > summary::-webkit-details-marker {
  display: none;
}

.tenant-actions-panel {
  margin-top: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--surface2);
  background: var(--surface);
  min-width: min(100%, 280px);
  max-width: 320px;
}

.tenant-actions-date {
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.tenant-leaving-form .tenant-actions-clear {
  cursor: pointer;
}

.mark-paid-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.input-compact {
  padding: 0.3rem 0.45rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  max-width: 110px;
}

.mark-paid-form .input-compact[name="reference"] {
  max-width: 90px;
}

.tenant-form .form-main input[type="text"],
.tenant-form .form-main input[type="email"],
.tenant-form .form-main input[type="date"],
.tenant-form .form-main input[type="number"],
.tenant-form .form-main select,
.tenant-form .form-aside select,
.tenant-form .form-aside input[type="date"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
}

.tenant-form .form-main input:focus,
.tenant-form .form-main select:focus,
.tenant-form .form-aside input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.2);
}

/* BS date of birth: three equal dropdowns */
.dob-bs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
  align-items: end;
}

.dob-bs-grid label {
  min-width: 0;
}

.dob-bs-grid select {
  width: 100%;
  min-height: 2.45rem;
  cursor: pointer;
  appearance: auto;
}

.read-only-banner {
  background: rgba(255, 176, 32, 0.1);
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.admin-head-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-panel {
  max-width: 960px;
}

.admin-table .role-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(61, 139, 253, 0.15);
  font-size: 0.85rem;
}

.admin-form-panel .admin-form {
  max-width: 520px;
}

.admin-form textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--surface2);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.field-static {
  margin: 0 0 1rem;
}

.mono {
  font-family: ui-monospace, monospace;
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.role-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.role-card-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.role-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.perm-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--text);
}

.perm-fieldset {
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
}

.perm-fieldset legend {
  font-weight: 600;
  padding: 0 0.35rem;
}

.perm-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.perm-checkbox input {
  margin-top: 0.2rem;
}

.admin-notice {
  background: rgba(61, 139, 253, 0.1);
  border: 1px solid rgba(61, 139, 253, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.utility-type-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.utility-pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.utility-pill.type-water {
  background: rgba(61, 139, 253, 0.18);
  color: #8ec5ff;
  border-color: rgba(61, 139, 253, 0.35);
}

.utility-pill.type-electricity {
  background: rgba(255, 176, 32, 0.18);
  color: #ffd080;
  border-color: rgba(255, 176, 32, 0.35);
}

.utility-pill.type-waste_management {
  background: rgba(52, 199, 89, 0.15);
  color: #8ee9a8;
  border-color: rgba(52, 199, 89, 0.3);
}

.utility-pill.type-other {
  background: rgba(139, 156, 179, 0.2);
  color: var(--muted);
  border-color: var(--surface2);
}

.meter-fieldset {
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0.5rem 0 1rem;
}

.meter-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.utility-link {
  font-size: 0.85rem;
  font-weight: 600;
}

.utility-table .utility-pill {
  white-space: nowrap;
}

.property-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.property-block {
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: rgba(15, 20, 25, 0.35);
}

.property-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.property-block-title {
  font-size: 1.05rem;
}

.property-block-addr {
  margin: 0.15rem 0 0;
}

.nested-units-table {
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.nested-units-table th,
.nested-units-table td {
  padding: 0.4rem 0.5rem;
}

.unit-add-form {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--surface2);
}

.form-subheading {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.tenant-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tenant-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tenant-profile-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .tenant-profile-layout {
    grid-template-columns: 1fr;
  }
}

.tenant-profile-photo-box {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--surface2);
}

.tenant-profile-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tenant-profile-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--muted);
}

.profile-dl {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr;
  gap: 0.35rem 1rem;
  font-size: 0.92rem;
}

.profile-dl dt {
  color: var(--muted);
  font-weight: 500;
}

.profile-dl dd {
  margin: 0;
}

.doc-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

@media print {
  .no-print {
    display: none !important;
  }

  .site-header,
  .site-footer,
  .read-only-banner,
  .flash-list {
    display: none !important;
  }

  .main {
    padding: 0;
    max-width: none;
  }

  body {
    background: #fff;
    color: #111;
  }

  .panel {
    break-inside: avoid;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    background: #fff;
    color: #111;
  }

  .data-table th,
  .data-table td {
    color: #111;
  }

  .muted {
    color: #444;
  }

  .stat-card {
    border: 1px solid #ccc;
    background: #f8f8f8;
    color: #111;
  }
}

/* Invoice row: email / SMS notify drawer */
.invoice-actions-cell {
  min-width: 12rem;
  vertical-align: top;
}

.invoice-notify-details {
  margin: 0.35rem 0 0.5rem;
  border: 1px solid var(--surface2, #2a3344);
  border-radius: var(--radius, 8px);
  background: rgba(0, 0, 0, 0.12);
}

.invoice-notify-summary {
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  list-style-position: inside;
}

.invoice-notify-panel {
  padding: 0.5rem 0.65rem 0.65rem;
  border-top: 1px solid var(--surface2, #2a3344);
}

.invoice-notify-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.invoice-notify-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.invoice-notify-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.invoice-notify-sms-form .invoice-notify-label {
  display: block;
  width: 100%;
}

.invoice-notify-textarea {
  width: 100%;
  max-width: 22rem;
  min-height: 2.5rem;
  font-size: 0.85rem;
}

/* ERP Professional UI layer */
.erp-body {
  --erp-bg: linear-gradient(140deg, #091427 0%, #102647 45%, #0c1b34 100%);
  --erp-surface: rgba(18, 34, 61, 0.92);
  --erp-border: rgba(108, 146, 204, 0.22);
  --erp-highlight: #5ea1ff;
  --erp-text-muted: #9bb0cc;
}

.erp-body .site-header {
  background: rgba(10, 21, 39, 0.88);
  border-bottom: 1px solid var(--erp-border);
}

.erp-brand-tag {
  font-size: 0.7rem;
  color: var(--erp-highlight);
  border: 1px solid rgba(94, 161, 255, 0.38);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  margin-left: 0.45rem;
  vertical-align: middle;
}

.nav-erp a {
  border: 1px solid transparent;
}

.nav-erp a:hover {
  border-color: rgba(94, 161, 255, 0.35);
  background: rgba(94, 161, 255, 0.08);
}

.erp-panel {
  background: var(--erp-surface);
  border: 1px solid var(--erp-border);
  border-radius: 14px;
}

.erp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
}

.erp-kpi-card {
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(31, 56, 97, 0.7), rgba(16, 33, 61, 0.8));
  border: 1px solid rgba(108, 146, 204, 0.2);
  border-radius: 12px;
}

.erp-kpi-label {
  font-size: 0.78rem;
  color: var(--erp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.erp-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
}
