/* Shared Projects visual system: desktop and mobile. */
.content:has(.unified-projects-header) { position: relative; padding: 0 !important; }
.content:has(.unified-projects-header) > header {
 height: 0 !important; min-height: 0 !important; margin: 0 !important;
 padding: 0 !important; border: 0 !important; overflow: visible;
}
.content:has(.unified-projects-header) > header > h2,
.content:has(.unified-projects-header) > header > div:first-child:not(.global-header-actions) { display: none; }
.content:has(.unified-projects-header) > header .global-header-actions {
 position: absolute; top: 19px; right: 18px; z-index: 6;
 display: flex !important; width: auto !important; gap: 8px; flex-wrap: nowrap !important;
}
.content:has(.unified-projects-header) > header .global-header-actions button {
 border: 1px solid #bce4ed; color: white; background: transparent;
 min-height: 38px; border-radius: 7px; font-size: 13px;
}
.projects-workspace:has(> .unified-projects-header) {
 display: flex !important; gap: 0 !important; background: #f5f7fa; min-height: 0;
}
.unified-projects-header { flex: 0 0 auto; min-width: 0; }
.unified-projects-brand {
 display: flex; align-items: center; gap: 18px; min-height: 78px;
 padding: 12px 240px 12px 20px; box-sizing: border-box; background: #0095b5; color: white;
}
.unified-projects-brand img { width: 130px; height: 40px; object-fit: contain; }
.unified-projects-brand h2 { margin: 0; font-size: 24px; line-height: 1.3; color: white; }
.unified-projects-brand p { margin: 3px 0 0; font-size: 12px; color: white; }
.unified-workspace-tabs {
 display: flex; gap: 18px; padding: 0 20px; min-height: 48px; background: white;
 border-bottom: 1px solid #d6e0e8;
}
.unified-workspace-tabs button {
 padding: 10px 14px; min-height: 46px; border: 0; border-bottom: 3px solid transparent;
 background: white; color: #42536a; font-size: 14px; border-radius: 0; cursor: pointer;
}
.unified-workspace-tabs button[aria-selected="true"] { color: #e86b0e; border-bottom-color: #f47719; }
.unified-projects-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
.unified-projects-tools button, .unified-analysis-toolbar button {
 display: inline-flex; align-items: center; justify-content: center; gap: 8px;
 min-height: 38px; padding: 8px 13px; border: 1px solid #bdccd9;
 border-radius: 6px; background: white; color: #17324f; font-size: 13px; cursor: pointer;
}
.unified-projects-tools > button { flex: 0 0 auto; width: auto !important; }
.unified-projects-tools .unified-new { background: #f47719; color: white; border-color: #f47719; }
.unified-projects-tools > details { margin-left: auto; }
.unified-projects-tools > details[open] { flex: 1 0 100%; margin: 0; }
.unified-projects-tools summary { cursor: pointer; color: #294359; font-size: 13px; }
.projects-workspace:has(> .unified-projects-header) > .projects-workspace-panel {
 padding: 0 16px 16px; box-sizing: border-box; gap: 8px; min-height: 0;
}
.projects-workspace:has(> .unified-projects-header) .project-stage-tabs {
 position: static !important; padding: 0 0 6px; background: transparent;
}
.projects-workspace:has(> .unified-projects-header) .project-stage-tabs button {
 font-size: 12px !important; border-color: #d7e0e8; color: #294359; background: white;
}
.projects-workspace:has(> .unified-projects-header) .project-stage-tabs button[aria-selected="true"] {
 background: #0095b5 !important; color: white !important;
}
.projects-workspace:has(> .unified-projects-header) input {
 border: 1px solid #c8d5e0; border-radius: 6px; background: white; padding: 9px 12px;
}
.unified-project-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.unified-project-card {
 min-width: 0; padding: 14px 16px; border: 1px solid #cbd8e3; border-radius: 9px; background: white;
 color: #183049; box-sizing: border-box;
}
.unified-project-overview { display: grid; grid-template-columns: minmax(180px,1.1fr) minmax(0,2fr) auto; gap: 18px; align-items: start; }
.unified-project-identity { min-width: 0; }
.unified-project-identity h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; color: #102943; }
.unified-project-identity p { font-size: 12px; color: #60758c; margin: 5px 0 0; }
.unified-project-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0; min-width: 0; }
.unified-project-meta > div { min-width: 0; padding-left: 14px; border-left: 1px solid #e0e7ee; }
.unified-project-meta dt { font-size: 11px; color: #60758c; margin-bottom: 5px; }
.unified-project-meta dd { margin: 0; font-size: 13px; color: #17324f; overflow-wrap: anywhere; }
.unified-project-status {
 font-size: 11px; font-weight: 700; border-radius: 7px; padding: 6px 9px; white-space: normal;
 background: #eef1f5; color: #58677a; max-width: 190px;
}
.unified-project-status.status-development { background: #fff0d9; color: #b35c09; }
.unified-project-status.status-analysis { background: #e2f1fd; color: #136b9e; }
.unified-project-status.status-correction { background: #ffe5e8; color: #b93246; }
.unified-project-status.status-approved { background: #dff4e4; color: #18773e; }
.unified-project-status.status-work { background: #eee8ff; color: #6949aa; }
.unified-project-status.status-finished { background: #e7efed; color: #42695e; }
.unified-project-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; align-items: start; }
.unified-project-actions > button {
 display: inline-flex; gap: 8px; justify-content: center; align-items: center; min-height: 36px;
 padding: 7px 12px; background: white; border: 1px solid #c5d3df; color: #17324f;
 border-radius: 6px; font: 600 12px "Open Sans",Arial,sans-serif; cursor: pointer;
}
.unified-project-actions > button.unified-open { background: #0095b5; color: white; border-color: #0095b5; }
.unified-project-actions button:disabled { opacity: .5; cursor: default; }
.unified-project-actions svg { flex: 0 0 auto; }
.unified-project-more { align-self: stretch; font-size: 12px; }
.unified-project-more > summary { padding: 9px; cursor: pointer; color: #60758c; }
.unified-project-more[open] { flex: 1 0 100%; }
.unified-project-more > div { margin-top: 8px; }
.unified-project-more .modal-actions { position: static !important; inset: auto !important; margin: 0 !important; }
.unified-project-pending { font-size: 12px; margin: 9px 0 0; padding: 7px 10px; background: #fff8e9; border-radius: 5px; }
.unified-followup-search { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.unified-followup-search input { flex: 1; min-width: 0; }
.unified-followup-search span, .unified-empty { font-size: 13px; color: #60758c; }
.unified-analysis-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: #60758c; padding: 8px 0; }
.unified-analysis-toolbar > span { flex: 1; }
.unified-analysis-toolbar > p { flex: 1 0 100%; margin: 0; }
.unified-doc-backdrop { position: fixed; inset: 0; z-index: 14000; background: white; }
.unified-doc-panel { display: flex; flex-direction: column; width: 100%; height: 100%; }
.unified-doc-panel > header { display: flex; gap: 12px; justify-content: space-between; padding: 12px 18px; background: #0095b5; color: white; }
.unified-doc-panel h2 { margin: 0; font-size: 18px; }
.unified-doc-panel header p { margin: 4px 0; }
.unified-doc-panel header button { color: white; background: transparent; border: 1px solid white; border-radius: 6px; padding: 8px 14px; }
.unified-doc-content { flex: 1; overflow: auto; padding: 16px; min-height: 0; }
@media (max-width: 850px) {
 .unified-projects-brand { padding: 10px 160px 10px 10px; min-height: 72px; gap: 9px; }
 .unified-projects-brand img { width: 84px; height: 32px; }
 .unified-projects-brand h2 { font-size: 18px; }
 .unified-projects-brand p { display: none; }
 .content:has(.unified-projects-header) > header .global-header-actions { top: 17px; right: 8px; gap: 5px; }
 .content:has(.unified-projects-header) > header .global-header-actions button { min-height: 38px; padding: 6px; font-size: 11px; }
 .unified-workspace-tabs { padding: 0 10px; gap: 8px; min-height: 42px; }
 .unified-workspace-tabs button { flex: 1; min-height: 42px; padding: 8px; }
 .unified-projects-tools { padding: 8px; gap: 6px; }
 .unified-projects-tools > button { flex: 1 1 40%; font-size: 11px; padding: 7px; min-height: 44px; }
 .unified-projects-tools > details { flex: 1 0 100%; margin: 3px 0; }
 .projects-workspace:has(> .unified-projects-header) > .projects-workspace-panel { padding: 0 8px 10px; }
 .unified-project-overview { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
 .unified-project-meta { grid-column: 1 / -1; grid-row: 2; gap: 8px; }
 .unified-project-meta > div { padding-left: 0; border: 0; }
 .unified-project-status { font-size: 10px; max-width: 120px; }
 .unified-project-identity h3 { font-size: 14px; }
 .unified-project-identity p { font-size: 11px; }
 .unified-project-card { padding: 12px; }
 .unified-project-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
 .unified-project-actions > button { min-width: 0; min-height: 44px; padding: 7px; }
 .unified-project-more { grid-column: 1 / -1; }
 .unified-project-meta dt { font-size: 10px; }
 .unified-project-meta dd { font-size: 11px; }
}
@media (max-width: 370px) {
 .unified-projects-brand { padding-right: 128px; gap: 7px; }
 .unified-projects-brand img { width: 58px; }
 .unified-projects-brand h2 { font-size: 15px; }
 .unified-project-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 851px) {
 .shell:has(> .content .unified-projects-header) { grid-template-columns: minmax(0,1fr) !important; }
 .shell:has(> .content .unified-projects-header) > aside { display: none !important; }
}

/* Override legacy generic workspace headers, including asynchronously loaded CSS. */
.content.content:has(.unified-projects-header) { padding: 0 !important; }
.projects-workspace.projects-workspace > .unified-projects-header {
 display: block !important; width: 100%; margin: 0 !important; padding: 0 !important;
 border: 0 !important; order: 0 !important; background: transparent !important;
}
.unified-projects-header.unified-projects-header > .unified-projects-brand {
 width: 100%; box-sizing: border-box; flex: none; border-radius: 0;
}
.unified-projects-brand.unified-projects-brand h2 { color: white !important; font-size: 24px !important; }
.unified-projects-brand.unified-projects-brand p { color: white !important; }
@media(max-width:850px) {
 .unified-projects-brand.unified-projects-brand h2 { font-size: 18px !important; }
}
@media(max-width:370px) {
 .unified-projects-brand.unified-projects-brand h2 { font-size: 15px !important; }
}

@media(max-width:850px) {
 .projects-workspace.projects-workspace:has(.unified-projects-header) .project-stage-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .projects-workspace.projects-workspace:has(.unified-projects-header) .project-stage-tabs button { font-size:11px !important; overflow-wrap:normal; word-break:normal; }
 .content.content:has(.unified-projects-header) .pending-bell b { display:inline !important; }
}
@media(max-width:370px) {
 .projects-workspace.projects-workspace:has(.unified-projects-header) .project-stage-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
