:root {
  --bg-1: #020617;
  --bg-2: #0f172a;
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f8fafc;
  --text-soft: #dbeafe;
  --text-muted: #94a3b8;
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-bg-2: rgba(255, 255, 255, 0.12);
  --input-border: rgba(255, 255, 255, 0.16);
  --focus: rgba(56, 189, 248, 0.55);
  --danger: #ef4444;
  --success: #22c55e;
}

html,
body {
  min-height: 100%;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.glass {
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.42);
}

.panel {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.panel-soft {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.2rem;
}

.text-main {
  color: var(--text);
}

.text-soft {
  color: var(--text-soft);
}

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

.label {
  display: block;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.input,
.textarea,
.select {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: #ffffff;
  padding: 0.9rem 1rem;
  outline: none;
  transition: 0.18s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #aebed1;
}

.input:hover,
.textarea:hover,
.select:hover {
  background: var(--input-bg-2);
  border-color: rgba(255, 255, 255, 0.22);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  background: rgba(255, 255, 255, 0.11);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #cbd5e1 50%),
    linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.8rem;
}

.select option {
  background: #0f172a;
  color: #ffffff;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #ffffff;
  -webkit-box-shadow: 0 0 0px 1000px #182338 inset;
  transition: background-color 5000s ease-in-out 0s;
  border: 1px solid var(--input-border);
}

input[type="file"] {
  width: 100%;
  color: #e2e8f0;
  background: transparent;
}

input[type="file"]::file-selector-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  padding: 0.72rem 1rem;
  border-radius: 0.9rem;
  margin-right: 0.85rem;
  cursor: pointer;
  transition: 0.18s ease;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: 0.18s ease;
  cursor: pointer;
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, #d946ef 0%, #22d3ee 100%);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.16);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-dark {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-dark:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.20);
}

.btn-danger {
  color: white;
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.34);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
}

.link-clean {
  color: #e2e8f0;
  text-decoration: none;
  transition: 0.18s ease;
}

.link-clean:hover {
  color: #ffffff;
  opacity: 1;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.table th {
  text-align: left;
  font-size: 0.84rem;
  color: #cbd5e1;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.95rem 1rem;
}

.table td {
  color: #f8fafc;
  padding: 0.95rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-admin {
  background: rgba(168, 85, 247, 0.18);
  color: #f0abfc;
  border: 1px solid rgba(168, 85, 247, 0.26);
}

.badge-user {
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.22);
}

.badge-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.badge-off {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.24);
}

.notice {
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 600;
}

.notice-success {
  background: rgba(34, 197, 94, 0.10);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.24);
}

.notice-error {
  background: rgba(239, 68, 68, 0.10);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.24);
}

hr.soft {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 1.25rem 0;
}

.avatar-ring {
  border-radius: 1.25rem;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.2rem;
  padding: 1rem;
}

@media (max-width: 900px) {
  .table th,
  .table td {
    white-space: nowrap;
  }
}