:root {
  --blue: #0f73c3;
  --royal: #002878;
  --ink: #1c242b;
  --muted: #6a7b84;
  --line: #d5dee6;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: #f6f7f8;
  color: var(--ink);
  font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  background: #5c6166;
  color: #fff;
  border-bottom: 3px solid #ed8922;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar a,
.toolbar button {
  font-family: inherit;
  font-size: 14px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toolbar a {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.toolbar a.home { border-color: #ed8922; }

.toolbar button {
  background: #ed8922;
  color: #1e1810;
  border-color: #ed8922;
  font-weight: 700;
}

.toolbar .short { display: none; }

.sheet {
  max-width: 210mm;
  margin: 22px auto 40px;
  background: var(--paper);
  box-shadow: 0 10px 40px rgba(58, 58, 58, 0.14);
}

.mast {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #5c6166;
  color: #fff;
  padding: 22px 22px 18px;
  border-bottom: 6px solid #ed8922;
}

.brand {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px 12px;
}

.rasam-mark {
  height: 52px;
  width: auto;
  max-width: 100%;
  display: block;
}

.doc-kicker {
  margin: 14px 0 0;
  font-size: 12px;
  color: #f6efe6;
}

h1 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
}

.lead {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: #f7f4f1;
  max-width: 62em;
}

.body { padding: 16px 20px 24px; }

h2 {
  margin: 18px 0 8px;
  font-size: 16px;
  color: var(--royal);
  border-inline-start: 4px solid var(--blue);
  padding-inline-start: 10px;
  line-height: 1.4;
}

.void {
  background: #fde8e8;
  border: 2px solid #a72123;
  color: #8d1517;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.85;
}

.steps { margin: 0 0 16px; padding-inline-start: 1.3em; }
.steps li { margin: 0 0 6px; }

.snap-form { margin-top: 8px; display: grid; gap: 10px; max-width: 32em; }
.field { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.field input {
  font: inherit;
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  background: #fff;
}

.pick {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  background: #5c6166;
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
}

#snap-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.file-name { margin-top: 10px; color: var(--muted); }
.snap-msg { min-height: 1.4em; font-weight: 700; }
.snap-msg.bad { color: #a72123; }
.snap-msg.ok { color: #3d6b12; }

button.send {
  justify-self: start;
  background: #ed8922;
  color: #1e1810;
  font-family: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 6px;
  padding: 10px 18px;
  cursor: pointer;
}

button.send:disabled { opacity: 0.6; cursor: wait; }

@media screen and (max-width: 1024px) {
  .sheet { margin: 12px 12px 28px; }
  .mast { padding: 16px 14px 14px; }
  .body { padding: 14px 12px 22px; }
  h1 { font-size: 20px; }
}

@media screen and (max-width: 720px) {
  .toolbar { padding: 6px 8px; }
  .toolbar-actions { flex-wrap: nowrap; width: 100%; gap: 6px; }
  .toolbar-actions a,
  .toolbar-actions button {
    flex: 1 1 0;
    min-height: 0;
    padding: 4px 4px;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
  }
  .toolbar .long { display: none; }
  .toolbar .short { display: inline; }
  .rasam-mark { height: 42px; }
  .lead, p { font-size: 14px; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .sheet { margin: 0; box-shadow: none; max-width: none; }
}
