:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f5ff;
  --text: #12223a;
  --muted: #5c6b82;
  --primary: #ff4f7a;
  --primary-dark: #d9315f;
  --teal: #11b6a7;
  --danger: #e44747;
  --border: #dce4f1;
  --shadow: 0 10px 30px rgba(18, 34, 58, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(255, 79, 122, 0.15), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(17, 182, 167, 0.15), transparent 35%),
    var(--bg);
  min-height: 100vh;
}

.container {
  width: min(1050px, 92vw);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.balance {
  background: linear-gradient(135deg, #ff4f7a, #ff7c57);
  color: #fff;
  border: none;
}

.balance .amount {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-top: 8px;
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

textarea { min-height: 90px; resize: vertical; }

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

button, .btn {
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover { background: var(--primary-dark); }

.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.danger, .danger {
  background: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ebfff7;
  border: 1px solid #b5f3dc;
  color: #176348;
}

.error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffeded;
  border: 1px solid #ffc8c8;
  color: #9c1d1d;
}

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

.muted { color: var(--muted); }

.auth-wrap {
  width: min(420px, 92vw);
  margin: 8vh auto 0;
}

.small {
  font-size: 0.83rem;
}

@media (max-width: 700px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
