:root {
  --bg: #0f0d16;
  --surface: #17131f;
  --surface-alt: #1f1b2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f2eefb;
  --text-muted: #9c93b8;
  --accent-a: #7c5cff;
  --accent-b: #ff5c8a;
  --success: #34d399;
  --danger: #ff5c8a;
  --warning: #ffb86b;
  --radius: 12px;
}

* { box-sizing: border-box; }

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

a { color: var(--accent-a); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
}
.brand .orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  flex-shrink: 0;
}

.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
  border-color: transparent;
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(124, 92, 255, 0.55);
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: #fff;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-danger {
  background: transparent;
  border: 1px solid rgba(255, 92, 138, 0.35);
  color: var(--danger);
}
.btn-sm { padding: 6px 10px; font-size: 12.5px; }

.error-box {
  font-size: 12.5px;
  color: var(--danger);
  background: rgba(255, 92, 138, 0.1);
  border: 1px solid rgba(255, 92, 138, 0.25);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.topbar .right { display: flex; align-items: center; gap: 12px; }
.topbar .email { font-size: 13px; color: var(--text-muted); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-card .label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; }
tr:last-child td { border-bottom: none; }

.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-user { background: rgba(156, 147, 184, 0.15); color: var(--text-muted); }
.badge-manager { background: rgba(255, 184, 108, 0.15); color: var(--warning); }
.badge-admin { background: rgba(255, 92, 138, 0.15); color: var(--danger); }

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
}

.muted { color: var(--text-muted); }
.hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  width: 100%;
  max-width: 360px;
}
