/* ============================================================
   هوية "المأمور الميني" — فيروزي #0D7377 + خط Cairo + كروت
   override stylesheet, loaded after the bundle CSS
   ============================================================ */

/* Cairo variable-font aliases so every weight renders */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/f8c8bb31-SLXVc1nY6HkvangtZmpQdkhzfH5lkSscQyyS8p4_RHH1.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67, U+1EE69, U+1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/861f3930-SLXVc1nY6HkvangtZmpQdkhzfH5lkSscSCyS8p4_RHH1.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url(fonts/c4b7a0b2-SLXVc1nY6HkvangtZmpQdkhzfH5lkSscRiyS8p4_RA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root, :host {
  /* Cairo everywhere */
  --font-display: "Cairo", sans-serif;
  --font-headline: "Cairo", sans-serif;
  --font-title: "Cairo", sans-serif;
  --font-body: "Cairo", sans-serif;
  --font-label: "Cairo", sans-serif;

  /* المأمور الميني teal palette (light) */
  --color-primary: #0D7377;
  --color-on-primary: #ffffff;
  --color-primary-container: #D9F2F1;
  --color-on-primary-container: #084C4F;
  --color-secondary: #B45309;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #FEF3C7;
  --color-on-secondary-container: #78350F;
  --color-surface: #F8FAFC;
  --color-surface-lowest: #ffffff;
  --color-surface-low: #F0FDFA;
  --color-surface-container: #E2E8F0;
  --color-surface-high: #CBD5E1;
  --color-surface-variant: #E2E8F0;
  --color-on-surface: #1E293B;
  --color-on-surface-variant: #475569;
  --color-outline: #94A3B8;
  --color-outline-variant: #CBD5E1;
}

/* dark */
.dark {
  --color-primary: #2DD4BF;
  --color-on-primary: #084C4F;
  --color-primary-container: #0D7377;
  --color-on-primary-container: #99F6E4;
  --color-secondary: #FBBF24;
  --color-on-secondary: #451A03;
  --color-secondary-container: #78350F;
  --color-on-secondary-container: #FEF3C7;
  --color-surface: #0F172A;
  --color-surface-lowest: #0B1220;
  --color-surface-low: #16213B;
  --color-surface-container: #1E293B;
  --color-surface-high: #334155;
  --color-surface-variant: #334155;
  --color-on-surface: #E2E8F0;
  --color-on-surface-variant: #94A3B8;
  --color-outline: #475569;
  --color-outline-variant: #475569;
}

/* حواف أنعم */
/* ===== قالب "المأمور الميني" — طبق الأصل (DamghaMemo) ===== */
.rounded { border-radius: 14px; }
.rounded-md { border-radius: 16px; }
.material-symbols-outlined { font-variation-settings: 'FILL' 1, 'wght' 500; }
body { font-family: 'Cairo', sans-serif !important; }
#root > div { position: relative; padding-bottom: 96px; background: #F8FAFC !important; }
.dark #root > div { background: #0F172A !important; }

#root > div::before {
  content: "المأمور الميني  |  مصلحة الضرائب المصرية";
  order: -1; display: flex; align-items: center; height: 54px; padding: 0 64px 0 16px;
  background: #0F172A; color: #fff; font-weight: 700; font-size: 14px; border-bottom: 1px solid #334155;
}
#root > div::after {
  content: "balance"; font-family: 'Material Symbols Outlined'; font-feature-settings: 'liga';
  position: absolute; top: 10px; right: 16px; width: 34px; height: 34px; border-radius: 10px;
  background: #14919B; color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; direction: ltr; z-index: 2;
}

