:root {
  --gold: #d4af37;
  --gold-soft: #e9cd6b;
  --bg-1: #0e0e11;
  --bg-2: #17171c;
  --panel: #1c1c22;
  --text: #f0ead9;
  --muted: #9a9488;
  --danger: #c0392b;
  --ok: #2e8b57;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, var(--bg-2), var(--bg-1));
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  direction: rtl;
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: fade-in 0.35s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.container { max-width: 960px; margin: 0 auto; width: 100%; flex: 1; }

h1, h2 { color: var(--gold-soft); }
h1 { font-size: 22px; }
h2 { font-size: 17px; margin-bottom: 4px; }

.subtitle { color: var(--muted); font-size: 13px; margin: -2px 0 16px; }

.panel {
  background: var(--panel);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.panel:hover { border-color: rgba(212, 175, 55, 0.4); }

.auth-box {
  max-width: 380px;
  margin: 60px auto;
}

label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }

.helper-text { font-size: 12px; color: var(--muted); margin: -8px 0 12px; line-height: 1.6; }

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.field-row { display: flex; align-items: center; gap: 8px; }
.field-row input { flex: 1; }

.icon-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  background: var(--bg-2);
  display: block;
}

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--gold);
  color: #1a1a1f;
  font-weight: 700;
  margin-top: 14px;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(212, 175, 55, 0.25); }
button:active, .btn:active { transform: translateY(0); }

button.secondary { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
button.secondary:hover { box-shadow: 0 6px 16px rgba(212, 175, 55, 0.12); }
button.danger { background: var(--danger); color: #fff; }
button.ok { background: var(--ok); color: #fff; }

.msg { margin-top: 10px; font-size: 13px; }
.msg.error { color: #e57373; }
.msg.success { color: #81c784; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
th, td { padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: right; }
th { color: var(--muted); font-weight: 600; }
tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(212, 175, 55, 0.04); }

.card-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}
.card-item:hover { border-color: rgba(212, 175, 55, 0.3); }
.card-item .row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; }
.tag.active { background: rgba(46,139,87,0.2); color: #81c784; }
.tag.inactive { background: rgba(192,57,43,0.2); color: #e57373; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

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

.site-footer {
  max-width: 960px;
  margin: 40px auto 0;
  width: 100%;
  text-align: center;
  padding: 20px 0 4px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sep { margin: 0 8px; opacity: 0.5; }
.site-footer .copyright { margin-top: 6px; font-size: 11px; opacity: 0.7; }
