/* MinerTools shared foundation — UI v7.1.0 */
@font-face {
  font-family: "IRANSansX";
  src: url("/static/assets/fonts/iransansx/iransansx-body-regular-400.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/static/assets/fonts/iransansx/iransansx-heading-bold-700.woff") format("woff");
  font-weight: 700 950;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #111b2d;
  --surface-2: #17243a;
  --surface-3: #1e2e47;
  --text: #edf4ff;
  --muted: #91a6bf;
  --line: rgba(148, 163, 184, 0.18);
  --brand: #3b82f6;
  --brand-strong: #176fe3;
  --success: #19a974;
  --warning: #d9911e;
  --danger: #dc5364;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.14);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --surface-3: #eaf1f8;
  --text: #122234;
  --muted: #667b90;
  --line: rgba(48, 76, 101, 0.14);
  --brand: #2383ed;
  --brand-strong: #086bd2;
  --success: #11875f;
  --warning: #a96708;
  --danger: #c4384b;
  --shadow-soft: 0 10px 28px rgba(30, 61, 87, 0.08);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "IRANSansX", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.75;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, h4, p { margin-block-start: 0; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.45; }
p { color: var(--muted); line-height: 1.9; }
[hidden] { display: none; }
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 82% 7%, rgba(59, 130, 246, .12), transparent 30%);
}
.site-container {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
  padding-block: 24px 32px;
}
.dashboard-body .site-container { width: 100%; max-width: none; padding: 0; }
.alerts { display: grid; gap: 8px; margin: 16px; }
.alert { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-weight: 700; }
.alert.success { color: var(--success); }
.alert.error { color: var(--danger); }
.login-card {
  width: min(460px, 100%);
  margin: 8vh auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.login-card h1 { margin-bottom: 8px; font-size: 26px; }
.brand-dot { width: 14px; height: 14px; margin-bottom: 16px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 16%, transparent); }

.login-card .form-stack { display: grid; gap: 16px; min-width: 0; }
.login-card .form-stack label { display: grid; gap: 8px; min-width: 0; color: var(--text); font-size: 13px; font-weight: 700; }
.login-card input,
.login-card textarea,
.login-card select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  outline: 0;
}
.login-card input, .login-card select { min-height: 44px; padding-inline: 12px; }
.login-card textarea { min-height: 96px; padding: 10px 12px; resize: vertical; }
.login-card input:focus, .login-card textarea:focus, .login-card select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 17%, transparent); }
.login-card .primary-btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding-inline: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}
.login-card .primary-btn:hover { background: var(--brand-strong); }
.legal-footer { margin-top: 24px; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-copy { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer-version { direction: ltr; unicode-bidi: isolate; }
.footer-socials { display: flex; gap: 8px; }
.footer-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--brand); text-decoration: none; }
.footer-icon .ti,
.footer-icon img,
.footer-icon .footer-social-mark { width: 18px; height: 18px; object-fit: contain; font-size: 18px; }
.footer-social-mark { display: block; width: 17px; height: 17px; background: currentColor; mask: center / contain no-repeat; -webkit-mask: center / contain no-repeat; }
.footer-social-mark--bale { mask-image: url('../assets/icons/bale.svg'); -webkit-mask-image: url('../assets/icons/bale.svg'); }
.footer-social-mark--rubika { mask-image: url('../assets/icons/rubika.svg'); -webkit-mask-image: url('../assets/icons/rubika.svg'); }
.dashboard-body .legal-footer { display: none; }
@media (max-width: 680px) {
  .site-container { width: min(100% - 24px, 1200px); padding-block: 12px 24px; }
  .login-card { padding: 20px; border-radius: 16px; }
  .legal-footer { align-items: flex-start; flex-direction: column; }
}
