/* FBC Master Data view — standalone page styles (reuses app.css theme vars). */
.master-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg, #f4f6f8);
  color: var(--fg, #1a1f2b);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.master-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel, #ffffff);
  border-bottom: 1px solid var(--border, #e5e9f0);
  position: sticky;
  top: 0;
  z-index: 5;
}

.master-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #1f4e79;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.master-brand__text {
  font-weight: 600;
  font-size: 15px;
}

.master-actions {
  display: flex;
  gap: 8px;
}

.master-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

.master-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.master-tab {
  border: 1px solid var(--border, #e5e9f0);
  background: var(--panel, #ffffff);
  color: var(--fg-muted, #5d7684);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.master-tab:hover {
  border-color: #1f4e79;
  color: #1f4e79;
}

.master-tab.is-active {
  background: #1f4e79;
  border-color: #1f4e79;
  color: #fff;
}

.master-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.master-toolbar .input {
  flex: 0 1 420px;
}

.master-hint {
  color: var(--fg-muted, #5d7684);
  font-size: 12px;
}

.master-meta {
  color: var(--fg-muted, #5d7684);
  font-size: 12px;
  margin-bottom: 10px;
  min-height: 16px;
}

.master-table-wrap {
  background: var(--panel, #ffffff);
  border: 1px solid var(--border, #e5e9f0);
  border-radius: 10px;
  overflow: auto;
}

.master-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.master-table th {
  position: sticky;
  top: 0;
  background: #f7f9fb;
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #5d7684;
  border-bottom: 1px solid var(--border, #e5e9f0);
  white-space: nowrap;
}

.master-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
  white-space: nowrap;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-table td[data-col="Description"],
.master-table td[data-col="description"] {
  white-space: normal;
  max-width: 520px;
}

.master-table tbody tr:hover {
  background: #f4f8fb;
}

.master-table .num,
.master-table td[data-col="rate"],
.master-table td[data-col="Amount"],
.master-table td[data-col="total"],
.master-table td[data-col="StandardPrice"],
.master-table td[data-col="MRP"],
.master-table td[data-col="SpecialProjectPrice"],
.master-table td[data-col="LandingPrice"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  .master-body {
    background: #12151c;
    color: #e6e9ef;
  }
  .master-topbar, .master-table-wrap, .master-tab {
    background: #1a1f2b;
    border-color: #2a3040;
  }
  .master-table th { background: #1e2432; }
  .master-table td { border-color: #222839; }
  .master-table tbody tr:hover { background: #1e2432; }
}
