@font-face {
  font-family: Vazirmatn;
  src: url("/static/fonts/vazirmatn-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Vazirmatn;
  src: url("/static/fonts/vazirmatn-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #1b2836;
  --muted: #5e6c7b;
  --line: #e4d9cc;
  --paper: #f7f3ed;
  --card: #fffdf9;
  --navy: #12324d;
  --navy-2: #1c4d73;
  --copper: #8d5a32;
  --warn-bg: #fff4ee;
  --warn: #7a341f;
  --ok: #1d6b45;
  --ok-bg: #e8f6ee;
  --danger: #8d2b2b;
  --shadow: 0 16px 40px rgba(28, 39, 49, 0.08);
  font-family: Vazirmatn, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #e6dfd4;
  color: var(--ink);
  font-family: Vazirmatn, Tahoma, sans-serif;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }

.phone {
  width: min(440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
@media (min-width: 760px) {
  body { padding: 28px 16px; }
  .phone {
    min-height: calc(100vh - 56px);
    border-radius: 28px;
    border: 1px solid #ddd3c6;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 12px;
  background: var(--navy);
  color: #f4efe6;
}
.uni { font-weight: 800; font-size: 16px; }
.office { color: #d7c4a4; font-size: 12px; margin-top: 2px; }
.langs { display: flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.langs button {
  border: 0;
  background: transparent;
  color: #efe6d8;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.langs button.on { background: #f4efe6; color: var(--navy); }

.progress { padding: 12px 16px 0; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.track { height: 6px; background: #e7dfd4; border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--copper); border-radius: 99px; }

.screen { padding: 16px 16px 28px; flex: 1; }
.warning {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #f0d2c6;
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.85;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 10px;
}
.warning p { margin: 0 0 8px; }
.warning p:last-child { margin: 0; }
h1 { font-size: 22px; line-height: 1.45; margin: 8px 0 6px; }
.lead { color: var(--muted); line-height: 1.8; margin: 0 0 14px; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 16px;
  color: var(--ink);
}
input:focus, select:focus { outline: 2px solid rgba(141, 90, 50, .25); border-color: var(--copper); }
.ltr { direction: ltr; text-align: left; }
.req { color: var(--copper); }
.field-label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  width: fit-content;
}

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--ink);
}
.seg-btn.on { background: var(--navy); color: white; border-color: var(--navy); }

.actions { display: flex; gap: 8px; margin-top: 16px; }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 15px;
}
.btn.primary { background: var(--navy); color: white; flex: 1; }
.btn.secondary { background: transparent; color: var(--navy); border: 1px solid #c9d3de; }
.btn.ghost { background: transparent; color: var(--navy-2); padding-inline: 8px; }
.btn:disabled { opacity: .55; }

.drop {
  border: 1.5px dashed #d3c4b2;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}
.drop img {
  width: 148px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  background: #efe8de;
  margin-bottom: 10px;
}
.drop img.wide { width: 100%; height: 190px; object-fit: contain; background: #1b2836; }
.file-btn {
  display: inline-flex;
  margin-top: 8px;
  background: var(--navy);
  color: white;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
}
.error {
  background: #fdecec;
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
  line-height: 1.7;
  font-size: 13px;
}
.check {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  line-height: 1.7;
}
.check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 0;
  padding: 0;
  flex: 0 0 22px;
}

.kv { display: grid; grid-template-columns: 112px 1fr; gap: 6px 10px; font-size: 14px; }
.kv span { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}
.amount { font-size: 34px; font-weight: 800; margin: 6px 0; letter-spacing: -0.03em; }
.amount small { font-size: 14px; font-weight: 700; margin-inline-start: 6px; }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}
.badge.due { background: #fff1e4; color: #8a4b12; }
.badge.unknown { background: #eef1f4; color: #526170; }
.badge.settled { background: var(--ok-bg); color: var(--ok); }
.sheba {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  background: #f3eee6;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0 12px;
}
.sheba b { direction: ltr; font-size: 18px; letter-spacing: .04em; }
.section { margin: 16px 0 8px; font-size: 13px; color: var(--copper); font-weight: 800; }
.history-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.history-row:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.history-row img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  background: #efe8de;
  flex: 0 0 72px;
}
.history-row .lead { margin: 2px 0; }
.auth-card { margin-top: 18px; }
