/* Areez Control — calm, high-contrast internal tool, mobile first */
:root { --bg: #F3F5F4; --card: #fff; --ink: #14201C; --muted: #5A6B65; --line: #DCE3E0; --brand: #0E5A46; --brand-ink: #fff;
  --green: #1F8A55; --yellow: #B7860B; --red: #C2382F; --radius: 14px;
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root { --bg: #0F1513; --card: #18211E; --ink: #E6EEEB; --muted: #9AABA5; --line: #2A3532; --brand: #3FB58E; --brand-ink: #08130F; } }
:lang(ur) { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", system-ui, sans-serif; line-height: 2; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; overflow-x: clip; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--brand); color: var(--brand-ink); }
.logo { font-size: 1.15rem; }
.bar-end { display: flex; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; }
.tabs a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); white-space: nowrap; font-weight: 600; }
.tabs a:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
main { width: min(960px, 100% - 32px); margin: 20px auto 60px; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.stat b { font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; }
.stat span { color: var(--muted); font-size: .92rem; }
.stat.hot { border-color: var(--red); box-shadow: inset 4px 0 0 var(--red); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-block: 12px; }
.appr header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.appr h2 { margin: 0; flex: 1 1 100%; }
.lvl { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #fff; }
.lvl-green { background: var(--green); } .lvl-yellow { background: var(--yellow); } .lvl-red { background: var(--red); }
.lvl-border-red { border-inline-start: 5px solid var(--red); } .lvl-border-yellow { border-inline-start: 5px solid var(--yellow); }
.status { color: var(--muted); font-size: .9rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
dt { color: var(--muted); } dd { margin: 0; }
@media (max-width: 520px) { dl { grid-template-columns: 1fr; } dt { margin-top: 6px; } }
form.login { max-width: 380px; display: grid; gap: 12px; }
.decide { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
button { font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
button.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.bar button.ghost { color: var(--brand-ink); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); } .ok { color: var(--green); } .bad { color: var(--red); font-weight: 600; }
.feed, .list { list-style: none; padding: 0; margin: 0; }
.feed li, .list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.feed time, .list small { color: var(--muted); font-size: .85rem; }
code { direction: ltr; unicode-bidi: isolate; font-size: .85em; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .92rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.prose h2, .prose h3, .prose h4 { margin: 14px 0 6px; }
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand-ink) 50%, transparent); font-weight: 600; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::after { content: " ▾"; }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; min-width: 140px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 10; }
.lang-menu li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang-menu li a[aria-current] { color: var(--brand); font-weight: 700; }
/* CEO chat */
.chat { display: grid; gap: 10px; margin-block: 12px; }
.msg { max-width: min(680px, 92%); padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: grid; gap: 4px; }
.msg > b { font-size: .85rem; color: var(--muted); }
.msg p { margin: 0 0 6px; } .msg time { font-size: .78rem; color: var(--muted); }
.msg-me { justify-self: end; background: color-mix(in srgb, var(--brand) 10%, var(--card)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.msg-ceo { justify-self: start; }
.chat-form { display: grid; gap: 10px; position: sticky; bottom: 8px; }
textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; width: 100%; box-sizing: border-box; }
.btns small { align-self: center; }
.task header { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; } .task h2 { margin: 0; }
.stat small { font-size: .8rem; }
/* Cost meter: widths as classes because the CSP forbids inline styles. */
.meter { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; margin-block: 14px 6px; }
.meter span { display: block; height: 100%; background: var(--green); }
.meter .w0 { width: 0%; background: var(--green); }
.meter .w5 { width: 5%; background: var(--green); }
.meter .w10 { width: 10%; background: var(--green); }
.meter .w15 { width: 15%; background: var(--green); }
.meter .w20 { width: 20%; background: var(--green); }
.meter .w25 { width: 25%; background: var(--green); }
.meter .w30 { width: 30%; background: var(--green); }
.meter .w35 { width: 35%; background: var(--green); }
.meter .w40 { width: 40%; background: var(--green); }
.meter .w45 { width: 45%; background: var(--green); }
.meter .w50 { width: 50%; background: var(--yellow); }
.meter .w55 { width: 55%; background: var(--yellow); }
.meter .w60 { width: 60%; background: var(--yellow); }
.meter .w65 { width: 65%; background: var(--yellow); }
.meter .w70 { width: 70%; background: var(--yellow); }
.meter .w75 { width: 75%; background: var(--yellow); }
.meter .w80 { width: 80%; background: var(--red); }
.meter .w85 { width: 85%; background: var(--red); }
.meter .w90 { width: 90%; background: var(--red); }
.meter .w95 { width: 95%; background: var(--red); }
.meter .w100 { width: 100%; background: var(--red); }
