/* css/fonts.css */
/* Generated by scripts/copy-fonts.ts from @fontsource packages. */
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 400;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/readex-pro-arabic-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 400;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;descent-override: 40%;src:url(/fonts/readex-pro-arabic-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 400;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;src:url(/fonts/readex-pro-latin-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 400;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;descent-override: 40%;src:url(/fonts/readex-pro-latin-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 500;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/readex-pro-arabic-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 500;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;descent-override: 40%;src:url(/fonts/readex-pro-arabic-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 500;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;src:url(/fonts/readex-pro-latin-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 500;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;descent-override: 40%;src:url(/fonts/readex-pro-latin-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 600;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/readex-pro-arabic-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 600;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;descent-override: 40%;src:url(/fonts/readex-pro-arabic-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 600;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;src:url(/fonts/readex-pro-latin-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 600;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;descent-override: 40%;src:url(/fonts/readex-pro-latin-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 700;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/readex-pro-arabic-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 700;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;descent-override: 40%;src:url(/fonts/readex-pro-arabic-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro';font-style: normal;font-display: swap;font-weight: 700;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;src:url(/fonts/readex-pro-latin-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Readex Pro Field';font-style: normal;font-display: swap;font-weight: 700;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;descent-override: 40%;src:url(/fonts/readex-pro-latin-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Aref Ruqaa';font-style: normal;font-display: swap;font-weight: 700;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/aref-ruqaa-arabic-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Aref Ruqaa';font-style: normal;font-display: swap;font-weight: 700;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/aref-ruqaa-latin-ext-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Aref Ruqaa';font-style: normal;font-display: swap;font-weight: 700;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;src:url(/fonts/aref-ruqaa-latin-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 400;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/cairo-arabic-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 400;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/cairo-latin-ext-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 400;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;src:url(/fonts/cairo-latin-400-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 500;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/cairo-arabic-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 500;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/cairo-latin-ext-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 500;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;src:url(/fonts/cairo-latin-500-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 600;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/cairo-arabic-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 600;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/cairo-latin-ext-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 600;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;src:url(/fonts/cairo-latin-600-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 700;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/cairo-arabic-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 700;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/cairo-latin-ext-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 700;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;src:url(/fonts/cairo-latin-700-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 800;unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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-10EC4,U+10EFC-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-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;src:url(/fonts/cairo-arabic-800-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 800;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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;src:url(/fonts/cairo-latin-ext-800-normal-5.3.0.woff2) format("woff2")}
@font-face{font-family: 'Cairo';font-style: normal;font-display: swap;font-weight: 800;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;src:url(/fonts/cairo-latin-800-normal-5.3.0.woff2) format("woff2")}

/* css/tokens.css */
/* Kashfiya design tokens: the only :root, and the only place colours are written (print.css aside): the other files
   use these names, also for see-through colours, drawn marks (data-URI images) and corner radii.
   Values are the approved prototype's final look (reference/prototype, proto-g22); names follow the prototype so the
   page styles of later phases read the same. No purple anywhere. */
:root {
  color-scheme: light;

  /* the warm paper and the cards on it */
  --paper: #f0ebe0;
  --paper-a90: rgba(240, 235, 224, .9); /* the settings' section bar over the page, with its blur */
  --sheet: #fffdf8;
  --sheet-side: color-mix(in srgb, var(--sheet) 52%, var(--paper));   /* a side column's quieter card */
  --field: #ffffff;
  --white: #ffffff;
  --card-line: rgba(120, 96, 40, .16);
  --ink: #172a31;
  --muted: #576a70;
  --muted-2: #4e6066;          /* tab words, a touch darker than muted on the tab rail */
  --dot-sep: #ab9f86;          /* the «·» between facts in a row */
  --line: #e2d9c6;
  --line-2: #ece5d6;
  --btn-line: #cbc1ad;
  --choice-line: #958c7d;
  --field-line: #74878c;
  --field-line-hover: #566a70;
  --placeholder: #64757a;
  --hover: #f7f2e8;
  --band: #f8f4ec;
  --band-2: #ebe5d8;           /* behind a paper opened by the doctor */
  --paper-line: #e3e9ea;       /* the edge of a paper's small picture */
  --tabs-bg: #e9e2d2;
  --wash-next: #fbf0d2;        /* the «next» row */
  --wash-in: #e6eff1;          /* the «inside now» row */

  /* petrol: the bars and the main action */
  --cover: #123b4a;
  --cover-2: #0c2c38;
  --cover-hi: #1a5265;
  --cover-mid: #1f6577;
  --cover-ink: #dceaee;
  --cover-dim: #9fbcc5;
  --cover-soft: #cfe0e5;
  --on-cover: #f2f4ef;
  --accent: #1c6a7c;
  --accent-2: #155868;
  --accent-soft: #e4ebe9;
  --soft-hover: #d2e0df;
  --on-accent: #f2f4ef;
  --focus: #1c6a7c;

  /* brass */
  --brass: #d6ad55;
  --brass-hi: #e9c46f;
  --brass-ink: #3d2c05;
  --coin-hi: #f6dd9c;
  --coin-lo: #b98d35;

  /* meaning: money green, alert red, amber */
  --money: #2a7a3e;
  --money-ink: #236b35;
  --money-soft: #deedd9;
  --money-line: #9dc0a6;
  --money-edge: #b9d6b6;       /* the day closed: its line on the money page */
  --ok-dot: #5fbf7a;
  --ok-hi: #9fd8ae;
  --net-ok: #7fcf95;
  --net-off: #f2d48a;
  --net-off-bg: #fbf0d2;       /* the strip under the top bar while the connection is lost */
  --net-off-ink: #6b4a0a;
  --net-off-line: #ead9a9;
  --net-back-bg: #e3f1de;      /* … and «عاد الاتصال.» a moment after */
  --net-back-line: #c9e2c1;
  --rx: #a5432f;
  --rx-ink: #8f3626;
  --rx-soft: #fbefea;
  --rx-line: #c98b7c;
  --rx-hi: #e58a76;
  --amber: #8a5a0f;
  --amber-line: #a87a2a;
  --amber-soft: #f2e6cc;
  --amber-wash: #fff8ea;
  --switch-off: #b4a88f;
  --wa: #1d6f3a;
  --wa-soft: #e2f3e6;
  --wa-hover: #d3ecd9;

  /* who a thing belongs to: the patient (brown), reception, the doctor, the system */
  --own-pat: #8a5a2b;
  --own-pat-soft: #f4e9da;
  --own-pat-ink: #6b4420;
  --own-desk: #3f5aa8;
  --own-desk-soft: #eceffa;
  --own-desk-ink: #2f4585;
  --own-doc: #1c6a7c;
  --own-doc-soft: #e3f0f0;
  --own-doc-ink: #155868;
  --own-auto: #6b7a80;
  --own-auto-soft: #f1ede3;
  --own-auto-ink: #4d5a5f;

  /* states */
  --disabled-bg: #efeadf;
  --disabled-ink: #5f6e73;
  --disabled-line: #ddd3bf;

  /* the day line (one mark a patient) and a time gone by (the reception, F2) */
  --day-mark: #ddd3c0;
  --day-left: #b9ae98;
  --day-booked: #a99d85;
  --slot-past: #b0a690;
  --off-wash: #f3eee4;         /* a day the clinic is closed */
  /* the bookings (F3): the words on a chosen day, the WhatsApp message as it will be sent */
  --day-on-ink: #d9ebed;
  --day-on-sub: #d7e9ec;
  --wa-msg: #e9f6e4;
  /* the doctor's big card (F6): its head's words on the petrol band, and the brass word above the name */
  --next-ink: #eef4f3;
  --next-k: #e6c877;
  /* the visit page (F6): the patient's band line; the prescription paper as it prints (its ink, its muted lines,
     its edge, the patient's line, the footer's rule, the ruled lines); a vital sign's unit in its box */
  --pband-line: #e3d2ba;
  --rx-paper-ink: #2a3d63;
  --rx-paper-muted: #56657f;
  --rx-paper-edge: #d9dfe0;
  --rx-paper-band: #e3eef0;
  --rx-paper-rule: #d4dfe1;
  --rx-paper-lines: #eef1f6;
  --vit-unit: #8a999d;
  /* a patient's face (F4): one of five steady tones a name, the first letter on it (lists.css .face.t0 … .t4) */
  --face-0-bg: #e4ebe9;
  --face-0-ink: #123b4a;
  --face-1-bg: #f6ead0;
  --face-1-ink: #7a520c;
  --face-2-bg: #f4e9da;
  --face-2-ink: #6b4420;
  --face-3-bg: #ece5d6;
  --face-3-ink: #3f3a2e;
  --face-4-bg: #dfe9ec;
  --face-4-ink: #1a5265;
  --hall-bg: #fbf0d2;          /* «إبلاغ المنتظرين» while a note shows on the waiting-room screen */
  --hall-ink: #6b4a0a;
  --hall-line: #e3c77f;
  --hall-hover: #f7e6b8;

  /* sign-in */
  --signin-card: #f8fbfa;
  --signin-glow: #2a9aa3;
  --signin-soft: #dfeeee;

  /* type: one scale 13/15/17/22 and 26 for the day's title, the figures and the name inside now */
  --font-ui: "Readex Pro", Tahoma, "Segoe UI", Arial, sans-serif;
  /* the same letters inside a field (input, select, textarea): Readex Pro with a deeper descent (scripts/copy-fonts.ts),
     so Chrome does not cut the dots under the letters there («علي» stays «علي») */
  --font-field: "Readex Pro Field", "Readex Pro", Tahoma, "Segoe UI", Arial, sans-serif;
  --font-name: "Aref Ruqaa", serif;
  --font-rx: "Cairo", Tahoma, Arial, sans-serif;
  --fs-1: 13px;
  --fs-2: 15px;
  --fs-3: 17px;
  --fs-4: 22px;
  --fs-5: 26px;
  /* the wordmark كشفية is a logo, drawn at its own sizes */
  --fs-mark: 31px;
  --fs-mark-sm: 26px;
  --fs-mark-signin: 56px;
  --fs-mark-signin-sm: 40px;

  /* sizes and space */
  --ctl: 40px;
  --ctl-sm: 34px;
  --ctl-lg: 48px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --r-1: 10px;
  --r-2: 16px;
  --r-3: 22px;
  --r-sheet: 18px;
  --r-row: 12px;
  --r-pill: 999px;
  --r-dot: 50%;                /* a circle: round buttons, dots, turn numbers */
  --r-line: 3px;               /* the brass line under the day's title */
  --r-tick: 4px;               /* an owner's stripe, a task's bar */
  --r-link: 8px;               /* a word button */
  --r-lift: 14px;              /* a row lifted out of its list, a menu, the sign-in fields */
  --r-rail: 21px;              /* the rail under tabs and choices */
  --r-key: 6px;
  --r-alert: 6px;              /* a medical alert's chip */                /* a keyboard key («Enter» beside a dialog's main button) */

  /* depth */
  --sh-1: 0 1px 2px rgba(12, 44, 56, .06);
  --sh-day: 0 1px 2px rgba(12, 44, 56, .04);       /* a day of the bookings' strip */
  --sh-day-on: 0 4px 12px rgba(18, 59, 74, .2);   /* the day shown */
  --sh-2: 0 8px 22px rgba(12, 44, 56, .14);
  --sh-card: 0 1px 1px rgba(88, 66, 20, .05), 0 2px 5px rgba(88, 66, 20, .05), 0 16px 32px -14px rgba(88, 66, 20, .24);
  --sh-card-hi: 0 1px 1px rgba(12, 44, 56, .05), 0 6px 14px rgba(12, 44, 56, .07), 0 26px 50px -16px rgba(12, 44, 56, .28);
  --sh-btn: inset 0 1px 0 rgba(255, 255, 255, .3), 0 1px 2px rgba(18, 59, 74, .2), 0 6px 14px -8px rgba(18, 59, 74, .45);
  --sh-btn-hover: inset 0 1px 0 rgba(255, 255, 255, .34), 0 2px 4px rgba(18, 59, 74, .18), 0 12px 22px -10px rgba(18, 59, 74, .5);
  --btn-depth: linear-gradient(rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 46%, rgba(0, 0, 0, .07));
  --sh-toast: 0 10px 26px rgba(12, 44, 56, .28);
  --sh-modal: 0 2px 6px rgba(12, 44, 56, .1), 0 40px 90px -20px rgba(12, 44, 56, .5);
  --ring: 0 0 0 4px rgba(28, 106, 124, .16);

  /* see-through colours: a token's colour and how much of it shows (-a20 = 20%) */
  --accent-a04: rgba(28, 106, 124, .043);
  --accent-a11: rgba(28, 106, 124, .11);
  --accent-a25: rgba(28, 106, 124, .25);
  --accent-a38: rgba(28, 106, 124, .38);
  --cover-a16: rgba(18, 59, 74, .16);
  --cover-a18: rgba(18, 59, 74, .18);
  --cover-a22: rgba(18, 59, 74, .22);
  --cover-2-a06: rgba(12, 44, 56, .06);
  --cover-2-a08: rgba(12, 44, 56, .08);
  --cover-2-a10: rgba(12, 44, 56, .1);
  --cover-2-a12: rgba(12, 44, 56, .12);
  --cover-2-a16: rgba(12, 44, 56, .16);
  --cover-2-a25: rgba(12, 44, 56, .25);
  --cover-2-a40: rgba(12, 44, 56, .4);
  --cover-2-a55: rgba(12, 44, 56, .55);
  --cover-ink-a08: rgba(220, 234, 238, .08);
  --cover-ink-a14: rgba(220, 234, 238, .14);
  --on-cover-a12: rgba(242, 244, 239, .12);
  --on-cover-a14: rgba(242, 244, 239, .14);
  --on-cover-a22: rgba(242, 244, 239, .22);
  --on-cover-a24: rgba(242, 244, 239, .24);
  --on-cover-a34: rgba(242, 244, 239, .34);
  --on-cover-a35: rgba(242, 244, 239, .35);
  --on-cover-a40: rgba(242, 244, 239, .4);
  --brass-a16: rgba(214, 173, 85, .16);
  --brass-a20: rgba(214, 173, 85, .2);
  --brass-a22: rgba(214, 173, 85, .22);
  --brass-a26: rgba(214, 173, 85, .26);
  --brass-a35: rgba(214, 173, 85, .35);
  --brass-a55: rgba(214, 173, 85, .55);
  --coin-shade-a30: rgba(120, 86, 10, .3);
  --coin-shade-a32: rgba(120, 86, 10, .32);
  --rx-a16: rgba(165, 67, 47, .16);
  --rx-a92: rgba(165, 67, 47, .92);
  --wash-next-fade: rgba(251, 243, 222, .25);
  --wash-in-a20: rgba(230, 239, 241, .2);
  --white-a35: rgba(255, 255, 255, .35);
  --white-a65: rgba(255, 255, 255, .65);
  --black-a05: rgba(0, 0, 0, .05);
  --black-a18: rgba(0, 0, 0, .18);
  --black-a35: rgba(0, 0, 0, .35);
  --signin-shine: rgba(120, 200, 215, .9);

  /* motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 120ms;
  --t-base: 180ms;

  /* drawn marks: a select's arrow (muted, and petrol in a summary), a field error's «!», the heartbeat line under the
     top bar, in the empty bell panel and under the sign-in name; the paper's grain */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23576a70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --arrow-accent: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231c6a7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --err-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 15'%3E%3Cpath d='M7.5 3.6v5' stroke='white' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='7.5' cy='11.2' r='1.1' fill='white'/%3E%3C/svg%3E");
  --ecg-bar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 20'%3E%3Cpath d='M0 10h52l5-7 6 14 5-10 3 3h10l3-2 3 2h63' fill='none' stroke='%23d6ad55' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --ecg-empty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M0 9h44l5-7 6 14 5-10 3 3h10l3-2 3 2h41' fill='none' stroke='%23d6ad55' stroke-width='1.8' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --ecg-brand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 18'%3E%3Cpath d='M0 9h62l5-7 6 14 5-10 3 3h10l3-2 3 2h73' fill='none' stroke='%23d6ad55' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .07 0 0 0 0 .17 0 0 0 0 .2 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --ecg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='40' viewBox='0 0 260 40'%3E%3Cpath d='M0 20h102l6-9 7 22 8-30 7 26 5-9h125' fill='none' stroke='%23d6ad55' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  /* the waiting-room TV's own (css/tv.css): its inks on the cream and on the petrol card, its well, the coin's ink */
  --tv-ink-soft: #2a3d43;
  --tv-ink-dim: #6a6457;
  --tv-ink-brass: #7a5a17;
  --tv-head-ink: #eef2ee;
  --tv-now-soft: rgba(238, 242, 238, .86);
  --tv-now-dim: #a9c3ca;
  --tv-well: rgba(255, 253, 248, .55);
  --coin-ink: #3d2c05;
  --brass-a10: rgba(214, 173, 85, .1);
  --brass-a50: rgba(214, 173, 85, .5);
  --brass-a70: rgba(214, 173, 85, .7);
  --brass-hi-a0: rgba(233, 196, 111, 0);
  --brass-hi-a60: rgba(233, 196, 111, .6);
  --brass-hi-a70: rgba(233, 196, 111, .7);
  --cover-ink-a28: rgba(220, 234, 238, .28);
  --warm-a06: rgba(88, 66, 20, .06);
  --warm-a08: rgba(88, 66, 20, .08);
  --warm-a22: rgba(88, 66, 20, .22);
}

/* css/base.css */
/* Base: the page, plain text, and the small helpers every screen uses. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 400 var(--fs-2)/1.6 var(--font-ui); direction: rtl; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-family: var(--font-field); }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: var(--accent-a38) transparent; }

/* digits read left to right inside Arabic; plaintext keeps «ملف 0152» or «5:30 م» in the right order */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: plaintext; white-space: nowrap; }
.nobr { white-space: nowrap; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
#view .money:not(.free) { font-weight: 600; } /* an amount on a page stands out (the prototype's); a printed paper keeps its weight */
.money.free { color: var(--muted); font-weight: 400; }
.money.back { color: var(--rx-ink); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-1); }
.shake { animation: shake .3s ease; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* who a thing belongs to (a card's stripe, a task row, a chip, a toast) */
.o-pat, .sheet[data-own="pat"], .chip.pat { --own: var(--own-pat); --own-soft: var(--own-pat-soft); --own-ink: var(--own-pat-ink); }
.o-desk, .sheet[data-own="desk"], .chip.desk, .toast[data-own="desk"] { --own: var(--own-desk); --own-soft: var(--own-desk-soft); --own-ink: var(--own-desk-ink); }
.o-doc, .sheet[data-own="doc"], .chip.doc, .toast[data-own="doc"] { --own: var(--own-doc); --own-soft: var(--own-doc-soft); --own-ink: var(--own-doc-ink); }
.o-auto, .chip.auto { --own: var(--own-auto); --own-soft: var(--own-auto-soft); --own-ink: var(--own-auto-ink); }
.o-money { --own: var(--money); --own-soft: var(--money-soft); --own-ink: var(--money-ink); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@keyframes s-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* css/controls.css */
/* Controls: buttons, tabs, toggles, choices, switches, checkboxes, chips and pills.
   One filled button per row; «cancel» is a word; no hover lift (owner, 2026-11-21: it flickers on the bottom row). */

/* buttons: filled petrol with a little depth by default */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--ctl); padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-pill);
  background-color: var(--accent); background-image: var(--btn-depth); box-shadow: var(--sh-btn);
  color: var(--on-accent); font-size: var(--fs-2); font-weight: 500; white-space: nowrap;
  transition: transform .12s var(--ease-out), box-shadow .16s, filter .16s;
}
.btn:hover { background-color: var(--accent-2); box-shadow: var(--sh-btn-hover); }
.btn svg, .ic-inline { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* an icon inside a line of text (the closed day's ✓): the button icon's size and colour, on the text's line */
.ic-inline { display: inline-block; vertical-align: -3px; margin-inline-end: 4px; }
.btn.sm { height: var(--ctl-sm); padding: 0 15px; font-size: var(--fs-1); }
.btn.lg { height: var(--ctl-lg); padding: 0 28px; }
.btn.soft { background-color: var(--accent-soft); color: var(--accent-2); }
.btn.soft:hover { background-color: var(--soft-hover); }
/* the green «استلم» button that takes money (.money is the amount itself) */
.btn.pay { background-color: var(--money); color: var(--white); }
.btn.pay:hover { background-color: var(--money-ink); }

/* flat buttons: white with a line, a word, an icon, a warning */
.btn.ghost, .btn.link, .btn.icon, .btn.danger {
  background-image: none; box-shadow: none;
  transition: transform .1s var(--ease-out), background-color .14s, border-color .14s, box-shadow .16s;
}
.btn.ghost { background-color: var(--field); border-color: var(--btn-line); color: var(--accent-2); }
.btn.ghost:hover { background-color: var(--accent-soft); border-color: var(--accent); box-shadow: none; }
.btn.link { height: auto; padding: 2px 6px; border: 0; border-radius: var(--r-link); background-color: transparent; color: var(--accent); }
.btn.link:hover { background-color: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 3px; }
.btn.link.danger { color: var(--rx-ink); }
.btn.icon { width: var(--ctl-sm); height: var(--ctl-sm); padding: 0; flex: none; }
.btn.icon svg { width: 17px; height: 17px; }
.btn.danger { background-color: var(--field); border-color: var(--rx-line); color: var(--rx-ink); }
.btn.danger:hover { background-color: var(--rx-soft); border-color: var(--rx); box-shadow: none; }
.btn.danger.solid { background-color: var(--rx); border-color: var(--rx); color: var(--white); }
.btn.danger.solid:hover { background-color: var(--rx-ink); }
.btn.wa { background-color: var(--wa-soft); border-color: transparent; color: var(--wa); }
.btn.wa:hover { background-color: var(--wa-hover); background-image: none; } /* raised at rest, as the prototype */
.btn:not(.link):active { transform: scale(.975); filter: brightness(.97); }

/* ghost buttons in a page's own bars keep the raised look */
:is(.toolbar, .savebar, .next-acts, .phead, .pstrip, .crumb, .days) .btn.ghost:not(.icon) {
  background-image: var(--btn-depth); box-shadow: var(--sh-btn);
  transition: transform .12s var(--ease-out), box-shadow .16s, filter .16s;
}
:is(.toolbar, .savebar, .next-acts, .phead, .pstrip, .crumb, .days) .btn.ghost:not(.icon):hover { box-shadow: var(--sh-btn-hover); }

/* tabs: a rail with the chosen tab raised */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; margin-bottom: 14px; padding: 3px; border-radius: var(--r-rail); background: var(--tabs-bg); }
.toolbar .tabs { margin-bottom: 0; }
.tabs button {
  height: var(--ctl-sm); padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--muted-2); font-size: var(--fs-1); font-weight: 400;
  transition: transform .1s var(--ease-out), background-color .14s, border-color .14s, box-shadow .16s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px var(--cover-a18); }
.tabs .n { display: inline-grid; place-items: center; margin-inline-start: 6px; color: var(--muted-2); font-weight: 400; }

/* toggles: one or more picks from a short list (days, filters) */
.togs { display: flex; flex-wrap: wrap; gap: 6px; }
.tog {
  height: var(--ctl-sm); padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r-pill);
  background: var(--field); color: var(--ink); font-size: var(--fs-1);
  transition: transform .1s var(--ease-out), background-color .14s, border-color .14s, box-shadow .16s;
}
.tog:hover { border-color: var(--own, var(--accent)); }
.tog[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.tog[aria-pressed="true"]::before { content: "✓"; margin-inline-end: 4px; }

/* choice: exactly one of a few (gender, slot length) */
.choice {
  display: inline-flex; flex-wrap: wrap; gap: 2px; width: max-content; max-width: 100%; min-height: var(--ctl);
  padding: 3px; overflow: hidden; border: 1px solid var(--choice-line); border-radius: var(--r-rail); background: var(--field);
}
.choice button {
  height: 32px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; font-size: var(--fs-2);
  transition: transform .1s var(--ease-out), background-color .14s, border-color .14s, box-shadow .16s;
}
.choice button:hover:not([aria-pressed="true"]) { background: var(--accent-soft); }
.choice button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 500; }

/* switch: on/off beside a field («لا يملك هاتفاً», «مستعجل») */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-2); cursor: pointer; }
.switch input {
  appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0; padding: 0;
  border: 1px solid var(--field-line); border-radius: var(--r-1); background: var(--switch-off); cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.switch input::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: var(--r-dot);
  background: var(--white); box-shadow: var(--sh-1); transition: inset-inline-start .15s;
}
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { inset-inline-start: 18px; }

/* checkbox with its sentence */
.check { display: flex; align-items: center; gap: 9px; font-size: var(--fs-2); line-height: 1.5; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--accent); }
.f .check input { background-color: var(--white); } /* a checkbox inside a form field: on the field's white */

/* chips (who it belongs to) and pills (a row's state) */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: var(--r-pill);
  background: var(--own-soft); color: var(--own-ink); font-size: var(--fs-1); font-weight: 500; line-height: 1.6; white-space: nowrap;
}
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-dot); background: var(--own); }
.sh-head .chip.auto { min-width: 0; padding: 0; background: none; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: var(--fs-1); font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.pill:is(.waiting, .inside, .booked, .done, .away, .left) { padding: 0; border: 0; background: none; line-height: 1.6; }
.pill.waiting { color: var(--amber); }
.pill.inside { color: var(--accent-2); }
.pill:is(.booked, .away, .left) { color: var(--muted); }
.pill.done { color: var(--money-ink); }
.pill.left { text-decoration: line-through; }
.pill:is(.waiting, .inside)::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-dot); background: currentColor; }
.pill.away::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-dot); box-shadow: inset 0 0 0 1.5px currentColor; }
.pill.done::before { content: "✓"; }
.pill.red { background: var(--rx-soft); color: var(--rx-ink); }
.pill.new { background: var(--own-pat-soft); color: var(--own-pat-ink); }
.pill.urgent { background: var(--rx); color: var(--white); }
.vok { color: var(--money-ink); font-weight: 500; white-space: nowrap; }

