@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0D1B2A;
  --navy2: #13253A;
  --teal: #00A896;
  --gold: #E8B84B;
  --red: #E53935;
  --line: rgba(255,255,255,.08);
  --muted: #9aa5b1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--navy);
  color: #fff;
  direction: rtl;
  min-height: 100vh;
}

::-webkit-scrollbar { height: 6px; width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

a { color: inherit; }

/* ---------- Login page ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--navy2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.login-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--teal);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.login-brand .name { font-weight: 700; font-size: 15px; }
.login-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--navy); color: #fff; font-family: inherit; font-size: 14px;
}
.field input:focus { outline: none; border-color: var(--teal); }
.btn-primary {
  width: 100%; padding: 12px; border-radius: 10px; border: none; background: var(--teal);
  color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; margin-top: 6px;
  font-family: inherit;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.error-box {
  background: rgba(229,57,53,.12); border: 1px solid var(--red); color: #ffb3b0;
  border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; display: none;
}

/* ---------- Dashboard shell ---------- */
.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; max-width: 880px; margin: 0 auto;
}
.top-bar .brand { display: flex; align-items: center; gap: 10px; }
.top-bar .brand .mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--teal);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
}
.top-bar .brand .name { font-size: 14px; font-weight: 700; }
.top-bar .who { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.top-bar button.link {
  background: transparent; border: none; color: var(--muted); cursor: pointer; font-family: inherit;
  font-size: 12.5px; text-decoration: underline;
}

.container { max-width: 880px; margin: 0 auto; padding: 8px 20px 60px; }

.page-title { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.page-sub { font-size: 14px; color: var(--muted); margin-bottom: 26px; max-width: 560px; line-height: 1.9; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile {
  background: var(--navy2); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  cursor: pointer; color: #fff; display: flex; flex-direction: column; gap: 14px; min-height: 168px;
  transition: transform .15s, border-color .15s; text-align: right;
}
.tile:hover { transform: translateY(-3px); }
.tile .row-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tile .icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.tile .title { font-size: 18px; font-weight: 800; }
.tile .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile .stat { font-size: 12.5px; font-weight: 700; margin-top: auto; }

.back-link {
  display: flex; align-items: center; gap: 6px; background: transparent; border: none;
  color: var(--muted); font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 14px; font-family: inherit;
}
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.section-head .bar { width: 8px; height: 26px; border-radius: 4px; }
.section-head .title { font-size: 21px; font-weight: 800; }
.section-head .sub { font-size: 12.5px; color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; white-space: nowrap; }

.day-card { background: var(--navy2); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.day-card .day-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px;
  background: transparent; border: none; cursor: pointer; color: #fff; font-family: inherit; font-weight: 700; font-size: 14.5px;
}
.day-card .day-body { padding: 0 18px 18px; display: none; flex-direction: column; gap: 10px; }
.day-card .day-body.open { display: flex; }
.post-row { background: var(--navy); border-radius: 10px; padding: 12px; }
.post-row .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.post-row .badges { display: flex; gap: 6px; }
.post-row .title { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.copy-link {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e4e1d8; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; cursor: pointer; color: #1b2430; width: 100%; text-align: right;
  direction: ltr; justify-content: space-between; font-family: monospace;
}

.status-picker { display: flex; gap: 4px; flex-wrap: wrap; }
.status-picker button {
  font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: #aab; cursor: pointer; font-family: inherit;
}
.status-picker button.active { border: none; color: #fff; }

.weekday-tabs { display: flex; gap: 8px; margin: 18px 0 22px; overflow-x: auto; padding-bottom: 6px; }
.weekday-tabs button {
  padding: 9px 16px; border-radius: 999px; white-space: nowrap; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: transparent; color: #c7ccd3; cursor: pointer; font-family: inherit;
}
.weekday-tabs button.active { border: none; background: #C13584; color: #fff; }
.weekday-tabs button.off { color: #556; }

.slide-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.slide-card { width: 168px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.slide-box {
  width: 168px; aspect-ratio: 9 / 16; border-radius: 16px; position: relative;
  background: linear-gradient(165deg, var(--navy2), var(--navy));
  border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; padding: 12px;
}
.slide-box .top-strip { position: absolute; top: 10px; right: 10px; left: 10px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.15); }
.slide-box .top-strip .fill { width: 100%; height: 100%; border-radius: 3px; }
.slide-box .head { color: #fff; font-weight: 800; font-size: 12.5px; margin-top: 10px; line-height: 1.6; }
.slide-box .body { color: #c7ccd3; font-size: 10.5px; margin-top: 8px; line-height: 1.8; white-space: pre-line; overflow: hidden; }
.slide-box .poll { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.slide-box .poll div { background: rgba(255,255,255,.92); border-radius: 6px; padding: 4px 8px; font-size: 9.5px; color: #1b2430; font-weight: 600; }
.chain-arrow { display: flex; align-items: center; color: #556; flex-shrink: 0; }

.rest-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: #778; }
.rest-state .big { font-size: 30px; }
.rest-state .t1 { font-size: 15px; font-weight: 700; }
.rest-state .t2 { font-size: 12.5px; }

.reel-card { background: var(--navy2); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; margin-bottom: 12px; }
.reel-head { width: 100%; padding: 16px 18px; background: transparent; border: none; cursor: pointer; text-align: right; font-family: inherit; }
.reel-head .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.reel-head .title { font-size: 15px; font-weight: 800; color: #fff; }
.reel-head .fmt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.reel-body { padding: 0 18px 18px; display: none; flex-direction: column; gap: 14px; }
.reel-body.open { display: flex; }
.reel-label { font-size: 11.5px; color: var(--gold); font-weight: 700; margin-bottom: 4px; }
.reel-flow div { font-size: 12.5px; color: #c7ccd3; display: flex; gap: 8px; margin-bottom: 6px; }
.reel-flow div span.dash { color: #556; }

.notice {
  background: rgba(232,184,75,.1); border: 1px solid var(--gold); border-radius: 12px; padding: 14px;
  font-size: 12.5px; color: #f0d99a; line-height: 2; margin: 18px 0 20px;
}

.notes-box { background: var(--navy2); border-radius: 14px; padding: 16px; border: 1px solid var(--line); }
.notes-box textarea {
  width: 100%; min-height: 80px; background: var(--navy); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; color: #fff; font-size: 13px; font-family: inherit; resize: vertical;
}
.notes-box .save-btn {
  margin-top: 10px; background: var(--teal); color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-box { background: var(--navy2); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: 100%; max-width: 360px; }
.modal-box h3 { margin: 0 0 16px; font-size: 16px; }
.modal-box .actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-box .actions button { flex: 1; padding: 10px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; }
.modal-box .actions .cancel { background: transparent; border: 1px solid var(--line); color: #ccc; }
.modal-box .actions .confirm { background: var(--teal); color: #fff; }

.footnote { margin-top: 40px; font-size: 11px; color: #556; text-align: center; line-height: 2; }
