/* PARC Field: the look of parc-costing.paani76.com (PARC Impact). */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --ink: #0f172a;
  --ink-2: #475569;
  --muted: #64748b;
  --line: rgba(226, 232, 240, .7);
  --bg: #f5f3ee;
  --gold-1: #f0cc6c;
  --gold-2: #d4a843;
  --gold-3: #c8942a;
  --gold-text: #9a6c12;
  --gold-soft: #fbf3df;
  --night-1: #141a28;
  --night-2: #07090f;
  --ok: #047857;
  --ok-soft: #ecfdf5;
  --ok-ring: rgba(167, 243, 208, .7);
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --warn-ring: rgba(253, 230, 138, .8);
  --danger: #be123c;
  --danger-soft: #fff1f2;
  --danger-ring: rgba(254, 205, 211, .9);
  --blue: #1d4ed8;
  --blue-soft: #eff6ff;
  --violet: #6d28d9;
  --violet-soft: #f5f3ff;
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --card-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(15, 23, 42, .05), 0 2px 4px -2px rgba(15, 23, 42, .06), 0 16px 32px -18px rgba(15, 23, 42, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { color: #7a5408; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 4px; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--font); font-size: 13.5px; font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
[hidden] { display: none !important; }
.gradient-text { background: linear-gradient(90deg, #f0cc6c, #e5b952 40%, #fff3d0 50%, #e5b952 60%, #c8942a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Background: dotted paper with soft coloured light */
.app-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.app-bg::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(15, 23, 42, .07) 1px, transparent 0); background-size: 22px 22px; -webkit-mask-image: linear-gradient(rgba(0, 0, 0, .7), transparent 70%); mask-image: linear-gradient(rgba(0, 0, 0, .7), transparent 70%); }
.blob { position: absolute; border-radius: 9999px; filter: blur(70px); opacity: .55; }
.blob-gold { width: 38rem; height: 38rem; right: -10rem; top: -14rem; background: radial-gradient(circle, rgba(229, 185, 82, .55), transparent 65%); }
.blob-blue { width: 32rem; height: 32rem; left: -12rem; top: 30%; background: radial-gradient(circle, rgba(28, 145, 181, .35), transparent 65%); }
.blob-rose { width: 26rem; height: 26rem; right: 10%; bottom: -12rem; background: radial-gradient(circle, rgba(224, 17, 95, .18), transparent 65%); }
body.bare { background: #06080d; color: #e2e8f0; }
body.bare .app-bg::before { background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 0); }
body.bare .blob { opacity: .45; }

/* Layout */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 40; display: flex; flex-direction: column; color: #f1f5f9; border-right: 1px solid rgba(255, 255, 255, .05);
  background: radial-gradient(120% 40% at 0 0, rgba(229, 185, 82, .16), transparent 60%), radial-gradient(100% 30% at 100% 100%, rgba(28, 145, 181, .12), transparent 60%), linear-gradient(#0d111b, #05060a); }
.content { margin-left: 256px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 26px 32px 64px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: #fff; }
.brand:hover { color: #fff; }
.brand-icon { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(229, 185, 82, .35), 0 10px 20px -10px rgba(229, 185, 82, .6); }
.brand-name { display: block; font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { display: block; font-size: 12px; font-weight: 600; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 18px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: #cbd5e1; transition: background-color .2s, color .2s, transform .2s cubic-bezier(.22, 1, .36, 1); }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05); transform: translateX(3px); }
.nav-link .ico { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-link-active { color: #fff; background: linear-gradient(90deg, rgba(229, 185, 82, .22), rgba(229, 185, 82, .04)); box-shadow: inset 0 0 0 1px rgba(229, 185, 82, .3), 0 8px 20px -12px rgba(229, 185, 82, .6); }
.nav-link-active::before { content: ""; position: absolute; left: -12px; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(#f0cc6c, #c8942a); box-shadow: 0 0 12px rgba(229, 185, 82, .8); }

/* Sidebar sections (FieldFlo, Al Azeem, Admin): collapsible tiles */
.nav > .nav-link { margin-bottom: 6px; }
.nav-sec { border-radius: 16px; transition: background-color .25s, box-shadow .25s; }
.nav-sec + .nav-sec { margin-top: 4px; }
.nav-sec[open] { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav-head { list-style: none; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 16px; cursor: pointer; user-select: none; color: #e2e8f0; transition: background-color .2s, box-shadow .2s; }
.nav-head::-webkit-details-marker { display: none; }
.nav-head::marker { content: ""; }
.nav-head:hover { background: rgba(255, 255, 255, .05); }
.nav-head:focus-visible { outline: 2px solid rgba(229, 185, 82, .7); outline-offset: 1px; }
.nav-badge { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--sec, linear-gradient(#475569, #1e293b)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px var(--sec-glow, rgba(0, 0, 0, .6)); }
.nav-badge .ico { width: 17px; height: 17px; }
.nav-sec-fieldflo { --sec: linear-gradient(135deg, #38b6db, #0f6d8c); --sec-glow: rgba(28, 145, 181, .9); }
.nav-sec-alazeem { --sec: linear-gradient(135deg, #d9a35f, #8f5520); --sec-glow: rgba(185, 115, 47, .9); }
.nav-sec-admin { --sec: linear-gradient(135deg, #f0cc6c, #b07d1f); --sec-glow: rgba(212, 168, 67, .9); }
.nav-sec-admin .nav-badge { color: #1a1205; }
.nav-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nav-head-label { font-size: 14px; font-weight: 700; color: #fff; }
.nav-head-sub { font-size: 11.5px; color: #8391a7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-chev { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #94a3b8; transition: transform .25s cubic-bezier(.22, 1, .36, 1), color .2s; }
.nav-chev .ico { width: 15px; height: 15px; }
.nav-sec[open] .nav-chev { transform: rotate(90deg); color: #f0cc6c; }
.nav-sec-current:not([open]) .nav-head { box-shadow: inset 0 0 0 1px rgba(229, 185, 82, .35); }
.nav-sec-current:not([open]) .nav-chev { color: #f0cc6c; }
.nav-sub { position: relative; display: flex; flex-direction: column; gap: 1px; margin: 0 8px 0 27px; padding: 2px 0 10px 10px; border-left: 1px solid rgba(255, 255, 255, .09); }
.nav-sec[open] .nav-sub { animation: nav-in .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-sub .nav-link { padding: 7px 10px; font-size: 13.5px; border-radius: 10px; gap: 10px; }
.nav-sub .nav-link .ico { width: 16px; height: 16px; }
.nav-sub .nav-link-active::before { left: -11px; top: 20%; bottom: 20%; width: 3px; }

/* Site logos at the foot of the sidebar */
.nav-sites { padding: 12px 18px 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.nav-sites-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }
.nav-sites-row { display: flex; gap: 8px; }
.nav-site { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .2s, box-shadow .2s; }
.nav-site img { width: 100%; height: 100%; object-fit: cover; }
.nav-site span { font-size: 12px; font-weight: 800; color: #0b0e14; }
.nav-site:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--u1, #d4a843), 0 8px 16px -8px var(--u1, #d4a843); }
.nav-site.on { box-shadow: 0 0 0 2px var(--u1, #d4a843), 0 0 14px var(--u1, #d4a843); }

.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: rgba(255, 255, 255, .6); border-bottom: 1px solid rgba(255, 255, 255, .6); box-shadow: 0 1px 0 rgba(15, 23, 42, .04); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.topbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.who { display: flex; align-items: center; gap: 10px; }
.who-avatar { width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #0b0e14; background: linear-gradient(#f0cc6c, #d4a843 55%, #c8942a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 10px -4px rgba(200, 148, 42, .7); }
.who-text { display: flex; flex-direction: column; line-height: 1.2; }
.who-name { font-size: 13px; font-weight: 700; }
.who-role { font-size: 11.5px; color: var(--muted); }
.scrim { display: none; }
.topbar .menu-btn { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head p { margin: 0; }
.back { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; color: var(--muted); }
.back:hover { color: var(--ink); }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Hero (dark card) */
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 24px 26px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(60% 120% at 100% 0, rgba(229, 185, 82, .35), transparent 60%), radial-gradient(50% 90% at 0 100%, rgba(28, 145, 181, .3), transparent 60%), radial-gradient(40% 80% at 60% 120%, rgba(224, 17, 95, .22), transparent 60%), linear-gradient(135deg, #141a28, #07090f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(212, 168, 67, .25), 0 30px 60px -30px rgba(7, 9, 15, .8); }
.hero h1 { color: #fff; font-size: 28px; }
.hero p { color: #cbd5e1; }
.hero .pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #f0cc6c; background: rgba(229, 185, 82, .12); box-shadow: inset 0 0 0 1px rgba(229, 185, 82, .3); margin-bottom: 10px; }
.hero-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero-logos { display: grid; grid-template-columns: repeat(4, 48px); gap: 10px; }
.hero-logos img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 14px 24px -10px rgba(0, 0, 0, .6); }
.hero .btn-outline { background: rgba(255, 255, 255, .06); color: #f1f5f9; border-color: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }

/* Cards */
.card { position: relative; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .82)); border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--card-shadow); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-head h2 { margin-bottom: 0; }
.card > .card-head:first-child { margin-bottom: 12px; }
.table-card { padding: 0; overflow-x: auto; }
.table-card > .card-head { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .12); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; user-select: none; color: #334155;
  background: linear-gradient(#fff, #f6f7f9); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(15, 23, 42, .08), 0 6px 12px -8px rgba(15, 23, 42, .25); transition: transform .15s cubic-bezier(.22, 1, .36, 1), box-shadow .15s, filter .15s, background-color .15s; }
.btn:hover { transform: translateY(-1px); border-color: rgba(15, 23, 42, .2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 17px; height: 17px; }
.btn-primary { color: #fff; border: 1px solid rgba(212, 168, 67, .35); background: linear-gradient(#273043, #0b0e14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 0 #020408, 0 10px 18px -8px rgba(2, 4, 8, .55); }
.btn-primary:hover { color: #fff; filter: brightness(1.15); border-color: rgba(212, 168, 67, .5); }
.btn-gold { color: #0b0e14; border: 0; background: linear-gradient(#f0cc6c, #d4a843 55%, #c8942a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 #8a6214, 0 10px 18px -8px rgba(200, 148, 42, .6); }
.btn-gold:hover { color: #0b0e14; filter: brightness(1.06); }
.btn-outline { }
.btn-danger { color: var(--danger); background: linear-gradient(#fff, #fff5f7); border-color: rgba(225, 29, 72, .25); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(225, 29, 72, .12); }
.btn-danger:hover { color: #9f1239; border-color: rgba(225, 29, 72, .4); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: #475569; }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; }

/* Messages */
.flash { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-ring); padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.alert { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-ring); padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.alert-inline { margin-bottom: 12px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 16px 16px 16px 66px; min-height: 84px; border-radius: var(--radius); color: var(--ink);
  background: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .82)); border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--card-shadow); --c1: #e5b952; --c2: #a5741d; transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s; }
a.stat:hover { color: var(--ink); transform: translateY(-3px); }
.stat::before { content: ""; position: absolute; left: 16px; top: 18px; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 16px -6px color-mix(in srgb, var(--c1) 75%, transparent); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 128px; height: 128px; border-radius: 99px; background: radial-gradient(circle, color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%); pointer-events: none; }
.stats > .stat:nth-child(4n+2) { --c1: #38bdf8; --c2: #1d4ed8; }
.stats > .stat:nth-child(4n+3) { --c1: #34d399; --c2: #047857; }
.stats > .stat:nth-child(4n+4) { --c1: #fb7185; --c2: #be123c; }
.stat-num { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-6 { grid-template-columns: repeat(6, 1fr); }
.stats-6 .stat { padding-left: 16px; padding-top: 64px; }
.stats-6 .stat::before { top: 16px; width: 34px; height: 34px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.timeline li:first-child { border-top: 0; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; white-space: nowrap; padding: 10px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--line); background: linear-gradient(rgba(248, 247, 241, .9), rgba(245, 242, 235, .9)); }
.table td { padding: 11px 16px; border-bottom: 1px solid rgba(226, 232, 240, .5); vertical-align: middle; }
.table tbody tr { transition: background-color .2s, box-shadow .2s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--u1, #d4a843) 6%, transparent); box-shadow: inset 3px 0 0 var(--u1, #d4a843); }
.table tr:last-child td { border-bottom: 0; }
.table th.right { text-align: right; }
.table tfoot td { font-weight: 700; background: rgba(248, 247, 241, .7); border-top: 1px solid var(--line); }
.row-muted td { opacity: .55; }
.empty-row { text-align: center; color: var(--muted); padding: 30px !important; }
.table.compact td, .table.compact th { padding: 8px 12px; }

.person { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.person:hover { color: var(--ink); }
.person:hover .person-name { color: var(--gold-text); }
.person > span { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 650; color: var(--ink); }
a.person-name:hover { color: var(--gold-text); }
.avatar { width: 34px; height: 34px; border-radius: 99px; object-fit: cover; flex: none; box-shadow: 0 0 0 2px #fff, 0 4px 10px -4px rgba(15, 23, 42, .35); }
.avatar-empty { display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #0b0e14; background: linear-gradient(135deg, #f0cc6c, #c8942a); }
.avatar-square { border-radius: 10px; }
.steps { margin: 0 0 10px; padding-left: 20px; }
.steps li { margin-bottom: 4px; }
textarea.mono { font-size: 13px; }

/* Badges */
.tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; background: #f1f5f9; color: #475569; }
.tag-ff { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px rgba(191, 219, 254, .9); }
.tag-aa { background: #fdf6ec; color: #8a5a1c; box-shadow: inset 0 0 0 1px rgba(234, 205, 160, .9); }
.tag-on { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.tag-off { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger-ring); }
.tag-warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.tag-site { background: color-mix(in srgb, var(--u1, #6366f1) 12%, #fff); color: color-mix(in srgb, var(--u1, #4338ca) 85%, #000); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--u1, #6366f1) 30%, transparent); }
.tag-site img { width: 15px; height: 15px; border-radius: 4px; margin-left: -4px; }

/* Filters, chips, pager */
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 220px; }
.filters select { width: auto; min-width: 170px; }
.report-filters { padding: 14px 18px 6px; }
.quick-ranges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: #475569; white-space: nowrap;
  background: linear-gradient(#fff, #f7f7f9); border: 1px solid rgba(15, 23, 42, .1); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(15, 23, 42, .05); transition: transform .2s cubic-bezier(.22, 1, .36, 1), color .2s; }
.chip:hover { transform: translateY(-1px); color: var(--ink); }
.chip.on { color: #fff !important; border-color: transparent; background: linear-gradient(135deg, var(--u1, #273043), var(--u2, #0b0e14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 16px -8px color-mix(in srgb, var(--u1, #0b0e14) 80%, transparent); }
.chip img { width: 20px; height: 20px; border-radius: 6px; margin-left: -6px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-row .field { margin-bottom: 10px; }
.filter-row .field.grow { flex: 1; min-width: 200px; }
.filter-row select { min-width: 170px; }
.filter-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; }

/* Forms */
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); width: 100%; border: 1px solid rgba(203, 213, 225, .8); border-radius: 12px; padding: 8px 12px; background: #fff; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05); transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select { height: 40px; }
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer; padding-right: 40px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px 16px; }
select:hover { border-color: rgba(148, 163, 184, .9); }
select:disabled { cursor: not-allowed; opacity: .6; }
select[multiple], select[size] { height: auto; padding-right: 12px; background-image: none; white-space: normal; }
select::-ms-expand { display: none; }
input[type=date], input[type=month], input[type=time] { min-width: 0; }
input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; margin-left: 6px; }
input::-webkit-calendar-picker-indicator:hover { opacity: .9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(212, 168, 67, .15); }
input[type=checkbox], input[type=radio] { width: auto; height: auto; accent-color: var(--gold-3); box-shadow: none; }
input[type=file] { padding: 7px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field em { font-style: normal; font-weight: 400; }
.hint { color: var(--muted); font-size: 12px; }
.err { color: var(--danger); font-size: 12px; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.form-layout { display: grid; grid-template-columns: 1fr 290px; gap: 16px; align-items: start; }
.form-layout > .form-card:only-child { grid-column: 1 / -1; max-width: 860px; }
.form-card h2 { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.viewer-apps { border: 1px dashed rgba(203, 213, 225, .9); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.viewer-apps legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.viewer-apps.has-err { border-color: var(--danger); }
.check { display: inline-flex; gap: 7px; align-items: center; }
.photo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.photo-row .grow { flex: 1; margin: 0; }
.photo-box { width: 96px; height: 96px; border-radius: 16px; background: #f8f6f0; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-empty { font-size: 12px; color: var(--muted); }
.side .card h2 { font-size: 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.facts-wide { grid-template-columns: 160px 1fr; font-size: 14px; }
.inline-form { display: flex; gap: 10px; }
.rename { display: flex; gap: 8px; align-items: center; }
.rename input { max-width: 340px; }
.fixed-value { padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f0; font-size: 14px; }
.short-input { max-width: 130px; flex: 0 0 130px !important; }

/* Photos */
.thumbs { white-space: nowrap; }
.thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 10px; margin-right: 4px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08), 0 4px 10px -6px rgba(15, 23, 42, .4); }
.clamp { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.gallery img { width: 160px; height: 160px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
.gallery-col img { width: 100%; height: auto; max-height: 320px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card-head.pad { padding: 16px 16px 4px; }

/* Page title with icon, month switch */
.title-row { display: flex; align-items: center; gap: 14px; }
.page-icon { display: flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--c1, #e5b952), var(--c2, #a5741d)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -8px color-mix(in srgb, var(--c1, #e5b952) 70%, transparent); }
.page-icon .ico { width: 22px; height: 22px; }
.eyebrow { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.flip { display: inline-flex; transform: rotate(180deg); }
.flip .ico, .back .ico { width: 15px; height: 15px; }
.month-switch { display: flex; align-items: center; gap: 8px; }
.month-form input { width: 170px; }
.section-title { font-size: 17px; margin: 22px 0 12px; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--danger); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 320px; }
.table-wrap { overflow-x: auto; margin: 0 -20px; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 20px; }

/* Person month */
.person-hero { --u1: #d4a843; }
.person-hero .hero-row { align-items: center; }
.person-big { display: flex; align-items: center; gap: 18px; min-width: 0; }
.person-big h1 { margin: 2px 0 2px; }
.person-big p { margin: 0; }
.hero-photo { width: 76px; height: 76px; border-radius: 22px; object-fit: cover; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 0 0 5px color-mix(in srgb, var(--u1) 60%, transparent), 0 16px 30px -12px #000; }
.hero-initials { display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #0b0e14; background: linear-gradient(135deg, #f0cc6c, #c8942a); }
.hero-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hero-unit { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 14px 24px -10px rgba(0, 0, 0, .6); }
.hero .month-form input { background: rgba(7, 9, 15, .6); border-color: rgba(255, 255, 255, .14); color: #fff; color-scheme: dark; }
.tabs { margin-bottom: 16px; }
.day-card { padding-top: 14px; }
.day-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.day-badge { width: 52px; height: 52px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; color: #fff; background: linear-gradient(135deg, var(--u1, #273043), var(--u2, #0b0e14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 16px -8px rgba(2, 4, 8, .6); }
.day-badge b { font-size: 19px; font-weight: 800; }
.day-badge span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.day-title { flex: 1; min-width: 140px; }
.day-title h3 { margin: 0; font-size: 16px; font-weight: 800; }
.day-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta { display: flex; flex-direction: column; padding: 5px 12px; border-radius: 10px; background: #f8f6f0; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 78px; }
.meta small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.map-box { height: 340px; border-radius: 14px; margin-bottom: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08); }
.leaflet-tooltip.pin-label { background: transparent; border: 0; box-shadow: none; color: #fff; font: 800 10.5px var(--font); padding: 0; }
.leaflet-tooltip.pin-label::before { display: none; }
.att-line { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.att-selfie { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(15, 23, 42, .1); }
.notes { margin: 12px 0 0; padding: 12px 16px 12px 30px; border-radius: 12px; background: linear-gradient(rgba(248, 247, 241, .9), rgba(245, 242, 235, .7)); font-size: 13px; color: var(--ink-2); }
.notes li { margin: 3px 0; }
.notes li::marker { color: var(--gold-3); }
.two-col .notes { margin-top: 0; }

/* Login (dark, like parc-costing) */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; text-align: center; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 0 0 1px rgba(229, 185, 82, .4), 0 0 40px -6px rgba(229, 185, 82, .55); }
.login-title { color: #fff; font-size: 24px; margin: 14px 0 2px; }
.login-sub { font-size: 14px; font-weight: 600; margin: 0 0 24px; }
.login-card { text-align: left; padding: 22px; border-radius: 18px; background: linear-gradient(rgba(17, 22, 34, .85), rgba(9, 12, 19, .85)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 60px -30px #000; }
.login-card .field > span { color: #cbd5e1; }
.login-card input { background: #07090f; border-color: rgba(51, 65, 85, .9); color: #fff; box-shadow: none; }
.login-card .alert { background: rgba(225, 29, 72, .12); color: #fda4af; box-shadow: inset 0 0 0 1px rgba(225, 29, 72, .3); }
.login-foot { color: #64748b; font-size: 12px; margin-top: 22px; }
.empty { text-align: center; padding: 60px 20px; }

/* Al Azeem */
.progress-cell { min-width: 140px; }
.progress { height: 8px; background: rgba(15, 23, 42, .07); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--u1, #d4a843), var(--u3, #f0cc6c)); }
.task-text { max-width: 560px; line-height: 1.45; }
.note { margin-top: 4px; color: var(--ink-2); background: var(--gold-soft); border-radius: 8px; padding: 2px 8px; display: inline-block; }
.tick-col { width: 36px; text-align: center; }
.tick { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; }
.tick.yes { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.tick.carried { background: var(--gold-soft); color: var(--gold-text); }
.tick.no { background: #f1f5f9; color: #94a3b8; }
.checklist tr.done td { background: rgba(236, 253, 245, .35); }
.crumbs { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.role-tabs { margin-bottom: 14px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .stats-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s; width: 280px; max-width: 85vw; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(7, 9, 15, .55); }
  .content { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .main { padding: 20px 16px 48px; }
  .stats, .stats-6 { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .form-layout, .two-col, .stats-3 { grid-template-columns: 1fr; }
  .who-text { display: none; }
  .hero h1 { font-size: 23px; }
  .table th, .table td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 760px) {
  /* Wide tables keep readable columns and scroll sideways inside their card */
  .table:has(th:nth-child(4)) { min-width: 600px; }
  .table:has(th:nth-child(6)) { min-width: 720px; }
  .table:has(th:nth-child(8)) { min-width: 860px; }
  .table.checklist { min-width: 560px; }
  .table .person-name { white-space: nowrap; }
  .table-card, .table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  /* Filters: two neat columns, search and buttons full width */
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-items: end; }
  .filter-row .field { min-width: 0; }
  .filter-row .field.grow, .filter-row .filter-actions { grid-column: 1 / -1; min-width: 0; }
  .filter-row select, .filter-row input, .filters select, .filters input[type=search] { min-width: 0; width: 100%; }
  .filter-actions .btn { flex: 1; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .report-filters { padding: 14px 14px 4px; }
  .quick-ranges .chip { flex: none; }
  .page-head h1 { font-size: 24px; }
  .card-head { flex-wrap: wrap; row-gap: 4px; }
  .card-head h2 { flex: none; }
  .card-head > :not(h2) { flex: 1 1 170px; min-width: 0; }
  .card-head > a:last-child { flex: none; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .filter-row { grid-template-columns: 1fr; }
  .stats, .stats-6 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-sec[open] .nav-sub { animation: none; }
  .nav-chev, .nav-link, .nav-site { transition: none; }
}