/* the visit's mark in a row: written / draft */
.mk { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-1); white-space: nowrap; }
.mk i { width: 11px; height: 11px; border-radius: var(--r-dot); box-shadow: inset 0 0 0 1.5px var(--btn-line); }
.mk.draft { color: var(--amber); }
.mk.draft i { box-shadow: inset 0 0 0 1.5px var(--amber); background: linear-gradient(90deg, var(--amber) 50%, transparent 50%); }
.mk.done { color: var(--money-ink); }
.mk.done i { background: var(--money); box-shadow: none; }

/* a finger needs room on a touch screen */
@media (pointer: coarse) {
  .btn.sm { min-height: 40px; }
  .btn.icon { min-width: 40px; min-height: 40px; }
  .btn.link { min-height: 40px; padding-block: 6px; }
  .tabs button, .tog, .choice button { min-height: 42px; }
  .check, .switch { min-height: 44px; }
  .check input { width: 22px; height: 22px; }
}

/* css/fields.css */
/* Fields: <label class="f" data-req> <span class="lb">name <span class="req"><span>*</span></span></span> <input>
   <span class="err"><span>say <span dir="ltr" class="nobr">example</span> tail</span></span> </label>.
   The error line sits under its own field, inside its column, and wraps; its example never breaks. */
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > .lb { display: flex; align-items: center; gap: 4px; color: var(--ink); font-size: var(--fs-1); font-weight: 500; }
.lb .opt { color: var(--muted); font-size: var(--fs-1); font-weight: 400; }
.req { color: var(--rx); font-size: var(--fs-2); font-weight: 600; line-height: 1; }
.f.ok .req { color: var(--money); }
.f.ok .req > span { display: none; }
.f.ok .req::after { content: "✓"; font-size: var(--fs-1); }

/* the boxes */
.f input:not([type="checkbox"]), .f select, .f textarea, .search input {
  width: 100%; height: var(--ctl); padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r-1);
  background-color: var(--field); color: var(--ink); font-size: var(--fs-2);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.f textarea { height: auto; min-height: 44px; max-height: 320px; padding: 9px 12px; line-height: 1.7; resize: none; overflow: auto; field-sizing: content; }
.f textarea.tall { min-height: 84px; }
.f select {
  appearance: none; padding-inline-end: 34px;
  background: var(--field) var(--arrow) left 12px center / 14px 14px no-repeat;
}
.f select[dir="ltr"] { padding-left: 34px; padding-right: 12px; }
.inline input.short { width: 84px; }
.f input::placeholder, .f textarea::placeholder, .search input::placeholder { color: var(--placeholder); opacity: 1; }
.f input:hover, .f select:hover, .f textarea:hover, .search input:hover { border-color: var(--field-line-hover); }
.f input:focus, .f select:focus, .f textarea:focus, .search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.f input[readonly], .f textarea[readonly] { background: var(--sheet); border-style: dashed; }
.f .switch input { width: 38px; height: 22px; padding: 0; background: var(--switch-off); }
.f .switch input:checked { background: var(--accent); }
.f .hint { color: var(--muted); font-size: var(--fs-1); line-height: 1.5; }

/* wrong: red box, and a line that says how to write it, with an example */
.f.bad :is(input:not([type="checkbox"]), select, textarea), .f.bad .choice { border-color: var(--rx); background-color: var(--rx-soft); box-shadow: 0 0 0 1px var(--rx); }
.f.bad :is(input:not([type="checkbox"]), select, textarea):focus { box-shadow: 0 0 0 1px var(--rx), 0 0 0 4px var(--rx-a16); }
.f.bad .hint { display: none; }
:is(.f, .price-row, .ml-row) .err { display: none; align-items: flex-start; gap: 6px; color: var(--rx-ink); font-size: var(--fs-1); font-weight: 500; line-height: 1.5; }
:is(.f, .price-row, .ml-row).bad .err { display: flex; }
:is(.f, .price-row, .ml-row).bad .err::before {
  content: ""; flex: none; width: 15px; height: 15px; margin-top: 2px; border-radius: var(--r-dot);
  background: var(--rx) var(--err-mark) center / 15px 15px no-repeat;
}
:is(.f, .price-row, .ml-row) .err > span { min-width: 0; }

/* a gentle warning (a name already in the files) */
.warnmsg { display: none; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--amber); font-size: var(--fs-1); }
.f.warn .warnmsg { display: flex; }
.f.warn input, .f.warn select { border-color: var(--amber-line); background-color: var(--amber-wash); }

/* search: a round box with its magnifier */
.search { position: relative; flex: 1 1 320px; min-width: 0; max-width: 560px; }
.search input { height: 44px; padding: 0; padding-inline: 44px 18px; border-radius: var(--r-pill); }
.search svg { position: absolute; top: 13px; inset-inline-start: 16px; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.f > .search { flex: none; } /* inside a form's column its basis would become its height */

/* field groups */
.sec-h { margin: 0 0 10px; color: var(--ink); font: 600 var(--fs-2)/1.4 var(--font-ui); }
.grid2, .grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@container (max-width: 560px) {
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
}

@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
}

/* css/cards.css */
/* Cards: the white sheet, its head, and the strip of figures.
   The page's main card (wide column) is raised; side cards sit lower on the paper. */
.sheet {
  min-width: 0; padding: 20px; border: 1px solid var(--card-line); border-radius: var(--r-sheet);
  background: var(--sheet); box-shadow: var(--sh-card), inset 0 1px 0 var(--white);
}
.row > :is(.c7, .c8).sheet, .row > :is(.c7, .c8) > .sheet { box-shadow: var(--sh-card-hi); }
.row > :is(.c4, .c5).sheet:not(.next), .row > :is(.c4, .c5) > .sheet:not(.next) {
  border-color: transparent; background: var(--sheet-side); box-shadow: inset 0 0 0 1px var(--card-line);
}
.sheet .sheet { box-shadow: none; }
.sheet[data-own] { position: relative; }
/* the coloured stripe: only on a card that came from the other screen (a reception card on the doctor's screen
   and the other way round); the patient's own cards carry none */
.sheet[data-own]::before {
  content: ""; position: absolute; z-index: 1; inset-block: 12px; inset-inline-start: -1px; width: 4px;
  border-start-end-radius: var(--r-tick); border-end-end-radius: var(--r-tick); background: var(--own, var(--accent)); pointer-events: none;
}
.device[data-role="doc"] .sheet[data-own="doc"]::before, .device[data-role="desk"] .sheet[data-own="desk"]::before,
.sheet[data-own="pat"]:not(.next)::before { display: none; }
.device[data-role="doc"] .sh-head .chip.doc, .device[data-role="desk"] .sh-head .chip.desk { display: none; }

.sh-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; margin: 0 0 12px; }
.sh-head h2 { margin: 0; font: 600 var(--fs-3)/1.35 var(--font-ui); }
.sh-head .end { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.sh-head .cnt { display: inline-grid; min-width: 0; place-items: center; border-radius: var(--r-pill); color: var(--muted); font-size: var(--fs-1); font-weight: 500; font-variant-numeric: tabular-nums; }

/* an empty page or list: one line, how to fill it, and its one button (no drawing) */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 16px 26px; border-radius: var(--r-2); color: var(--muted); font-size: var(--fs-1); text-align: center; }
.empty b { color: var(--ink); font-size: var(--fs-2); font-weight: 600; }
.empty .btn { margin-top: 6px; }
.empty .inline { justify-content: center; }

/* figures: separate small cards, or one joined card on the home pages */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
  min-width: 0; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: var(--r-2);
  background: var(--sheet); box-shadow: var(--sh-1);
}
.stat b { display: block; font: 600 var(--fs-5)/1.3 var(--font-ui); letter-spacing: -.2px; white-space: nowrap; }
.stat span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-1); }
.stat.amber span { color: var(--amber); }
.stat.green span { color: var(--money-ink); }
.stat:is(.amber, .green) span::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-dot); background: currentColor; }
.stat.green:last-child b { color: var(--money); }
.stat.zero :is(b, span) { color: var(--muted); }
.stat.zero span::before { background: var(--btn-line); }

