/* Quantum Projects brand system — shared across every active Blazor screen.
   Palette is derived from the approved Quantum Projects identity board. */
:root {
  --qp-primary: #0b7a75;
  --qp-primary-dark: #075f63;
  --qp-primary-deep: #073c4b;
  --qp-secondary: #14c7bf;
  --qp-amber: #f59e0b;
  --qp-text: #1f2937;
  --qp-subtle: #64748b;
  --qp-border: #e5e7eb;
  --qp-bg: #f4f8fa;
  --qp-white: #fff;
  --qp-glow: rgba(20,199,191,.13);
  font-family: 'Tajawal','Segoe UI',Tahoma,Arial,sans-serif;
  color:var(--qp-text);
  background:var(--qp-bg);
  font-synthesis:none;
}
html { scroll-behavior:smooth; }
body { background:var(--qp-bg); color:var(--qp-text); line-height:1.65; }
a { color:var(--qp-primary); }
a:hover { color:var(--qp-primary-dark); }
button,input,textarea,select { font-family:inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline:2px solid var(--qp-secondary); outline-offset:2px;
}
::selection { background:#aceee7; color:#062b31; }
.app-layout { background:var(--qp-bg); }
.sidebar {
  width:275px;min-width:275px;
  background:linear-gradient(166deg,#073d4c 0%,#075960 58%,#063b49 100%);
  box-shadow:-4px 0 30px rgba(0,39,51,.09);
  border-left:1px solid rgba(255,255,255,.1);
  scrollbar-color:#427c7f transparent;
}
.sidebar::before { content:"";display:block;position:absolute;top:0;right:0;left:0;height:4px;
  background:linear-gradient(90deg,var(--qp-primary),var(--qp-secondary),var(--qp-amber)); }
.brand { padding:30px 18px 29px;gap:11px;border-bottom:1px solid rgba(255,255,255,.085);min-height:103px; }
.brand:hover { color:#fff; }
.brand-mark { display:block;width:59px;height:59px;flex:none;object-fit:contain;
  border:none;border-radius:13px;background:#fff;padding:3px;box-shadow:0 5px 16px rgba(0,19,25,.22); }
.brand-text { min-width:0; }
.brand strong { font-weight:800;font-size:17px;line-height:1.3;color:#fff;white-space:normal; }
.brand small { font:600 11px/1.5 'Montserrat','Segoe UI',sans-serif;
  color:#9ce8e0;letter-spacing:0;margin-top:7px; }
.sidebar-label { color:#98cbd0;padding:23px 25px 10px;font-size:11px;letter-spacing:0; }
.main-menu { padding:0 11px;gap:4px; }
.nav-item { position:relative;border-radius:11px;color:#d4e6e8;min-height:47px;
  font-size:13px;font-weight:600;padding:11px 14px;transition:background .16s,color .16s; }
.nav-item .nav-icon { width:20px;height:20px;flex:none;color:#a8d0d2; }
/* The legacy style targeted any span as an icon. Nav labels are spans now, icons are SVG. */
.nav-item > span { display:inline;width:auto;place-items:unset;color:inherit;font-size:13px;line-height:1.5; }
.nav-item:hover { color:#fff;background:rgba(20,199,191,.13); }
.nav-item:hover .nav-icon { color:#fff; }
.nav-item.active { background:linear-gradient(90deg,#11a9a4,#08807c);color:#fff;
  box-shadow:0 5px 14px rgba(0,33,40,.17); }
.nav-item.active::before { content:"";position:absolute;right:0;top:8px;bottom:8px;
  width:3px;border-radius:3px;background:var(--qp-amber); }
.nav-item.active .nav-icon,.nav-item.active > span { color:#fff; }
.sidebar-foot { margin:auto 12px 20px;padding:15px;background:rgba(255,255,255,.06);
  border:1px solid rgba(169,227,225,.17);border-radius:12px;color:#d8eff0;align-items:center;gap:9px;font-weight:700; }
.sidebar-foot img { width:39px;height:39px;flex:none;border-radius:10px;background:rgba(255,255,255,.95);padding:4px; }
.sidebar-foot small { display:block;color:#94c4c9;font:500 10px/1.7 'Montserrat',sans-serif; }
.workspace { display:flex;flex-direction:column;min-height:100vh;background:var(--qp-bg); }
.content { flex:1;padding:32px 34px 20px;min-height:0; }
.topbar { height:76px;padding:0 32px;border-bottom:1px solid #e5edf0;box-shadow:0 1px 10px rgba(10,69,76,.025); }
.topbar-heading { display:flex;align-items:center;gap:17px;min-width:0; }
.nav-toggle { display:grid;place-items:center;width:38px;height:38px;border:1px solid #e3ebee;
  border-radius:10px;background:#f7fbfb;color:var(--qp-primary);transition:background .16s; }
.nav-toggle:hover { background:#e5f7f5; }
.nav-icon { display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8; }
.ui-icon { width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8; }
.top-title { color:#173b46;font-size:14px;line-height:1.6;overflow:hidden;text-overflow:ellipsis; }
.top-path { color:#93a5ae; }
.live-dot { background:var(--qp-secondary);box-shadow:0 0 0 4px #14c7bf24; }
.company-name { color:#516d78;white-space:nowrap;font-weight:700; }
.profile { border-right-color:#e3eaee;color:#25434c; }
.profile small { font-family:'Montserrat','Tajawal',sans-serif;color:#8799a2; }
.avatar { background:#dff7f5;color:var(--qp-primary);font-weight:800; }
.signout .nav-icon { width:16px;height:16px; }
.workspace-footer { padding:13px 34px 20px;display:flex;justify-content:space-between;
  gap:12px;border-top:1px solid #e7eff0;font-size:11px;color:#93a4ae; }
.workspace-footer span:first-child { direction:ltr;font-family:'Montserrat',sans-serif; }
.is-collapsed .sidebar { width:79px;min-width:79px; }
.is-collapsed .brand { justify-content:center;padding:25px 9px; }
.is-collapsed .brand-mark { width:54px;height:54px; }
.is-collapsed .brand-text,.is-collapsed .sidebar-label,
.is-collapsed .nav-item span,.is-collapsed .sidebar-foot span { display:none; }
.is-collapsed .main-menu { padding:14px 9px 2px; }
.is-collapsed .nav-item { justify-content:center;padding:12px; }
.is-collapsed .sidebar-foot { justify-content:center;padding:8px;margin:18px 7px; }
/* Shared page titles, cards and table systems */
.page-header { border-radius:16px;padding:20px 23px;margin-bottom:23px;
  background:linear-gradient(115deg,#fff 0%,#fff 68%,#effaf8 100%);
  border:1px solid #e7eff0;border-right:4px solid var(--qp-primary); }
.page-header h1 { font-size:27px;color:#123e4b;margin:7px 0 6px;font-weight:800; }
.page-header p,.section-title p { color:#718694;font-size:13px;line-height:1.8; }
.eyebrow { font:700 10px/1.4 'Montserrat','Tajawal',sans-serif;letter-spacing:1.1px;
  color:var(--qp-primary);direction:auto; }
.btn { min-height:39px;border-radius:10px;letter-spacing:0;font-weight:700;padding:10px 16px;
  transition:transform .15s,background .15s,box-shadow .15s; }
.btn:hover:not(:disabled) { transform:translateY(-1px); }
.btn.primary { color:#fff;background:linear-gradient(110deg,#087b76,#08a49f);
  box-shadow:0 5px 14px rgba(7,123,118,.14); }
.btn.primary:hover { background:linear-gradient(110deg,#056c69,#078e89);
  box-shadow:0 7px 18px rgba(7,123,118,.20); }
.btn.soft { color:var(--qp-primary-dark);background:#e5f7f5; }
.btn.soft:hover { background:#d4f1ee; }
.btn.subtle { color:#4b6874;background:#f0f5f6;border:1px solid #e5ebed; }
.btn.subtle:hover { background:#e5edf0; }
.btn:disabled { opacity:.55;box-shadow:none;cursor:not-allowed; }
.kpi-grid { gap:15px; }
.kpi { border:1px solid #e4edef;border-top:3px solid #d1f0ed;border-radius:14px;
  padding:20px 22px;box-shadow:0 5px 19px rgba(15,69,80,.04);background:#fff; }
.kpi:hover { border-top-color:var(--qp-secondary); }
.kpi strong { color:#113d4a;font:800 27px/1.25 'Montserrat','Tajawal',sans-serif;
  margin:13px 0 10px;unicode-bidi:plaintext;font-variant-numeric:tabular-nums; }
.kpi span,.kpi-head { color:#69818c;font-size:12px; }
.kpi small { color:#96a9af; }
.kpi-symbol { width:40px;height:40px;color:var(--qp-primary)!important;background:#ddf5f2; }
.kpi.risk { border-top-color:#f5cfbd; }
.kpi.risk .kpi-symbol { background:#fff2ed;color:#c65b4b!important; }
.panel { border:1px solid #e5edef;background:#fff;border-radius:15px;
  box-shadow:0 4px 20px rgba(20,75,85,.035);overflow:hidden; }
.panel-heading { background:#fff;padding:21px 24px 17px;flex-wrap:wrap; }
.panel-heading h2,.editor-heading h2 { color:#123f49;font-size:17px; }
.panel-heading p { color:#8298a2;line-height:1.8; }
.panel-heading a { color:var(--qp-primary); }
.table-wrapper { overflow-x:auto;scrollbar-color:#9ccbc9 #f3f7f8; }
.data-table { text-align:right;min-width:680px;font-variant-numeric:tabular-nums; }
.data-table thead { background:#f3faf9; }
.data-table th { padding:13px 18px;color:#40646c;font-size:12px;border-color:#e1efed;
  background:#f3faf9;white-space:nowrap; }
.data-table td { padding:14px 18px;border-color:#eaf0f2;color:#526873; }
.data-table tbody tr:nth-child(even) td { background:#fcfdfd; }
.data-table tbody tr:hover td { background:#edf9f7; }
.data-table .table-strong { color:#0b746f; }
.data-table small { color:#8ba0a8; }
.pill { background:#e1f5f1;color:#0b736f;border:1px solid #d4eeea;font-weight:700; }
.progress-track { height:7px;background:#e1eeef;border-radius:10px; }
.progress-fill { border-radius:10px;background:linear-gradient(90deg,var(--qp-primary),var(--qp-secondary)); }
.search-input,.form-control,.worksheet-number { border:1px solid #dce7e9;background:#fff;
  color:#263e48;border-radius:9px;min-height:40px;transition:border-color .16s,box-shadow .16s; }
.search-input:focus,.form-control:focus,.worksheet-number:focus { outline:0;
  border-color:#14a79f;box-shadow:0 0 0 3px var(--qp-glow); }
.search-input::placeholder,.form-control::placeholder { color:#a2b1b8; }
.search-input { max-width:100%; }
input[type="number"],input[type="date"],input[dir="ltr"],.worksheet-number {
  font-variant-numeric:tabular-nums;direction:ltr;text-align:left;
  font-feature-settings:'tnum'; }
.mini-link { color:var(--qp-primary);font-weight:700; }
.mini-link:hover { text-decoration:underline; }
.mini-link.delete { color:#bf4949; }
.breadcrumbs { color:#8496a1;font-size:12px; }
.breadcrumbs a { color:var(--qp-primary);font-weight:700; }
.project-hero { background:linear-gradient(120deg,#063f4b,#086f70 62%,#0a9d9b);
  border-radius:16px;padding:31px 33px;isolation:isolate; }
.project-hero::after { content:"";inset:0 0 auto auto;position:absolute;width:53%;height:100%;
  opacity:.13;background-image:linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px);
  background-size:30px 30px;pointer-events:none; }
.project-hero .eyebrow { color:#8df0e6; }
.project-hero h1 { color:#fff; }
.project-hero p { color:#c4e9e8; }
.hero-badges span { border-color:#539f9c;background:#ffffff15; }
.hero-outline { border:1px solid #90d9d4;color:#fff;background:#ffffff16; }
.hero-outline:hover { background:#ffffff24;color:#fff; }
.stage-track { gap:10px; }
.stage-step { color:#8a9ba4; }
.stage-dot { background:#edf3f4;color:#5d8490; }
.stage-step.done .stage-dot { background:#d9f5eb;color:#09765b; }
.stage-step.current .stage-dot { color:#fff;background:var(--qp-primary);
  box-shadow:0 0 0 5px rgba(20,199,191,.12); }
.stage-step.current { color:#0a706c; }
.requirements { border-color:#e5eeef; }
.requirement.fulfilled { color:#0a7a65;background:#dbf4e9; }
.requirement.missing { color:#9f5b1c;background:#fff0d4; }
.module-section h3 { color:#285763;border-right-color:var(--qp-amber); }
.module-tile { border:1px solid #e5eeef;border-radius:12px;background:#fff;box-shadow:0 2px 9px #123e4805; }
.module-tile:hover { color:var(--qp-primary);border-color:#80cfc9;
  box-shadow:0 8px 20px #0b7a7515;transform:translateY(-1px); }
.module-tile-icon { background:#e3f7f4;color:var(--qp-primary);font-size:23px; }
.module-tile strong { color:#254b54;font-weight:800; }
.module-tile small { color:#839ba2;font-family:'Montserrat','Tajawal',sans-serif; }
.tile-arrow { color:var(--qp-primary); }
.section-title h2 { color:#173f49; }
.alert-danger { background:#fff0f0;border-right:3px solid #d34b4b;color:#9d2525; }
.alert-warning { background:#fff7e7;border-right:3px solid #f59e0b;color:#83520b; }
.alert-success { background:#e8f8f0;border-right:3px solid #1eaa76;color:#157151; }
.text-danger { color:#bc3030!important; }
.text-success { color:#07805c!important; }
.helper-text { font-size:12px;color:#728894;line-height:1.9;padding-inline:6px; }
.loading-section { color:#6b8893;min-height:160px; }
.empty { color:#8c9da5!important; }
/* Unified dialog and form treatment; applies to the generic module editor too. */
.modal-backdrop-custom { background:rgba(4,31,43,.67);backdrop-filter:blur(3px); }
.editor-card { border-radius:17px;box-shadow:0 26px 70px rgba(1,35,43,.28);
  padding:0;overflow-y:auto;overscroll-behavior:contain; }
.editor-heading { padding:23px 27px 18px;margin-bottom:0;border-bottom:1px solid #e8f0f0;
  background:linear-gradient(115deg,#fff,#eaf9f6);align-items:center; }
.editor-heading h2 { margin-top:7px;font-size:21px; }
.editor-card>form { padding:24px 27px 25px; }
.editor-card>.alert { margin:14px 27px; }
.icon-button { display:grid;place-items:center;border-radius:9px;background:#e6f2f2;color:#47727a; }
.icon-button:hover { color:#a82f2f;background:#ffeded; }
.form-grid label,.login-form label { color:#345460;font-size:12px;font-weight:700; }
.form-grid { gap:17px; }
.form-control { padding:10px 13px; }
.form-control:disabled { background:#f1f4f5;cursor:not-allowed; }
.check-inline input { accent-color:var(--qp-primary); }
.editor-actions { border-color:#e5eeef; }
.worksheet-toolbar { max-width:700px; }
.worksheet-number { border-color:#d8e9e8; }
.worksheet-note { background:#f0f8f8;color:#526f7a;border-top:1px solid #e0eeef; }
.auth-page { min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px 12px; }
.auth-page .login-shell { width:100%;margin:0; }
/* Login screen is deliberately software-oriented: timeline, project controls and metrics. */
.login-shell { max-width:1100px;min-height:630px;margin:5vh auto 7vh;
  grid-template-columns:47% 53%;border:1px solid #e0ebea;border-radius:22px;
  box-shadow:0 22px 60px rgba(13,76,86,.13); }
.login-accent { position:relative;overflow:hidden;padding:33px 39px 29px;
  background:linear-gradient(143deg,#074653 0%,#065e63 66%,#0b8a81 100%); }
.login-accent::after { content:"";position:absolute;inset:0;pointer-events:none;opacity:.08;
  background-image:linear-gradient(90deg,#fff 1px,transparent 1px),linear-gradient(#fff 1px,transparent 1px);
  background-size:34px 34px; }
.login-accent>* { position:relative;z-index:1; }
.login-brand { display:flex;align-items:center;gap:13px; }
.login-brand img { width:74px;height:74px;object-fit:contain;border-radius:17px;background:#fff;padding:3px; }
.login-brand strong { color:#fff;font-weight:800;font-size:18px;display:block; }
.login-brand small { color:#acf0e9;font:600 12px 'Montserrat',sans-serif;display:block;margin-top:5px; }
.login-pitch { margin:55px 0 26px; }
.login-pitch .eyebrow { color:#a4f5e9; }
.login-pitch h2 { font-weight:800;font-size:30px;line-height:1.4;color:#fff;margin:14px 0; }
.login-pitch p { color:#c9eaea;font-size:14px;line-height:2;max-width:420px; }
.login-visual { border:1px solid #78c6c366;background:rgba(255,255,255,.085);
  padding:16px 18px 14px;border-radius:15px;max-width:390px; }
.login-chart-title { display:flex;justify-content:space-between;color:#ccefeb;
  font:600 10px 'Montserrat',sans-serif; }
.login-chart-title span { color:var(--qp-amber);letter-spacing:4px;font-size:8px; }
.gantt-rows { margin-top:18px; }
.gantt-rows>div { height:28px;border-top:1px dashed #ffffff1e;position:relative; }
.gantt-rows>div:last-child { border-bottom:1px dashed #ffffff1e; }
.gantt-bar { position:absolute;top:8px;height:12px;border-radius:4px;display:block; }
.gantt-bar.a { background:#74e2d7;right:4%;width:57%; }
.gantt-bar.b { background:#29c6be;right:20%;width:42%; }
.gantt-bar.c { background:#f59e0b;right:45%;width:30%; }
.gantt-bar.d { background:#c2f8ef;right:14%;width:48%; }
.login-stats { display:flex;justify-content:space-between;margin-top:15px;color:#d4eeea;font-size:11px; }
.login-powered { margin-top:auto;padding-top:30px;color:#a2d6d8;
  font:500 11px 'Montserrat','Tajawal',sans-serif; }
.login-form { padding:74px 68px 60px;gap:13px;justify-content:center; }
.login-form h1 { font-size:29px;color:#1a3c49; }
.login-form>p { color:#7e929c;font-size:13px;line-height:1.7; }
.login-form label { margin-top:8px; }
.login-form .btn { min-height:46px;font-size:14px;margin-top:17px; }
.login-help { border-top:1px solid #eef2f3;padding-top:17px;line-height:1.8; }
.boot { color:var(--qp-primary);gap:14px;font-weight:700; }
.boot img { width:49px;height:49px; }
#blazor-error-ui { position:fixed;bottom:0;inset-inline:0;background:#fff3f0;
  border-top:2px solid #d34b4b;color:#9d2525;padding:13px 20px;z-index:100; }
/* Layout behavior for laptops / tablets / narrow screens */
@media(max-width:1200px) {
  .sidebar { width:235px;min-width:235px; }
  .brand { padding:23px 12px; }
  .brand strong { font-size:15px; }
  .brand-mark { width:49px;height:49px; }
  .content { padding:24px 22px; }
  .topbar { padding:0 22px; }
}
@media(max-width:760px) {
  .app-layout { display:block; }
  .sidebar,.is-collapsed .sidebar { position:relative;width:100%;min-width:0;height:auto;min-height:0;
    max-height:none;overflow:visible; }
  .sidebar::before { height:3px; }
  .brand,.is-collapsed .brand { justify-content:flex-start;min-height:70px;padding:11px 17px; }
  .brand-mark,.is-collapsed .brand-mark { width:45px;height:45px; }
  .is-collapsed .brand-text { display:block; }
  .sidebar-label,.main-menu,.sidebar-foot,.is-collapsed .main-menu { display:none; }
  .mobile-nav-open .sidebar-label { display:block;padding:14px 17px 5px; }
  .mobile-nav-open .main-menu,.mobile-nav-open.is-collapsed .main-menu {
    display:flex;flex-wrap:wrap;gap:6px;padding:6px 12px 14px; }
  .mobile-nav-open .nav-item,.mobile-nav-open.is-collapsed .nav-item {
    min-height:42px;padding:9px 11px;justify-content:flex-start; }
  .mobile-nav-open.is-collapsed .nav-item span { display:inline; }
  .topbar { min-height:60px;height:auto;padding:10px 13px;gap:8px; }
  .topbar-heading { gap:9px; }
  .top-title { font-size:12px; }
  .top-path,.company-name { display:none; }
  .top-actions { gap:8px; }
  .profile { padding-right:8px;font-size:10px;gap:6px; }
  .avatar { width:30px;height:30px; }
  .signout { padding:9px 10px; }
  .signout span { display:none; }
  .content { padding:18px 12px 10px; }
  .page-header { padding:17px 16px;align-items:flex-start;flex-wrap:wrap; }
  .page-header h1 { font-size:23px; }
  .page-header>.btn { font-size:12px; }
  .panel-heading { padding:17px; }
  .editor-heading { padding:18px; }
  .editor-card>form { padding:18px; }
  .editor-card>.alert { margin:12px 18px; }
  .login-shell { display:block;min-height:0;margin:18px 11px;border-radius:18px; }
  .login-accent { padding:23px 22px; }
  .login-brand img { width:55px;height:55px; }
  .login-pitch { margin:21px 0; }
  .login-pitch h2 { font-size:23px; }
  .login-visual { display:none; }
  .login-powered { display:none; }
  .login-form { padding:28px 22px; }
  .workspace-footer { padding:13px;font-size:10px; }
}
@media(max-width:480px) {
  .top-title { max-width:145px; }
  .profile>span:last-child { display:none; }
  .kpi-grid,.kpi-grid.four,.content-grid,.module-grid { grid-template-columns:1fr; }
  .content-grid>section { grid-column:span 1!important; }
  .panel { border-radius:12px; }
  .form-grid { grid-template-columns:1fr; }
  .editor-card { max-height:95vh; }
  .page-header h1 { font-size:21px; }
  .stage-track { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important;transition:none!important;animation:none!important; }
}
