:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #ecf2ff;
  background: #0f172a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a, #111c35);
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

h1, h2 {
  margin-top: 0;
}

.card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #253256;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.login-box {
  max-width: 420px;
  margin: 70px auto;
}

.hidden {
  display: none;
}

.grid {
  display: grid;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.gap-12 {
  gap: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  display: grid;
  gap: 6px;
}

.stat-card strong {
  font-size: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.wrap {
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.invoice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.invoice-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #27365c;
  vertical-align: middle;
}

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #33446f;
  background: #111a31;
  color: #fff;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

button {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #3b82f6;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #263454;
}

button.warning {
  background: #a16207;
}

button.danger {
  background: #b91c1c;
}

.table-btn {
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 88px;
}

.action-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: #9fb0d5;
}

.error {
  color: #ff8da1;
}

@media (max-width: 900px) {
  .two-cols,
  .stats,
  .invoice-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}