[data-page="home"] .strip {
  grid-template-columns: repeat(4, minmax(max-content, 1fr)); gap: 0;
  border: 1px solid var(--card-line); border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--sh-card);
}
[data-page="home"] .strip.three { grid-template-columns: repeat(3, minmax(max-content, 1fr)); }
[data-page="home"] .stat {
  display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 10px;
  padding: 14px 20px; border: 0; border-radius: 0; background: none; box-shadow: none;
}
[data-page="home"] .stat + .stat { border-inline-start: 1px solid var(--line-2); }
@container (max-width: 1040px) {
  [data-page="home"] .stat { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@container (max-width: 560px) {
  [data-page="home"] :is(.strip, .strip.three) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  [data-page="home"] .stat { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; gap: 8px; padding-inline: 16px; }
  [data-page="home"] .stat:nth-child(2n) { border-inline-start: 1px solid var(--line-2); }
  [data-page="home"] .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  [data-page="home"] .strip:not(.three) .stat:nth-child(n+3) { grid-column: 1 / -1; border-inline-start: 0; }
  [data-page="home"] .strip.three .stat:last-child { grid-column: 1 / -1; }
  .stat b { font-size: var(--fs-4); }
}

/* css/lists.css */
/* Lists: the person row (.li), the reception's queue table (.qt), plain tables (.tbl), the row menu and the pager.
   A patient's row looks the same in every list: turn number, name and facts, actions. */
.list { display: flex; flex-direction: column; }
.li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 12px;
  min-height: 44px; padding: 8px; border-top: 1px solid var(--line-2); border-radius: var(--r-row);
  transition: background var(--t-fast);
}
.li:first-child { border-top: 0; }
.li:hover { background: var(--hover); }
.li[data-act="file"] { cursor: pointer; }
.li[data-act="file"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.li .who { min-width: 0; }
.li .who b, .who2 b { display: block; font-size: var(--fs-2); font-weight: 600; line-height: 1.4; text-overflow: ellipsis; }
.li:is([data-state="done"], [data-state="left"]) .who b { color: var(--muted); font-weight: 500; }
.li .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0; color: var(--muted); font-size: var(--fs-1); line-height: 1.5; }
.li .meta > span:not(.pill):not(.chip):not(.mk) + span:not(.pill):not(.chip):not(.mk)::before { content: "·"; margin-inline: 6px; color: var(--dot-sep); }
.li .meta > .pill + span { margin-inline-start: 8px; }
.li .meta > span:not(.pill):not(.chip):not(.mk) + :is(.pill, .chip, .mk) { margin-inline-start: 8px; } /* a label after plain words never touches them */
.meta .num { letter-spacing: .01em; }
.li .meta .qwait { font-variant-numeric: tabular-nums; }
.li .acts { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.li .money { color: inherit; }
.li.w20 .qwait { color: var(--amber); font-weight: 600; }
.li.w40 .qwait { color: var(--rx-ink); font-weight: 600; }

/* in a row, one filled button: the others turn soft or flat */
.li:not(.task) .acts .btn.sm:where(:not(.icon):not(.ghost):not(.link):not(.soft):not([data-act="in"])) { background-color: var(--accent-soft); border-color: transparent; color: var(--accent-2); }
.li:not(.task) .acts .btn.sm:where(:not(.icon):not(.ghost):not(.link):not(.soft):not([data-act="in"])):hover { background-color: var(--soft-hover); }
:is(.li:not(.task), td, .sh-head, .crumb, .days) .btn.ghost, .more .btn { border-color: transparent; background-color: transparent; color: var(--accent-2); }
:is(.li:not(.task), td, .sh-head, .crumb, .days) .btn.ghost:hover, .more .btn:hover { border-color: transparent; background-color: var(--accent-soft); }

/* the turn number: a coin while waiting, petrol inside, a ring when out for a test, green when done, a time when booked */
.li .no {
  display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; border-radius: var(--r-dot);
  background: var(--own-auto-soft); color: var(--own-auto-ink); font-size: var(--fs-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.li .no svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.li[data-state="waiting"] .no {
  background: radial-gradient(circle at 34% 28%, var(--coin-hi), var(--brass) 58%, var(--coin-lo)); color: var(--brass-ink);
  box-shadow: inset 0 1px 0 var(--white-a65), inset 0 -2px 0 var(--coin-shade-a30), 0 2px 5px var(--coin-shade-a32);
}
.li[data-state="inside"] .no { background: radial-gradient(circle at 34% 28%, var(--cover-mid), var(--cover) 62%); color: var(--white); box-shadow: 0 0 0 2px var(--brass), 0 0 0 7px var(--brass-a20); }
.li[data-state="away"] .no { background: transparent; color: var(--cover); box-shadow: inset 0 0 0 1.5px var(--cover); }
.li[data-state="done"] .no { background: transparent; color: var(--money-ink); box-shadow: inset 0 0 0 1.5px var(--money-line); }
.li[data-state="booked"] .no { width: auto; height: auto; justify-items: start; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); }

/* the next patient: a warm wash, a brass edge, a ring that breathes, and the word «التالي» */
.li.is-next {
  position: relative; margin-top: 10px; border-top-color: transparent; border-radius: var(--r-lift);
  background: linear-gradient(to left, var(--wash-next), var(--wash-next-fade) 78%); box-shadow: inset -3px 0 0 var(--brass);
}
.li.is-next + .li { border-top-color: transparent; }
.li.is-next .no { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--brass); animation: s-ring 2.6s ease-in-out infinite; }
.li.is-next::before {
  content: "التالي"; position: absolute; top: -11px; inset-inline-start: 16px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--brass); color: var(--brass-ink); font-size: var(--fs-1); font-weight: 600; line-height: 1.75; box-shadow: 0 2px 5px var(--coin-shade-a30);
}
@keyframes s-ring { 0%, 100% { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--brass); } 50% { box-shadow: 0 0 0 2px var(--white), 0 0 0 7px var(--brass-a35); } }

/* a task row (reception's «يحتاج منك الآن»): a coloured stripe, the sentence, one wide button */
.li.task { grid-template-columns: 4px minmax(0, 1fr) 208px; }
.li.task .no { width: 4px; min-width: 0; height: auto; align-self: stretch; margin-block: 3px; border-radius: var(--r-tick); background: var(--own); color: var(--own-ink); }
.li.task .no svg { display: none; }
.li.task .who b { font-weight: 500; }
.li.task .acts .btn { width: 100%; justify-content: center; padding-inline: 10px; }
@container (max-width: 560px) {
  .li.task { grid-template-columns: 4px minmax(0, 1fr); }
  .li.task .acts { grid-column: 2; justify-content: flex-start; }
}

/* group heads inside a list, and the folded «انتهت» */
.group-h, .qt-g, .done-fold > summary { display: flex; align-items: center; gap: 6px; margin: 0; padding: 16px 8px 4px; color: var(--muted); font-size: var(--fs-1); font-weight: 500; }
:is(.group-h, .qt-g, .done-fold) .count { display: inline-grid; min-width: 0; place-items: center; border-radius: var(--r-pill); color: var(--muted); font-size: var(--fs-1); font-weight: 400; }
.done-fold { margin-top: 6px; }
.done-fold > summary { cursor: pointer; list-style: none; }
.done-fold > summary::-webkit-details-marker { display: none; }
/* the fold's small «+» box («−» when open), as in the prototype */
.done-fold > summary::before {
  content: "+"; display: grid; place-items: center; width: 20px; height: 20px;
  border: 1px solid var(--line); border-radius: var(--r-link); background: var(--white); color: var(--ink); font-size: var(--fs-1);
}
.done-fold[open] > summary::before { content: "−"; }

/* the reception's queue: a table made of rows, columns that fold as the screen narrows */
.qt { display: flex; flex-direction: column; }
.qt-h, .li.qt-r {
  display: grid; grid-template-columns: 42px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.55fr);
  align-items: center; gap: 4px 14px;
}
.qt-h {
  position: sticky; top: -16px; z-index: 4; height: 30px; padding-inline: 10px; border-bottom: 1px solid var(--line);
  background: var(--sheet); color: var(--muted); font-size: var(--fs-1); font-weight: 500;
}
.qt-g { position: sticky; top: 14px; z-index: 3; background: var(--sheet); }
.qt-g::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: 8px; background: linear-gradient(var(--sheet), transparent); pointer-events: none; }
.qt-g .btn.link { margin-inline-start: auto; }
.li.qt-r { min-height: 57px; padding: 8px; gap: 0 14px; border-top: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; transition: background .14s; }
.li.qt-r:hover { background: transparent; }
.li.qt-r.is-next { border-top-color: transparent; border-radius: var(--r-lift); }
.li.qt-r[data-state="inside"] {
  border-top-color: transparent; border-radius: var(--r-lift);
  background: linear-gradient(to left, var(--wash-in), var(--wash-in-a20) 78%); box-shadow: inset -3px 0 0 var(--cover);
}
.qt-r small { display: block; overflow: clip visible; color: var(--muted); font-size: var(--fs-1); line-height: 1.5; white-space: nowrap; text-overflow: ellipsis; }
.qt-r .rnote { margin-top: 1px; padding-inline-start: 7px; border-inline-start: 2px solid var(--btn-line); }
.qt-r .st, .qt-r .vis { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.qt-r .st { gap: 1px 8px; }
.st-t { font-size: var(--fs-1); line-height: 1.5; white-space: normal; }
.st-t > .num { unicode-bidi: plaintext; }
.st-t.done { color: var(--money-ink); }
.st-t.done::before { content: "✓ "; }
.st-t.muted { color: var(--muted); }
.qt-r.w20 .st-t { color: var(--amber); font-weight: 600; }
.qt-r.w40 .st-t { color: var(--rx-ink); font-weight: 600; }
.st .late { display: block; color: var(--rx-ink); font-weight: 500; }
.qt-r .vis .money { font-weight: 600; }
.qt-r .acts { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; min-width: 0; }
.qt-r .acts .btn:not(.icon) { min-width: 104px; justify-content: center; }
.li.qt-r:not([data-state="waiting"]) .acts .btn:not(.icon) { background-color: var(--accent-soft); color: var(--accent-2); box-shadow: none; }
.li.qt-r:not([data-state="waiting"]) .acts .btn:not(.icon):hover { background-color: var(--soft-hover); }
.qt-r .acts .btn.icon { border-color: transparent; background-color: transparent; color: var(--accent-2); }
.qt-r .acts .btn.icon:is(:hover, [aria-expanded="true"]) { background-color: var(--accent-soft); color: var(--accent-2); }
.qt.done-folded .qt-r:is([data-state="done"], [data-state="left"]) { display: none; }
@media (hover: hover) {
  .qt-r .more > .btn.icon { opacity: .5; }
  .qt-r:hover .more > .btn.icon, .qt-r .more > .btn.icon:is([aria-expanded="true"], :focus-visible) { opacity: 1; }
}
@container (min-width: 1001px) {
  .qt-h, .li.qt-r { grid-template-columns: 42px minmax(0, 1.5fr) minmax(6.5rem, 1fr) minmax(8.5rem, 1.15fr) minmax(7.5rem, 1.55fr); }
}
@container (min-width: 1200px) {
  .qt-h, .li.qt-r { grid-template-columns: 42px minmax(0, 1.4fr) minmax(6.5rem, 1.15fr) minmax(8.5rem, 1.3fr) 196px; gap: 2px 14px; }
  .li.qt-r { gap: 0 14px; }
  .qt-r .st-t { white-space: nowrap; }
  .qt-r .vis .meta { flex-wrap: nowrap; }
}
@container (max-width: 1199px) {
  .qt-r .acts .btn:not(.icon) { min-width: 0; padding-inline: 12px; }
  .qt-r .acts .btn:not(.icon) svg { display: none; }
}
@container (max-width: 1000px) {
  .qt-h { display: none; }
  .li.qt-r { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .qt-r .st, .qt-r .vis { grid-column: 2; flex-flow: row wrap; align-items: center; gap: 8px; }
  .qt-r .acts { grid-area: 1 / 3; }
}
@container (max-width: 560px) {
  .li.qt-r { grid-template-columns: 42px minmax(0, 1fr); }
  .qt-r .acts { grid-area: auto / 2; flex-wrap: wrap; }
  .qt-r .who b { white-space: normal; }
}

/* the «…» menu of a row: it measures itself and opens upward near the bottom (.up) */
.more { position: relative; display: inline-flex; }
.pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline-end: 0; display: flex; flex-direction: column; gap: 2px;
  min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lift); background: var(--white); box-shadow: var(--sh-2);
  animation: pop .14s ease-out;
}
.pop.up { top: auto; bottom: calc(100% + 6px); }
.pop.narrow { min-width: 0; }
.pop button {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: var(--r-1); background: transparent;
  font-size: var(--fs-2); text-align: start; white-space: nowrap;
}
.pop.narrow button { white-space: normal; }
.pop button:hover { background: var(--accent-soft); }
.pop button.danger { position: relative; margin-top: 5px; color: var(--rx-ink); }
.pop button.danger::before { content: ""; position: absolute; top: -4px; inset-inline: 8px; border-top: 1px solid var(--line-2); }
.pop button.danger:hover { background: var(--rx-soft); }
.pop svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* tables */
.scrollx { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; line-height: normal; }
.tbl th {
  height: 30px; padding: 0 10px; border-bottom: 1px solid var(--line); background: none;
  color: var(--muted); font-size: var(--fs-1); font-weight: 500; text-align: start; white-space: nowrap;
}
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-size: var(--fs-2); vertical-align: middle; }
.tbl td.num { color: var(--muted); letter-spacing: .02em; }
.tbl :is(td, th).amt { text-align: end; white-space: nowrap; }
.tbl td.acts { text-align: end; white-space: nowrap; }
.tbl td.acts .btn { margin-inline-start: 6px; }
.tbl tr.click { cursor: pointer; transition: background .14s; }
.tbl tr.click:hover { background: var(--accent-a04); }
.tbl tr.click td:first-child { border-start-start-radius: var(--r-row); border-end-start-radius: var(--r-row); }
.tbl tr.click td:last-child { border-start-end-radius: var(--r-row); border-end-end-radius: var(--r-row); }

/* a person with the file-number badge */
.who2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who2 b { white-space: nowrap; overflow: clip visible; }
.who2 small { display: block; color: var(--muted); font-size: var(--fs-1); line-height: 1.5; }
@container (max-width: 760px) {
  .who2 b { white-space: normal; }
}
.av {
  display: grid; place-items: center; flex: none; min-width: 54px; height: 28px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--own-auto-soft); color: var(--accent-2); font-size: var(--fs-1); font-weight: 600; font-variant-numeric: tabular-nums; direction: ltr;
}
.face {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-dot); vertical-align: middle;
  background: var(--av-bg, var(--own-doc-soft)); color: var(--av-ink, var(--own-doc-ink));
  box-shadow: inset 0 0 0 1px var(--black-a05), 0 1px 2px var(--cover-2-a10);
}
.face::before { content: attr(data-l); font: 600 var(--fs-2)/1 var(--font-ui); }
.face.lg { width: 54px; height: 54px; }
.face.lg::before { font-size: var(--fs-4); }
.face.sm { width: 28px; height: 28px; }
.face.sm::before { font-size: var(--fs-1); }
.face.t0 { --av-bg: var(--face-0-bg); --av-ink: var(--face-0-ink); }
.face.t1 { --av-bg: var(--face-1-bg); --av-ink: var(--face-1-ink); }
.face.t2 { --av-bg: var(--face-2-bg); --av-ink: var(--face-2-ink); }
.face.t3 { --av-bg: var(--face-3-bg); --av-ink: var(--face-3-ink); }
.face.t4 { --av-bg: var(--face-4-bg); --av-ink: var(--face-4-ink); }
/* a name with its face before it (a file's head, the slim strip) */
.has-face { display: flex; align-items: center; gap: 10px; }

/* pager */
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: var(--fs-1); }
.pager .pg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.pg-n { min-width: 34px; height: 34px; border: 1px solid transparent; border-radius: var(--r-dot); background: transparent; font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
.pg-n:hover { border-color: var(--btn-line); background: var(--white); }
.pg-n[aria-current="page"] { background: var(--accent); color: var(--white); font-weight: 600; }

/* css/shell.css */
/* The frame: one .device fills the window: the top bar, the side menu over or beside the page, the page with its
   title bar and grid, the bell's panel and the toasts. Container queries follow the device's width. */
.device { container-type: inline-size; position: relative; display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--paper); }

/* top bar: [menu, page name] | كشفية | [saved, bell, user, sign-out]; a brass line with a pulse that runs across */
.topbar {
  --focus: var(--brass);
  position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  flex: none; height: 52px; padding-inline: 14px; overflow-x: clip; border-bottom: 2px solid var(--brass); color: var(--on-cover);
  background: radial-gradient(520px 90px at 50% -10%, var(--brass-a20), transparent 70%), linear-gradient(var(--cover-hi) 0, var(--cover) 58%, var(--cover-2) 100%);
  box-shadow: 0 8px 22px -8px var(--cover-2-a55);
}
.topbar::after {
  content: ""; position: absolute; left: 0; bottom: -11px; width: 100%; height: 20px; pointer-events: none;
  background: var(--ecg-bar) 0 50% / 150px 20px no-repeat;
  transform: translateX(calc(50% - 75px)); animation: tb-pulse 8s linear infinite;
}
@keyframes tb-pulse { 0% { transform: translateX(-150px); } 70%, 100% { transform: translateX(100%); } }
.tb-start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-acts { display: flex; align-items: center; gap: 8px; justify-self: end; }
.tb-menu, .bell { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: var(--r-dot); }
.tb-menu { background: var(--brass); color: var(--cover-2); }
.bell { position: relative; width: 34px; height: 34px; background: var(--on-cover-a12); color: var(--on-cover); }
.bell:hover { background: var(--on-cover-a22); }
.bell.ring svg { animation: ring .9s; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.tb-menu svg, .bell svg, .tb-out svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute; top: -6px; inset-inline-end: -6px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-1); background: var(--rx); color: var(--white); font-size: var(--fs-1); font-weight: 600; line-height: 1; box-shadow: 0 0 0 2px var(--cover);
}
.tb-page { overflow: clip visible; font-size: var(--fs-2); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.topbar .kf-name { position: relative; top: -3px; display: inline-block; color: var(--on-cover); font: 700 var(--fs-mark)/1 var(--font-name); white-space: nowrap; }
.kf-name i { font-style: normal; color: var(--brass); }
.tb-net { display: inline-flex; align-items: center; gap: 6px; color: var(--cover-dim); font-size: var(--fs-1); white-space: nowrap; }
.tb-net::before { content: ""; width: 7px; height: 7px; border-radius: var(--r-dot); background: var(--net-ok); }
.tb-net.off { color: var(--net-off); }
.tb-net.off::before { background: var(--brass); }
.tb-user { display: flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--on-cover-a12); font-size: var(--fs-1); white-space: nowrap; }
.tb-user small { margin-inline-start: 6px; color: var(--cover-soft); font-size: var(--fs-1); }
.tb-out {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; margin-inline-start: 8px; padding: 0 13px; border: 0; border-radius: var(--r-pill);
  background: transparent; box-shadow: inset 0 0 0 1px var(--on-cover-a34); color: var(--cover-ink); font-size: var(--fs-1); font-weight: 500;
}
.tb-out:hover { background: var(--rx); box-shadow: none; color: var(--white); }
.tb-back {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 12px; border: 0; border-radius: var(--r-pill);
  background: var(--on-cover-a14); color: var(--on-cover); font-size: var(--fs-1); font-weight: 500; white-space: nowrap;
}
.tb-back:hover { background: var(--on-cover-a24); }
.tb-back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) {
  .tb-menu, .bell { width: 42px; height: 42px; }
  .tb-out, .tb-back, .tb-user { height: 42px; }
  .tb-out { min-width: 42px; justify-content: center; }
}
@container (max-width: 700px) {
  .tb-net { display: none; }
}
/* under the top bar while the connection is lost, and «عاد الاتصال.» a moment after it is back */
.net-strip { flex: none; padding: 7px 16px; font-size: var(--fs-1); font-weight: 500; text-align: center; }
.net-strip.off { border-bottom: 1px solid var(--net-off-line); background: var(--net-off-bg); color: var(--net-off-ink); }
.net-strip.back { border-bottom: 1px solid var(--net-back-line); background: var(--net-back-bg); color: var(--money-ink); }
@container (max-width: 640px) {
  .tb-page, .tb-user small, .tb-out span, .tb-back span { display: none; }
  .topbar .kf-name { font-size: var(--fs-mark-sm); }
  .tb-back { padding: 0 10px; }
}
@container (max-width: 470px) {
  .tb-user { display: none; }
}