#root > div > header {
  position: relative !important; top: auto !important; order: 0;
  background: linear-gradient(to left, #084C4F, #0D7377 50%, #14919B) !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 16px 20px 0 !important;
}
#root > div > header > div {
  display: grid !important; grid-template-columns: auto 1fr auto; column-gap: 12px; row-gap: 1px; align-items: center;
  height: auto !important; padding: 0 !important; max-width: none !important;
}
#root > div > header > div > div:first-child { display: contents !important; }
#root > div > header > div > div:first-child > button { display: contents !important; }
#root > div > header > div > div:first-child > button > div:first-child {
  grid-column: 1; grid-row: 1 / 3; width: 44px !important; height: 44px !important; border-radius: 16px !important;
  background: rgba(255,255,255,.15) !important; border: 1px solid rgba(255,255,255,.25); color: #fff !important;
}
#root > div > header .material-symbols-outlined { font-size: 22px; }
#root > div > header > div > div:first-child > button > div:first-child .material-symbols-outlined { font-size: 24px !important; }
#root > div > header > div > div:first-child > button > div:last-child { display: contents !important; }
#root > div > header > div > div:first-child > button > div:last-child > span:first-child {
  grid-column: 2; grid-row: 1; align-self: end; color: #fff !important; font-size: 18px !important; font-weight: 800 !important; line-height: 1.3 !important;
}
#root > div > header > div > div:first-child > button > div:last-child > span:first-child::after {
  content: "إصدار 2026"; display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: 999px;
  background: rgba(255,255,255,.2); font-size: 10px; font-weight: 600; vertical-align: middle;
}
#root > div > header > div > div:first-child > button > div:last-child > span:last-child {
  display: block !important; grid-column: 2; grid-row: 2; align-self: start; font-size: 0 !important; white-space: normal !important;
}
#root > div > header > div > div:first-child > button > div:last-child > span:last-child::after {
  content: "منظومة الفحص الضريبي الميداني والمكتبي"; font-size: 12px; font-weight: 500; color: #CCFBF1; line-height: 1.5;
}
#root > div > header > div > div:last-child { display: contents !important; }
/* كارت المأمور */
#root > div > header > div > div:last-child > button:first-child {
  display: flex !important; grid-column: 1 / -1; grid-row: 3; position: relative; margin-top: 14px; text-align: right;
  background: rgba(255,255,255,.10) !important; border: 1px solid rgba(255,255,255,.20) !important; border-radius: 16px !important;
  padding: 10px 62px 10px 12px !important; color: #fff; backdrop-filter: blur(8px); align-items: flex-start; flex-direction: column; gap: 0 !important; width: auto;
}
#root > div > header > div > div:last-child > button:first-child > span:first-child {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 12px; box-sizing: border-box;
  background: rgba(251,191,36,.20); border: 1px solid rgba(252,211,77,.40); color: #FDE68A !important;
  display: flex; align-items: center; justify-content: center; font-size: 22px !important; overflow: visible;
}
#root > div > header > div > div:last-child > button:first-child > span:last-child {
  color: #fff !important; font-size: 13px !important; font-weight: 700 !important; white-space: normal !important; line-height: 1.5; font-family: 'Cairo', sans-serif;
}
#root > div > header > div > div:last-child > button:first-child > span:last-child::after {
  content: none !important; display: none !important;
}
/* زر مذكرة جديدة */
#root > div > header > div > div:last-child > button:last-child {
  grid-column: 3; grid-row: 1 / 3; width: 44px; height: 44px; padding: 0 !important; border-radius: 14px !important;
  background: rgba(255,255,255,.15) !important; border: 1px solid rgba(255,255,255,.25) !important; color: #fff !important; font-size: 0 !important; gap: 0 !important;
}
#root > div > header > div > div:last-child > button:last-child span:not(.material-symbols-outlined) { display: none !important; }
#root > div > header > div > div:last-child > button:last-child .material-symbols-outlined { font-size: 24px !important; }

/* الهيرو: البحث */
#root > div > main, #root > div > main > section[aria-label="تصفية المذكرات"] { display: contents; }
#root > div > main > section[aria-label="تصفية المذكرات"] > form {
  order: 1; display: flex; gap: 10px; margin: 0; padding: 14px 20px 24px; align-items: center;
  background: linear-gradient(to left, #084C4F, #0D7377 50%, #14919B);
  border-radius: 0 0 24px 24px; box-shadow: 0 10px 22px -12px rgba(13,115,119,.55); max-width: none !important;
}
#root form[role="search"] > div {
  flex: 1; height: 46px; background: #fff !important; border: 2px solid #FBBF24 !important; border-radius: 16px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08) !important; padding: 0 14px !important; outline: none !important;
}
#root form[role="search"] > div:focus-within { box-shadow: 0 0 0 2px rgba(251,191,36,.35) !important; }
#root form[role="search"] > div .material-symbols-outlined { color: #94A3B8 !important; font-size: 22px !important; }
#root form[role="search"] > div input { color: #1E293B !important; font-size: 13px !important; font-weight: 500; }
#root form[role="search"] > button {
  width: 46px; height: 46px; padding: 0 !important; border-radius: 16px !important; font-size: 0 !important; gap: 0 !important;
  background: rgba(255,255,255,.15) !important; border: 1px solid rgba(255,255,255,.28) !important; color: #fff !important;
}
#root form[role="search"] > button span:not(.material-symbols-outlined) { display: none !important; }
#root form[role="search"] > button .material-symbols-outlined { font-size: 22px !important; }
#root > div > main > section[aria-label="تصفية المذكرات"] > div[role="tablist"] { order: 4; padding: 4px 16px 6px; }
#root > div > main > section[aria-label="تصفية المذكرات"] + section { order: 5; padding: 8px 16px 0; }
#root > div > footer { order: 6; }

