/* RC2 Fix29 — global readability floor + shared dense-control/dark-theme hardening.
   Loaded after site.css so dense legacy selectors cannot render readable UI text below 11px. */
:root{--penti-min-readable-font:11px}

/* Semantic small text */
small,.eyebrow,.sidebar-footer,.showcase-footer,.validation-summary,.field-error,.message-card code,
.panel-hint,.muted-copy,.timeline-copy time,.definition-grid span,.notification-row-main small,
.field-builder-main small,.option-builder-row small,.builder-recycle-panel .panel-heading p,
.mail-status-row span{font-size:var(--penti-min-readable-font)!important}

/* Labels, form helpers and compact controls */
.stack-form label,.compact-form label,.user-admin-form label,.template-admin-row label,
.availability-card span,.availability-card label,.property-list dt,.property-list dd,
.inline-add-form input,.inline-add-form select,.user-admin-form input,.user-admin-form select,
.template-admin-row input[type=number],.template-admin-row select,.availability-card input[type=datetime-local],
.retro-edit textarea,.comment-form textarea,.comment-form select,.attachment-upload-form input,
.secondary-button,.mini-button,.catalog-action,.queue-tabs a,.dark-link-button,
.segmented-control button,.kanban-status-form select,.kanban-status-form button,.column-add-item,
.dynamic-card-actions .link-button{font-size:var(--penti-min-readable-font)!important}

/* Badges / chips / compact identifiers */
.metric-icon,.tag,.soft-badge,.scope-pill,.form-badge,.code-chip,.mini-code,.mini-tag,
.status-badge,.priority-badge,.priority-pill,.action-kind,.sla-chip,.field-type-badge,
.access-chips span,.field-chip-row span,.offering-meta>span,.service-load-numbers span,
.phase-number,.kanban-column-head span,.dynamic-card-tags span,.notification-badge,
.role-permission-summary>span:not(.muted-copy){font-size:var(--penti-min-readable-font)!important}

/* Tables, lists and dense metadata */
.data-table th,.data-table td,.mini-grid strong,.team-grid small,.offering-row small,
.catalog-admin-offering strong,.catalog-admin-offering small,.user-admin-identity small,
.user-admin-identity span,.locked-user small,.ticket-id strong,.ticket-id span,.ticket-subject span,
.ticket-requester span,.ticket-owner span,.ticket-requester strong,.ticket-owner strong,
.sla-chip span,.sla-chip strong,.empty-state span,.sla-preview span,.sla-preview small,
.sla-preview-panel>p,.workflow-action-panel>p,.ticket-fields span,.ticket-fields strong,
.conversation-meta strong,.conversation-meta span,.comment-lock-row,.retro-edit,.property-list dt,
.property-list dd,.sla-box span,.sla-box strong,.sla-box small,.audit-event strong,.audit-event small,
.audit-event p,.template-offering-head small,.template-name strong,.template-name small,
.audit-json,.attachment-list span,.attachment-list b,.attachment-upload-form small,
.project-request-row strong,.project-request-row span,.project-request-row small,.project-card>small,
.project-context-grid span,.project-context-grid p,.template-size-card>p,.template-size-card li>span,
.template-size-card li>strong,.template-size-card li>small,.triage-panel>p,.project-workspace-metrics span,
.project-workspace-metrics small,.phase-roadmap-item strong,.phase-roadmap-item small,
.kanban-column-head strong,.kanban-card-meta span,.kanban-card>strong,.kanban-card>small,
.dependency-mini span,.dependency-mini small,.dependency-mini a,.workflow-stage-pill,
.approval-card small,.inline-evidence-form input[type=file],.artifact-list a span,
.board-switcher-item small,.board-library-section summary,.board-library-row strong,
.board-library-row small,.dynamic-column-head small,.dynamic-kanban-card>p,.dynamic-card-meta,
.column-empty-state,.add-column-tile strong,.add-column-tile small,.gantt-project-toolbar p,
.gantt-grid-header,.gantt-grid-row,.gantt-grid-row .task-name small,.gantt-calendar-header span,
.gantt-phase-bar-v2 span,.gantt-task-bar-v2,.gantt-today-line:before,.gantt-legend,
.panel-heading a,.action-row small,.dashboard-list-row strong,.dashboard-list-row span,
.dashboard-list-row small,.stage-bar-row strong,.stage-bar-row span,.service-load-row strong,
.service-load-row span,.runbook-steps li:before,.runbook-steps strong,.runbook-steps span,
.account-matrix strong,.account-matrix span,.timeline-copy p,.app-toast,.admin-runtime-strip span,
.admin-runtime-strip>a strong{font-size:var(--penti-min-readable-font)!important}

/* Mobile navigation labels remain readable as well. */
.mobile-bottom-nav small{font-size:var(--penti-min-readable-font)!important}