/* side menu: closed at start; over the page on narrow screens, beside it on wide ones; out of the Tab order when closed */
.dev-body { position: relative; display: flex; flex: 1; min-height: 0; }
.side {
  --focus: var(--brass);
  position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 20; display: flex; flex-direction: column; gap: 8px;
  width: 212px; padding: 14px 12px; overflow-y: auto; overscroll-behavior: contain; background: var(--cover); color: var(--cover-ink);
  box-shadow: -10px 0 30px var(--black-a18); transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s;
}
.side.open { transform: none; visibility: visible; }
.side > * { flex: none; }
.side .grp { display: flex; flex-direction: column; gap: 2px; }
.side .grp + .grp { padding-top: 6px; border-top: 1px solid var(--cover-ink-a14); }
.side button {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--cover-ink); font-size: var(--fs-2); text-align: start;
}
.side button:hover { background: var(--cover-ink-a08); }
.side button[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: 600; }
.side svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scrim { position: absolute; inset: 0; z-index: 15; background: var(--cover-2-a25); }
@media (pointer: coarse) {
  .side button { min-height: 44px; }
}
@container (min-width: 1040px) {
  .side { position: relative; flex: none; box-shadow: none; transform: none; transition: none; }
  .side:not(.open) { display: none; }
  .scrim { display: none; }
}

/* the page: a warm paper with a soft glow, centred, ending with a small heartbeat */
.view {
  flex: 1; min-width: 0; overflow: auto; padding: 20px 24px 32px; scrollbar-gutter: stable;
  background-color: var(--paper);
  background-image: var(--grain), radial-gradient(980px 560px at 104% -10%, var(--brass-a26), transparent 62%), radial-gradient(820px 560px at -8% 110%, var(--accent-a11), transparent 60%);
}
@container (max-width: 560px) {
  .view { padding: 16px 14px 28px; }
}
.page { max-width: 1240px; margin-inline: auto; font-size: var(--fs-2); line-height: 1.55; }
.page.narrow { max-width: 960px; }
.page.full { max-width: none; }
.page:not(.full)::after {
  content: ""; display: block; height: 40px; max-width: 520px; margin: 26px auto 0; opacity: .75;
  background:
    var(--ecg) center / 260px 40px no-repeat,
    linear-gradient(to left, transparent, var(--brass-a55) 22%, var(--brass-a55) calc(50% - 130px), transparent calc(50% - 130px), transparent calc(50% + 130px), var(--brass-a55) calc(50% + 130px), var(--brass-a55) 78%, transparent) center / 100% 1.6px no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .view.enter .page > * { animation: s-rise .34s var(--ease-out) both; }
  .view.enter .page > :nth-child(2) { animation-delay: .04s; }
  .view.enter .page > :nth-child(3) { animation-delay: .08s; }
  .view.enter .page > :nth-child(n+4) { animation-delay: .12s; }
}

/* the page's title bar: the page name lives in the top bar, so the h1 is kept for screen readers only (on phones it shows) */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 16px; }
.toolbar h1 { margin: 0; font: 600 var(--fs-3)/1.35 var(--font-ui); }
.toolbar .today { margin-inline-end: auto; color: var(--ink); font-size: var(--fs-5); font-weight: 700; line-height: 1.3; }
.toolbar .today::after { content: ""; display: block; width: 38px; height: 3px; margin-top: 5px; border-radius: var(--r-line); background: linear-gradient(to left, var(--brass), var(--brass-hi)); }
.toolbar .end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-inline-start: auto; }
@media (max-height: 820px) {
  .page > .toolbar { margin-bottom: 8px; }
}
@container (min-width: 641px) {
  .toolbar h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .toolbar:not(:has(> :not(h1))) { display: none; }
}
@container (max-width: 700px) {
  .toolbar .today { font-size: var(--fs-4); }
}
@container (max-width: 560px) {
  .toolbar .end { margin-inline-start: 0; }
}

/* the page grid: 12 columns, one on narrow screens (a side column then flows into the page, its first card first) */
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 16px; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.stack { display: flex; flex-direction: column; gap: 16px; }
@container (max-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > :is(.c4, .c5, .c7, .c8) { grid-column: auto; }
  .row .stack.rail { display: contents; }
  .row .stack.rail > .sheet:first-child { order: -1; }
}

/* the bell's panel */
.np-scrim { position: absolute; inset: 0; z-index: 35; }
.npanel {
  position: absolute; z-index: 36; inset-block-start: 58px; inset-inline-end: 10px; width: min(360px, 100% - 20px); max-height: 70%;
  overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--white); box-shadow: var(--sh-2);
  animation: pop .2s ease-out;
}
.npanel h3 { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 8px; font: 600 var(--fs-2) var(--font-ui); }
.npanel .empty { display: grid; justify-items: center; gap: 10px; padding: 18px 12px 22px; }
.npanel .empty::before {
  content: ""; width: 120px; height: 18px;
  background: var(--ecg-empty) center / 100% 100% no-repeat;
}
.npanel .empty b { color: var(--muted); font-size: var(--fs-1); font-weight: 400; text-align: center; }
.nitem {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-inline-start: 3px solid var(--own, var(--accent));
  border-radius: var(--r-1); background: transparent; font-size: var(--fs-1); text-align: start; transition: background var(--t-fast);
}
.nitem + .nitem { margin-top: 4px; }
.nitem.unread { background: var(--own-soft, var(--accent-soft)); }
.nitem:hover { background: var(--sheet); }
.nitem > div { flex: 1; min-width: 0; }
.nitem b { font-weight: 500; }
.nitem small { display: block; color: var(--muted); font-size: var(--fs-1); }
.nitem svg { width: 16px; height: 16px; flex: none; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nitem .chip { align-self: flex-start; margin-inline-start: auto; }

/* toasts: dark pills at the bottom, the newest at the bottom; a refusal stays until closed */
.toasts {
  position: absolute; z-index: 35; inset-block: auto 22px; inset-inline: 0; display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  width: min(460px, 100% - 24px); margin-inline: auto; pointer-events: none;
}
.toast {
  position: relative; display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; padding: 10px 18px 10px 22px;
  border-radius: var(--r-pill); background: var(--cover-2); color: var(--on-cover); box-shadow: var(--sh-toast);
  font-size: var(--fs-2); cursor: default; pointer-events: auto; animation: tin .24s ease-out;
}
.toast::before { content: ""; z-index: 1; flex: none; width: 8px; height: 8px; border-radius: var(--r-dot); background: var(--ok-dot); pointer-events: none; }
.toast.err { box-shadow: 0 0 0 1.5px var(--rx-hi), var(--sh-toast); }
.toast.err::before { background: var(--rx-hi); }
.toast.out { animation: tout .2s ease-in forwards; }
.toast .t-body { flex: 1; min-width: 0; }
.toast .t-body small { display: block; color: var(--muted); font-size: var(--fs-1); }
.toast.act .t-body { display: flex; align-items: center; gap: 8px; }
.toast.act .t-body svg { flex: none; width: 16px; height: 16px; margin-inline-end: 4px; color: var(--ok-hi); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast .btn { background-image: none; box-shadow: none; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.toast .x {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-inline-start: 6px; border: 0; border-radius: var(--r-dot);
  background: var(--on-cover-a14); color: var(--on-cover); font-size: var(--fs-2); line-height: 1;
}
@keyframes tin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(6px); } }

/* css/modal.css */
/* Dialogs: <div class="layer-slot"><div class="layer"><div class="modal" role="dialog">…</div></div></div>.
   The main button first, «إلغاء» a quiet word at the far end; the foot stays in view while the dialog scrolls. */
.layer-slot:empty { display: none; }
.layer {
  position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px;
  background: var(--cover-2-a40); animation: fade .15s ease;
}
.modal {
  width: min(560px, 100%); max-height: calc(100% - 20px); overflow: auto; padding: 20px 24px;
  border-radius: var(--r-3); background: var(--sheet); box-shadow: var(--sh-modal);
  font-size: var(--fs-2); line-height: 1.55;
}
.modal.wide { width: min(720px, 100%); }
@media (prefers-reduced-motion: no-preference) {
  .modal:not(.shake) { animation: s-pop .26s cubic-bezier(.2, 1.15, .3, 1) both; }
}
@keyframes s-pop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h2 { margin: 0 0 4px; font: 600 var(--fs-3)/1.35 var(--font-ui); }
.modal .sub { margin: 0 0 14px; color: var(--muted); font-size: var(--fs-2); }

/* «المزيد» folds */
.modal details > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: var(--fs-1); font-weight: 500; list-style: none; cursor: pointer; }
.modal details > summary::-webkit-details-marker { display: none; }
.modal details > summary::before {
  content: ""; width: 14px; height: 14px; transition: transform .15s;
  background: var(--arrow-accent) center / 14px auto no-repeat;
}
.modal details[open] > summary::before { transform: rotate(180deg); }

.modal .foot {
  position: sticky; bottom: -20px; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 -20px; padding: 16px 0 20px; border-top: 1px solid var(--line-2); background: var(--sheet);
}
.modal .foot .end { margin-inline-start: auto; }
/* a field brought into sight (a refused form focuses it) stops above the sticky foot, its error line too */
.modal:has(.foot) { scroll-padding-bottom: 100px; }
@container (max-width: 560px) {
  .modal:has(.foot) { scroll-padding-bottom: 150px; } /* the foot's buttons take two lines on a phone */
}
.modal .foot .btn:first-child { min-width: 150px; justify-content: center; }
.modal .foot .btn[data-act="close"]:not(:only-child) {
  margin-inline-start: auto; padding-inline: 14px; border-color: transparent; background: none; box-shadow: none; color: var(--muted);
}
.modal .foot .btn[data-act="close"]:not(:only-child):hover { background: var(--line-2); color: var(--ink); }

/* the quick patient search (Ctrl+K or «/», finder.js): a box near the top, the patients found, the keys it takes */
.modal:has(.kq) { width: min(600px, calc(100% - 24px)); padding: 0; align-self: start; margin-top: 72px; overflow: hidden; }
.kq-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.kq-in svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.kq-in input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; font: 500 var(--fs-2) var(--font-field); color: var(--ink); outline: none; }
.kq-in input:focus { box-shadow: var(--ring); }
.kq kbd { padding: 1px 7px; border: 1px solid var(--line); border-radius: var(--r-key); background: var(--white); color: var(--muted); font: inherit; }
.kq-l { max-height: min(420px, 60vh); padding: 8px; overflow: auto; }
.kq-l:empty { display: none; }
.kq-r {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 9px 12px;
  border: 0; border-radius: var(--r-row); background: none; text-align: start; cursor: pointer;
}
.kq-r[aria-selected="true"] { background: var(--accent-soft); }
.kq-r .no {
  display: grid; place-items: center; height: 26px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white);
  color: var(--accent-2); font-size: var(--fs-1); font-weight: 600;
}
.kq-r b { display: block; font-size: var(--fs-2); font-weight: 600; }
.kq-r small { color: var(--muted); font-size: var(--fs-1); }
.kq-r > span small { display: block; } /* the age and phone: its own line under the name */
.kq-none { margin: 0; padding: 14px 20px; color: var(--muted); font-size: var(--fs-1); }
.kq-f { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 20px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: var(--fs-1); }

/* css/signin.css */
/* Sign-in: <main class="signin"> fills the window while signed out (the .device is hidden then).
   The real system's sign-in look: petrol with a brass heartbeat across the middle and two soft lights; the name
   كشفية with its shine; no clinic name, no test accounts. */
.signin {
  min-height: 100dvh; display: grid; place-items: center; padding: 16px; color: var(--ink); font: 400 var(--fs-2)/1.6 var(--font-ui);
  background: radial-gradient(900px 500px at 80% 10%, var(--brass-a16), transparent 60%), linear-gradient(160deg, var(--cover) 0%, var(--cover-2) 100%) fixed;
}
.signin .bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.signin .bg-ecg { position: absolute; top: 50%; inset-inline: 0; width: 100%; height: 140px; transform: translateY(-50%); opacity: .55; }
.signin .bg-ecg polyline {
  fill: none; stroke: var(--brass); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 2600; stroke-dashoffset: 2600;
  animation: ecg 4.5s linear infinite;
}
@keyframes ecg { 0% { stroke-dashoffset: 2600; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -2600; } }
.signin .blob { position: absolute; border-radius: var(--r-dot); filter: blur(60px); opacity: .35; animation: float 14s ease-in-out infinite alternate; }
.signin .blob.b1 { top: -80px; right: -60px; width: 380px; height: 380px; background: var(--signin-glow); }
.signin .blob.b2 { bottom: -90px; left: -40px; width: 320px; height: 320px; background: var(--brass); opacity: .18; animation-duration: 18s; }
@keyframes float { from { transform: translate(0, 0); } to { transform: translate(-60px, 50px); } }
@media (max-width: 600px) {
  .signin .bg-ecg { height: 90px; }
}

.signin .card {
  position: relative; z-index: 1; width: min(400px, 100%); padding: 30px 28px 18px; border-radius: var(--r-3);
  background: var(--signin-card); box-shadow: 0 30px 80px var(--black-a35);
}
.signin .brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.signin .brand::after {
  content: ""; width: 170px; height: 18px; margin-top: 2px;
  background: var(--ecg-brand) center / 100% 100% no-repeat;
}
.signin .name {
  position: relative; display: inline-block; padding-bottom: 10px; color: var(--cover);
  font: 700 var(--fs-mark-signin)/1.1 var(--font-name); animation: beat 7s ease-in-out 1.5s infinite;
}
.signin .name i { font-style: normal; color: var(--brass); }
.signin .name::after {
  content: attr(data-text); position: absolute; inset: 0; color: transparent; pointer-events: none;
  background: linear-gradient(100deg, transparent 38%, var(--signin-shine) 50%, transparent 62%) -50% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; animation: shine 7s ease-in-out 1.5s infinite;
}
@keyframes shine { 0% { background-position: -50% 0; } 22%, 100% { background-position: 150% 0; } }
@keyframes beat { 0%, 24%, 100% { transform: scale(1); } 27% { transform: scale(1.06); } 30% { transform: scale(1); } 33% { transform: scale(1.03); } 36% { transform: scale(1); } }
.signin h1 { margin: 12px 0 14px; color: var(--muted); font-size: var(--fs-2); font-weight: 500; text-align: center; }
.signin form { display: flex; flex-direction: column; gap: 10px; }

/* its fields: taller and rounder than the screens' fields, a plain error line */
.signin .f { gap: 4px; }
.signin .f input { height: 46px; border-radius: var(--r-lift); }
.signin .f input:focus { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--signin-soft); }
.signin .f.bad input { box-shadow: 0 0 0 1px var(--rx); }
.signin .f.bad .err { display: block; font-weight: 400; line-height: inherit; }
.signin .f.bad .err::before { content: none; }
.signin .form-err { padding: 8px 14px; border-radius: var(--r-row); background: var(--rx-soft); color: var(--rx-ink); font-size: var(--fs-1); }
.signin .go-btn {
  height: 48px; margin-top: 6px; border: 0; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-2); font-weight: 600; box-shadow: 0 1px 2px var(--cover-a18); transition: background .12s, box-shadow .12s;
}
.signin .go-btn:hover { background: var(--accent-2); box-shadow: 0 4px 12px var(--cover-a22); }

/* a short wide window (a laptop at 200%, a phone on its side): the name beside the form, so nothing scrolls */
@media (max-height: 540px) and (min-width: 600px) {
  .signin .card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "brand form" "title form";
    align-items: start; column-gap: 24px; width: min(640px, 100%); padding: 12px 24px 10px;
  }
  .signin .brand { grid-area: brand; }
  .signin .name { padding-bottom: 6px; font-size: var(--fs-mark-signin-sm); }
  .signin h1 { grid-area: title; margin: 2px 0 6px; }
  .signin form { grid-area: form; }
}

/* css/pages/desk.css */
/* F2: the reception's own parts: the home's «now» strip and day line, the day's times, the search's results, the
   arrival dialog. The prototype's final look (tests/checks/style-parity.mjs, keys desk.*). */

/* the waiting hall in one line, as the waiting-room screen shows it: who is inside, who is next */
.now-strip {
  --focus: var(--brass);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); padding: 14px var(--s5);
  border-radius: var(--r-2) var(--r-2) 0 0; background: linear-gradient(160deg, var(--cover), var(--cover-2)); color: var(--on-cover);
}
.now-strip > span { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.now-strip .k { margin-inline-end: var(--s1); color: var(--cover-dim); font-size: var(--fs-1); }
.now-strip b { margin-inline: 6px; color: var(--brass-hi); font-size: var(--fs-4); font-weight: 600; font-variant-numeric: tabular-nums; }
.now-strip .end { display: flex; align-items: center; gap: var(--s4); min-width: 0; max-width: 100%; margin-inline-start: auto; }
.now-strip .day-date { color: var(--cover-dim); font-size: var(--fs-1); }
.now-strip .btn.ghost { border-color: var(--on-cover-a40); background: transparent; color: var(--on-cover); }
/* on a phone: the date on its own line, its two buttons share the next one */
@container (max-width: 600px) {
  .now-strip { gap: 6px var(--s4); }
  .now-strip .end { flex: 1 1 100%; flex-wrap: wrap; gap: var(--s2); margin-inline-start: 0; white-space: normal; }
  .now-strip .end .day-date { flex: 1 1 100%; }
  .now-strip .end .btn { flex: 1 1 140px; justify-content: center; }
  .now-strip .end .btn.hall-on { flex-basis: 100%; }
}

/* «إبلاغ المنتظرين»: its words while a note shows on the waiting-room screen */
.btn[data-act="hall"] .hall-t { min-width: 0; overflow-x: clip; text-overflow: ellipsis; white-space: nowrap; }
.btn.hall-on { border-color: var(--hall-line); background: var(--hall-bg); color: var(--hall-ink); }
.btn.hall-on:hover { background: var(--hall-hover); }

/* nothing waits for the reception; a day the clinic is closed */
.ok-empty { display: flex; align-items: center; gap: 10px; padding: 14px var(--s4); border-radius: var(--r-1); background: var(--money-soft); color: var(--money-ink); font-weight: 500; }
.ok-empty svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.slots-off, .off-note { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--r-row); background: var(--off-wash); color: var(--muted); font-size: var(--fs-1); }
.was-in { color: var(--muted); font-size: var(--fs-1); }
/* tomorrow's first bookings on the reception (the prototype's «مواعيد الغد» list) */
.tom-list .li { grid-template-columns: minmax(0, 1fr) auto; }
.tom-list .who b { font-weight: 500; }
.tom-more { margin: 6px 0 0; }

