/* Skhaa 3.2 — unified shell (structure shared with the KNZ operations centre, Skhaa colours).
   Loaded last: it restyles the frame around the existing screens and styles the new ones. */

@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url(fonts/plex-ar-400.woff2) format("woff2"); 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; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url(fonts/plex-ar-500.woff2) format("woff2"); 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; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url(fonts/plex-ar-600.woff2) format("woff2"); 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; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url(fonts/plex-ar-700.woff2) format("woff2"); 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; }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url(fonts/plex-lat-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 500; font-display: swap; src: url(fonts/plex-lat-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url(fonts/plex-lat-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Arabic"; font-weight: 700; font-display: swap; src: url(fonts/plex-lat-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --sk-plum: #6d1a5b;
  --sk-plum-deep: #2b0a25;
  --sk-plum-soft: #f5eaf2;
  --sk-ink: #2d1229;
  --sk-text: #2a2030;
  --sk-muted: #6d5f6f;
  --sk-paper: #f8f6f3;
  --sk-card: #ffffff;
  --sk-line: #e9e2e6;
  --sk-line-strong: #d6cad3;
  --sk-gold: #f6cb62;
  --sk-red: #b3261e;
  --sk-red-soft: #fbe9e7;
  --sk-green: #1f6f57;
  --sk-green-soft: #e4f3ec;
  --sk-radius: 14px;
  --sk-shadow: 0 1px 2px rgba(45, 18, 41, .05), 0 4px 14px rgba(45, 18, 41, .05);
  --sk-side: 248px;
  --bg: var(--sk-paper);
  --line: var(--sk-line);
  --muted: var(--sk-muted);
}

.sk, .sk *, .sk *::before, .sk *::after { box-sizing: border-box; }
body.sk { margin: 0; }
.sk-side a, .sk-top a { text-decoration: none; }
body.sk {
  background: var(--sk-paper); color: var(--sk-text);
  font-family: "Plex Arabic", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", Arial, sans-serif;
  font-size: 15px; line-height: 1.6;
}
.sk .ic { flex: none; vertical-align: -4px; }
.sk :focus-visible { outline: 2px solid var(--sk-plum); outline-offset: 2px; border-radius: 6px; }
.sk button, .sk input, .sk select, .sk textarea { font-family: inherit; }

/* ---------- shell ---------- */
.sk .app-shell { display: block; min-height: 100vh; }
.sk .nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.sk-side {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sk-side); z-index: 40;
  background: var(--sk-plum-deep); color: #eadfe7; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .2s ease;
}
.nav-toggle:checked ~ .sk-side { transform: none; }
.sk-scrim { display: none; position: fixed; inset: 0; background: rgba(30, 8, 26, .5); z-index: 30; }
.nav-toggle:checked ~ .sk-scrim { display: block; }
.sk-brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; color: #fff; }
.sk-brand img { height: 46px; width: 46px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.sk-brand strong { display: block; font-size: 1.25rem; line-height: 1.15; color: #fff; }
.sk-brand small { color: var(--sk-gold); font-size: .78rem; }
.sk-side nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: block; }
.sk-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 2px 0; border-radius: 10px;
  color: #dccfd8; font-weight: 500; font-size: .95rem; min-height: 44px;
}
.sk-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sk-link.on { background: var(--sk-gold); color: var(--sk-plum-deep); font-weight: 600; }
.sk-link .nav-badge {
  margin-inline-start: auto; background: var(--sk-red); color: #fff; font-size: .72rem; font-weight: 600;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px;
}
.sk-link.on .nav-badge { background: var(--sk-plum-deep); }
.sk-sep { margin: 16px 12px 6px; font-size: .74rem; color: #b79aaf; }
.sk-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.sk-foot form { margin: 0; }
.sk-me { flex: 1; display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; }
.sk-me span { min-width: 0; }
.sk-me strong { display: block; font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-me small { display: block; color: #c2a9bb; font-size: .78rem; }
.sk-logout { background: transparent; border: 0; color: #dccfd8; cursor: pointer; padding: 10px; border-radius: 10px; display: grid; place-items: center; }
.sk-logout:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.sk-logout .ic { transform: scaleX(-1); }

.sk .content { width: auto; margin: 0; min-height: 100vh; }
.sk .content > header.sk-top {
  position: sticky; top: 0; z-index: 20; height: auto; min-height: 64px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: rgba(248, 246, 243, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--sk-line);
}
.sk .content > header.sk-top h1 { flex: 1; min-width: 0; font-size: 1rem; font-weight: 600; color: var(--sk-ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk .content > header.sk-top .header-account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .84rem; color: var(--sk-muted); }
.sk-email { display: none; }
.sk-burger, .sk-bell {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; cursor: pointer;
  color: var(--sk-ink); background: var(--sk-card); border: 1px solid var(--sk-line);
}
.sk-bell b {
  position: absolute; top: -5px; inset-inline-end: -5px; background: var(--sk-red); color: #fff; font-size: .68rem;
  min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 4px;
}
.sk .page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px 16px 48px; }
.sk .alert { max-width: 1240px; margin: 14px 16px 0; border-radius: 12px; padding: 11px 14px; font-size: .9rem; font-weight: 500; border: 1px solid #bcdccd; background: var(--sk-green-soft); color: #174f3e; }
.sk .alert.error { background: var(--sk-red-soft); border-color: #f0c0bb; color: #7a1610; }

@media (min-width: 960px) {
  .sk-side { transform: none; }
  .sk-link { padding: 7px 12px; min-height: 38px; margin: 1px 0; }
  .sk-scrim, .sk-burger { display: none !important; }
  .sk .content { margin-inline-start: var(--sk-side); }
  .sk .page { padding: 26px 30px 60px; }
  .sk .content > header.sk-top { padding: 10px 30px; }
  .sk .alert { margin: 14px 30px 0; }
  .sk-email { display: inline; }
}
@media (min-width: 1560px) { .sk .alert { margin-inline: auto; } }

/* ---------- surfaces ---------- */
.sk .panel, .sk .reviews, .sk .review-work { border-color: var(--sk-line); border-radius: var(--sk-radius); box-shadow: var(--sk-shadow); }
.sk .panel-head { border-bottom-color: var(--sk-line); padding: 16px 18px; gap: 10px; flex-wrap: wrap; }
.sk .panel-head h2 { font-size: 1.05rem; font-weight: 600; color: var(--sk-ink); }
.sk .panel-head small { font-size: .84rem; color: var(--sk-muted); }
.sk .title-row { align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sk .title-row h2, .sk .project-head h2 { font-size: 1.45rem; font-weight: 700; color: var(--sk-ink); margin: 0 0 3px; }
.sk .title-row p, .sk .project-head p { font-size: .92rem; color: var(--sk-muted); }
.sk .empty { text-align: center; padding: 26px 12px; color: var(--sk-muted); font-size: .92rem; }

/* the welcome banner becomes a plain page heading */
.sk .hero { background: none; color: var(--sk-ink); border-radius: 0; padding: 0; margin-bottom: 16px; align-items: flex-end; gap: 12px; flex-wrap: wrap; box-shadow: none; }
.sk .hero p { display: none; }
.sk .hero h2 { font-size: 1.45rem; font-weight: 700; color: var(--sk-ink); margin: 0 0 3px; }
.sk .hero span { font-size: .92rem; color: var(--sk-muted); }
.sk .hero a, .sk .hero .button { background: var(--sk-card); color: var(--sk-ink) !important; border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: .92rem; }

/* number tiles */
.sk .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
@media (min-width: 720px) { .sk .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .sk .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.sk .stats article { display: flex; flex-direction: column-reverse; justify-content: flex-end; border-color: var(--sk-line); border-radius: var(--sk-radius); padding: 14px 16px; box-shadow: var(--sk-shadow); border-top: 3px solid transparent; min-width: 0; }
.sk .stats b { font-size: 1.75rem; font-weight: 600; color: var(--sk-ink); line-height: 1.25; }
.sk .stats span { font-size: .84rem; font-weight: 500; color: var(--sk-muted); margin: 0; }
.sk .stats article.danger-stat { border-top-color: var(--sk-red); background: #fffafa; }
.sk .stats article.danger-stat b { color: var(--sk-red); }

/* ---------- buttons, forms, badges ---------- */
.sk .primary { background: var(--sk-plum); border: 1px solid var(--sk-plum); border-radius: 10px; padding: 8px 16px; min-height: 40px; font-weight: 600; font-size: .92rem; }
.sk .primary:hover { background: #561347; }
.sk .btn, .sk .modal-form button:not(.primary), .sk .link-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--sk-line-strong); background: var(--sk-card); color: var(--sk-ink); font-weight: 600; font-size: .92rem; cursor: pointer;
}
.sk .btn:hover, .sk .link-button:hover { background: var(--sk-paper); }
.sk .btn-sm { min-height: 34px; padding: 4px 11px; font-size: .84rem; }
.sk .btn-danger { border-color: #e3b1ac; color: var(--sk-red); }
.sk .btn-danger:hover { background: var(--sk-red-soft); }
.sk .badge { font-size: .76rem; font-weight: 600; padding: 2px 9px; line-height: 1.7; white-space: nowrap; }
.sk .badge.info { background: var(--sk-plum-soft); color: var(--sk-plum); }
.sk dialog { border-radius: var(--sk-radius); width: min(520px, calc(100% - 30px)); }
.sk .modal-form { gap: 14px; }
.sk .modal-form h2 { font-size: 1.1rem; font-weight: 600; color: var(--sk-ink); }
.sk .modal-form label, .sk .form-grid label, .sk .auth-card label, .sk .team-add-form label { font-size: .88rem; font-weight: 600; color: var(--sk-ink); display: grid; gap: 6px; }
.sk .modal-form input, .sk .modal-form select, .sk .modal-form textarea, .sk .form-grid input, .sk .auth-card input, .sk .team-add-form select {
  border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 9px 12px; font-size: .95rem; min-height: 42px; background: #fff; color: var(--sk-text); width: 100%;
}
.sk .modal-form > div:last-child { display: flex; gap: 8px; justify-content: flex-start; flex-direction: row-reverse; }
.sk .checkbox-line { display: flex !important; align-items: center; gap: 9px; font-weight: 500 !important; }
.sk .checkbox-line input { width: 18px; min-height: 0; height: 18px; flex: none; }
.sk .hint { font-size: .84rem; color: var(--sk-muted); margin: 0; }

/* ---------- sign-in ---------- */
.sk.auth-body { background: var(--sk-paper); }
.sk .auth-card { border-radius: var(--sk-radius); box-shadow: var(--sk-shadow); border: 1px solid var(--sk-line); }
.sk .auth-card h1 { font-size: 1.2rem; color: var(--sk-ink); }

/* ---------- projects list ---------- */
.sk .project-meta { display: block; margin-top: 3px; color: var(--sk-muted); font-size: .84rem; font-weight: 400; }

/* ---------- owner view: progress only ---------- */
.progress-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 16px; }
.sk .progress-card { padding: 18px; }
.progress-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.progress-card-head strong { display: block; font-size: 1.05rem; font-weight: 600; color: var(--sk-ink); }
.progress-card-head small { display: block; color: var(--sk-muted); font-size: .84rem; margin-top: 2px; }
.progress-percent { font-size: 1.75rem; font-weight: 600; color: var(--sk-plum); line-height: 1.1; }
.progress-bar { height: 10px; border-radius: 10px; background: #ece4ea; overflow: hidden; margin: 14px 0 10px; }
.progress-bar span { display: block; height: 100%; border-radius: 10px; background: var(--sk-plum); }
.progress-summary { margin: 0; color: var(--sk-muted); font-size: .9rem; }

/* ---------- project team ---------- */
.sk .team-panel { margin-bottom: 16px; overflow: visible; }
.team-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; }
.team-panel > summary::-webkit-details-marker { display: none; }
.team-panel > summary h2 { font-size: 1.05rem; font-weight: 600; color: var(--sk-ink); margin: 0; }
.team-panel > summary .team-names { flex: 1; min-width: 0; color: var(--sk-muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-panel > summary .team-toggle { color: var(--sk-plum); font-weight: 600; font-size: .88rem; }
.team-panel[open] > summary { border-bottom: 1px solid var(--sk-line); }
.team-panel[open] > summary .team-toggle::after { content: " ▴"; }
.team-panel:not([open]) > summary .team-toggle::after { content: " ▾"; }
.team-intro { margin: 14px 18px 0; color: var(--sk-muted); font-size: .88rem; }
.team-list { display: grid; gap: 10px; padding: 14px 18px; }
.team-member { border: 1px solid var(--sk-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.team-member-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-member-main > div { min-width: 0; }
.team-member-main strong { display: block; font-size: .95rem; font-weight: 600; color: var(--sk-ink); }
.team-member-main small { display: block; color: var(--sk-muted); font-size: .8rem; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk .member-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--sk-plum-soft); color: var(--sk-plum); display: grid; place-items: center; font-weight: 700; }
.team-member-roles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.team-member-roles .badge { margin: 0; }
.role-chip { display: inline-flex; align-items: center; margin: 0; background: var(--sk-plum-soft); border-radius: 20px; padding-inline-end: 2px; }
.role-chip .badge { background: none !important; }
.chip-remove { border: 0; background: transparent; color: var(--sk-plum); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; display: grid; place-items: center; }
.chip-remove:hover { background: var(--sk-red-soft); color: var(--sk-red); }
.member-overrides { grid-column: 1 / -1; border-top: 1px dashed var(--sk-line); padding-top: 8px; }
.member-overrides > summary { cursor: pointer; color: var(--sk-plum); font-weight: 600; font-size: .86rem; }
.member-overrides form { display: grid; gap: 12px; margin-top: 10px; }
.permission-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.permission-option { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--sk-line); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: .88rem; background: #fff; }
.permission-option input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--sk-plum); }
.permission-option small { display: block; color: var(--sk-muted); font-size: .76rem; }
.permission-option.from-role { background: var(--sk-paper); }
.member-overrides .primary { justify-self: start; }
.team-add-form { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: end; padding: 14px 18px 18px; border-top: 1px solid var(--sk-line); background: var(--sk-paper); border-radius: 0 0 var(--sk-radius) var(--sk-radius); }
@media (min-width: 760px) { .team-add-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; } }
@media (max-width: 620px) { .team-member { grid-template-columns: minmax(0, 1fr); } .team-member-roles { justify-content: flex-start; } }
.sk .clean-member-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; }
.sk .clean-member-chips .badge { margin: 0; }

/* ---------- roles and permissions ---------- */
.matrix-scroll { overflow-x: auto; }
.roles-matrix { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.roles-matrix th, .roles-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--sk-line); text-align: center; vertical-align: middle; }
.roles-matrix thead th { position: sticky; top: 0; background: var(--sk-paper); font-weight: 600; color: var(--sk-ink); font-size: .86rem; white-space: nowrap; }
.roles-matrix thead th small { display: block; font-weight: 400; color: var(--sk-muted); font-size: .74rem; }
.roles-matrix th:first-child, .roles-matrix td:first-child { text-align: start; min-width: 260px; }
.roles-matrix tbody th { font-weight: 500; color: var(--sk-text); }
.roles-matrix .matrix-group th { background: var(--sk-plum-soft); color: var(--sk-plum); font-weight: 600; font-size: .82rem; text-align: start; padding: 6px 12px; }
.roles-matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--sk-plum); cursor: pointer; }
.roles-matrix .admin-col { color: var(--sk-green); font-weight: 700; background: #fbfaf9; }
.matrix-save { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; }

.matrix-save small { color: var(--sk-muted); font-size: .88rem; }
.sk .roles-list, .sk .clients-list { margin-top: 16px; }
.role-row, .client-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: 14px 18px; border-top: 1px solid var(--sk-line); }
.role-row:first-of-type, .client-row:first-of-type { border-top: 0; }
.role-row strong, .client-main strong { font-size: .98rem; font-weight: 600; color: var(--sk-ink); }
.role-row p, .client-main p, .role-row small, .client-main small { display: block; margin: 2px 0 0; color: var(--sk-muted); font-size: .88rem; font-weight: 400; }
.role-row .badge, .client-row .badge { margin: 0 6px; }
.role-actions, .client-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.role-actions form, .client-actions form { margin: 0; }
.sk .role-actions button, .sk .client-actions button { min-height: 34px; padding: 4px 11px; border-radius: 10px; border: 1px solid var(--sk-line-strong); background: #fff; color: var(--sk-ink); font-weight: 600; font-size: .84rem; cursor: pointer; }
.sk .role-actions button.danger-link, .sk .client-actions button.danger-link { border-color: #e3b1ac; color: var(--sk-red); }
@media (max-width: 620px) { .role-row, .client-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- users ---------- */
.user-memberships { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sk .user-memberships .badge { margin: 0; font-weight: 500; }
.flag-form { margin: 6px 0 0; }
.flag-form label { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--sk-muted); cursor: pointer; }
.flag-form input { accent-color: var(--sk-plum); }

/* ---------- project heading ---------- */
.sk p.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.sk p.project-meta .badge { margin: 0; }
.sk p.project-meta .link-button { min-height: 32px; padding: 3px 12px; font-size: .84rem; }
.sk .project-report-link { display: inline-flex; margin-top: 10px; color: var(--sk-plum); font-weight: 600; font-size: .88rem; }
.sk .project-report-link:hover { text-decoration: underline; }
.sk .users-header, .sk .users-row { grid-template-columns: minmax(220px, 1.5fr) 150px 110px 140px 140px minmax(200px, auto); }
.sk .user-actions { flex-wrap: wrap; }
.sk .user-actions a, .sk .user-actions button { white-space: nowrap; }
.user-type-cell { display: grid; gap: 2px; min-width: 0; }
.sk .role-form select { min-height: 36px; border-radius: 8px; border-color: var(--sk-line-strong); padding: 5px 8px; }
.sk .users-row > * { min-width: 0; }
.sk .role-form select { width: 100%; max-width: 100%; }
@media (max-width: 760px) { .sk .users-row > span:not(.badge)::before { color: var(--sk-muted); font-size: .8rem; } }

/* plain buttons that never had a style of their own */
.sk .content button:not([class]) {
  min-height: 36px; padding: 5px 13px; border-radius: 10px; border: 1px solid var(--sk-line-strong); background: var(--sk-card);
  color: var(--sk-ink); font-weight: 600; font-size: .86rem; cursor: pointer;
}
.sk .content button:not([class]):hover { background: var(--sk-paper); }
.sk .content > header.sk-top select, .sk .content > header.sk-top input { min-height: 36px; border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 5px 10px; font-size: .86rem; background: #fff; }
.sk .project-members-panel.readonly { margin-bottom: 16px; }

/* ---------- 3.3: categories, invitations, profile ---------- */
.sk .category-fields { border: 1px solid var(--sk-line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.sk .category-fields legend { font-size: .88rem; font-weight: 600; color: var(--sk-ink); padding: 0 6px; }
.category-main, .category-subs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.category-subs[hidden] { display: none; }
.category-hint { flex-basis: 100%; font-size: .82rem; color: var(--sk-muted); }
.sk .modal-form label.choice { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 500; font-size: .9rem; background: #fff; }
.sk .modal-form label.choice input { width: 17px; height: 17px; min-height: 0; padding: 0; flex: none; accent-color: var(--sk-plum); }
.sk .modal-form label.choice:has(input:checked) { border-color: var(--sk-plum); background: var(--sk-plum-soft); color: var(--sk-plum); font-weight: 600; }
.sk .modal-form label small { font-weight: 400; color: var(--sk-muted); font-size: .8rem; }
.sk .invite-link-box { padding: 14px 18px; margin-bottom: 16px; display: grid; gap: 10px; border-color: #ecd596; background: #fffdf5; }
.invite-link-box strong { display: block; color: var(--sk-ink); font-size: .95rem; }
.invite-link-box small { display: block; color: var(--sk-muted); font-size: .84rem; }
.invite-link-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-link-row input { flex: 1; min-width: 220px; min-height: 40px; border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 8px 12px; font-size: .86rem; background: #fff; color: var(--sk-text); }
.client-account { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: .84rem; color: var(--sk-muted); }
.sk .client-account .badge { margin: 0; }
.client-account form { margin: 0; }
.sk .client-account button { min-height: 28px; padding: 2px 10px; font-size: .8rem; }
.profile-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; align-items: start; }
@media (min-width: 860px) { .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk .profile-form { padding: 18px; }
.sk a.sk-me:hover strong { text-decoration: underline; }
.sk .auth-links { text-align: center; margin: 14px 0 0; font-size: .9rem; }
.sk .auth-links a { color: var(--sk-plum); font-weight: 600; }
.sk .auth-links a.primary { color: #fff; display: inline-flex; align-items: center; text-decoration: none; }
.sk .auth-card label small { display: block; font-weight: 400; color: var(--sk-muted); font-size: .8rem; }
.sk .marketing-pending { padding: 18px; margin-bottom: 16px; }
.sk .marketing-pending h2 { font-size: 1.05rem; font-weight: 600; color: var(--sk-ink); margin: 0 0 6px; }
.sk .marketing-pending p { margin: 0; color: var(--sk-muted); font-size: .92rem; }
.sk [data-category-only][hidden] { display: none !important; }

/* ---------- 3.4: screens of a module inside the shell ---------- */
.sk-link.sk-sub { font-size: .92rem; }
.sk-sep { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk .section-label { font-size: .95rem; font-weight: 600; color: var(--sk-ink); margin: 0 0 8px; }
.sk a.marketing-card { display: block; color: inherit; text-decoration: none; }
.sk a.marketing-card:hover { border-color: var(--sk-plum); }
.sk a.marketing-card .progress-summary { color: var(--sk-plum); font-weight: 600; margin-top: 10px; }
.marketing-row-note { color: var(--sk-muted); font-size: .84rem; }

/* roles matrix with many roles: headers wrap, the permission column stays in place while scrolling sideways */
.roles-matrix th, .roles-matrix td { padding: 9px 8px; }
.roles-matrix thead th { white-space: normal; min-width: 76px; max-width: 104px; line-height: 1.35; vertical-align: bottom; }
.roles-matrix th:first-child, .roles-matrix td:first-child { position: sticky; inset-inline-start: 0; background: var(--sk-paper); z-index: 1; min-width: 230px; max-width: none; }
.roles-matrix thead th:first-child { z-index: 2; }
.roles-matrix .matrix-group th { background: var(--sk-plum-soft); }
@media (max-width: 640px) {
    .roles-matrix th:first-child, .roles-matrix td:first-child { min-width: 150px; max-width: 170px; font-size: .84rem; }
}

/* invite a new person from the team panel, and project + role in the invitation dialog */
.team-invite-form { border-top: 1px dashed var(--sk-line); border-radius: 0 0 var(--sk-radius) var(--sk-radius); }
.team-add-form:not(.team-invite-form) { border-radius: 0; }
.team-invite-head { grid-column: 1 / -1; display: grid; gap: 2px; }
.team-invite-head strong { color: var(--sk-ink); font-size: .95rem; }
.team-invite-head small { color: var(--sk-muted); font-size: .84rem; }
.sk .team-add-form input { width: 100%; }
@media (min-width: 760px) { .team-invite-form { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1.2fr) auto; } }
.invite-project { display: grid; gap: 12px; }
@media (min-width: 560px) { .invite-project { grid-template-columns: 1.4fr 1fr; } }
.sk .modal-form select:disabled { opacity: .55; }
.sk .team-add-form input { border: 1px solid var(--sk-line-strong); border-radius: 10px; padding: 9px 12px; font-size: .95rem; min-height: 42px; background: #fff; color: var(--sk-text); }
.team-panel .invite-link-box { margin: 0 18px 14px; }
.team-panel .team-alert { margin: 0 18px 14px; }

/* ---------- «الدخول كـ»: the strip shown while an administrator looks through someone else's account ---------- */
.view-as-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 46px; padding: 7px 16px; background: #f6cb62; color: #2b0a25; font-size: .9rem; font-weight: 500; border-bottom: 1px solid #d9ab3c; }
.view-as-bar small { font-weight: 400; opacity: .8; }
.view-as-bar form { margin: 0; }
.sk .view-as-bar button { min-height: 32px; padding: 4px 14px; border: 1px solid #2b0a25; border-radius: 100px; background: #2b0a25; color: #fff; font-weight: 600; font-size: .86rem; cursor: pointer; }
.sk .view-as-bar button:hover { background: #4a1040; }
.sk.viewing .content > header.sk-top { top: 46px; }
@media print { .view-as-bar { display: none; } }

/* ---------- home: programmer panel ---------- */
.developer-kpi-panel { margin: 18px 0; }
.developer-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--sk-line); }
.developer-kpis article { background: #fff; padding: 16px 18px; }
.developer-kpis b, .developer-kpis span { display: block; }
.developer-kpis b { font-size: 26px; }
.developer-kpis span { color: var(--sk-muted); font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.developer-kpis article.danger-stat b { color: #b8445d; }
.developer-kpis article.warning-stat b { color: #9b6615; }
.developer-work-list { border-top: 1px solid var(--sk-line); }
.developer-work-list .list-row:first-child { border-top: 0; }
.developer-more { padding: 12px 20px; border-top: 1px solid #edf0f4; color: var(--sk-muted); font-size: .86rem; }
.oldest-issues-panel { margin: 18px 0; }
@media (max-width: 900px) { .developer-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- home: folded activity ---------- */
.sk .activity-fold { margin: 18px 0; }
.activity-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.activity-fold > summary::-webkit-details-marker, .activity-day > summary::-webkit-details-marker { display: none; }
.activity-fold > summary h2 { font-size: 15px; margin: 0; white-space: nowrap; }
.activity-fold > summary .fold-latest { flex: 1; min-width: 0; color: var(--sk-muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-fold > summary .fold-toggle { color: var(--sk-plum); font-weight: 600; font-size: .86rem; white-space: nowrap; }
.activity-fold > summary .fold-toggle::after { content: "عرض ▾"; }
.activity-fold[open] > summary .fold-toggle::after { content: "إخفاء ▴"; }
.activity-fold[open] > summary { border-bottom: 1px solid var(--sk-line); }
.activity-fold[open] > summary .fold-latest { visibility: hidden; }
.activity-day { border-top: 1px solid var(--sk-line); }
.activity-day:first-of-type { border-top: 0; }
.activity-day > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: #faf7fa; font-size: .88rem; }
.activity-day > summary b { color: var(--sk-ink); }
.activity-day > summary span { color: var(--sk-muted); font-size: .8rem; }
.activity-day > summary::after { content: "▾"; margin-inline-start: auto; color: var(--sk-muted); }
.activity-day[open] > summary::after { content: "▴"; }
@media (max-width: 600px) { .activity-fold > summary { flex-wrap: wrap; } .activity-fold > summary .fold-latest { flex-basis: 100%; order: 5; } }
.activity-fold .activity-row { padding-block: 10px; }
.activity-fold .activity-row > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; align-items: center; }
.activity-fold .activity-row > div > * { grid-column: 1; margin: 0; }
.activity-fold .activity-row > div > small { grid-column: 2; grid-row: 1 / span 2; white-space: nowrap; }
@media (max-width: 600px) { .activity-fold .activity-row > div { grid-template-columns: minmax(0, 1fr); } .activity-fold .activity-row > div > small { grid-column: 1; grid-row: auto; } }
