:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --primary: #0b57d0;
  --primary-dark: #0842a0;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #059669;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #ecfeff 100%);
  color: var(--text);
}

.container {
  max-width: 420px;
  margin: 48px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.15);
}

button,
.button {
  display: inline-block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

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

button.secondary {
  background: #eef2ff;
  color: var(--primary);
}

.message {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  display: none;
}

.message.error {
  display: block;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.message.success {
  display: block;
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

.footer-link {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-layout {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 16px 40px;
}

.admin-layout-wide {
  max-width: 1100px;
}

.admin-section {
  margin-bottom: 28px;
}

.admin-section h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.section-subtitle {
  margin: 0 0 16px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 400;
}

.admin-form textarea {
  resize: vertical;
  min-height: 80px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.payment-upload {
  margin-bottom: 16px;
}

.payment-qr-preview {
  display: block;
  margin-top: 12px;
  max-width: 280px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-header button {
  width: auto;
  padding: 10px 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge.admin {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.user {
  background: #f3f4f6;
  color: #374151;
}

.badge.active {
  background: #dcfce7;
  color: #166534;
}

.badge.inactive {
  background: #fee2e2;
  color: #991b1b;
}

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

.actions button {
  width: auto;
  padding: 8px 10px;
  font-size: 0.85rem;
}

.actions button.danger {
  background: var(--danger);
}

.actions button.primary {
  background: var(--primary);
  color: #fff;
}

.payment-container {
  max-width: 520px;
}

.payment-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.payment-row:last-child {
  border-bottom: none;
}

.payment-row span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.payment-row span:last-child {
  text-align: right;
  font-weight: 600;
}

.payment-note {
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.92rem;
  line-height: 1.5;
}

.loading-text {
  color: var(--muted);
  margin: 0;
}

.payment-qr {
  margin-top: 16px;
  text-align: center;
}

.payment-qr img {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