/* the day's patients, one mark each in the order the evening goes: done, left, inside, out for a test, waiting, booked */
.dayline { display: flex; align-items: center; gap: var(--s3); margin: -4px 0 14px; }
@media (max-height: 820px) {
  .dayline { margin-bottom: var(--s2); }
}
.day-bar { display: flex; flex-wrap: wrap; flex: 0 1 calc(var(--n, 8) * 37px); gap: 3px; min-width: 0; }
.day-bar i { flex: 1 1 0; min-width: 3px; height: 10px; border-radius: var(--r-pill); background: var(--day-mark); }
.day-bar i.d { background: var(--money); }
.day-bar i.l { background: var(--day-left); }
.day-bar i.i { background: var(--cover); box-shadow: 0 0 0 3px var(--cover-a16); }
.day-bar i.a { background: var(--field); box-shadow: inset 0 0 0 2px var(--cover); }
.day-bar i.w { background: var(--brass); }
.day-bar i.b { background: transparent; box-shadow: inset 0 0 0 1.5px var(--day-booked); }
.day-say { color: var(--muted); font-size: var(--fs-1); white-space: nowrap; }
.day-say b { color: var(--ink); font-size: var(--fs-2); font-weight: 600; }

/* the day's times: a free one opens a booking at it, a taken one names who, a time gone by is pale */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; padding: 0 var(--s1);
  border: 1px solid var(--btn-line); border-radius: var(--r-row); background: var(--field); color: var(--accent-2);
  font-size: var(--fs-1); line-height: 1.2; cursor: pointer;
}
.slot:not(.taken):hover { border-color: var(--accent); background: var(--accent-soft); }
.slot.taken { border-color: var(--line-2); background: var(--line-2); color: var(--muted); cursor: default; }
.slot small { max-width: 100%; overflow-x: clip; font-size: var(--fs-1); line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.slot.taken:not(.past) small { color: var(--ink); font-weight: 500; }
.slot.taken.past { border-color: transparent; background: transparent; color: var(--slot-past); }
.slot.taken.past small { display: none; }
.slot.is-now { position: relative; box-shadow: inset 0 0 0 2px var(--brass); }
.slot.is-now::after {
  content: "الآن"; position: absolute; top: -10px; inset-inline-start: 8px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--brass); color: var(--brass-ink); font-size: var(--fs-1); font-weight: 600; line-height: 1.6;
}

/* a search's results: each file with its state today and what can be done with it */
.results { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); }
.res { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-1); background: var(--field); }
.res .who { flex: 1 1 200px; min-width: 0; }
.res .who b { line-height: 1.4; }
.res .acts { display: flex; gap: 6px; }

/* the arrival: the patient in a band; the visit's type, its amount and the payment side by side on one line, the rest
   under them (the prototype's arrival); the desk's vital signs */
.modal:has(#ar) .sub { margin: 8px 0 16px; padding: 8px 14px; border-radius: var(--r-row); background: var(--line-2); color: var(--ink); }
#ar { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr); align-items: start; }
#ar > * { grid-column: 1 / -1; }
/* (by name, not by place: the day-full line or the old amount above them must not move them) */
#ar > [data-req="type"] { grid-column: 1; }
#ar > [data-field="amount"] { grid-column: 2; }
#ar > #ar-paid-f { grid-column: 3; }
#ar .choice { flex-wrap: nowrap; }
#ar .choice button { padding-inline: var(--s3); white-space: nowrap; }
.amt-read { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: var(--ctl); }
.amt-read b { font-size: var(--fs-3); font-weight: 600; line-height: 1.35; white-space: nowrap; }
.vit { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 0 10px; }
#ar .vit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vit .f { display: grid; align-content: start; row-gap: 0; padding-bottom: 10px; }
.vit .f .lb { flex-wrap: wrap; align-self: end; row-gap: 0; margin-bottom: 6px; line-height: 1.35; }
.vit input { direction: ltr; text-align: center; }
/* a vital sign out of range says so in a word and an arrow, not only in colour */
.vw { margin-inline-start: 6px; font-size: var(--fs-1); font-style: normal; font-weight: 600; white-space: nowrap; }
.f .lb .vw:empty { display: none; }
.vit .f.hi input { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.vit .f.crit input { border-color: var(--rx); background: var(--rx-soft); color: var(--rx-ink); }
.f.hi .vw { color: var(--amber); }
.f.crit .vw, .f.bad .vw { color: var(--rx-ink); }
/* the day full, what is taken now, a file with the same name, the gender read from the name */
.full-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); padding: 9px var(--s3); border-radius: var(--r-row); background: var(--rx-soft); color: var(--rx-ink); font-size: var(--fs-2); font-weight: 500; }
.full-line .btn.link { margin-inline-start: auto; }
/* an amount still owed from an earlier visit, at the top of the arrival (taken now unless switched off) */
.owe-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); padding: 9px var(--s3); border-radius: var(--r-row); background: var(--amber-soft); color: var(--amber); font-size: var(--fs-2); font-weight: 500; }
.owe-line .switch { margin-inline-start: auto; color: var(--ink); }
.ar-now { padding: var(--s2) var(--s3); border-radius: var(--r-row); background: var(--money-soft); color: var(--money-ink); font-size: var(--fs-1); }
.same-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; padding: var(--s2) 10px; border-radius: var(--r-1); background: var(--hall-bg); color: var(--hall-ink); font-size: var(--fs-1); }
.same-line[hidden] { display: none; }
.modal .from-name { display: block; margin-top: 6px; color: var(--muted); font-size: var(--fs-1); }
.ar-more { align-self: flex-start; }
.modal .kbd-hint { align-self: center; margin-inline-start: 6px; color: var(--muted); font-size: var(--fs-1); }
.modal .kbd-hint kbd { padding: 0 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-key); background: var(--field); font: inherit; }
@container (max-width: 640px) {
  #ar { grid-template-columns: minmax(0, 1fr); } /* the arrival form: one column */
  #ar > :is([data-req="type"], [data-field="amount"], #ar-paid-f) { grid-column: 1 / -1; }
  #ar .choice { flex-wrap: wrap; }
}
/* a finger is bigger than a pointer; a touch screen has no Enter key to name */
@media (pointer: coarse) {
  .slot { min-height: 44px; }
  .vit-box .vit input { min-height: 48px; }
  .modal .kbd-hint { display: none; }
}

/* css/pages/bookings.css */
/* F3: the bookings: a strip of days, a day's list, the free times of three days; the booking form's days and times;
   the WhatsApp reminder. The prototype's final look (tests/checks/style-parity.mjs, keys bk.*). */

/* the strip of days: a week, the day shown pressed, a day off dashed */
.days { display: flex; align-items: stretch; gap: var(--s2); margin-bottom: var(--s4); }
.days > .btn.icon { align-self: center; }
.days-in { display: grid; flex: 1 1 0%; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); min-width: 0; }
.day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 66px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--field); box-shadow: var(--sh-day);
  color: var(--muted); font-size: var(--fs-1); cursor: pointer;
}
.day:hover { border-color: var(--accent); }
.day b { color: var(--ink); font-size: var(--fs-2); font-weight: 500; white-space: nowrap; }
.day .n { font-variant-numeric: tabular-nums; }
.day .n.has { color: var(--accent-2); }
.day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); box-shadow: var(--sh-day-on); color: var(--day-on-ink); }
.day[aria-pressed="true"] :is(b, .num, .n) { color: var(--white); }
.day.off { border-style: dashed; background: transparent; box-shadow: none; }
.day.off :is(b, .num) { color: var(--muted); }
.day.off[aria-pressed="true"] { border-style: solid; background: var(--accent); }
@container (min-width: 1200px) {
  .day { display: grid; grid-template-columns: auto auto; align-content: center; gap: 0 var(--s2); height: 54px; border-radius: var(--r-lift); }
  .day .n { grid-column: 1 / -1; text-align: center; }
}
@container (max-width: 760px) {
  .days-in { grid-auto-columns: 92px; overflow-x: auto; }
}
@container (max-width: 560px) {
  .days-in { grid-auto-columns: minmax(84px, 1fr); }
}
@media (pointer: coarse) {
  .day { min-height: 42px; }
}

/* a day's bookings: the time, the patient, the reminder, what to do */
.li.bk { grid-template-columns: 74px minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.li.bk .tm { color: var(--ink); font-size: var(--fs-2); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.li.bk .tm.none { color: var(--muted); font-size: var(--fs-1); font-weight: 400; }
.li.bk .st-t { white-space: nowrap; }
.li.bk .acts .btn:not(.soft):not(.icon) { min-width: 84px; }
@container (min-width: 1200px) {
  .li.bk { grid-template-columns: 74px minmax(0, 1.4fr) 150px 250px; }
  .li.bk .acts { flex-wrap: nowrap; justify-content: flex-end; }
}
@container (max-width: 760px) {
  .li.bk { grid-template-columns: 64px minmax(0, 1fr); }
  .li.bk .acts { grid-column: 1 / -1; justify-content: flex-start; }
}

/* the free times of three days, side by side */
.slots3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slots3 .col { display: flex; flex-direction: column; gap: 6px; }
.slots3 .col > b { display: block; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); font-size: var(--fs-1); font-weight: 500; text-align: center; }
.slots3 .col > b small { display: block; color: var(--muted); font-size: var(--fs-1); font-weight: 400; text-align: center; }
.slots3 .slot { flex-direction: row; height: 34px; border-radius: var(--r-pill); }
.slots3 .more { align-self: center; color: var(--muted); font-size: var(--fs-1); }

/* the booking form: the day as buttons («يوم آخر» opens a date), the time chosen */
.modal .bk-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.modal .bk-days button {
  display: grid; align-content: center; min-height: 52px; padding: 6px 10px; border: 1px solid var(--btn-line); border-radius: var(--r-row);
  background: var(--field); color: var(--ink); font: inherit; line-height: 1.35; text-align: center; cursor: pointer;
}
.modal .bk-days button:hover { border-color: var(--accent); background: var(--accent-soft); }
.modal .bk-days button b { font-size: var(--fs-2); font-weight: 600; }
.modal .bk-days button small { color: var(--muted); font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
.modal .bk-days button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.modal .bk-days button[aria-pressed="true"] small { color: var(--day-on-sub); }
.modal .bk-days button.other { border-style: dashed; color: var(--accent-2); }
.modal .bk-days button.other[aria-pressed="true"] { border-style: solid; color: var(--on-accent); }
.modal .bk-days button:disabled { background: var(--off-wash); opacity: .55; cursor: not-allowed; }
#bk-date { max-width: 220px; margin-top: var(--s2); }
.slot[aria-pressed="true"] { background: var(--own-desk-soft); font-weight: 600; }

/* the WhatsApp reminder as it will be sent */
.wa-msg { max-width: 420px; padding: var(--s3) 14px; border-radius: var(--r-lift) var(--r-lift) var(--r-lift) var(--r-tick); background: var(--wa-msg); font-size: var(--fs-2); line-height: 1.7; white-space: pre-line; }

/* a booking's note in its row (never medical) */
.li.bk .note-box { padding: 0 var(--s2); border: 1px solid var(--own-desk); border-radius: var(--r-row); background: var(--field); color: var(--own-desk-ink); font-size: var(--fs-1); }

/* css/pages/patients.css */
/* The patients page, a patient's file, the visits, the papers (F4): the prototype's final look (tests/checks/probe.json,
   keys pt.*, file.*, scan.*, doc.*, vi.*, am.*). */

/* ----- the patients table: the badge, the actions as quiet links, the phone and age folded under the name when narrow ----- */
[data-page="patients"] .sh-head .search { flex: 1 1 280px; min-width: auto; }
.ptbl td.num { text-align: start; }
.ptbl .dx { display: block; }
.ptbl td.acts .btn.soft { background-color: transparent; border-color: transparent; }
.ptbl td.acts .btn.ghost { gap: 4px; padding: 0 12px 0 10px; border-color: transparent; background-color: transparent; background-image: none; box-shadow: none; }
.ptbl td.acts .btn.ghost svg { width: 16px; height: 16px; }
.who2 .only-narrow { display: none; }
.pg-gap { color: var(--muted); }
@container (max-width: 760px) {
  .ptbl :is(th, td):is(:nth-child(2), :nth-child(3), :nth-child(4)) { display: none; }
  .ptbl .who2 .only-narrow { display: block; }
  .ptbl td.acts .btn.soft { display: none; }
}
@container (max-width: 560px) {
  .ptbl :is(th, td):nth-child(5) { display: none; }
  .ptbl td.acts .btn.ghost { display: none; } /* on a phone the whole row opens the file */
}

/* ----- previous / next ----- */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; min-height: 36px; margin-bottom: 14px; }
.crumb .path { color: var(--muted); font-size: var(--fs-1); }
.crumb .path b { color: var(--ink); font-weight: 600; }
.crumb .flip { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--muted); font-size: var(--fs-1); }
@container (max-width: 560px) {
  .crumb .flip { margin-inline-start: 0; }
}

/* ----- a file's head: the number, the name with its face, the facts one after the other, the buttons under them ----- */
.phead { display: grid; grid-template-columns: auto minmax(0, 1fr); flex-wrap: wrap; align-items: start; gap: 4px 14px; }
.phead .av { min-width: 66px; height: 32px; margin-top: 2px; padding: 0 12px; font-size: var(--fs-2); }
.phead h1 { margin: 0; font: 600 var(--fs-4)/1.3 var(--font-ui); }
.phead .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.tag .k { color: var(--muted); font-size: var(--fs-1); }
.phead .tag .k, .phead .tag:first-child { display: none; }
.phead .tag + .tag:not(:nth-child(2))::before { content: "·"; margin-inline: 9px; color: var(--muted); }
.phead .tags .pill { margin-inline-start: 12px; }
.phead .acts { display: flex; flex-wrap: wrap; justify-content: flex-start; grid-column: 2; gap: 8px; margin-top: 10px; }
.phead .acts .btn.ghost, .pstrip .ps-acts .btn.ghost { border-color: transparent; }
.phead .acts .btn.ghost:not(:hover), .pstrip .ps-acts .btn.ghost:not(:hover) { background-color: transparent; }
.phead-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: var(--fs-1); }
.phead-note .tag { border-color: var(--own-desk); border-radius: var(--r-pill); font-size: var(--fs-2); }
.phead-note .tag .k::after { content: ":"; }
.alert-chip { padding: 1px 8px; border-radius: var(--r-alert); background: var(--rx-soft); color: var(--rx-ink); font-size: var(--fs-1); font-weight: 500; }
.fam { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 12px; padding: 10px 0 2px; border-top: 1px solid var(--line-2); font-size: var(--fs-2); }
.fam .k { color: var(--muted); }
.fam .btn.soft { margin-inline-start: auto; }

/* ----- the slim strip: the same patient and buttons, once the head has scrolled away (wide screens) ----- */
.pstrip {
  position: sticky; top: -20px; z-index: 5; display: flex; align-items: center; gap: 12px; height: 56px; margin: -20px -24px -36px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: var(--white); box-shadow: 0 4px 14px var(--cover-2-a06); white-space: nowrap;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
}
.pstrip.on { visibility: visible; opacity: 1; transform: none; transition: opacity .16s, transform .16s; }
.pstrip .ps-nav { display: flex; flex: none; align-items: center; gap: 6px; padding-inline-end: 14px; border-inline-end: 1px solid var(--line-2); }
.pstrip .rnd, .pstrip .ps-acts .btn { width: 34px; gap: 0; padding: 0; font-size: 0; line-height: 0; }
.pstrip .ps-acts .btn { width: 38px; }
.pstrip .ps-nav small { margin-inline-start: 4px; color: var(--muted); font-size: var(--fs-1); }
.pstrip .ps-name { min-width: 85px; overflow: clip visible; font-size: var(--fs-3); font-weight: 600; line-height: 1.35; text-overflow: ellipsis; }
.pstrip .ps-no { display: inline-grid; flex: none; place-items: center; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--own-auto-soft); color: var(--accent-2); font-size: var(--fs-1); font-weight: 600; direction: ltr; }
.pstrip .ps-facts { flex-shrink: 20; min-width: 0; overflow: clip visible; color: var(--muted); font-size: var(--fs-1); text-overflow: ellipsis; }
.pstrip .alert-chip { display: flow-root; min-width: min(156px, 30%); max-width: max-content; padding: 3px 8px; overflow: hidden; line-height: 1.45; text-overflow: ellipsis; white-space: normal; }
.pstrip .ps-acts { display: flex; flex: none; gap: 6px; margin-inline-start: auto; }
@container (max-width: 760px) {
  .pstrip { display: none; }
  .pstrip .ps-nav small { display: none; }
}

