:root {
  --bg-app: #121317;
  --surface-1: #1e2025;
  --surface-2: #26282f;
  --surface-3: #2e3138;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --text-hi: #f3f4f6;
  --text-mid: #9a9fac;
  --text-low: #6b707c;
  --accent: #6366f1;
  --accent-hover: #7678f4;
  --accent-wash: rgba(99, 102, 241, 0.14);
  --danger: #f2545b;
  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--text-hi);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

body.dashboard-body {
  display: block;
  padding: 0;
}

h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

p {
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.55;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand .icon {
  color: var(--accent);
}

.brand-logo {
  display: block;
  height: 18px;
  width: auto;
}

.auth-card {
  background: var(--surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-card .brand-logo {
  height: 40px;
  margin: 0 auto 16px;
}

.auth-account {
  font-weight: 600;
  font-size: 14.5px;
  background: var(--accent-wash);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin: 14px 0 20px;
  color: var(--text-hi);
}

.auth-switch {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-low);
  font-size: 12.5px;
  text-decoration: none;
}

.auth-switch:hover {
  color: var(--text-hi);
}

form {
  text-align: left;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  margin: 14px 0 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  color: var(--text-hi);
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-ui);
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  color: var(--text-hi);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-ui);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  background: var(--surface-3);
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 10px;
}

.btn-primary {
  display: block;
  width: 100%;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 18px;
  text-align: center;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 1.2em;
}

.form-footer {
  text-align: center;
  font-size: 13px;
  margin-top: 18px;
  color: var(--text-mid);
}

.form-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Dashboard ---------- */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-header h1 {
  font-size: 16px;
}

.dash-header .dash-user {
  font-size: 13px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 24px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.file-item .file-title {
  flex: 1;
  font-weight: 500;
}

.file-item .file-date {
  font-size: 12.5px;
  color: var(--text-low);
}

.file-item button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-mid);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
}

.file-item button:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.files-empty {
  color: var(--text-low);
  font-size: 14px;
  margin-top: 24px;
}

/* ---------- Admin ---------- */

.admin-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex: none;
}

.admin-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.admin-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-medium);
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease;
}

.admin-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-hi);
  border-radius: 50%;
  transition: transform 120ms ease;
}

.admin-toggle input:checked + .admin-toggle-slider {
  background: var(--accent);
}

.admin-toggle input:checked + .admin-toggle-slider::before {
  transform: translateX(16px);
}

.admin-toggle input:disabled + .admin-toggle-slider {
  opacity: 0.5;
  cursor: default;
}
