:root {
  --ink: #16283f;
  --muted: #627086;
  --line: #dbe3ee;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --blue: #1B2A6B;
  --blue-dark: #12204F;
  --gold: #b48a3c;
  --cyan: #3355A6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--wash);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
  color: var(--blue);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 520px);
}

.auth-panel {
  background: var(--paper);
  border-top: 4px solid var(--cyan);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.brand-mark {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  
}

h1,
h2 {
  margin: 8px 0 0;
  line-height: 1.15;
}

.auth-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.magic-form {
  margin-top: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  font: inherit;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 11px 12px;
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 12px 16px;
}

button:hover {
  background: var(--blue-dark);
}

.status {
  min-height: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost-button:hover {
  background: var(--wash);
}

.dashboard {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 48px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.summary-band > div {
  background: var(--paper);
  padding: 20px;
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  
}

.table-section {
  margin-top: 28px;
}

.section-head {
  margin-bottom: 12px;
}

.resource-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

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

.resource-table th {
  background: #f9fbfe;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  
}

.resource-table tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-block;
  border: 1px solid #c8e3d4;
  border-radius: 999px;
  color: #247044;
  background: #eef9f2;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
}

.pill-paid {
  border-color: #b6d4ea;
  background: #eef6fc;
  color: #155f8c;
}

.pill-unpaid {
  border-color: #e5d5aa;
  background: #fff8e8;
  color: #805f17;
}

.pill-void {
  border-color: #d9dde5;
  background: #f3f5f8;
  color: #596475;
}

.invoice-status-editor {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 190px;
}

.invoice-status-editor input,
.invoice-status-editor select {
  font-size: 13px;
  padding: 9px 10px;
}

.save-invoice-status {
  min-width: 74px;
  padding: 9px 12px;
}

.row-status {
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
  margin-top: 7px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

@media (max-width: 700px) {
  .field-row,
  .summary-band {
    grid-template-columns: 1fr;
  }

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

.brand-logo{display:block;margin:0 auto 16px;max-height:64px;width:auto}