/* ----- the doctor's: chronic illnesses, the past visits ----- */
.chr-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-inline-start: 18px; font-size: var(--fs-2); line-height: 1.55; }
.sheet.chronic { box-shadow: var(--sh-card); }
.chronic .none { margin: 0; }
[data-page="file"] .vlist .li { grid-template-columns: 118px minmax(0, 1fr) auto; gap: 0 12px; cursor: pointer; }
[data-page="file"] .vlist .li .no { width: auto; min-width: 0; height: auto; border-radius: 0; background: none; color: var(--muted); font-size: var(--fs-2); justify-items: start; }
[data-page="file"] .vlist .li .acts .btn { width: 34px; gap: 0; padding: 0; font-size: 0; }
[data-page="file"] .vlist .li .acts .btn svg { width: 16px; height: 16px; }
[data-page="file"] .c5 .li .no { width: 38px; min-width: 38px; height: 38px; }
.locked { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--r-1); background: var(--hover); color: var(--muted); font-size: var(--fs-1); }
.locked svg, .lock-note svg { flex: none; width: 16px; height: 16px; margin-inline-end: 4px; stroke: currentColor; fill: none; stroke-width: 2; }
.lock-note svg { display: inline-block; vertical-align: -3px; }
.sheet.c7 p.count { margin: 10px 0 0; }
.lock-note { margin: 8px 0 0; }

/* ----- «المواعيد والدفع» ----- */
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 8px 16px; margin: 15px 0; }
.kv dt { color: var(--muted); font-size: var(--fs-1); }
.kv dd { margin: 0; }
.kv dd.pre { white-space: pre-line; }

/* ----- the papers: the doctor's cards (a small first page beside the title), the reception's locked list ----- */
.docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.doc-card {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); flex-direction: column; align-items: center; justify-items: start; gap: 3px 12px; padding: 8px 12px;
  border: 1px solid transparent; border-radius: var(--r-row); background: var(--white); font-size: var(--fs-1); text-align: start; cursor: pointer;
}
.doc-card:hover { background: var(--hover); }
.doc-card .paper { display: block; grid-row: 1 / 3; width: 44px; height: 58px; margin-bottom: 4px; overflow: hidden; border: 1px solid var(--paper-line); border-radius: var(--r-tick); object-fit: cover; }
.doc-card b { align-self: end; font-size: var(--fs-2); font-weight: 600; }
.doc-card .muted { align-self: start; font-size: var(--fs-1); }
.paper.pdf { display: grid; place-items: center; background: var(--white); color: var(--rx-ink); font-size: var(--fs-1); font-weight: 600; }

/* ----- adding a paper ----- */
.sc-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scan-area { position: relative; display: grid; place-items: center; height: 260px; overflow: hidden; border: 1px dashed var(--field-line); border-radius: var(--r-row); background: var(--band); }
.scan-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 24px; color: var(--muted); font-size: var(--fs-1); text-align: center; }
.scan-empty svg { width: 34px; height: 34px; stroke: var(--own-desk); fill: none; stroke-width: 1.6; }
.scan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 120px)); justify-content: start; align-content: start; align-self: stretch; gap: 12px; width: 100%; padding: 12px; overflow-y: auto; }
.scan-page { position: relative; display: flex; flex-direction: column; gap: 4px; }
.scan-page .paper { display: block; width: 100%; aspect-ratio: 210 / 297; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--white); box-shadow: var(--sh-1); object-fit: contain; }
.scan-page .pg { position: absolute; top: 6px; inset-inline-start: 6px; display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--cover); color: var(--on-cover); font-size: var(--fs-1); line-height: 1.43; }
.scan-page .pg-x { position: absolute; top: 6px; inset-inline-end: 6px; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: var(--r-dot); background: var(--rx-a92); color: var(--white); cursor: pointer; }
.scan-page .pg-x svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; }

/* ----- a paper opened by the doctor: one page in sight, the others above and below it ----- */
.doc-big { display: grid; place-items: center; padding: 12px; border-radius: var(--r-1); background: var(--band-2); }
.doc-big .paper { display: block; height: min(60vh, 520px); aspect-ratio: 210 / 297; overflow: hidden; box-shadow: 0 8px 24px var(--cover-2-a16); }
.doc-big .paper img { display: block; width: 100%; transform: translateY(calc(-100% * var(--pg, 0) / var(--n, 1))); }
.modal .crumb { margin: 12px 0 0; }
.doc-nav { justify-content: space-between; }
.modal .vi-crumb { margin-top: 14px; }
.vm.hi .num, .vm.hi .vw { color: var(--amber); }
.vm.crit .num, .vm.crit .vw, .vm.bad .vw { color: var(--rx-ink); }
.vm.crit .num { font-weight: 700; }

/* css/pages/doc.css */
/* The doctor's pages (F6): the prototype's final look (tests/checks/probe.json, keys dh.*).
   The home's big card: the patient inside now, or the next one waiting, under a petrol band with a brass line. */
.sheet.next { padding: 0; overflow: hidden; box-shadow: var(--sh-card-hi); --own: var(--cover); }
.next-head {
  position: relative; z-index: 2; padding: 16px 20px; border-bottom: 2px solid var(--brass);
  background: radial-gradient(420px 160px at 12% -30%, var(--brass-a22), transparent 70%), linear-gradient(135deg, var(--cover-hi), var(--cover) 62%, var(--cover-2));
}
.next-head .k { color: var(--next-k); font-size: var(--fs-1); font-weight: 500; }
.next-head h3 { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; color: var(--next-ink); font: 600 var(--fs-5) var(--font-ui); }
.next-head .inline { gap: 8px; font-size: var(--fs-1); }
.next-head .inline :is(span, .muted, .num) { color: var(--next-ink); }
.next-head .inline .alert-chip { color: var(--rx-ink); }
.next-head .face { color: var(--av-ink); box-shadow: 0 0 0 2px var(--white-a35); }
.next-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 20px 18px; }
.fact { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-2); }
.fact .lbl { display: block; flex: none; min-width: 84px; padding-top: 1px; color: var(--muted); font-size: var(--fs-1); }
.fact .note-box { display: block; padding: 8px 12px; border: 1px solid var(--own-desk); border-radius: var(--r-row); background: var(--white); color: var(--own-desk-ink); font-size: var(--fs-2); }
.taken-by { color: var(--own-desk-ink); font-size: var(--fs-1); }
.next-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ask { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--amber); border-radius: var(--r-1); background: var(--white); }
.ask > b { font-weight: 700; }
.solo-row { margin-bottom: 16px; }
.sheet.next::before { inset-block: 0; border-radius: 0; } /* the card's stripe runs its whole height */
.next-acts .btn { height: var(--ctl-lg); }
.next-body > .inline, .ask .inline { min-width: 0; }
.next-body > .inline .btn.link { min-width: 0; max-width: 100%; justify-content: flex-start; text-align: start; white-space: normal; }

/* ----- the visit (keys vp.*): the patient's band, one card of quiet fields, the prescription column, the save bar ----- */
.pband {
  position: sticky; top: -20px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -20px -24px 16px; padding: 12px 24px;
  border-bottom: 1px solid var(--pband-line); background: var(--own-pat-soft); box-shadow: 0 1px 0 var(--pband-line);
}
.pband h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 var(--fs-4)/1.35 var(--font-ui); }
.pband .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--own-pat-ink); font-size: var(--fs-1); }
.pband > .btn.soft { margin-inline-start: auto; }
.visit-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 14px; }
.visit-grid > .stack { gap: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--sh-card); }
.visit-grid > .stack > .sheet { padding: 20px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.visit-grid > .stack > .sheet + .sheet { border-top: 1px solid var(--line-2); }
.visit-grid > .stack > .sheet::before { display: none; }
.visit-grid > .stack > :is(.note-box, .resume, .chronic-line) { margin: 14px 20px 2px; }
.visit-grid > .stack .sh-head { min-height: 0; margin-bottom: 8px; }
.visit-grid > .stack .sh-head h2 { color: var(--accent-2); font-size: var(--fs-2); }
#visit .sh-head .chip.doc { display: none; }
/* the fields of the visit: one line under each, no box */
#visit .visit-grid > .stack :is(input, textarea) { padding: 0 2px; border: 0; border-bottom: 1px solid var(--field-line); border-radius: 0; background: none; box-shadow: none; }
#visit .visit-grid > .stack :is(input, textarea):focus { outline: 0; border-bottom-color: var(--accent); box-shadow: 0 2px 0 var(--accent); } /* focused: the line thickens */
#visit .visit-grid > .stack textarea { padding-block: 9px; line-height: 1.7; }
#visit :is(.exam-f, .notes-f, .desk-f) { margin-top: 12px; }
#visit .vsheet .vit input { padding-inline: 52px 2px; text-align: right; direction: ltr; } /* room for the unit */
#visit .done-f { margin-bottom: 12px; }
/* the vital signs: one read line; the boxes with their unit inside */
.visit-grid > .stack > .vsheet { padding-block: 12px; background: var(--band); }
.vline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0; }
.vline .vl-t { margin-inline-end: 4px; font-weight: 600; }
.vline .was-v { color: var(--muted); font-size: var(--fs-1); } /* «آخر مرة …» (the prototype's m8; not drawn yet) */
.vline .taken-by { color: var(--muted); }
.vline .btn { margin-inline-start: auto; }
.vsheet .vit { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.vsheet .vit .f { position: relative; padding-bottom: 10px; }
/* each box writes its unit inside, at the number's left (js/visit.js vitBox: data-u from the shared table), the number
   keeping its room beside it */
.vsheet .vit .f::after { content: attr(data-u); position: absolute; bottom: 10px; left: 11px; display: flex; align-items: center; height: var(--ctl); color: var(--vit-unit); font-size: var(--fs-1); pointer-events: none; direction: rtl; }
.vsheet .vit .f:is([data-k="bp"], [data-k="pulse"])::after { left: 4px; }
#visit .vsheet .vit .f:not([data-k="bp"], [data-k="pulse"], [data-k="sugar"]) input { padding-left: 40px; }
#visit .vsheet .vit .f[data-k="pulse"] input { padding-left: 47px; }
#visit .vsheet .vit .f[data-k="sugar"] input { padding-left: 56px; }
.vsheet .vit .lb { align-self: end; margin-bottom: 6px; font-size: var(--fs-1); font-weight: 500; line-height: 1.35; }

/* after the visit (the prototype's): what was done beside the review, the word to the reception under them; a clinic
   without services: the word to the reception beside the review */
.visit-grid > .stack > .sheet.after { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 20px; padding: 20px; }
.sheet.after .sh-head { grid-column: 1 / -1; }
.sheet.after:not(:has(.done-f)) .desk-f { order: 1; }
.sheet.after:not(:has(.done-f)) .next-f { order: 2; }
#v-next { flex-wrap: nowrap; }
.visit-grid > .stack > .sheet.pay { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding-block: 12px; background: var(--band); }
.sheet.pay .sh-head { margin: 0; }
.sheet.pay .chip { display: none; }
.sheet.pay p { margin: 0; }
.chronic-line { padding: 9px 14px; border-radius: var(--r-row); background: var(--own-pat-soft); color: var(--own-pat-ink); font-size: var(--fs-2); }
.chronic-line b { font-weight: 600; }
@container (max-width: 900px) {
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .visit-grid > .stack > .sheet.after { display: block; }
  #v-next { flex-wrap: wrap; }
  .vsheet .vit { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 10px; }
}
@container (max-width: 560px) {
  .pband { top: -16px; margin: -16px -14px 14px; padding: 10px 14px; }
  .vsheet .vit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vsheet .vit .f:first-child { grid-column: 1 / -1; }
}

/* ----- the prescription column: tabs, the paper as it prints, the past visits ----- */
.rx-col { position: sticky; top: 64px; }
.rx-col .tabs { margin-bottom: 10px; }
.rx-col [hidden] { display: none; }
.rx-warn { display: flex; gap: 8px; margin: 6px 14px 0; padding: 8px 10px; border-radius: var(--r-1); background: var(--rx-soft); color: var(--rx-ink); font-family: var(--font-ui); font-size: var(--fs-1); }
.rx-warn.soft { background: var(--amber-wash); color: var(--amber); }
.rx-warn svg { flex: none; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
/* «أدويتي»: the medicines that start so, under the line being typed */
.rx-sug { position: absolute; z-index: 8; inset-inline: 10px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lift); background: var(--white); box-shadow: var(--sh-2); font-family: var(--font-ui); }
.rx-s { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border: 0; border-radius: var(--r-1); background: none; color: var(--ink); font-size: var(--fs-1); line-height: 1.67; text-align: start; cursor: pointer; }
.rx-s[aria-selected="true"], .rx-s:hover { background: var(--accent-soft); }
.rx-s b { font-weight: 600; white-space: nowrap; direction: ltr; }
.rx-s span { color: var(--muted); font-size: var(--fs-1); line-height: 1.55; }
.rx-sug small { padding: 4px 10px 2px; color: var(--muted); font-size: var(--fs-1); }
.rx-sug kbd { padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r-key); background: var(--white); font: inherit; }
/* the last three visits */
.sheet.hist { display: flex; flex-direction: column; padding: 6px 18px; box-shadow: var(--sh-card); }
.hist .hv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.hist .hv:first-child { border-top: 0; }
.hist .hv time { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-1); }
.hist .hv b { font-weight: 600; }
.hist .hv p { grid-column: 1; margin: 2px 0 0; line-height: 1.7; unicode-bidi: plaintext; }
.hist .hv .btn { grid-column: 2; grid-row: 2 / 4; align-self: start; }
.hist .hv-note { color: var(--muted); font-size: var(--fs-1); }

/* ----- the save bar, always at the bottom ----- */
.savebar {
  position: sticky; bottom: -32px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px -24px -32px; padding: 12px 24px;
  border-top: 1px solid var(--line); background: var(--sheet); box-shadow: 0 -6px 16px var(--cover-2-a08);
}
.savebar .note { color: var(--muted); font-size: var(--fs-1); }
/* a field brought into sight (a refused save focuses it) stops clear of the sticky band and bar, its error line too */
.view:has(.savebar) { scroll-padding-bottom: 120px; }
.view:has(.pband) { scroll-padding-top: 100px; }
@container (max-width: 560px) {
  .view:has(.pband) { scroll-padding-top: 170px; } /* the band takes three lines on a phone */
  .view:has(.savebar) { scroll-padding-bottom: 150px; }
}
.savebar .sb-end { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); }
@container (max-width: 560px) {
  .savebar { bottom: -28px; margin: 16px -14px -28px; padding: 10px 14px; }
  .savebar .sb-end { width: 100%; margin-inline-start: 0; padding-inline-start: 0; border-inline-start: 0; }
  .savebar .sb-end .btn { flex: 1 1 0%; justify-content: center; }
}
@media (pointer: coarse) {
  #visit .vsheet .vit input, .savebar .btn { min-height: 48px; height: 48px; }
  .vsheet .vit .f::after { height: 48px; }
}
@media (max-height: 500px) {
  .savebar { padding-block: 6px; } /* a short screen (a laptop at 200%) keeps more of the page in sight */
}

/* ----- the other papers (F5): the menu of kinds, the form written on the clinic's sheet ----- */
.pp-menu { box-shadow: var(--sh-card); }
.pp-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pp-b { min-height: 52px; border: 1px solid var(--btn-line); border-radius: var(--r-lift); background: var(--white); color: var(--accent-2); font: 500 var(--fs-2) var(--font-ui); cursor: pointer; }
.pp-b:hover { border-color: var(--accent); background: var(--accent-soft); }
.pp-menu .list { margin-top: 12px; }
.pp-menu .pp-hint { margin: 12px 0 0; }
.pp-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 8px 14px 14px; font-family: var(--font-ui); }
.pp-body :is(textarea, input) { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--white); font: 400 var(--fs-2)/1.7 var(--font-field); resize: vertical; unicode-bidi: plaintext; }
.pp-tests { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* css/pages/money.css */
/* F7: the reception's box, the doctor's accounts and the day's close. The prototype's final look (keys mo.*). */
.strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split-line { margin: -6px 0 14px; color: var(--muted); font-size: var(--fs-1); }
.split-line b { white-space: nowrap; }
/* one amount a row: given back in red, its way of paying when not cash */
tr.back td { color: var(--rx-ink); }
.pm { display: inline-block; margin-inline-start: 6px; padding: 0 7px; border-radius: var(--r-pill); background: var(--own-desk-soft); color: var(--own-desk-ink); font-size: var(--fs-1); font-weight: 500; vertical-align: 1px; }
.tbl .who-b { font-weight: 600; }
.month-tbl tfoot td { font-weight: 600; }
/* the money taken out, and who still owes */
.outs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 12px; padding: 10px 12px; border-radius: var(--r-row); background: var(--rx-soft); font-size: var(--fs-1); }
.outs .k { color: var(--rx-ink); font-weight: 600; }
.outs b { white-space: nowrap; }
.outs small { font-size: inherit; } /* who took it out: the line's own size, on the scale */
[data-page="money"] .kv { grid-template-columns: auto minmax(max-content, 1fr); } /* the amount keeps its room; a long name wraps */
.owe-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; padding: 10px 16px; border-radius: var(--r-lift); background: var(--sheet-side); box-shadow: inset 0 0 0 1px var(--card-line); font-size: var(--fs-2); }
.owe-box b { white-space: nowrap; }
.owe-box .btn.link { margin-inline-start: auto; }
.stack > .owe-box { margin-top: 0; }
.money-note { margin-bottom: 0; }
.year-line { margin: 10px 0 0; font-size: var(--fs-2); }
.acc-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; }
.sheet.month { margin-top: 16px; }
.li.owe-li, .li.log-li, .li.de-li { grid-template-columns: minmax(0, 1fr) auto auto; }
.li.log-li, .li.de-li { grid-template-columns: minmax(0, 1fr) auto; }
/* the day's close: said on the page, and in its dialog */
.resume { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--amber-line); border-radius: var(--r-row); background: var(--amber-wash); color: var(--amber); font-size: var(--fs-1); }
.closed-day { margin-bottom: 16px; border-color: var(--money-edge); background: var(--money-soft); color: var(--money-ink); }
.view.enter .page > .closed-day { animation: none; }
.closed-day [data-act="day-reopen"] { margin-inline-start: 10px; }
/* the sentence never wider than the line beside the ✓ (16px, its 4px and the 8px gap), so a narrow line wraps it there */
.closed-day > .cd-say { max-width: calc(100% - 28px); }
.closed-day .late { display: block; margin-top: 6px; color: var(--amber); font-weight: 500; }
.de-open { margin-bottom: 12px; }
.de-cash { font-size: var(--fs-4); font-weight: 600; }
.de-diff { color: var(--muted); font-size: var(--fs-1); }
.over-say { flex: 1 0 100%; margin: 0 0 6px; color: var(--rx-ink); }

