/* STLIC Poruke – green #00763A, dark #0B3D2A, gold #B09872 */
:root {
  --ink: #1B2420; --muted: #5B6660; --line: #E1E6E2; --line2: #EEF1EF; --bg: #F5F6F3;
  --green: #00763A; --green-d: #005A2C; --green-t: #E3F1E9; --green-ink: #00552A;
  --dark: #0B3D2A; --gold: #B09872; --gold-l: #C9B48E;
  --warn-bg: #FDF1E7; --warn-ink: #6A3412; --warn-line: #E8B98F;
  --bad-bg: #FBE9E7; --bad-ink: #8C1D18; --gray-bg: #ECEDEC; --gray-ink: #3E4A44;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--green); } a:hover { color: var(--green-d); }
h1 { margin: 0; font-size: 26px; font-weight: 700; }
h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.sr-only { position: absolute; left: -9999px; }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--dark); padding: 24px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 20px; color: #fff; text-decoration: none; }
.brand .mark { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.brand .mark img { width: 30px; height: 30px; }
.brand b { display: block; font-size: 15px; } .brand span { color: #C9D8CF; font-size: 12px; }
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #E4EDE8; text-decoration: none; }
.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.nav .badge { margin-left: auto; background: var(--gold); color: var(--dark); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 14px 12px; border-radius: 10px; background: rgba(255,255,255,.07); color: #E4EDE8; font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.side-foot .signout button { background: none; border: 0; color: #C9D8CF; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.meter > div { height: 6px; background: var(--gold-l); }

.main { flex: 999 1 560px; min-width: 0; padding: 28px 36px; }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.head .grow { flex: 1 1 260px; }
.head p { margin: 4px 0 0; color: var(--muted); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.pad { padding: 18px 20px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .k { font-size: 13px; color: var(--muted); } .stat .v { font-size: 28px; font-weight: 700; margin-top: 4px; }
.bar { display: flex; height: 8px; border-radius: 4px; background: var(--line2); overflow: hidden; margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; font: 600 15px inherit; font-family: inherit; text-decoration: none; border: 1px solid #CBD3CE; background: #fff; color: var(--ink); cursor: pointer; }
.btn:hover { background: #F0F3F1; color: var(--ink); }
.btn.pri { background: var(--green); border-color: var(--green); color: #fff; }
.btn.pri:hover { background: var(--green-d); }
.btn.danger { color: var(--bad-ink); border-color: #E6B5B0; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] { background: #E4E8E5; border-color: #E4E8E5; color: var(--muted); cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr.sel td { background: #EEF5F1; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.sortlink { color: var(--gray-ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; min-height: 32px; }
.namelink { font-weight: 600; color: var(--green-ink); }

.pill { display: inline-block; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.good { background: var(--green-t); color: var(--green-ink); }
.pill.neutral { background: #EDF0EE; color: var(--gray-ink); }
.pill.warn { background: var(--warn-bg); color: #7A3D0E; }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.muted { background: var(--gray-bg); color: var(--gray-ink); }
.pill.off { background: #F3F4F2; color: var(--muted); }
.kw { font: 600 12px ui-monospace, Menlo, monospace; background: #EEF5F1; color: var(--green-ink); border-radius: 6px; padding: 3px 8px; }
.bg-good { background: var(--green); } .bg-neutral { background: #8FA59A; } .bg-warn { background: #D9822B; } .bg-bad { background: #B3261E; } .bg-muted { background: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid #CBD3CE; background: #fff; color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none; }
.chip.on { background: var(--dark); border-color: var(--dark); color: #fff; }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.alert.success { background: var(--green-t); color: var(--green-ink); }
.alert.info, .alert.debug { background: #EDF0EE; color: var(--gray-ink); }
.alert.warning { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.alert.error { background: var(--bad-bg); color: var(--bad-ink); }

/* forms */
label, .lbl { font-weight: 600; font-size: 13px; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=number], input[type=password],
input[type=datetime-local], input[type=time], select, textarea {
  font: 15px inherit; font-family: inherit; color: var(--ink); border: 1px solid #CBD3CE; border-radius: 8px; padding: 9px 12px; background: #fff; min-height: 44px; max-width: 100%;
}
textarea { width: 100%; line-height: 1.5; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field .help { font-size: 12px; color: var(--muted); }
.errorlist { margin: 0; padding: 0; list-style: none; color: var(--bad-ink); font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid #CBD3CE; border-radius: 999px; font-weight: 600; background: #fff; cursor: pointer; }
.checks input:checked + span { color: var(--green-ink); }
.checks label:has(input:checked) { background: var(--green-t); border-color: #9CCBB0; }
.checks.ex label:has(input:checked) { background: #F6EFE3; border-color: #D9C39B; }
.inline-radios { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.inline-radios label { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 500; font-size: 14px; }

.two { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.two > .a { flex: 999 1 520px; min-width: 0; }
.two > .b { flex: 1 1 320px; min-width: 0; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 700; }

.footer-lock { display: flex; align-items: center; gap: 10px; border: 1px dashed #B8CFC2; background: #F4F8F5; border-radius: 8px; padding: 10px 12px; }
.counter { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.counter.long { border-color: var(--warn-line); background: #FFF8F2; }
.counter .badge { min-width: 76px; text-align: center; border-radius: 8px; padding: 9px 10px; background: var(--green); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.counter.long .badge { background: #7A3D0E; }
.linkwarn { display: none; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: 10px; padding: 12px 14px; }
.linkwarn.show { display: block; }

.phone { background: #F1F2F0; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bubble { background: #E5E6E3; border-radius: 16px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; word-break: break-word; max-width: 100%; }
.phone img { max-width: 160px; border-radius: 12px; }

.thread-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); flex: 1 1 280px; min-width: 0; }
.thread { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line2); text-decoration: none; color: var(--ink); min-height: 72px; }
.thread.on { background: #EEF5F1; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; background: #DCE8E1; color: var(--dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.avatar.lg { width: 48px; height: 48px; font-size: 15px; }
.convo { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; }
.msgs { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: #FAFBFA; max-height: 70vh; overflow-y: auto; }
.m-in { align-self: flex-start; max-width: 75%; }
.m-in .b { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.m-out { align-self: flex-end; max-width: 75%; display: flex; flex-direction: column; align-items: flex-end; }
.m-out .b { background: var(--green); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; white-space: pre-wrap; word-break: break-word; }
.m-note { align-self: center; font-size: 12px; color: var(--gray-ink); background: #EDF0EE; border-radius: 999px; padding: 5px 12px; text-align: center; }
.m-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.m-out img, .m-in img { max-width: 140px; border-radius: 10px; margin-bottom: 4px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #E4E8E5; color: var(--gray-ink); }
.steps .done .n { background: var(--green); color: #fff; } .steps .cur { font-weight: 700; } .steps .cur .n { background: var(--dark); color: #fff; }

.public { max-width: 680px; margin: 40px auto; padding: 0 20px; }
.public .card { padding: 28px; }
@media (max-width: 700px) { .main { padding: 20px 16px; } .thread-list { border-right: 0; border-bottom: 1px solid var(--line); } }

/* language switch (same look as STLIC Mekteb) */
.lang { display: inline-flex; gap: 6px; }
.lang button { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid #E2DED5; background: #fff; color: #8A8F8B; font: 600 15px inherit; font-family: inherit; cursor: pointer; }
.lang button.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.side .lang { margin: 4px 0 2px; }
.side .lang button { min-height: 32px; padding: 0 10px; font-size: 13px; background: transparent; border-color: rgba(255,255,255,.25); color: #E4EDE8; }
.side .lang button.on { background: var(--gold); border-color: var(--gold); color: #fff; }

/* home / sign-in page */
body.home { background: #F7F5F0; }
.home-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.home-hero { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 56px 28px; color: #fff; text-align: center;
  background-color: #2D653B;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px), radial-gradient(120% 80% at 20% 10%, #3D854D 0%, #2D653B 45%, #1F472A 80%, #1A3A25 100%);
  background-size: 28px 28px, 100% 100%; }
.home-hero-inner { max-width: 520px; display: flex; flex-direction: column; align-items: center; }
.logo-ring { width: 250px; height: 250px; border-radius: 50%; background: rgba(176,152,114,.45); display: flex; align-items: center; justify-content: center; }
.logo-disc { width: 222px; height: 222px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.logo-disc img { width: 150px; height: 150px; }
.home-org { margin: 34px 0 6px; color: #C3AE8A; font-weight: 600; font-size: 21px; letter-spacing: .04em; }
.home-title { margin: 0; font-size: 56px; line-height: 1.1; font-weight: 700; color: #fff; }
.home-sub { margin: 22px 0 0; font-size: 19px; color: #DCE8DF; line-height: 1.5; }
.home-cta { margin-top: 56px; display: inline-flex; align-items: center; gap: 18px; padding: 18px 26px; border-radius: 14px; background: #AE9A78; color: #fff; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.18); text-align: left; }
.home-cta:hover { background: #A08B68; color: #fff; }
.home-cta-text { display: flex; flex-direction: column; }
.home-cta-text b { font-size: 21px; } .home-cta-text span { font-size: 17px; opacity: .92; }
.home-cta-note { margin: 22px 0 0; font-size: 16px; color: #DCE8DF; line-height: 1.6; }
.home-panel { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 56px 28px; }
.home-form { width: 100%; max-width: 440px; }
.home-form h2 { font-size: 38px; margin: 0 0 14px; }
.home-form .muted { font-size: 17px; margin: 0 0 26px; }
.home-form label { font-size: 16px; }
.home-form input[type=text], .home-form input[type=password] { width: 100%; min-height: 52px; font-size: 17px; }
.home-form hr { border: 0; border-top: 1px solid #E2DED5; margin: 30px 0 20px; }
.home-alt { text-align: center; color: var(--muted); font-size: 16px; line-height: 1.7; }
.home-alt a { font-weight: 600; text-decoration: none; }
.btn.block { width: 100%; min-height: 50px; font-size: 17px; }
@media (max-width: 700px) { .home-title { font-size: 42px; } .logo-ring { width: 190px; height: 190px; } .logo-disc { width: 168px; height: 168px; } .logo-disc img { width: 112px; height: 112px; } .home-cta { margin-top: 32px; } }

/* pictures on the compose screen */
.pics { display: flex; flex-wrap: wrap; gap: 10px; }
.pic { position: relative; width: 96px; height: 116px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #F1F2F0; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-x { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(27,36,32,.78); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.pic-x:hover, .pic-x:focus-visible { background: #B3261E; }
.pic-size { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 6px; font-size: 11px; color: #fff; background: rgba(27,36,32,.6); }
.pic-add { width: 96px; height: 116px; border-radius: 10px; border: 1.5px dashed #B8CFC2; background: #F4F8F5; color: var(--green-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; text-align: center; cursor: pointer; padding: 6px; }
.pic-add:hover { background: var(--green-t); }
#id_pictures:focus-visible + .help, .pic-add:focus-within { outline: 2px solid var(--green); }
.pic-add[hidden] { display: none; }
.phone .pics-row { display: flex; flex-direction: column; gap: 6px; }