/* Project Documents tab — expose the existing project-level artifact upload in the correct workspace. */
.project-document-upload-surface{margin:16px 0 18px;padding:16px;border:1px solid var(--border,#e7e8eb);border-radius:12px;background:var(--surface-2,#f7f8fa)}
.project-document-upload-surface .documents-upload-form{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(280px,1.3fr) auto;gap:12px;align-items:end;margin:0}
.project-document-upload-surface .documents-upload-form label{font-size:11px!important}
.project-document-upload-surface .documents-upload-form input,.project-document-upload-surface .documents-upload-form select{min-height:40px;font-size:11px!important}
.project-document-upload-surface .documents-upload-form button{width:auto;min-height:40px;align-self:end}
@media(max-width:800px){.project-document-upload-surface .documents-upload-form{grid-template-columns:1fr}.project-document-upload-surface .documents-upload-form button{width:100%}}

/* Project board compact controls — keep them visually consistent with the rest of the app. */
.inline-effort-form{display:grid;grid-template-columns:minmax(90px,1fr) auto;gap:7px;align-items:center;margin:4px 0 2px}
.inline-effort-form input,
.inline-evidence-form input[type=file],
.kanban-status-form select,
.project-tool-panel input[type=file],
.project-tool-panel select{
    width:100%;min-width:0;min-height:38px;padding:8px 10px;border:1px solid var(--border,#dfe1e5);border-radius:9px;background:var(--surface,#fff);color:var(--text,#17191d);outline:none;font-size:12px!important
}
.inline-effort-form input:focus,
.inline-evidence-form input[type=file]:focus,
.kanban-status-form select:focus,
.project-tool-panel input[type=file]:focus,
.project-tool-panel select:focus{border-color:var(--accent,#e5005a);box-shadow:0 0 0 3px rgba(229,0,90,.10)}
.inline-effort-form button,
.inline-evidence-form button,
.kanban-status-form button{
    min-height:38px;border:1px solid var(--border,#dfe1e5);border-radius:9px;padding:8px 11px;background:var(--surface,#fff);color:var(--text,#17191d);font-size:11px!important;font-weight:800;cursor:pointer
}
.inline-effort-form button:hover,.inline-evidence-form button:hover,.kanban-status-form button:hover{border-color:var(--accent,#e5005a);color:var(--accent,#e5005a)}
.inline-evidence-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;margin-top:4px}
.kanban-status-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;margin-top:5px}
.inline-evidence-form input[type=file]::file-selector-button,
.project-document-upload-surface input[type=file]::file-selector-button,
.project-tool-panel input[type=file]::file-selector-button{
    border:0;border-right:1px solid var(--border,#dfe1e5);margin:-8px 10px -8px -10px;padding:8px 11px;background:var(--surface-2,#f3f4f6);color:var(--text,#17191d);font:inherit;font-weight:700;cursor:pointer
}

/* Dark theme contrast hardening — native controls and compact action buttons must never become white-on-white. */
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
    background:#18181e!important;color:#f4f4f6!important;border-color:#3a3a43!important;color-scheme:dark
}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#a5a7b0!important;opacity:1}
html[data-theme="dark"] input:disabled,html[data-theme="dark"] select:disabled,html[data-theme="dark"] textarea:disabled{background:#23232a!important;color:#9ea0a9!important;border-color:#34343d!important;opacity:1}
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .context-button,
html[data-theme="dark"] .mini-button,
html[data-theme="dark"] .inline-effort-form button,
html[data-theme="dark"] .inline-evidence-form button,
html[data-theme="dark"] .kanban-status-form button{
    background:#202027!important;color:#f4f4f6!important;border-color:#3a3a43!important
}
html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .context-button:hover,
html[data-theme="dark"] .mini-button:hover,
html[data-theme="dark"] .inline-effort-form button:hover,
html[data-theme="dark"] .inline-evidence-form button:hover,
html[data-theme="dark"] .kanban-status-form button:hover{background:#2a2a32!important;border-color:#e5005a!important;color:#fff!important}
html[data-theme="dark"] input[type=file]::file-selector-button{
    background:#2a2a32!important;color:#f4f4f6!important;border-color:#3a3a43!important
}
html[data-theme="dark"] .artifact-list a,
html[data-theme="dark"] .kanban-card,
html[data-theme="dark"] .project-tool-panel,
html[data-theme="dark"] .project-document-upload-surface{color:#f4f4f6}
html[data-theme="dark"] .artifact-list a span,
html[data-theme="dark"] .kanban-card>small,
html[data-theme="dark"] .kanban-card-meta,
html[data-theme="dark"] .dependency-mini,
html[data-theme="dark"] .panel-hint,
html[data-theme="dark"] .muted-copy{color:#b9bbc4!important}
@media(max-width:720px){.inline-effort-form,.inline-evidence-form,.kanban-status-form{grid-template-columns:1fr}.inline-effort-form button,.inline-evidence-form button,.kanban-status-form button{width:100%}}

/* SSO settings — keep the enable checkbox and label aligned as one compact row. */
.stack-form .sso-enable-line{display:flex!important;grid-template-columns:none!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;min-height:36px;margin:0;padding:2px 0}
.stack-form .sso-enable-line input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;flex:0 0 16px;accent-color:#e5005a}
.stack-form .sso-enable-line span{display:inline;line-height:1.35}

/* Authenticated error/access-denied views — keep the message high on the page and centered horizontally. */
.app-shell .content-area .login-page.single-message{min-height:0!important;height:auto!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;background:transparent!important;padding:48px 16px 28px!important}
.app-shell .content-area .login-page.single-message .message-card{width:min(560px,100%);margin:0 auto}
@media(max-width:720px){.app-shell .content-area .login-page.single-message{padding:28px 0 20px!important}}
