html, body { margin: 0; padding: 0; background: #0f1418; }
:root {
    --bg: #0f1418;
    --surface: #1a232a;
    --surface-2: #141c22;
    --line: #2b3841;
    --text: #f2f6f7;
    --muted: #a7b6bf;
    --teal: #8fb9ad;
    --red: #c8342c;
}
* { -webkit-tap-highlight-color: transparent; }
body {
    color: var(--text);
    background: var(--bg);
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.app { max-width: 560px; margin: 0 auto; padding: 16px 20px 34px; }
@media (min-width: 768px) { .app { padding: 26px 28px 40px; } }

.bar { display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; }
.logo { width: 30px; height: 30px; border-radius: 8px; display: block; }
.brand-mark { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
    display: inline-flex; align-items: center; min-height: 56px; padding: 0 14px;
    border-radius: 12px; border: 1px solid var(--line); color: var(--muted);
    text-decoration: none; font-size: 15px; font-weight: 600;
}
.nav a[aria-current="page"] { background: var(--surface); border-color: #3b4b56; color: var(--text); }
.offline {
    margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #33454d;
    background: #17222a; color: #c9d7de; font-size: 14px; line-height: 1.55;
}
main { padding-top: 20px; }

h1 { margin: 0 0 8px; font-size: 29px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }
.lede { margin: 0 0 20px; color: var(--muted); font-size: 16px; line-height: 1.65; }
h2 { margin: 0 0 12px; font-size: 19px; font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.tile {
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    min-height: 132px; padding: 16px 15px; border-radius: 18px;
    border: 1px solid var(--line); background: var(--surface); text-decoration: none;
}
.tile:active { background: #22303a; }
.tile-label { font-size: 18px; font-weight: 700; line-height: 1.35; }
.icon { width: 40px; height: 40px; color: var(--teal); flex: none; }

.home-foot { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; }
.quiet-link {
    display: inline-flex; align-items: center; min-height: 56px; color: var(--muted);
    font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.quiet-btn {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px;
    margin-top: 10px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); font-family: inherit; font-size: 16px;
    font-weight: 700; text-align: center;
}
.back {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: var(--muted); font-size: 15px; text-decoration: none;
}
.case-head { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.case-head h1 { margin: 0; }
.section { margin-top: 26px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; margin-top: 2px; border-radius: 999px;
    border: 1px solid #3c5a55; background: #16211f; color: var(--teal);
    font-size: 15px; font-weight: 700;
}
.step-text { font-size: 16.5px; line-height: 1.7; }

.call {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 92px; padding: 14px 18px; border-radius: 18px; background: var(--red);
    color: #fff; text-decoration: none; text-align: center;
}
.call:active { background: #a92a24; }
.call-label { font-size: 17px; font-weight: 700; }
.call-number { font-size: 34px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.1; }
.call-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.call-src { font-size: 13px; color: var(--muted); }
.others { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.call-2 {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 60px; padding: 14px 16px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface); text-decoration: none;
}
.call-2-name { font-size: 16px; font-weight: 600; }
.call-2-number { font-size: 20px; font-weight: 700; color: var(--teal); }

.noprim { padding: 16px; border-radius: 16px; border: 1px dashed #3c4a54; background: var(--surface-2); }
.noprim-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.noprim-text { margin: 0; font-size: 15px; color: var(--muted); }
.noprim-text a { color: var(--teal); }

.share-cta {
    display: block; margin-top: 26px; padding: 18px 16px; border-radius: 18px;
    border: 1px solid #2f4d53; background: #14262b; text-decoration: none;
}
.share-title { display: block; font-size: 20px; font-weight: 700; }
.share-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.55; }

.mine { display: flex; flex-direction: column; gap: 10px; }
.mine-row {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; min-height: 62px;
    padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--surface); text-decoration: none;
}
.mine-name { font-size: 17px; font-weight: 700; }
.mine-role { grid-column: 1; font-size: 13px; color: var(--muted); }
.mine-number { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 18px; font-weight: 700; color: var(--teal); }
.empty { margin: 0; color: var(--muted); font-size: 15px; }
.empty a { color: var(--teal); }
.note { margin: 22px 0 0; font-size: 14px; color: var(--muted); line-height: 1.65; }

.pick { display: flex; flex-direction: column; gap: 8px; }
.pick-row {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; min-height: 62px; padding: 12px 16px; padding-inline-end: 52px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    font-family: inherit; font-size: 16px; text-align: start; width: 100%;
}
.pick-row.on { border-color: #4f8378; background: #16241f; }
.pick-name { font-weight: 700; min-width: 0; }
.pick-role { font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; }
.pick-tick {
    position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
    border-radius: 999px; border: 1px solid #3c5a55; color: #cdece2; font-size: 16px; font-weight: 700;
}
.pick-row.on .pick-tick { background: #4f8378; border-color: #4f8378; color: #08120f; }
.extra { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.locate {
    width: 100%; min-height: 58px; border-radius: 14px; border: 1px solid #2f4d53;
    background: #14262b; color: var(--text); font-family: inherit; font-size: 17px; font-weight: 700;
}
.locate:disabled { opacity: 0.7; }
.place { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); word-break: break-all; }
.place bdi { color: var(--teal); }
.place-link { display: block; margin-top: 8px; direction: ltr; text-align: start; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.warn {
    margin: 12px 0 0; padding: 12px 14px; border-radius: 12px;
    border-inline-start: 3px solid #d9534a; background: rgba(237, 49, 62, 0.09);
    color: #ffc0b8; font-size: 14.5px; line-height: 1.6;
}
.hint {
    margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid #33454d;
    background: #17222a; color: #c9d7de; font-size: 14.5px; line-height: 1.7;
}
.preview {
    display: block; width: 100%; box-sizing: border-box; min-height: 96px; margin: 0;
    padding: 14px; border-radius: 14px; border: 1px dashed #3c4a54; background: var(--surface-2);
    color: var(--text); font-family: inherit; font-size: 16px; line-height: 1.65;
    white-space: pre-wrap; word-break: break-word; resize: none;
}
.hint-small { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.copy-btn {
    min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 700;
}
.send { display: flex; flex-direction: column; gap: 10px; }
.send-btn {
    display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px 16px;
    border-radius: 16px; background: #1c7a4c; color: #fff; font-size: 17px; font-weight: 700;
    text-align: center; text-decoration: none;
}
.send-note { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.offline-send { padding: 16px; border-radius: 16px; border: 1px solid #3a4a2c; background: #1c2418; }
.offline-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #e6f0d0; }
.offline-body { margin: 0; font-size: 14.5px; color: #c3cdb4; line-height: 1.65; }
.offline-people { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.offline-person {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0;
    padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-size: 15px;
}
.offline-number { font-weight: 700; color: #dcecc6; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.input {
    width: 100%; box-sizing: border-box; min-height: 56px; padding: 12px 14px; border-radius: 12px;
    border: 1px solid #33424c; background: #0c1216; color: var(--text); font-family: inherit; font-size: 18px;
}
.input::placeholder { color: #6f8089; }
.primary {
    width: 100%; min-height: 60px; margin-top: 6px; border: 0; border-radius: 14px;
    background: #79b6a6; color: #0b1418; font-family: inherit; font-size: 18px; font-weight: 800;
}
.linkish {
    margin-top: 12px; padding: 10px 0; min-height: 56px; border: 0; background: none;
    color: var(--muted); font-family: inherit; font-size: 15px;
    text-decoration: underline; text-underline-offset: 3px;
}
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.role {
    min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 600;
}
.role.on { border-color: #4f8378; background: #16241f; color: #cdece2; }
.saved { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.saved-main { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.saved-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.saved-actions { display: flex; gap: 8px; margin-top: 10px; }
.saved-call, .saved-del {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px;
    border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
}
.saved-call { background: #22343c; color: var(--text); border: 1px solid #35505c; }
.saved-del { background: none; border: 1px solid var(--line); color: var(--muted); }

.official { display: flex; flex-direction: column; gap: 12px; }
.official-row { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.official-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.official-name { font-size: 17px; font-weight: 700; }
.official-number { font-size: 26px; font-weight: 800; color: var(--teal); letter-spacing: 0.03em; }
.official-body { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.official-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.official-src { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.src-name { font-weight: 700; color: var(--text); }
.src-link { display: block; margin-top: 2px; color: #7fb0a4; word-break: break-all; }
.official-checked { margin: 8px 0 0; font-size: 12.5px; color: #7f8f98; }

.foot {
    margin: 30px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
    font-size: 13px; color: var(--muted); line-height: 1.6;
}