/* مؤشرات المحفظة */
#root > div > main > section:first-child {
  order: 3; display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; padding: 22px 16px 6px; align-items: stretch; max-width: none !important;
}
#root > div > main > section:first-child::before {
  content: "مؤشرات محفظة الفحص الحالية"; grid-column: 1; grid-row: 1; align-self: center; font-size: 15px; font-weight: 800; color: #1E293B; line-height: 1.5;
}
.dark #root > div > main > section:first-child::before { color: #F1F5F9; }
#root > div > main > section:first-child::after {
  content: "الربع الرابع 2026"; grid-column: 2; grid-row: 1; justify-self: end; align-self: center;
  font-size: 11px; font-weight: 600; color: #64748B; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 6px 12px;
}
.dark #root > div > main > section:first-child::after { background: #1E293B; border-color: #334155; color: #CBD5E1; }
#root > div > main > section:first-child > div:last-child { grid-column: 1 / -1; grid-row: 2; display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; }
#root > div > main > section:first-child > div:first-child { grid-column: 1 / -1; grid-row: 3; border-radius: 16px !important; padding: 16px !important; }
#root > div > main > section:first-child > div:first-child h1 { font-size: 18px !important; line-height: 1.5 !important; font-weight: 800 !important; }
#root > div > main > section:first-child > div:first-child p { font-size: 12px !important; line-height: 1.8 !important; }
#root > div > main > section:first-child > div:last-child > article {
  display: grid !important; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; align-items: center; position: relative;
  padding: 14px !important; gap: 0 !important; border-radius: 16px !important; background: #fff !important;
  border: 1px solid rgba(226,232,240,.9) !important; box-shadow: 0 1px 2px rgba(15,23,42,.06) !important; height: auto;
}
.dark #root > div > main > section:first-child > div:last-child > article { background: #1E293B !important; border-color: #334155 !important; }
#root article > header { display: contents !important; }
#root article > header > .material-symbols-outlined {
  display: flex !important; grid-column: 1; grid-row: 1; width: 36px !important; height: 36px !important; box-sizing: border-box;
  align-items: center; justify-content: center; border-radius: 12px; font-size: 22px !important; background: #FFFBEB; color: #D97706 !important; overflow: visible;
}
#root article > header > span:first-child { grid-column: 1 / -1; grid-row: 3; margin-top: 2px; font-size: 12px !important; font-weight: 600 !important; color: #64748B !important; white-space: normal; }
.dark #root article > header > span:first-child { color: #94A3B8 !important; }
#root > div > main > section:first-child > div:last-child > article > div { grid-column: 1 / -1; grid-row: 2; margin-top: 12px; }
#root > div > main > section:first-child > div:last-child > article > div > p {
  font-size: 19px !important; line-height: 1.4 !important; font-weight: 800 !important; color: #1E293B !important;
}
.dark #root > div > main > section:first-child > div:last-child > article > div > p { color: #F1F5F9 !important; }
#root > div > main > section:first-child > div:last-child > article::after {
  position: absolute; top: 14px; left: 14px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
#root > div > main > section:first-child > div:last-child > article:nth-child(1)::after { content: "الدمغة"; background: #FFFBEB; color: #B45309; }
#root > div > main > section:first-child > div:last-child > article:nth-child(2)::after { content: "التنمية"; background: #F0FDFA; color: #0F766E; }
#root > div > main > section:first-child > div:last-child > article:nth-child(2) > header > .material-symbols-outlined { background: #F0FDFA; color: #0D7377 !important; }
.dark #root > div > main > section:first-child > div:last-child > article > header > .material-symbols-outlined { background: rgba(45,212,191,.12); color: #5EEAD4 !important; }
.dark #root > div > main > section:first-child > div:last-child > article::after { background: rgba(45,212,191,.12) !important; color: #5EEAD4 !important; }

/* التنقل الأصلي مخفي (بيتحكم فيه الشريط الجديد) */
#root > div > nav[aria-label="التنقل السفلي"] { display: none !important; }
/* ===== شريط التنقل السفلي (5 تبويبات) ===== */
#mm-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-around; align-items: stretch;
  background: #fff; border-top: 1px solid #E2E8F0; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 15px rgba(0,0,0,.04); direction: rtl; font-family: 'Cairo', sans-serif;
}
.dark #mm-nav { background: #1E293B; border-top-color: #334155; }
#mm-nav button {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px;
  border: 0; background: transparent; cursor: pointer; color: #94A3B8; font-size: 10px; font-weight: 600; font-family: inherit; line-height: 1.2; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
#mm-nav button .material-symbols-outlined { font-size: 24px; font-variation-settings: 'FILL' 1; }
#mm-nav button.on { color: #0D7377; font-weight: 800; }
.dark #mm-nav button.on { color: #2DD4BF; }
#mm-nav button.dot::after { content: ""; position: absolute; top: 2px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; }