/* the money page: the figures as one card, a double rule over the totals */
.page[data-page="money"]:not(:has(.row)) { max-width: 960px; }
[data-page="money"] .sheet { box-shadow: var(--sh-card); }
[data-page="money"] .strip:not(.three) { grid-template-columns: repeat(4, minmax(max-content, 1fr)); } /* a big amount widens its own figure, never runs into the next */
[data-page="money"] .strip { gap: 0; border: 1px solid var(--card-line); border-radius: var(--r-sheet); background: var(--sheet); box-shadow: var(--sh-card); }
[data-page="money"] .stat { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 14px 18px; border: 0; border-radius: 0; background: none; box-shadow: none; }
[data-page="money"] .stat + .stat { border-inline-start: 1px solid var(--line-2); }
[data-page="money"] .stat b { font-size: var(--fs-4); line-height: 1.3; white-space: nowrap; }
[data-page="money"] .stat span { font-size: var(--fs-1); white-space: nowrap; }
[data-page="money"] .tbl td { padding-block: 7px; }
[data-page="money"] .tbl td.amt { font-weight: 600; }
[data-page="money"] .tbl tfoot td { padding-block: 10px; border-top: 3px double var(--field-line); border-bottom: 0; font-weight: 600; }
[data-page="money"] .tbl tfoot td.amt { color: var(--money-ink); }
.toolbar .flip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-1); }
#pt-got, #out-amt, #de-count { width: 150px; unicode-bidi: normal; }
@container (max-width: 1040px) {
  [data-page="money"] .stat { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@container (max-width: 900px) {
  [data-page="money"] .strip:not(.three) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-page="money"] .strip:not(.three) .stat:nth-child(odd) { border-inline-start: 0; }
  [data-page="money"] .strip:not(.three) .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
/* a phone: the doctor's month fits the width (its five columns closer, the heads on two lines when they must) instead
   of hiding the amount past the left edge */
@container (max-width: 560px) {
  .month-tbl :is(th, td) { padding-inline: 5px; }
  .month-tbl th { white-space: normal; }
}
/* a phone: the receipts' rows stack (name and amount, then the time, the type and who took it) */
@container (max-width: 560px) {
  [data-page="money"] .stat b { font-size: var(--fs-3); }
  [data-page="money"] .scrollx:has(> .tbl tbody tr[data-pid]) { overflow: visible; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  [data-page="money"] .tbl:has(tbody tr[data-pid]), [data-page="money"] .tbl:has(tbody tr[data-pid]) :is(tbody, tfoot) { display: block; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) td { display: block; padding: 0; border: 0; color: var(--muted); font-size: var(--fs-1); text-align: start; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tbody td:has(> b) { order: -2; flex: 1 1 55%; min-width: 0; color: var(--ink); font-size: var(--fs-2); }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) td.amt { order: -1; margin-inline-start: auto; color: var(--ink); font-size: var(--fs-2); }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tbody tr::after { content: ""; order: -1; flex-basis: 100%; height: 0; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tbody td:not(:first-child):not(:has(> b)):not(.amt):not(:empty)::before { content: "·"; margin-inline-end: 6px; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tfoot tr { border-top: 2px solid var(--line); border-bottom: 0; }
  [data-page="money"] .tbl:has(tbody tr[data-pid]) tfoot td:first-child { order: -2; flex: 0 1 auto; color: var(--ink); font-size: var(--fs-2); }
}

/* css/pages/admin.css */
/* The admin pages (F8): the users and their permissions, the settings. The prototype's final look
   (tests/checks/probe.json, keys us.*). */

/* ----- the users: one row an account (its letter, name and permissions, phone, buttons) ----- */
.urow { display: grid; grid-template-columns: 38px minmax(0, 1fr) 118px 372px; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line-2); }
.urow .av { width: 38px; min-width: auto; height: 38px; padding: 0; border-radius: var(--r-dot); font-size: var(--fs-2); font-variant-numeric: normal; direction: rtl; }
.urow .av.doc { background: var(--own-doc-soft); color: var(--own-doc-ink); }
.urow .av.desk { background: var(--own-desk-soft); color: var(--own-desk-ink); }
.urow .name b { display: block; font-weight: 600; }
.urow .name small { display: block; color: var(--muted); font-size: var(--fs-1); }
.urow > .num { color: var(--muted); }
.urow .name { min-width: 0; }
.urow .acts { display: flex; justify-content: flex-start; gap: 6px; }
.urow .btn.danger { background-image: var(--btn-depth); box-shadow: var(--sh-btn); } /* raised like the buttons beside it */
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; margin-top: 12px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.f.fbox { display: block; margin-top: 14px; }
#u-form .sec-h { margin-top: 18px; color: var(--muted); } /* the permissions' quiet heading, apart from the fields */
@container (max-width: 760px) {
  .urow { display: flex; padding-block: 12px; grid-template-columns: none; }
  .urow .name { min-width: 170px; margin-inline-end: auto; }
  .urow .acts { flex-wrap: wrap; justify-content: normal; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 560px) {
  .checks { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
  .check { min-height: 44px; }
}

/* ----- the settings (keys st.*): sections, one rhythm each; the section bar on top, the save bar at the bottom ----- */
[data-page="settings"] .sheet { padding: 20px; box-shadow: var(--sh-card); }
[data-page="settings"] .sec-h { color: var(--ink); }
[data-page="settings"] .sec-h:not(.first) { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
[data-page="settings"] .sec-h.first { margin-top: 0; }
[data-page="settings"] .form-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
[data-page="settings"] .sheet > .check { margin-top: 14px; }
[data-page="settings"] .check + .small { padding-inline-start: 27px; }
.setnav { position: sticky; top: -20px; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 10px 0; background: var(--paper-a90); backdrop-filter: blur(6px); }
.setnav button { height: 34px; padding: 0 16px; border: 1px solid var(--btn-line); border-radius: var(--r-pill); background: var(--white); color: var(--ink); font-size: var(--fs-1); }
.setnav button[aria-current="true"] { border-color: var(--cover); background: var(--cover); color: var(--on-cover); }
.setbar { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-block: 10px; padding-inline: 18px 10px; border-radius: var(--r-2); background: var(--cover); color: var(--on-cover); box-shadow: 0 10px 30px var(--cover-2-a25); }
.setbar span { flex: 1; font-size: var(--fs-2); }
.view:has(.setbar:not([hidden])) { scroll-padding-bottom: 110px; } /* a refused field stops above the bar, its error line too */
.view:has(.setnav) { scroll-padding-top: 70px; } /* and below the sections' bar */
@container (max-width: 1040px) { .view:has(.setnav) { scroll-padding-top: 130px; } } /* the bar takes two lines */
@container (max-width: 560px) { .view:has(.setnav) { scroll-padding-top: 170px; } }
.setbar .btn.go { border-color: var(--brass); background-color: var(--brass); color: var(--cover-2); }
.setbar .btn.undo { border-color: transparent; background-color: transparent; color: var(--cover-ink); }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 34px; gap: 8px; align-items: center; }
.price-row + .price-row { margin-top: 8px; }
.price-row input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r-1); background: var(--white); font-size: var(--fs-2); }
.price-row input[dir="ltr"] { text-align: right; unicode-bidi: normal; }
.price-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.price-row > .err, .ml-row > .err { grid-column: 1 / -1; } /* the error line: fields.css */
.price-row.bad input { border-color: var(--rx); background: var(--rx-soft); box-shadow: 0 0 0 1px var(--rx); }
.add-row { margin-top: 10px; }
#set-desk .free-row { margin-top: 16px; }
#s-free, #s-max { max-width: 120px; }
#s-top { max-width: 90px; }
.work-row, .max-row { margin-top: 12px; }
.grid3.work-row { display: flex; flex-wrap: wrap; align-items: flex-start; }
.grid3.work-row > .f { flex: 1 1 150px; }
.grid3.work-row > .f:has(#s-step) { flex: 0 0 auto; }
#s-step { flex-wrap: nowrap; }
#s-step button { padding: 0 10px; white-space: nowrap; }
.set-note { margin: 6px 0 0; }
.sh-sub { margin: -6px 0 12px; }
.paper-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 6px; }
#set-rx > .slip-check { margin: 4px 0 14px; } /* the turn slip's box, under the paper */
.set-rx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 20px; align-items: start; }
.stack.tight { gap: 12px; }
.rxs.rx-prev { aspect-ratio: auto; }
.rxs .rx-gap { flex: 1; min-height: 90px; }
.sub-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: var(--fs-1); }
.sub-line .small { margin-inline-start: auto; }
.backup-say, .help-say { margin: 0; }
.help-say { margin-bottom: 12px; }
[data-page="settings"] .help-foot { margin-top: 0; }
.dev-say { margin: 0 0 8px; }
.addr { display: inline-block; margin: 0; padding: 6px 14px; border-radius: var(--r-1); background: var(--own-auto-soft); font-size: var(--fs-3); font-weight: 600; letter-spacing: .3px; }
#set-lists .tabs { margin-bottom: 12px; }
.ml-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; margin-bottom: 10px; padding-inline-end: 4px; overflow: auto; }
.ml-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
#ml-lab .ml-row, #ml-img .ml-row, #ml-dx .ml-row { grid-template-columns: minmax(0, 1fr) auto; }
.ml-row input { width: 100%; min-width: 0; height: var(--ctl, 40px); padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--r-1); background: var(--field); color: var(--ink); font-size: var(--fs-2); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.ml-row input:hover { border-color: var(--field-line-hover); }
.ml-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.ml-row.bad input { border-color: var(--rx); background: var(--rx-soft); }
@container (min-width: 701px) {
  [data-page="settings"] .grid2 { grid-template-columns: 300px auto; justify-content: start; column-gap: 48px; }
  [data-page="settings"] .price-row { grid-template-columns: minmax(0, 300px) 140px auto; justify-content: start; }
  [data-page="settings"] .price-row input:first-child { max-width: 300px; }
}
@container (max-width: 820px) {
  .set-rx { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 560px) {
  .setbar { flex-wrap: wrap; }
  .setbar span { flex: 1 0 100%; }
}
/* the TV links in «أجهزة العيادة» (admins) */
.tvl-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.tvl-row:first-child { border-top: 0; }
.tvl-name { flex: 1; min-width: 0; }
.tvl-name b { display: block; font-weight: 600; }
.tvl-name small { display: block; color: var(--muted); font-size: var(--fs-1); }
.tvl-none { margin: 0; }
/* restoring a backup: what it replaces and the file's accounts, said before; the steps while it goes */
.backup-warn { margin-top: 4px; }
.backup-who, .backup-step { margin: 10px 0 0; }

/* css/print.css */
/* F5: print preview on screen and @page A5/A4 (the only other file allowed hex colours and !important) */

/* The prescription paper on the visit page (F6): the paper as it prints, in its own type (Cairo) and sizes */
.rxs {
  position: relative; display: flex; flex-direction: column; overflow: hidden; aspect-ratio: 148 / 210;
  border: 1px solid var(--rx-paper-edge); border-radius: var(--r-1); background: var(--white); box-shadow: 0 10px 26px var(--cover-2-a12);
  color: var(--rx-paper-ink); font-family: var(--font-rx);
}
.rxs header { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px 8px; border-bottom: 2px solid var(--brass); }
.rxs header b { display: block; font-size: 16px; font-weight: 700; }
.rxs header small { display: block; color: var(--rx-paper-muted); font-size: var(--fs-1); }
.rxs .rx-no { text-align: left; }
.rxs .pl { display: flex; justify-content: space-between; gap: 8px; padding: 6px 14px; background: var(--rx-paper-band); color: var(--cover); font-size: 12.5px; }
.rxs .rxmark { padding: 6px 14px 0; color: var(--cover); font: 700 var(--fs-4) var(--font-rx); }
.rxs textarea { flex: 1 1 0%; padding: 4px 14px 10px; unicode-bidi: plaintext; border: 0; outline: none; resize: none; color: var(--rx-paper-ink); font: 500 var(--fs-2)/1.9 var(--font-rx); background: repeating-linear-gradient(transparent 0 25.6px, var(--rx-paper-lines) 25.6px 26.6px); }
.rxs footer { padding: 6px 14px; border-top: 1px solid var(--rx-paper-rule); color: var(--rx-paper-muted); font-size: 11.5px; text-align: center; }

/* The preview: the papers as they will print, one under the other */
.pv { display: grid; grid-auto-rows: max-content; justify-items: center; row-gap: 16px; max-height: 62vh; padding: 18px; overflow: auto; border-radius: var(--r-lift); background: var(--band-2); }
.pv > .rxs { width: 430px; max-width: none; }
.pv .rx-body { flex: 1; padding: 6px 14px 10px; color: var(--rx-paper-ink); font: 500 15px/1.9 var(--font-rx); text-align: start; unicode-bidi: plaintext; white-space: pre-wrap; }
.pv .rx-body .rx-i { margin: 0 0 4px; }
.pv .rx-body .muted { color: var(--rx-paper-muted); }
.rx-next { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #c9bfa9; font-size: 13.5px; font-weight: 600; }
.rxs.rx-cont .pl { margin-top: 12px; }
@container (max-width: 560px) {
  .pv > .rxs { zoom: .6372; } /* the A5 sheet whole on a phone */
  .pv > .a4 { zoom: .4893; } /* the A4 sheet too, as wide as the A5 one */
}

/* The printer gets the papers only: the page is hidden, each paper is a sheet of its own */
#print-root { display: none; }
@media print {
  @page { size: A5; margin: 0; }
  html.printing body > :not(#print-root) { display: none !important; }
  html.printing #print-root { display: block !important; }
  #print-root .rxs { width: 148mm; height: 210mm; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; break-after: page; }
  #print-root .rx-body { flex: 1; padding: 6px 14px 10px; color: #2a3d63; font: 500 15px/1.9 var(--font-rx); unicode-bidi: plaintext; white-space: pre-wrap; }
  #print-root .rx-body .rx-i { margin: 0 0 4px; }
  #print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* The other papers on the clinic's sheet (F5): their title, the sick leave's sentence, a request's list */
.rxs.pp { aspect-ratio: auto; min-height: 420px; }
.pp-title { padding: 10px 14px 2px; color: var(--cover); font: 700 17px var(--font-rx); text-align: center; }
.pp-say { margin: 4px 0 0; color: #2a3d63; font: 500 15px/2 var(--font-rx); }
.pv .rx-body ol, #print-root .rx-body ol { margin: 0; padding-inline-start: 22px; text-align: left; }
.pv .rx-body p, #print-root .rx-body p { margin: 0 0 8px; font-family: var(--font-rx); white-space: normal; }

/* The day's handover and the month's accounts (F7): an A4 sheet, previewed like the papers */
.pv > .a4 { width: 560px; max-width: none; padding: 22px 24px; border-radius: 6px; background: #fff; box-shadow: 0 10px 26px rgba(12, 44, 56, .12); }
.a4 h3 { margin: 0; font: 600 18px var(--font-ui); }
.a4 .tbl { margin-top: 12px; font-size: 13px; }
.a4 .sign { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; font-size: 13px; }
@media print {
  @page a4 { size: A4; margin: 14mm; }
  #print-root .a4 { page: a4; width: auto; padding: 0; border-radius: 0; box-shadow: none; break-after: page; }
}

/* The turn slip (slip.js): a small receipt, 72 mm wide (a receipt printer's roll), the number big; on the printer's own
   paper (size auto), without the dashed edge the preview draws */
.slip { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72mm; margin: 0 auto; padding: 14px 10px 18px; border: 1px dashed #b9b1a0; background: var(--white); color: #111; font-size: var(--fs-1); text-align: center; }
.slip-mark { font: 700 var(--fs-4)/1 var(--font-name); }
.slip-mark i { font-style: normal; color: #b8913f; }
.slip-k { margin-top: 6px; color: #555; }
.slip-no { font-size: 56px; font-weight: 700; line-height: 1.05; }
@media print {
  @page slip { size: auto; margin: 0; }
  #print-root .slip { page: slip; border: 0; break-after: page; }
}

/* css/tv.css */
/* F9: the waiting-room screen (tv.html, and its preview in the menu's «شاشة الانتظار»). The system's own look: a petrol
   bar on top with the brass line and its travelling heartbeat, the cream page, «بالداخل الآن» as the petrol card, the
   next one and the waiting names on white strips in a lighter well. Every size follows the screen's width (cqw), so a
   1366 TV and a 1920 TV show the same picture. The prototype's final look (keys tv.*); like print.css, this file keeps
   the screen's own sizes; its colours are tokens (tokens.css). */
.tv-wrap { container-type: inline-size; display: flex; min-height: 100%; }
.tv-wrap > .tv { flex: 1; }
.page.full:has(> .tv-wrap) { height: 100%; } /* the screen's TV preview fills the view, as the hall's does the TV */
.tv-wrap.in-dev { margin: -20px -24px -32px; min-height: calc(100% + 52px); }
@container (max-width: 560px) {
  .tv-wrap.in-dev { margin: -16px -14px -28px; min-height: calc(100% + 44px); }
}
/* the TV itself: the whole screen */
body.tvmode { margin: 0; padding: 0; background: var(--paper); }
body.tvmode #tvRoot { display: flex; min-height: 100dvh; }
body.tvmode .tv-wrap { flex: 1; min-height: 100dvh; }
body.tvmode .tv { height: 100dvh; }

.tv {
  --tv-ink: var(--ink); --tv-soft: var(--tv-ink-soft); --tv-dim: var(--tv-ink-dim); --tv-line: var(--line); --tv-now: var(--tv-ink-brass);
  --focus: var(--brass);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(12px, 2.4vh, 30px); min-height: 100%; overflow: hidden;
  padding: clamp(14px, 3vh, 40px) clamp(18px, 3.4cqw, 72px); color: var(--ink); font-family: var(--font-ui);
  background: var(--grain), radial-gradient(1200px 700px at 104% -10%, var(--brass-a26), transparent 62%), radial-gradient(1000px 700px at -8% 110%, var(--accent-a11), transparent 60%), var(--paper);
}
.tv.idle { cursor: none; }

.tv-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; overflow-x: clip;
  margin: calc(-1 * clamp(14px, 3vh, 40px)) calc(-1 * clamp(18px, 3.4cqw, 72px)) 0; padding: clamp(12px, 2.2vh, 26px) clamp(18px, 3.4cqw, 72px); color: var(--tv-head-ink);
  background: radial-gradient(900px 140px at 50% -20%, var(--brass-a20), transparent 70%), linear-gradient(180deg, var(--cover-hi) 0, var(--cover) 58%, var(--cover-2) 100%);
  border-bottom: 2px solid var(--brass-a70); box-shadow: 0 8px 22px -8px var(--cover-2-a55);
}
/* one heartbeat on the brass line, travelling along it: one slow pass every 10 seconds */
.tv-head::after {
  content: ""; position: absolute; left: 0; bottom: -13px; width: 100%; height: 26px; transform: translateX(calc(50% - 110px)); animation: tv-pulse 10s linear infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 26'%3E%3Cpath d='M0 13h80l7-10 8 20 7-14 4 4h14l4-3 4 3h92' fill='none' stroke='%23d6ad55' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") 0 50% / 220px 26px no-repeat;
}
@keyframes tv-pulse { 0% { transform: translateX(-220px); } 70%, 100% { transform: translateX(100%); } }
.tv-clinic b { display: block; font: 500 clamp(17px, 1.5cqw, 60px)/1.3 var(--font-ui); }
.tv-clinic small, .tv-clock small { display: block; margin-top: 2px; color: var(--cover-dim); font: 400 clamp(13px, .85cqw, 34px)/1.4 var(--font-ui); }
.tv-head-end { display: flex; align-items: center; gap: clamp(12px, 1.4cqw, 56px); }
.tv-clock { text-align: end; }
.tv-clock b { display: block; font: 500 clamp(18px, 1.7cqw, 68px)/1.3 var(--font-ui); font-variant-numeric: tabular-nums; }
.tv-sound { padding: 6px 14px; border: 1px solid var(--brass-a50); border-radius: var(--r-pill); background: transparent; color: var(--brass); font: 500 clamp(12px, .85cqw, 32px)/1.4 var(--font-ui); cursor: pointer; }

.tv-main { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(14px, 2cqw, 80px); min-height: 0; }
.tv-now, .tv-side { border-radius: clamp(18px, 1.6cqw, 60px); }
.tv-now {
  --tv-ink: var(--on-cover); --tv-soft: var(--tv-now-soft); --tv-dim: var(--tv-now-dim);
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(8px, 1.6vh, 20px);
  padding: clamp(14px, 3vh, 40px) clamp(16px, 3cqw, 112px); color: var(--on-cover); text-align: center;
  border: 0; border-bottom: 3px solid var(--brass); box-shadow: var(--sh-card-hi);
  background: radial-gradient(70% 45% at 50% 0%, var(--brass-a20), transparent 70%), linear-gradient(160deg, var(--cover-hi), var(--cover) 55%, var(--cover-2));
}
.tv-wrap.in-dev .tv-now { padding-block-end: calc(clamp(12px, 2.6vh, 32px) + 1.9 * clamp(12px, 1.7cqw, 38px) + 12px); }
.tv-k { color: var(--tv-dim); font: 400 clamp(13px, 1.05cqw, 42px)/1.3 var(--font-ui); }
.tv-now .tv-k { color: var(--next-k); }
.tv-now-no {
  display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border: 2px solid var(--brass-hi-a70); border-radius: var(--r-dot);
  color: var(--brass-hi); font: 500 clamp(30px, 3.2cqw, 128px)/1 var(--font-ui); font-variant-numeric: tabular-nums; box-shadow: 0 0 0 6px var(--brass-a10);
}
.tv-now-name { max-width: 100%; font: 500 clamp(22px, 2.6cqw, 104px)/1.35 var(--font-ui); text-wrap: balance; overflow-wrap: anywhere; }
.tv-now-go { color: var(--tv-dim); font: 400 clamp(13px, 1.05cqw, 42px)/1.4 var(--font-ui); }
.tv-empty { color: var(--tv-soft); font: 500 clamp(24px, 2.6cqw, 104px)/1.3 var(--font-ui); }
/* the «inside now» card ends with the last two called numbers and their times */
.tv-recent {
  position: absolute; inset-inline: 0; inset-block-end: clamp(12px, 2.6vh, 32px); display: flex; justify-content: center; align-items: center; gap: clamp(10px, 1.2cqw, 48px);
  color: var(--tv-dim); font: 400 clamp(12px, .95cqw, 38px)/1.4 var(--font-ui);
}
.tv-recent b { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; margin-inline-end: .45em; border: 1px solid var(--cover-ink-a28); border-radius: var(--r-dot); color: var(--tv-soft); font-weight: 500; }

.tv-side { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: clamp(12px, 2.4vh, 30px) clamp(16px, 1.8cqw, 72px); border: 1px solid var(--card-line); background: var(--tv-well); box-shadow: inset 0 2px 6px var(--warm-a06); }
.tv-next { display: flex; flex-direction: column; gap: clamp(6px, 1vh, 12px); }
.tv-next-row { display: flex; align-items: center; gap: clamp(10px, 1.2cqw, 48px); }
.tv-next-no {
  display: inline-grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: var(--r-dot);
  background: var(--wash-next); color: var(--tv-now); box-shadow: inset 0 0 0 2px var(--brass); font: 500 clamp(16px, 1.5cqw, 60px)/1 var(--font-ui); font-variant-numeric: tabular-nums;
}
.tv-next-name { min-width: 0; font: 500 clamp(17px, 1.6cqw, 64px)/1.35 var(--font-ui); }
.tv-list { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: clamp(12px, 2.2vh, 26px); padding-top: clamp(10px, 1.8vh, 22px); border-top: 1px solid var(--tv-line); }
.tv-list .tv-k { margin-bottom: clamp(4px, .8vh, 10px); }
.tv-queue { display: flex; flex-direction: column; flex: 1; gap: clamp(6px, 1.1vh, 12px); min-height: 0; margin: 0; padding: 0; overflow: hidden; list-style: none; }
.tv-q {
  display: flex; align-items: center; flex: none; gap: clamp(10px, 1.1cqw, 44px); padding: clamp(4px, .7vh, 8px); padding-inline-end: clamp(14px, 1.4cqw, 56px); border-radius: var(--r-pill);
  background: var(--white); color: var(--ink); box-shadow: 0 1px 2px var(--warm-a08), 0 6px 14px -6px var(--warm-a22); font: 500 clamp(15px, 1.3cqw, 52px)/1.3 var(--font-ui);
}
.tv-q b, .tv.nonames .tv-q b {
  display: inline-grid; place-items: center; flex: none; width: 1.9em; height: 1.9em; border-radius: var(--r-dot); font-weight: 500; font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 34% 28%, var(--coin-hi), var(--brass) 58%, var(--coin-lo)); color: var(--coin-ink);
  box-shadow: inset 0 1px 0 var(--white-a65), inset 0 -2px 0 var(--coin-shade-a30), 0 2px 5px var(--coin-shade-a32);
}
.tv.nonames .tv-queue { flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: clamp(8px, 1cqw, 32px); }
.tv.nonames .tv-q { padding: 0; background: none; box-shadow: none; }
.tv-q.in { animation: tv-row .4s var(--ease-out); }
.tv-none { color: var(--tv-dim); font: 400 clamp(14px, 1.2cqw, 48px)/1.4 var(--font-ui); }
.tv-more { padding-top: clamp(6px, 1vh, 12px); color: var(--tv-dim); font-size: clamp(13px, 1.05cqw, 42px); }

.tv-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--tv-dim); font-size: clamp(13px, .9cqw, 36px); }
.tv-foot-end { display: flex; align-items: center; flex: none; gap: clamp(12px, 1.4cqw, 56px); }
.tv-note { color: var(--tv-ink-brass); font-weight: 600; }
.tv-mark { color: var(--ink); font: 700 clamp(16px, 1.4cqw, 56px)/1 "Aref Ruqaa", var(--font-ui); opacity: .7; }
.tv-mark i { color: var(--brass); font-style: normal; }
.tv-live { display: inline-flex; align-items: center; gap: 8px; }
.tv-live::before { content: ""; width: .55em; height: .55em; border-radius: var(--r-dot); background: var(--ok-dot); }
.tv-live.off::before { background: var(--brass); } /* lost the connection for more than 30 s: the clinic must notice */

/* a patient called: the number and name rise in, a soft ring twice; the next one swaps in */
.tv-now.call .tv-now-no, .tv-now.call .tv-now-name { animation: tv-in .6s var(--ease-out) both; }
.tv-now.call .tv-now-name { animation-delay: .12s; }
.tv-now.call::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: tv-ring 1.8s ease-out 2; }
.tv-next.swap { animation: tv-in .5s var(--ease-out) .2s both; }
@keyframes tv-in { from { opacity: 0; transform: translateY(.18em) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tv-ring { 0% { box-shadow: inset 0 0 0 2px var(--brass-hi-a60); } 100% { box-shadow: inset 0 0 0 2px var(--brass-hi-a0); } }
@keyframes tv-row { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tv-now.call .tv-now-no, .tv-now.call .tv-now-name, .tv-now.call::after, .tv-next.swap, .tv-q.in, .tv-head::after { animation: none; }
}

/* the TV hung upright, or a narrow window: stacked, its words sized to the taller hall view */
@media (max-aspect-ratio: 1/1) {
  .tv-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, .7fr) minmax(0, 1.3fr); }
  .tv-clinic b { font-size: clamp(17px, 2.6cqw, 60px); }
  .tv-clinic small, .tv-clock small, .tv-foot { font-size: clamp(13px, 1.6cqw, 34px); }
  .tv-clock b { font-size: clamp(18px, 2.8cqw, 64px); }
  .tv-k, .tv-now-go { font-size: clamp(13px, 1.9cqw, 42px); }
  .tv-now-no { font-size: clamp(30px, 5.4cqw, 120px); }
  .tv-now-name { font-size: clamp(22px, 4.4cqw, 100px); }
  .tv-next-no { font-size: clamp(16px, 2.6cqw, 60px); }
  .tv-next-name { font-size: clamp(17px, 2.9cqw, 64px); }
  .tv-q { font-size: clamp(15px, 2.4cqw, 54px); }
  .tv-none { font-size: clamp(14px, 2.1cqw, 48px); }
  .tv-recent { font-size: clamp(12px, 1.7cqw, 38px); }
}
/* a phone or a narrow window (after the upright rows above, so it wins): the «inside now» card as tall as its words,
   the list under it takes the rest */
@container (max-width: 760px) {
  .tv-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tv-recent { position: static; flex-wrap: wrap; margin-top: 8px; } /* under «إلى غرفة الفحص», not over it */
}
/* the waiting screen without a link: what to do */
.tv-stop { display: grid; flex: 1; place-content: center; gap: 12px; min-height: 100dvh; padding: 24px; text-align: center; background: var(--paper); color: var(--ink); font-family: var(--font-ui); }
.tv-stop b { font-size: 26px; }
.tv-stop p { max-width: 560px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }

/* css/modules/spec.css */
/* F10: the specialty sections on the doctor's visit (js/clinical.js, each module's own in css/modules/<id>.css). The
   prototype's final look (keys sx.*). */
.sx-mod { display: contents; } /* its sections are the visit column's own cards */
/* (doc.css styles the column's sections as its direct children: the same for these, one box further in. They always
   follow the complaint's section, so each has the line above it.) */
.visit-grid > .stack > .sx-mod > .sheet { padding: 20px; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; background: none; box-shadow: none; }
.visit-grid > .stack > .sx-mod > .sheet::before { display: none; }
.visit-grid > .stack > .sx-mod + .sheet { border-top: 1px solid var(--line-2); }
.spx .f > .err { margin-top: 6px; align-items: flex-start; line-height: 1.45; }
.sx-off { margin: 0; }
.sx-calcs { margin-bottom: 10px; }
.calc { display: inline-flex; flex-direction: column; padding: 6px 12px; border-radius: var(--r-1); background: var(--own-doc-soft); color: var(--own-doc-ink); font-size: var(--fs-1); }
.calc b { font-size: var(--fs-3); }
.from-prev { padding: 1px 7px; border-radius: var(--r-key); background: var(--own-auto-soft); color: var(--own-auto-ink); font-size: var(--fs-1); }

/* css/modules/gyn.css */
/* F10 gynecology: the pregnancy's G P A in one row of small boxes (each box in its own field, for its refusal) */
.gpa-f { margin-top: 10px; }
.inline.gpa { flex-wrap: nowrap; }
.gpa .f input { width: 56px; }

/* css/modules/peds.css */
/* F10 peds: its own look on the specialty sections (css/modules/spec.css holds the shared one) */
/* «المستحق الآن»: the vaccines due, under the date of birth */
.peds-due { margin-top: 10px; }

/* css/modules/eye.css */
/* F10 eye: the last readings above the table; the right/left table, each value in a box of its own width with its
   refusal wrapping under it, the row's boxes level and their name beside the box (the prototype's F-C); a pressure
   outside 10 to 21 in red. */
.eye-was { margin: 0 0 10px; color: var(--muted); font-size: var(--fs-1); }
.eye-t td { padding-block: 9px; vertical-align: top; }
.eye-t td:first-child { padding-top: 19px; }
.eye-t .f.eye-cell { gap: 0; width: 100px; }
.eye-t .f.eye-cell.wide { width: 170px; }
.eye-t .eye-cell input { height: var(--ctl-sm); }
/* over the visit's lined fields (doc.css #visit … input): the line and the value turn red */
#visit .eye-t .f.crit input { border-bottom-color: var(--rx); color: var(--rx-ink); }
.eye-more { margin-top: 10px; }
.eye-hint { margin: 8px 0 0; }
/* a phone: the table is wider than the screen (the glasses' boxes alone are 340px), so each reading's name goes on its
   own line and the right and left eyes share the width under it, «اليمنى» and «اليسرى» still at the head of their halves */
@container (max-width: 560px) {
  .eye-t, .eye-t :is(thead, tbody) { display: block; }
  .eye-t tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .eye-t th { padding-inline: 0; }
  .eye-t th:first-child { display: none; }
  .eye-t td { padding: 0 0 10px; }
  .eye-t td:first-child { grid-column: 1 / -1; padding: 10px 0 4px; border-bottom: 0; color: var(--muted); font-size: var(--fs-1); }
  .eye-t .f.eye-cell, .eye-t .f.eye-cell.wide { width: 100%; }
}

/* css/modules/cardio.css */
/* F10 cardio: the line under the heart's findings that says how the blood pressure is marked */
.cardio-bp { margin: 8px 0 0; }

/* css/modules/ortho.css */
/* F10 ortho: the cast's day and weeks keep their places in the section's grid (their box only hides them together);
   the day the cast comes off under them */
.ortho-cast { display: contents; }
.ortho-off { margin-top: 10px; }

/* css/modules/derm.css */
/* F10 derm: the package's sessions, one round button a session (the used ones filled in the patient's colour), the
   line beside them; the lesion under the body's areas */
.derm-row { margin-top: 10px; }
.derm-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.derm-dots button { width: 22px; height: 22px; border: 2px solid var(--own-pat); border-radius: var(--r-dot); background: var(--white); }
.derm-dots button[aria-pressed="true"] { background: var(--own-pat); }
.derm-lesion { margin-top: 10px; }
/* a finger needs room on a touch screen */
@media (pointer: coarse) {
  .derm-dots { gap: 8px; }
  .derm-dots button { width: 32px; height: 32px; }
}

/* css/modules/neuro.css */
/* F10 neuro: how long ago the last seizure was, under the seizure record, in the patient's colours (the prototype's
   calc «ago»; css/modules/spec.css holds the shared look) */
.neuro-calcs { margin-top: 10px; }
.neuro-calcs .calc { background: var(--own-pat-soft); color: var(--own-pat-ink); }

/* css/modules/surg.css */
/* F10 surgery: the paper's two kinds (request, report) above the operation's fields, as wide as their words */
.surg-kind { display: block; }
.surg-kind .choice { margin-bottom: 10px; }

/* css/states.css */
/* States, declared last so they win: hidden, disabled, busy, and no motion for those who ask for none.
   The only file (with print.css) allowed !important. */
[hidden] { display: none !important; }

/* disabled: a pale button that says it cannot be pressed now */
.btn:not(.link):is(:disabled, [aria-disabled="true"]) {
  background-color: var(--disabled-bg) !important; background-image: none !important; border-color: var(--disabled-line) !important;
  color: var(--disabled-ink) !important; box-shadow: none !important; transform: none !important; filter: none; cursor: not-allowed;
}
.btn.link:is(:disabled, [aria-disabled="true"]) { color: var(--disabled-ink) !important; cursor: not-allowed; }
.f :is(input, select, textarea):disabled { border-color: var(--disabled-line); background-color: var(--disabled-bg); color: var(--disabled-ink); cursor: not-allowed; }
.choice[aria-disabled="true"] { background: var(--disabled-bg); border-color: var(--disabled-line); color: var(--disabled-ink); cursor: not-allowed; }

/* busy: the words fade and a small ring turns until the server answers */
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; inset: 0; width: 16px; height: 16px; margin: auto; border-radius: var(--r-dot);
  border: 2px solid var(--on-cover-a35); border-top-color: var(--on-accent); animation: spin .7s linear infinite;
}
.btn:is(.ghost, .soft, .link)[aria-busy="true"]::after { border-color: var(--accent-a25); border-top-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn[aria-busy="true"]::after { animation: spin 2s linear infinite !important; }
}
