:root {
  --bg: #0f1115;
  --panel: #1a1d24;
  --panel-2: #21252e;
  --border: #2c313c;
  --text: #e6e9ef;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --accent-hover: #6a9eff;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warn: #f39c12;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, #1a2030 0%, var(--bg) 55%);
  color: var(--text);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ---------- ورود ---------- */
.login-card {
  max-width: 420px;
  margin: 8vh auto 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.login-card p.subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}

input[type="file"] {
  padding: 8px 10px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover {
  background: var(--panel-2);
  border-color: var(--accent);
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- داشبورد ---------- */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.dashboard-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.dashboard-header .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.card p.desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.version-display {
  margin-top: 16px;
  padding: 16px 18px;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.version-label {
  font-size: 13px;
  color: var(--muted);
}

.version-value {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
  direction: ltr;
}

.version-value.empty {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.version-value.loading {
  color: var(--warn);
  font-size: 14px;
}

.result-box {
  margin-top: 16px;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 12.5px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
}

.result-box.success { color: var(--success); border-color: rgba(46, 204, 113, 0.35); }
.result-box.error   { color: var(--danger);  border-color: rgba(231, 76, 60, 0.35); }
.result-box.loading { color: var(--warn); }

.file-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  direction: ltr;
  text-align: right;
}

.inline-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.hidden { display: none !important; }

footer {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
