/* ========================================================================== */
/* ATA | Forms                                                                */
/* Modern form layer. Scoped to avoid altering legacy forms during migration. */
/* ========================================================================== */

.ai-task-form-page {
    background:
        radial-gradient(circle at 12% 8%, rgba(72, 200, 132, .045), transparent 30%),
        radial-gradient(circle at 92% 18%, rgba(38, 161, 181, .04), transparent 28%),
        #f5faf9;
    margin: 0;
    min-height: calc(100vh - 120px);
    padding: 34px 24px 128px;
}

.ai-task-form-page > .visible-lg {
    display: none !important;
}

.ai-task-form-shell {
    float: none;
    margin: 0 auto;
    max-width: 1500px;
    padding: 0;
    width: 100%;
}

.ai-task-form-layout {
    align-items: flex-start;
    display: flex;
    gap: 22px;
    margin: 0;
}

.ai-task-form-main {
    float: none;
    min-width: 0;
    padding: 0;
    width: calc(100% - 282px);
}

.ai-task-form-summary {
    background: #fff;
    border: 1px solid #dcece8;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 67, 67, .075);
    margin-bottom: 18px;
    overflow: hidden;
    padding: 23px 26px 22px;
    position: relative;
}

.ai-task-form-summary::before {
    background: linear-gradient(90deg, #52ca75 0%, #089b89 52%, #1499ca 100%);
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.ai-task-form-eyebrow {
    align-items: center;
    color: #0b8b7d;
    display: flex;
    font-size: 10px;
    font-weight: 700;
    gap: 8px;
    letter-spacing: .14em;
    margin-bottom: 14px;
}

.ai-task-form-eyebrow__icon {
    align-items: center;
    background: #e9f8f4;
    border-radius: 8px;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.ai-task-form-title {
    align-items: flex-start;
    background: #f7fbfa;
    border: 1px solid #e4efed;
    border-radius: 12px;
    display: flex;
    gap: 11px;
    margin-top: 12px;
    padding: 11px 13px;
}

.ai-task-form-title__icon {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #0a9182;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 16px;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.ai-task-form-title__label {
    color: #7c9495;
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.ai-task-form-title h1 {
    color: #315b63;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.ai-task-form-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1.45fr) minmax(180px, .55fr);
    margin-top: 0;
    padding-top: 0;
}

.ai-task-form-meta__item {
    align-items: center;
    background: #f7fbfa;
    border: 1px solid #e4efed;
    border-radius: 12px;
    display: flex;
    gap: 11px;
    min-width: 0;
    padding: 11px 13px;
}

.ai-task-form-meta__item > i {
    align-items: center;
    color: #22a58f;
    display: inline-flex;
    flex: 0 0 31px;
    font-size: 16px;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.ai-task-form-meta__item > div {
    min-width: 0;
}

.ai-task-form-meta__item span {
    color: #8ca0a1;
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .07em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.ai-task-form-meta__item strong {
    color: #315b63;
    display: block;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-task-form-tabs {
    background: #fff;
    border: 1px solid #dcece8;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 67, 67, .065);
    overflow: hidden;
}

.ai-task-form-tabs md-tabs-wrapper {
    background: #f8fbfa;
    border-bottom: 1px solid #e1ecea !important;
    padding: 0 18px;
}

.ai-task-form-tabs md-tabs-canvas,
.ai-task-form-tabs md-pagination-wrapper {
    height: 58px;
}

.ai-task-form-tabs .md-tab {
    color: #71898c;
    font-size: 12px;
    font-weight: 600;
    height: 58px;
    letter-spacing: .01em;
    line-height: 58px;
    min-width: 132px;
    padding: 0 22px;
    text-transform: none;
}

.ai-task-form-tabs .md-tab.md-active,
.ai-task-form-tabs .md-tab.md-focused {
    color: #087f73;
}

.ai-task-form-tabs md-ink-bar {
    background: linear-gradient(90deg, #47c878, #079d8b);
    height: 3px;
}

.ai-task-form-tabs md-content {
    background: #fff;
}

.ai-task-form-tabs .container-fluid.col-md-12 {
    padding: 8px 28px 22px;
}

.ai-task-form-tabs .hr-strong {
    border-color: #dcece8;
}

.ai-task-form-tabs .css-input-secundary-accent-text {
    color: #0d8175;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ai-task-form-tabs md-input-container {
    margin-bottom: 8px;
    margin-top: 8px;
}

.ai-task-form-tabs md-input-container > i {
    align-items: center;
    background: #eef8f5;
    border-radius: 9px;
    color: #159b88 !important;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    margin-left: 0 !important;
    width: 34px;
}

.ai-task-form-tabs md-input-container .md-input,
.ai-task-form-tabs md-select .md-select-value,
.ai-task-form-tabs md-datepicker .md-datepicker-input {
    border-color: #cfe1dd;
    color: #214d55;
}

.ai-task-form-tabs md-input-container label,
.ai-task-form-tabs .css-label-secundary-text {
    color: #71898c;
    font-size: 11px;
}

.ai-task-form-tabs md-input-container.md-input-focused label,
.ai-task-form-tabs md-input-container.md-input-has-value label {
    color: #0b8c7d;
}

.ai-task-form-tabs md-chips .md-chips {
    border-color: #cfe1dd;
    box-shadow: none;
}

.ai-task-form-tabs md-chip {
    background: #edf8f5;
    border: 1px solid #d8ece7;
    border-radius: 999px;
    color: #176e66;
    font-size: 11px;
}

.ai-task-form-rail {
    float: none;
    padding: 0;
    position: sticky;
    top: 88px;
    width: 260px;
}

.ai-task-form-classifier {
    background: #fff;
    border: 1px solid #dcece8;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 67, 67, .075);
    margin: 0;
    overflow: hidden;
    padding: 21px 18px 18px;
}

.ai-task-form-classifier > br {
    display: none;
}

.ai-task-form-rail-heading span,
.ai-task-form-perspective-title span {
    color: #0c9483;
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
    margin-bottom: 6px;
}

.ai-task-form-rail-heading h2,
.ai-task-form-perspective-title h3 {
    color: #0b8c7d;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.32;
    margin: 0;
}

.ai-task-form-choice-label {
    align-items: center;
    border-top: 1px solid #e5efed;
    color: #789092;
    display: flex;
    font-size: 10px;
    gap: 8px;
    margin: 17px 0 10px;
    padding-top: 14px;
}

.ai-task-form-choice-label__answer {
    align-items: center;
    background: #eff4f3;
    border-radius: 999px;
    color: #60797c;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    height: 25px;
    justify-content: center;
    min-width: 32px;
    padding: 0 9px;
}

.ai-task-form-choice-label__answer--yes {
    background: #e1f6ef;
    color: #087f70;
}

.ai-task-form-rail [ng-switch] {
    margin-bottom: 7px;
}

.ai-task-form-rail .row-fluid {
    width: 100%;
}

.ai-task-form-rail .btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d5e6e2;
    border-radius: 15px;
    box-shadow: none;
    color: #325b62;
    display: flex;
    font-size: 11px;
    font-weight: 500;
    justify-content: flex-start;
    min-height: 43px;
    padding: 9px 13px;
    text-align: left;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
    white-space: normal;
    width: 100%;
}

.ai-task-form-rail .btn i {
    color: #159b88;
    flex: 0 0 22px;
    font-size: 15px;
    text-align: center;
}

.ai-task-form-rail .btn:hover,
.ai-task-form-rail .btn:focus {
    background: #f2faf7;
    border-color: #8fd4c5;
    color: #0b796f;
    box-shadow: 0 8px 20px rgba(12, 87, 82, .09);
    outline: none;
    transform: translateX(2px);
}

.ai-task-form-rail .btn-custom-success-active {
    background: #dff4ef;
    border-color: #66bdae;
    color: #075e55;
    font-weight: 600;
}

.ai-task-form-rail .btn-custom-success-active i {
    color: #087f72 !important;
}

.ai-task-form-perspective-title {
    border-top: 1px solid #dceae7;
    border-bottom: 1px solid #dceae7;
    margin: 20px 0 12px;
    padding: 18px 0 14px;
}

.ai-task-form-perspective-title ~ .row-fluid[ng-show] {
    margin-bottom: 7px;
}

.ai-task-form-perspective-title ~ .row-fluid[ng-show]:last-child {
    margin-bottom: 0;
}

.ai-task-form-actions-separator {
    display: none;
}

.ai-task-form-actions {
    align-items: center;
    background: #fff;
    border: 1px solid #dcece8;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15, 67, 67, .065);
    display: flex;
    gap: 10px;
    margin: 18px 0 0;
    padding: 13px 16px;
    width: 100%;
}

.ai-task-activity-table {
    border-collapse: separate;
    border-spacing: 0 8px;
    table-layout: fixed;
}

.ai-task-activity-table > thead > tr > th {
    border-bottom: 1px solid #dceae7;
    padding: 8px 12px;
}

.ai-task-activity-table__meta-heading {
    width: 205px;
}

.ai-task-activity-table > tbody > tr {
    background: #f8fbfa;
    cursor: pointer;
}

.ai-task-activity-table > tbody > tr > td {
    border-bottom: 1px solid #e3eeeb;
    border-top: 1px solid #e3eeeb;
    padding: 12px;
    vertical-align: top;
}

.ai-task-activity-table > tbody > tr > td:first-child {
    border-left: 1px solid #e3eeeb;
    border-radius: 11px 0 0 11px;
}

.ai-task-activity-table > tbody > tr > td:last-child {
    border-radius: 0 11px 11px 0;
    border-right: 1px solid #e3eeeb;
}

.ai-task-activity-table__facts {
    display: grid;
    gap: 9px;
}

.ai-task-activity-table__facts span {
    align-items: center;
    color: #5e797d;
    display: flex;
    font-size: 10px;
    gap: 7px;
    white-space: nowrap;
}

.ai-task-activity-table__facts i {
    color: #18a08c;
    font-size: 16px;
    text-align: center;
    width: 14px;
}

.ai-task-activity-table__signals {
    align-items: center;
    display: flex;
    gap: 6px;
    margin-top: 9px;
}

.ai-task-activity-table__signals .material-icons {
    font-size: 16px;
}

.ai-task-activity-table__content {
    color: #31565e;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ai-task-form-actions button.ai-task-action {
    align-items: center;
    border-radius: 999px;
    box-shadow: none;
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    justify-content: center;
    min-height: 43px;
    gap: 9px;
    padding: 10px 20px !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.ai-task-form-actions .ai-task-action i {
    font-size: 13px;
    line-height: 1;
}

.ai-task-form-actions .ai-task-action:hover,
.ai-task-form-actions .ai-task-action:focus {
    box-shadow: 0 10px 24px rgba(7, 60, 63, .12);
    outline: none;
    transform: translateY(-1px);
}

.ai-task-form-actions button.ai-task-action--primary {
    background: #087f72 !important;
    border-color: #087f72 !important;
    color: #fff !important;
}

.ai-task-form-actions button.ai-task-action--primary:hover,
.ai-task-form-actions button.ai-task-action--primary:focus {
    background: #066e64 !important;
    border-color: #066e64 !important;
    color: #fff !important;
}

.ai-task-form-actions button.ai-task-action--secondary {
    background: #f5faf9 !important;
    border-color: #d4e6e2 !important;
    color: #315b62 !important;
}

.ai-task-form-actions button.ai-task-action--secondary:hover,
.ai-task-form-actions button.ai-task-action--secondary:focus {
    background: #fff !important;
    border-color: #9bcac1 !important;
    color: #075e55 !important;
}

.ai-task-form-actions button.ai-task-action--danger {
    background: #fff8f8 !important;
    border-color: #f0cbcc !important;
    color: #be4d50 !important;
}

.ai-task-form-actions button.ai-task-action--danger:hover,
.ai-task-form-actions button.ai-task-action--danger:focus {
    background: #fff0f0 !important;
    border-color: #e9babc !important;
    color: #a33c40 !important;
}

.ai-task-form-select-menu md-select-menu {
    background: #fff;
    border: 1px solid #d8e9e5;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(10, 62, 65, .16);
    overflow: hidden;
    padding: 7px;
}

.ai-task-form-select-menu md-content {
    background: #fff;
}

.ai-task-form-select-menu md-option {
    border-radius: 8px;
    color: #385e64;
    font-size: 11px;
    height: 40px;
    line-height: 40px;
    margin: 2px 0;
    padding: 0 13px;
}

.ai-task-form-select-menu md-option:hover,
.ai-task-form-select-menu md-option:focus {
    background: #eef8f5;
    color: #087f72;
}

.ai-task-form-select-menu md-option[selected],
.ai-task-form-select-menu md-option.md-selected {
    background: #dff4ee;
    color: #087f72;
    font-weight: 600;
}

.ai-task-form-select-menu md-optgroup label {
    color: #0b8c7d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 12px 13px 5px;
    text-transform: uppercase;
}

/* ========================================================================== */
/* ATA | Project form                                                         */
/* Keeps the project workflow intact while sharing the task-form language.    */
/* ========================================================================== */

.ai-project-form-page {
    padding-top: 28px;
}

.ai-project-form-shell {
    max-width: 1480px;
}

.ai-project-form-summary {
    margin-bottom: 18px;
}

.ai-project-form-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-project-form-meta .ai-task-form-meta__item:only-child {
    grid-column: 1 / -1;
}

.ai-project-form-title h1 {
    font-size: 13px;
}

.ai-project-form-title__separator {
    color: #9bb0b1;
    font-weight: 400;
    padding: 0 3px;
}

.ai-project-form-content {
    margin: 0;
}

.ai-project-form-content > .col-md-12 {
    padding: 0;
}

.ai-project-form-tabs .md-tab {
    min-width: 140px;
}

.ai-project-form-tabs .container-fluid.col-md-6 {
    padding: 8px 28px 22px;
}

.ai-project-form-tabs .ai-project-plan-tab {
    box-sizing: border-box;
    float: none;
    overflow: hidden;
    padding: 8px 28px 24px;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-tab > .container-fluid.col-md-12 {
    float: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-tab > [layout-gt-sm="row"] {
    box-sizing: border-box;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-tab .custom-full-row {
    align-items: center;
    display: flex;
    min-height: 28px;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-tab .custom-align-right {
    margin-left: auto;
}

.ai-project-form-tabs .ai-project-plan-grid {
    align-items: center;
    box-sizing: border-box;
    column-gap: 10px;
    display: flex;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-grid md-datepicker {
    display: block;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-grid md-datepicker .md-datepicker-input-container {
    box-sizing: border-box;
    width: calc(100% - 34px);
}

.ai-project-form-tabs .ai-project-plan-grid md-datepicker .md-datepicker-input {
    box-sizing: border-box;
    max-width: none;
    width: 100%;
}

.ai-project-form-tabs .ai-project-plan-grid--status > md-input-container:last-child {
    flex: 0 0 auto;
}

.ai-project-form-tabs .ai-project-plan-grid--status > md-input-container:last-child .btn {
    margin-left: 0 !important;
}

.ai-project-planner-status {
    align-items: center;
    color: #91a7a8;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 7px;
    letter-spacing: .03em;
}

.ai-project-planner-status--ready {
    color: #087e70;
}

.ai-project-planner-card {
    background: #fff;
    border: 1px solid #d9e8e5;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(8, 72, 67, .07);
    box-sizing: border-box;
    margin: 18px 0 6px;
    overflow: hidden;
    padding: 20px;
    width: 100%;
}

.ai-project-planner-card__toolbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ai-project-planner-card__heading {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.ai-project-planner-card__icon,
.ai-project-planner-empty__icon {
    align-items: center;
    background: #e9f7f4;
    border-radius: 12px;
    color: #079583;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.ai-project-planner-card__heading h3 {
    color: #164b52;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 3px;
}

.ai-project-planner-card__heading p {
    color: #789294;
    font-size: 11px;
    line-height: 1.35;
    margin: 0;
}

.ai-project-planner-card__actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}

.ai-project-planner-file-input {
    height: 1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.ai-project-planner-action {
    align-items: center;
    background: #fff;
    border: 1px solid #bfd8d4;
    border-radius: 999px;
    color: #16645d;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    gap: 8px;
    line-height: 1;
    margin: 0;
    min-height: 38px;
    padding: 0 16px;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ai-project-planner-action:hover {
    background: #f1faf8;
    border-color: #73bfb3;
    box-shadow: 0 5px 14px rgba(8, 107, 95, .1);
    transform: translateY(-1px);
}

.ai-project-planner-action--primary {
    background: #078f80;
    border-color: #078f80;
    color: #fff;
}

.ai-project-planner-action--primary:hover {
    background: #06796d;
    border-color: #06796d;
}

.ai-project-planner-action--danger {
    color: #b84d51;
}

.ai-project-planner-action.is-disabled,
.ai-project-planner-action[disabled] {
    cursor: default;
    opacity: .58;
    pointer-events: none;
    transform: none;
}

.ai-project-planner-preview {
    margin: 0;
}

.ai-project-planner-preview img {
    background: #f7faf9;
    border: 2px solid #075f58;
    border-radius: 10px;
    box-sizing: border-box;
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.ai-project-planner-preview figcaption {
    align-items: center;
    color: #789294;
    display: flex;
    font-size: 10px;
    gap: 16px;
    justify-content: flex-end;
    padding: 8px 4px 0;
}

.ai-project-planner-preview figcaption span {
    align-items: center;
    display: inline-flex;
    gap: 5px;
}

.ai-project-planner-empty {
    align-items: center;
    background: #f7fbfa;
    border: 1px dashed #b8d4d0;
    border-radius: 12px;
    color: #607f82;
    display: flex;
    gap: 14px;
    min-height: 112px;
    padding: 20px;
}

.ai-project-planner-empty strong {
    color: #285b60;
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}

.ai-project-planner-empty p {
    font-size: 11px;
    line-height: 1.45;
    margin: 0;
}

.ai-project-planner-loading {
    align-items: center;
    color: #5b7d80;
    display: flex;
    gap: 9px;
    justify-content: center;
    min-height: 132px;
}

.ai-project-planner-notice {
    align-items: center;
    border-radius: 9px;
    display: flex;
    font-size: 11px;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
}

.ai-project-planner-notice--error {
    background: #fff2f2;
    color: #a44349;
}

.ai-project-planner-notice--success {
    background: #edf9f5;
    color: #147466;
}

.ai-project-form-tabs md-input-container.ai-project-select-field {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #cfe1dd;
    border-radius: 0;
    box-sizing: border-box;
    min-height: 58px;
    padding: 9px 4px 7px;
    transition: border-color .18s ease;
}

.ai-project-form-tabs md-input-container.ai-project-select-field:hover {
    background: transparent;
    border-color: #9dd3c8;
}

.ai-project-form-tabs md-input-container.ai-project-select-field.md-input-focused {
    background: transparent;
    border-color: #42bda5;
    box-shadow: none;
}

.ai-project-form-tabs .ai-project-select-field > .ai-project-select-field__label {
    color: #789294 !important;
    display: block;
    font-size: 9px !important;
    font-weight: 700;
    left: auto;
    letter-spacing: .07em;
    line-height: 1.2;
    margin: 0 0 2px;
    position: static;
    text-transform: uppercase;
    transform: none !important;
    width: auto;
}

.ai-project-form-tabs .ai-project-select-field__label b {
    color: #0c8d7d;
    font-weight: 700;
}

.ai-project-form-tabs .ai-project-select-field md-select .md-select-placeholder {
    color: #8da1a2;
    font-weight: 500;
}

.ai-project-form-tabs .ai-project-select-field md-select {
    margin: 0;
}

.ai-project-form-tabs .ai-project-select-field md-select .md-select-value {
    border-bottom: 0 !important;
    color: #284f57;
    font-size: 12px;
    font-weight: 600;
    min-height: 27px;
    padding: 2px 0 0;
}

.ai-project-form-tabs .ai-project-select-field md-select .md-select-icon {
    color: #128d7d;
}

.ai-project-form-tabs md-input-container.ai-project-select-side {
    align-items: center;
    align-self: stretch;
    display: flex;
    flex: 0 0 52px !important;
    justify-content: center;
    margin-bottom: 8px;
    margin-top: 8px;
    max-width: 52px !important;
    min-height: 58px;
    min-width: 52px;
    padding: 0;
    width: 52px;
}

.ai-project-form-tabs md-input-container.ai-project-select-side > i {
    margin: 0 !important;
}

.ai-project-form-tabs md-input-container.ai-project-select-side--action {
    cursor: pointer;
    flex-basis: 58px !important;
    max-width: 58px !important;
    min-width: 58px;
    width: 58px;
}

.ai-project-form-tabs md-input-container.ai-project-select-side--secondary-action {
    flex-basis: 34px !important;
    max-width: 34px !important;
    min-width: 34px;
    transform: translateX(-24px);
    width: 34px;
}

.ai-project-form-tabs md-input-container.ai-project-select-side--action:hover > i,
.ai-project-form-tabs md-input-container.ai-project-select-side--action:focus > i {
    background: #dff4ee;
    color: #087f72 !important;
}

.ai-project-form-tabs .btn-custom-success:not(.ai-task-action),
.ai-project-form-tabs .btn-custom-danger:not(.ai-task-action) {
    border-radius: 999px;
    box-shadow: none;
    font-size: 11px;
    min-height: 36px;
    padding: 8px 15px;
}

.ai-project-form-actions {
    margin-top: 18px;
}

.ai-project-form-page + .row footer-site,
.ai-project-form-page + .row {
    margin-top: 0;
}

/* Project GTD tab: the same operational language as the main GTD inboxes. */

.ai-project-gtd-tab {
    background: #f6fbf9;
    box-sizing: border-box;
    margin: 0 !important;
    min-height: 0;
    overflow: visible;
    padding: 24px 28px 32px;
    width: 100%;
}

.ai-project-gtd-header {
    align-items: center;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ai-project-gtd-heading {
    align-items: center;
    display: flex;
    gap: 13px;
    min-width: 0;
}

.ai-project-gtd-heading__icon,
.ai-project-gtd-toolbar__summary-icon,
.ai-project-gtd-empty > span {
    align-items: center;
    background: #e9f8f4;
    border-radius: 11px;
    color: #0b9787;
    display: inline-flex;
    flex: 0 0 auto;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.ai-project-gtd-heading__icon {
    font-size: 17px;
}

.ai-project-gtd-heading__eyebrow {
    color: #0b8b7d;
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
    margin-bottom: 3px;
}

.ai-project-gtd-heading h2 {
    color: #0a3540;
    font-family: "Manrope", "Quicksand", sans-serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.2;
    margin: 0;
}

.ai-project-gtd-heading p {
    color: #71898d;
    font-size: 11px;
    margin: 3px 0 0;
}

.ai-project-gtd-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.ai-project-gtd-action {
    align-items: center;
    background: #fff;
    border: 1px solid #cfe4df;
    border-radius: 999px;
    color: #28565c;
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    gap: 8px;
    min-height: 38px;
    outline: 0;
    padding: 8px 15px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.ai-project-gtd-action i {
    color: #078f80;
    font-size: 14px;
}

.ai-project-gtd-action:hover,
.ai-project-gtd-action:focus {
    background: #f0faf7;
    border-color: #8fcfc3;
    color: #08786d;
    transform: translateY(-1px);
}

.ai-project-gtd-action--primary {
    background: #078f80;
    border-color: #078f80;
    color: #fff;
}

.ai-project-gtd-action--primary i,
.ai-project-gtd-action--primary:hover,
.ai-project-gtd-action--primary:focus {
    color: #fff;
}

.ai-project-gtd-action--primary:hover,
.ai-project-gtd-action--primary:focus {
    background: #06796d;
    border-color: #06796d;
}

.ai-project-gtd-toolbar {
    align-items: center;
    background: #f8fbfa;
    border: 1px solid #dcece8;
    border-radius: 14px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 26px;
    min-height: 76px;
    padding: 9px 12px 9px 15px;
}

.ai-project-gtd-toolbar__summary {
    align-items: center;
    display: flex;
    gap: 11px;
    min-width: 0;
}

.ai-project-gtd-toolbar__summary-icon {
    height: 36px;
    width: 36px;
}

.ai-project-gtd-toolbar__summary > div > span {
    color: #789294;
    display: block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .09em;
}

.ai-project-gtd-toolbar__summary strong {
    color: #31575f;
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

.ai-project-gtd-toolbar__count,
.ai-project-gtd-section__count {
    background: #eaf5f2;
    border-radius: 999px;
    color: #557578;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 9px;
    white-space: nowrap;
}

.ai-project-form-tabs md-input-container.ai-project-gtd-properties {
    flex: 0 1 330px;
    margin: 0;
    min-height: 54px;
    width: 330px;
}

.ai-project-gtd-section {
    margin: 0 auto 34px;
    max-width: 1220px;
    width: 100%;
}

.ai-project-gtd-section__heading {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 10px 10px;
    min-height: 32px;
}

.ai-project-gtd-section__icon {
    align-items: center;
    color: #078f80;
    display: inline-flex;
    font-size: 16px;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.ai-project-gtd-section h3 {
    color: #17464e;
    font-family: "Manrope", "Quicksand", sans-serif;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.ai-project-gtd-section__line {
    border-top: 1px solid #a9d6cc;
    flex: 1;
    margin-left: 4px;
}

.ai-project-gtd-task-table {
    margin: -10px auto 0;
    max-width: 1220px;
    width: calc(100% - 28px);
}

.ai-project-gtd-task-table > tbody > tr > td {
    padding: 0 !important;
}

.ai-project-gtd-empty {
    align-items: center;
    background: #f8fbfa;
    border: 1px dashed #c7e1db;
    border-radius: 14px;
    color: #496b70;
    display: flex;
    gap: 12px;
    margin: 10px 0 4px;
    padding: 18px;
}

.ai-project-gtd-empty strong {
    color: #254f56;
    font-size: 12px;
}

.ai-project-gtd-empty p {
    font-size: 11px;
    margin: 3px 0 0;
}

@media (max-width: 767px) {
    .ai-project-form-meta {
        grid-template-columns: 1fr;
    }

    .ai-project-form-tabs .md-tab {
        min-width: 112px;
    }

    .ai-project-form-tabs .container-fluid.col-md-6 {
        padding-left: 18px;
        padding-right: 18px;
        width: 100%;
    }

    .ai-project-form-tabs .ai-project-plan-tab {
        padding: 8px 18px 22px;
    }

    .ai-project-gtd-tab {
        padding: 20px 18px 26px;
    }

    .ai-project-gtd-section__heading {
        margin-left: 4px;
        margin-right: 4px;
    }

    .ai-project-gtd-task-table {
        width: calc(100% - 8px);
    }

    .ai-project-gtd-header,
    .ai-project-gtd-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-project-gtd-actions {
        flex-wrap: wrap;
    }

    .ai-project-form-tabs md-input-container.ai-project-gtd-properties {
        flex-basis: auto;
        width: 100%;
    }

    .ai-project-form-tabs md-input-container.ai-project-select-field {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .ai-project-form-tabs .ai-project-plan-grid {
        display: grid;
        gap: 14px 18px;
    }

    .ai-project-form-tabs .ai-project-plan-grid--dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-project-form-tabs .ai-project-plan-grid--status {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    .ai-project-form-tabs .ai-project-plan-grid > md-input-container:not(.visible-md):not(.visible-lg) {
        margin: 8px 0;
        max-width: none !important;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .ai-project-form-tabs .ai-project-plan-grid--dates,
    .ai-project-form-tabs .ai-project-plan-grid--status {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .ai-task-form-page {
        padding: 22px 16px 44px;
    }

    .ai-task-form-layout {
        display: block;
    }

    .ai-task-form-main,
    .ai-task-form-rail {
        width: 100%;
    }

    .ai-task-form-rail {
        margin-top: 18px;
        position: static;
    }

    .ai-task-form-classifier {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-task-form-rail-heading,
    .ai-task-form-choice-label,
    .ai-task-form-perspective-title {
        grid-column: 1 / -1;
    }

    .ai-task-form-rail [ng-switch],
    .ai-task-form-rail .row-fluid[ng-show] {
        margin: 0;
    }

    .ai-task-form-actions { margin-right: 0; }
}

@media (max-width: 599px) {
    .ai-task-form-page {
        padding: 14px 10px 38px;
    }

    .ai-task-form-summary,
    .ai-task-form-tabs,
    .ai-task-form-classifier,
    .ai-task-form-actions {
        border-radius: 14px;
    }

    .ai-task-form-summary {
        padding: 20px 17px 17px;
    }

    .ai-task-form-title h1 {
        font-size: 12px;
    }

    .ai-task-form-meta {
        grid-template-columns: 1fr;
    }

    .ai-task-form-tabs md-tabs-wrapper {
        padding: 0 4px;
    }

    .ai-task-form-tabs .md-tab {
        min-width: 105px;
        padding: 0 12px;
    }

    .ai-task-form-tabs .container-fluid.col-md-12 {
        padding: 8px 14px 18px;
    }

    .ai-task-form-classifier {
        grid-template-columns: 1fr;
    }

    .ai-task-form-actions {
        flex-wrap: wrap;
    }

    .ai-task-activity-table__meta-heading {
        width: 155px;
    }

    .ai-task-activity-table__facts span {
        white-space: normal;
    }
}

/* Collect dialog
   Two-step capture flow inspired by the public onboarding forms and adapted
   to the quieter visual language of the authenticated workspace. */
.ai-collect-dialog {
    width: min(900px, calc(100vw - 48px));
    min-width: 0;
    max-width: 900px;
    min-height: 0;
    max-height: calc(100vh - 110px);
    overflow: hidden;
    border: 1px solid #d6e7e3;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 28px 72px rgba(7, 58, 63, .24);
}

.ai-collect-dialog__form {
    position: relative;
    display: flex;
    min-height: 0;
    max-height: calc(100vh - 110px);
    flex-direction: column;
    overflow: hidden;
}

.ai-collect-dialog .ai-collect-dialog__toolbar {
    min-height: 78px;
    color: #123f46;
    border-bottom: 1px solid #dcebe8;
    background:
        radial-gradient(circle at 92% 0, rgba(27, 157, 186, .08), transparent 36%),
        linear-gradient(90deg, rgba(71, 196, 113, .08), rgba(0, 148, 136, .045) 52%, rgba(35, 142, 206, .055)),
        #ffffff !important;
}

.ai-collect-dialog__toolbar .md-toolbar-tools {
    height: 78px;
    max-height: 78px;
    padding: 0 24px;
}

.ai-collect-dialog__title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.ai-collect-dialog__title-icon {
    display: inline-flex;
    width: 43px;
    height: 43px;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    color: #078f81;
    border: 1px solid #d5ebe6;
    border-radius: 13px;
    background: linear-gradient(145deg, #e5f7f2, #ffffff);
    font-size: 17px;
}

.ai-collect-dialog__title small,
.ai-collect-card__head small,
.ai-collect-summary small {
    display: block;
    color: #078f81;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.2;
}

.ai-collect-dialog__title h2 {
    margin: 2px 0 0;
    color: #123f46;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.ai-collect-dialog__close {
    display: inline-flex !important;
    width: 39px !important;
    height: 39px !important;
    min-width: 39px !important;
    min-height: 39px !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    color: #54747a !important;
    border-radius: 11px !important;
}

.ai-collect-dialog__close:hover,
.ai-collect-dialog__close:focus {
    color: #075e55 !important;
    background: #eaf8f5 !important;
}

.ai-collect-dialog__content {
    min-height: 0;
    flex: 1 1 auto;
    overflow: auto !important;
    background:
        radial-gradient(circle at 8% 5%, rgba(74, 196, 116, .055), transparent 28%),
        #f5faf9;
}

.ai-collect-dialog__body {
    box-sizing: border-box;
    padding: 22px 24px 24px;
}

.ai-collect-steps {
    display: grid;
    width: min(650px, 100%);
    align-items: center;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    margin: 0 auto 18px;
}

.ai-collect-step {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    outline: 0;
    color: #71898d;
    background: transparent;
    text-align: left;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.ai-collect-step:hover,
.ai-collect-step:focus {
    border-color: #d9eae6;
    background: rgba(255, 255, 255, .72);
}

.ai-collect-step.is-active {
    color: #123f46;
    border-color: #bfe1d8;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 76, 78, .07);
}

.ai-collect-step__number {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    color: #6d8b8e;
    border: 1px solid #d5e5e2;
    border-radius: 50%;
    background: #ffffff;
    font-size: 14px;
}

.ai-collect-step.is-active .ai-collect-step__number,
.ai-collect-step.is-complete .ai-collect-step__number {
    color: #ffffff;
    border-color: #078f81;
    background: linear-gradient(145deg, #22b89a, #078f81);
}

.ai-collect-step__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ai-collect-step__copy small {
    color: #84999c;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-collect-step__copy strong {
    margin: 1px 0;
    color: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.ai-collect-step__copy em {
    overflow: hidden;
    color: #829699;
    font-size: 10px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-collect-steps__line {
    height: 2px;
    margin: 0 8px;
    background: #dce9e6;
    transition: background-color .18s ease;
}

.ai-collect-steps__line.is-complete {
    background: #50c58a;
}

.ai-collect-card {
    position: relative;
    overflow: hidden;
    padding: 25px 27px 26px;
    border: 1px solid #dceae7;
    border-radius: 19px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 16px 40px rgba(14, 66, 69, .07);
}

.ai-collect-card::before {
    position: absolute;
    top: 0;
    right: 22px;
    left: 22px;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(90deg, #50c87d, #078f81, #159ac3);
    content: "";
}

.ai-collect-card__head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding-bottom: 19px;
    border-bottom: 1px solid #e1ece9;
}

.ai-collect-card__icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    color: #078f81;
    border: 1px solid #d6ebe6;
    border-radius: 15px;
    background: linear-gradient(145deg, #e9f8f4, #ffffff);
    font-size: 22px;
}

.ai-collect-card__head h3 {
    margin: 3px 0 4px;
    color: #153f47;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.25;
}

.ai-collect-card__head p {
    margin: 0;
    color: #667f84;
    font-size: 12px;
    line-height: 1.48;
}

.ai-collect-fields {
    display: grid;
    gap: 17px;
}

.ai-collect-field {
    display: block;
    margin: 0;
}

.ai-collect-field__label {
    display: block;
    margin: 0 0 7px 2px;
    color: #617b80;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
}

.ai-collect-field__label b {
    color: #078f81;
}

.ai-collect-field__control,
.ai-collect-select {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    box-sizing: border-box;
    min-height: 58px;
    padding: 8px 11px;
    border: 1px solid #d9e8e5;
    border-radius: 13px;
    background: #f8fbfa;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ai-collect-field__control:focus-within,
.ai-collect-select:focus-within {
    border-color: #76bfb2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .08);
}

.ai-collect-field__control > i,
.ai-collect-select__icon {
    display: inline-flex;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    flex: 0 0 35px;
    color: #129786;
    border-radius: 10px;
    background: #e8f7f3;
    font-size: 14px;
}

.ai-collect-field__control input,
.ai-collect-field__control textarea {
    width: 100%;
    min-width: 0;
    padding: 7px 4px;
    border: 0;
    outline: 0;
    color: #173f46;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    resize: vertical;
}

.ai-collect-field__control input::placeholder,
.ai-collect-field__control textarea::placeholder {
    color: #9aabad;
    font-weight: 400;
}

.ai-collect-field__control--textarea {
    align-items: flex-start;
}

.ai-collect-field__control--textarea > i {
    margin-top: 3px;
}

.ai-collect-field__control--textarea textarea {
    min-height: 76px;
    line-height: 1.5;
}

.ai-collect-field__hint {
    display: block;
    margin: 6px 0 0 3px;
    color: #8a9da0;
    font-size: 10px;
}

.ai-collect-select {
    padding: 6px 8px 6px 11px;
}

.ai-collect-select__control {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto;
}

.ai-collect-select__control .md-errors-spacer {
    display: none;
}

.ai-collect-select__control md-select {
    margin: 0;
    color: #173f46 !important;
    font-size: 13px;
    font-weight: 500;
}

.ai-collect-select__control md-select .md-select-value {
    min-height: 38px;
    align-items: center;
    border-bottom: 0 !important;
}

.ai-collect-select__clear {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border: 0;
    border-radius: 10px;
    outline: 0;
    color: #4d777b;
    background: #eef6f4;
    transition: color .18s ease, background-color .18s ease;
}

.ai-collect-select__clear:hover:not(:disabled),
.ai-collect-select__clear:focus:not(:disabled) {
    color: #a44045;
    background: #fff0f0;
}

.ai-collect-select__clear:disabled {
    cursor: default;
    opacity: .35;
}

.ai-collect-project-control {
    display: grid;
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
}

.ai-collect-project-trigger {
    display: grid;
    min-width: 0;
    min-height: 72px;
    align-items: center;
    grid-template-columns: 35px minmax(0, 1fr) 34px;
    gap: 11px;
    padding: 8px 10px;
    border: 1px solid #d9e8e5;
    border-radius: 13px;
    outline: 0;
    color: #173f46;
    background: #f8fbfa;
    text-align: left;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ai-collect-project-trigger:hover,
.ai-collect-project-trigger:focus {
    border-color: #76bfb2;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .08);
}

.ai-collect-project-trigger__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ai-collect-project-trigger__copy small {
    color: #078f81;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
}

.ai-collect-project-trigger__copy strong,
.ai-collect-project-trigger__copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-collect-project-trigger__copy strong {
    margin: 3px 0 2px;
    color: #244f56;
    font-size: 12px;
    font-weight: 700;
}

.ai-collect-project-trigger__copy em {
    color: #84999c;
    font-size: 9px;
    font-style: normal;
}

.ai-collect-project-trigger__action {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    color: #078f81;
    border: 1px solid #d4e9e4;
    border-radius: 10px;
    background: #ffffff;
    font-size: 12px;
}

.ai-collect-project-control > .ai-collect-select__clear {
    width: 42px;
    height: 100%;
    min-height: 72px;
    border: 1px solid #d9e8e5;
    border-radius: 13px;
}

.ai-collect-summary {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 19px;
    padding: 13px 15px;
    border: 1px solid #cfe7e1;
    border-radius: 13px;
    background: #eef9f6;
}

.ai-collect-summary > span {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    color: #078f81;
    border-radius: 9px;
    background: #ffffff;
    font-size: 15px;
}

.ai-collect-summary strong {
    display: block;
    margin: 3px 0 2px;
    color: #173f46;
    font-size: 13px;
    font-weight: 700;
}

.ai-collect-summary p {
    margin: 0;
    color: #6b8387;
    font-size: 11px;
}

.ai-collect-notice-host {
    margin-top: 14px;
}

.ai-collect-dialog__actions {
    min-height: 68px;
    padding: 11px 22px !important;
    border-top: 1px solid #dcebe8;
    background: #ffffff;
}

.ai-collect-dialog__actions .ai-activity-button {
    min-width: 116px;
}

.ai-collect-dialog__actions .ai-activity-button--secondary {
    margin-left: 0;
    margin-right: 8px;
}

.ai-collect-select-menu md-select-menu {
    border-radius: 14px;
}

.md-select-menu-container.ai-collect-select-menu {
    z-index: 1230 !important;
}

.ai-collect-project-selector {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ai-collect-project-selector__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 47, 52, .58);
    backdrop-filter: blur(3px);
}

.ai-collect-project-selector__panel {
    position: relative;
    display: flex;
    width: 100%;
    height: min(680px, calc(100% - 10px));
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #cfe3df;
    border-radius: 20px;
    background: #f5faf9;
    box-shadow: 0 28px 72px rgba(5, 47, 51, .3);
    animation: ai-collect-selector-enter 180ms ease-out both;
}

@keyframes ai-collect-selector-enter {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-collect-project-selector__header {
    position: relative;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 72px;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 1px solid #dceae7;
    background: #ffffff;
}

.ai-collect-project-selector__header::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #51c96b, #079486 50%, #1595c6);
    content: "";
}

.ai-collect-project-selector__close {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border: 0;
    border-radius: 11px;
    outline: 0;
    color: #668489;
    background: transparent;
}

.ai-collect-project-selector__close:hover,
.ai-collect-project-selector__close:focus {
    color: #075e55;
    background: #eaf8f5;
}

.ai-collect-project-selector__body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    padding: 13px;
}

.ai-collect-project-current {
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid #d6e8e4;
    border-radius: 14px;
    background: #ffffff;
}

.ai-collect-project-current__icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    color: #078f81;
    border-radius: 10px;
    background: #e8f7f3;
    font-size: 14px;
}

.ai-collect-project-current > div {
    min-width: 0;
}

.ai-collect-project-current small {
    display: block;
    color: #078f81;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-collect-project-current strong,
.ai-collect-project-current p {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-collect-project-current strong {
    margin: 3px 0 1px;
    color: #214b53;
    font-size: 11px;
    font-weight: 700;
}

.ai-collect-project-current p {
    margin: 0;
    color: #7a9296;
    font-size: 9px;
}

.ai-collect-project-grid {
    border-color: #d6e8e4;
}

.ai-collect-project-clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #d7e8e4;
    border-radius: 999px;
    outline: 0;
    color: #55777c;
    background: #f4f9f8;
    font-size: 9px;
    font-weight: 600;
}

.ai-collect-project-clear-filters:hover,
.ai-collect-project-clear-filters:focus {
    color: #075e55;
    border-color: #a8d4cb;
    background: #eaf8f5;
}

.ai-collect-project-table {
    min-width: 840px;
}

.ai-collect-project-table__customer-col { width: 16%; }
.ai-collect-project-table__project-col { width: 31%; }
.ai-collect-project-table__type-col { width: 14%; }
.ai-collect-project-table__status-col { width: 15%; }
.ai-collect-project-table__area-col { width: 18%; }
.ai-collect-project-table__state-col { width: 6%; }

.ai-collect-project-table__project {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.ai-collect-project-table__project b,
.ai-collect-project-table__project span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-collect-project-table__project b {
    color: #078f81;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
}

.ai-collect-project-table__project span {
    color: #264f57;
    font-size: 10px;
    font-weight: 600;
}

.ai-collect-project-table .ai-context-tag {
    max-width: 100%;
}

.ai-collect-project-table .ai-context-table__empty-row td {
    height: 90px;
    color: #84999c;
    font-size: 11px;
    text-align: center;
}

.ai-collect-project-selector__actions {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 68px;
    gap: 9px;
    padding: 11px 17px;
    border-top: 1px solid #dceae7;
    background: #ffffff;
}

.ai-collect-project-selector__actions .ai-context-button--secondary {
    order: 1;
}

.ai-collect-project-selector__actions .ai-context-button--primary {
    order: 2;
}

@media (max-width: 700px) {
    .ai-collect-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 28px);
        border-radius: 17px;
    }

    .ai-collect-dialog__form {
        max-height: calc(100vh - 28px);
    }

    .ai-collect-dialog__toolbar .md-toolbar-tools {
        padding: 0 16px;
    }

    .ai-collect-dialog__body {
        padding: 16px;
    }

    .ai-collect-steps {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    }

    .ai-collect-step {
        gap: 8px;
        padding: 8px;
    }

    .ai-collect-step__number {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        font-size: 12px;
    }

    .ai-collect-step__copy em {
        display: none;
    }

    .ai-collect-card {
        padding: 21px 18px 22px;
    }

    .ai-collect-card__head {
        align-items: flex-start;
    }

    .ai-collect-card__icon {
        width: 45px;
        height: 45px;
        flex-basis: 45px;
        font-size: 18px;
    }

    .ai-collect-dialog__actions {
        padding: 10px 12px !important;
    }

    .ai-collect-dialog__actions .ai-activity-button {
        min-width: 0;
        padding-right: 14px;
        padding-left: 14px;
    }

    .ai-collect-project-selector {
        padding: 7px;
    }

    .ai-collect-project-selector__panel {
        height: calc(100% - 2px);
        border-radius: 15px;
    }

    .ai-collect-project-selector__header {
        padding: 0 14px;
    }

    .ai-collect-project-selector__header .ai-context-dialog__title small {
        display: none;
    }

    .ai-collect-project-selector__body {
        padding: 8px;
    }

    .ai-collect-project-current {
        min-height: 58px;
    }

    .ai-collect-project-selector__actions {
        padding: 9px 10px;
    }

    .ai-collect-project-selector__actions .ai-context-button {
        min-width: 0;
        padding-right: 13px !important;
        padding-left: 13px !important;
    }
}

/* Activity dialog
   Keeps the existing Angular bindings and actions while giving the modal the
   same visual hierarchy as the redesigned task form. */
.ai-activity-dialog {
    width: min(1080px, calc(100vw - 48px));
    min-width: 0;
    max-width: 1080px;
    min-height: 0;
    max-height: calc(100vh - 160px);
    overflow: hidden;
    border: 1px solid #d6e7e3;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 72px rgba(7, 58, 63, .22);
}

.ai-activity-dialog__form {
    display: flex;
    min-height: 0;
    max-height: calc(100vh - 160px);
    flex-direction: column;
    overflow: hidden;
}

.ai-activity-dialog .ai-activity-dialog__toolbar {
    min-height: 74px;
    color: #123f46;
    border-bottom: 1px solid #dcebe8;
    background:
        linear-gradient(90deg, rgba(71, 196, 113, .07), rgba(0, 148, 136, .045) 52%, rgba(35, 142, 206, .055)),
        #ffffff !important;
}

.ai-activity-dialog__toolbar .md-toolbar-tools {
    height: 74px;
    max-height: 74px;
    padding: 0 20px;
}

.ai-activity-dialog__title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-activity-dialog__title > span:last-child {
    color: #088d7f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
}

.ai-activity-dialog__title-icon,
.ai-activity-section__heading-icon,
.ai-activity-field__icon,
.ai-activity-option__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #069687;
    background: #eaf8f5;
}

.ai-activity-dialog__title-icon {
    width: 40px;
    height: 40px;
    border: 1px solid #d9eeea;
    border-radius: 12px;
    font-size: 17px;
}

.ai-activity-section__heading > span:last-child {
    display: block;
    color: #088d7f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.2;
}

.ai-activity-dialog__title h2 {
    margin: 0;
    color: #123f46;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
}

.ai-activity-dialog__close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    color: #54747a !important;
    border-radius: 11px !important;
}

.ai-activity-dialog__close:hover,
.ai-activity-dialog__close:focus {
    color: #075e55 !important;
    background: #eaf8f5 !important;
}

.ai-activity-dialog__content {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden !important;
    background: #f5faf9;
}

.ai-activity-dialog__body {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
}

.ai-activity-layout {
    display: grid;
    height: 100%;
    min-height: 0;
    align-items: stretch;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    gap: 12px;
}

.ai-activity-layout__sidebar {
    display: grid;
    min-height: 0;
    align-content: start;
    gap: 12px;
}

.ai-activity-section {
    padding: 17px 18px 18px;
    border: 1px solid #dceae7;
    border-radius: 15px;
    background: #ffffff;
}

.ai-activity-section__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ai-activity-section__heading-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
}

.ai-activity-section__heading h3 {
    margin: 0;
    color: #17444b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.ai-activity-timing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ai-activity-layout__sidebar .ai-activity-timing-grid .ai-activity-field {
    height: 66px;
    box-sizing: border-box;
}

.ai-activity-timing-grid .md-errors-spacer {
    display: none;
}

.ai-activity-field,
.ai-activity-template {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #deebe8;
    border-radius: 11px;
    background: #f9fcfb;
}

.ai-activity-field__icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
}

.ai-activity-control {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.ai-activity-control__label {
    display: block;
    color: #6f898e;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .055em;
    line-height: 1.1;
}

.ai-activity-control__label b {
    color: #078f81;
    font-weight: 700;
}

.ai-activity-field md-input-container.ai-activity-control__input {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto;
}

.ai-activity-control__input .md-input {
    height: 25px;
    min-height: 25px;
    padding-top: 0;
    line-height: 25px;
}

.ai-activity-control--template {
    justify-content: center;
}

.ai-activity-control--template .ai-activity-control__input {
    height: 25px;
}

.ai-activity-field md-input-container,
.ai-activity-template md-input-container {
    min-width: 0;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    flex: 1 1 auto;
}

.ai-activity-dialog md-input-container label {
    color: #6f898e !important;
    font-size: 10px;
    font-weight: 500;
}

.ai-activity-dialog md-input-container input,
.ai-activity-dialog md-input-container textarea,
.ai-activity-dialog md-input-container md-select {
    color: #173f46 !important;
    font-size: 12px;
    font-weight: 500;
}

.ai-activity-dialog md-input-container .md-input,
.ai-activity-dialog md-input-container md-select {
    border-color: #c8ddd9 !important;
}

.ai-activity-dialog md-input-container.md-input-focused .md-input,
.ai-activity-dialog md-input-container.md-input-focused md-select {
    border-color: #078f81 !important;
}

.ai-activity-field--date md-datepicker {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.ai-activity-field--date .ai-activity-control__input {
    height: 25px;
}

.ai-activity-field--date .md-datepicker-input-container {
    width: 100%;
    margin-left: 0;
}

.ai-activity-time {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
    align-items: stretch;
    grid-template-columns: minmax(45px, 1fr) 12px minmax(45px, 1fr);
    gap: 5px;
}

.ai-activity-time__separator {
    display: flex;
    height: 25px;
    align-self: start;
    align-items: center;
    justify-content: center;
    margin-top: 13px;
    padding: 0 0 1px;
    color: #55767b;
    line-height: 25px;
    text-align: center;
}

.ai-activity-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ai-activity-option {
    display: grid;
    min-width: 0;
    align-items: center;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #deebe8;
    border-radius: 11px;
    background: #f9fcfb;
}

.ai-activity-option > span:nth-child(2) {
    overflow: hidden;
    color: #17444b;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-activity-option__icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    font-size: 13px;
}

.ai-activity-option strong,
.ai-activity-option > div > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-activity-option strong {
    color: #17444b;
    font-size: 11px;
    font-weight: 600;
}

.ai-activity-option > div > span {
    margin-top: 2px;
    color: #789095;
    font-size: 9px;
}

.ai-activity-option md-switch {
    margin: 0;
}

.ai-activity-option md-switch .md-container {
    margin-right: 0;
}

.ai-activity-template {
    margin-top: 10px;
}

.ai-activity-template__clear {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    color: #709095 !important;
}

.ai-activity-template__clear:hover,
.ai-activity-template__clear:focus {
    color: #075e55 !important;
    background: #eaf8f5 !important;
}

.ai-activity-section--content {
    display: flex;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 15px;
}

.ai-activity-section--content .ai-activity-template {
    margin-top: 0;
    margin-bottom: 10px;
}

.ai-activity-field--content + .ai-activity-field--content {
    margin-top: 10px;
}

.ai-activity-control--title {
    min-height: 43px;
    justify-content: flex-start;
}

.ai-activity-control--title .ai-activity-control__input {
    padding-right: 40px !important;
}

.ai-activity-control--title md-char-counter,
.ai-activity-control--title .md-char-counter {
    right: 0;
    bottom: 5px;
}

.ai-activity-field--detail {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    overflow: hidden;
}

.ai-activity-field--detail .ai-activity-field__icon {
    margin-top: 3px;
}

.ai-activity-control--detail {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    justify-content: stretch;
}

.ai-activity-field--detail .ai-activity-control__input {
    display: flex;
    height: auto;
    min-height: 0;
    padding-bottom: 18px !important;
    flex: 1 1 auto !important;
    flex-direction: column;
    overflow: hidden;
}

.ai-activity-field--detail .md-resize-wrapper {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ai-activity-field--detail textarea {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box;
    flex: 1 1 auto;
    resize: none;
    overflow-y: auto !important;
    line-height: 1.5;
}

.ai-activity-field--detail .md-errors-spacer {
    position: relative;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.ai-activity-field--detail md-char-counter,
.ai-activity-field--detail .md-char-counter {
    bottom: 0;
}

.ai-activity-dialog__error:empty {
    display: none;
}

.ai-activity-dialog__actions {
    min-height: 64px;
    padding: 10px 18px !important;
    border-top: 1px solid #dcebe8;
    background: #ffffff;
}

.ai-activity-button {
    display: inline-flex;
    min-width: 104px;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 19px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.ai-activity-button i {
    font-size: 13px;
    line-height: 1;
}

.ai-activity-button:hover,
.ai-activity-button:focus {
    box-shadow: 0 10px 24px rgba(7, 60, 63, .12) !important;
    outline: none;
    transform: translateY(-1px);
}

.ai-activity-button--primary {
    color: #ffffff;
    border: 1px solid #078f81;
    background: #078f81;
}

.ai-activity-button--primary:hover,
.ai-activity-button--primary:focus {
    color: #ffffff;
    border-color: #06766c;
    background: #06766c;
}

.ai-activity-button--secondary {
    margin-left: 8px;
    color: #315d63;
    border: 1px solid #c9ded9;
    background: #f5faf9;
}

.ai-activity-button--secondary:hover,
.ai-activity-button--secondary:focus {
    color: #075e55;
    border-color: #9bcac1;
    background: #eaf8f5;
}

.ai-activity-button--danger {
    color: #be4d50;
    border: 1px solid #f0cbcc;
    background: #fff8f8;
}

.ai-activity-button--danger:hover,
.ai-activity-button--danger:focus {
    color: #a33c40;
    border-color: #e9babc;
    background: #fff0f0;
}

.ai-activity-template__select .md-select-value {
    min-height: 25px;
    color: #214d55;
    border-color: #cfe1dd;
}

.ai-activity-template__select .md-select-icon {
    color: #6f898e;
}

.ai-activity-template__select:focus .md-select-value,
.ai-activity-template__select.md-focused .md-select-value {
    border-color: #078f81;
}

.ai-activity-select-menu md-select-menu {
    overflow: hidden;
    padding: 7px;
    border: 1px solid #d8e9e5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(10, 62, 65, .16);
}

/* The activity dialog is intentionally above the fixed application chrome.
   Angular Material moves select menus to <body>, so keep this menu above the
   dialog backdrop as well instead of letting it render behind the modal. */
.md-select-menu-container.ai-activity-select-menu {
    z-index: 1210 !important;
}

.ai-activity-select-menu md-content {
    border-radius: 10px;
    background: #fff;
}

.ai-activity-select-menu md-option {
    height: 40px;
    min-height: 40px;
    margin: 2px 0;
    padding: 0 13px;
    border-radius: 8px;
    color: #385e64;
    font-size: 11px;
    line-height: 40px;
}

.ai-activity-select-menu md-select-menu md-content md-option:hover,
.ai-activity-select-menu md-select-menu md-content md-option:focus,
.ai-activity-select-menu md-select-menu md-content md-option.md-focused {
    color: #087f72 !important;
    background: #eef8f5 !important;
}

.ai-activity-select-menu md-select-menu md-content md-option[selected],
.ai-activity-select-menu md-select-menu md-content md-option[aria-selected="true"],
.ai-activity-select-menu md-select-menu md-content md-option.md-selected {
    color: #087f72 !important;
    background: #dff4ee !important;
    font-weight: 600;
}

/* Task and project contexts modal */
/* Bootstrap's fixed navigation and app footer use a higher stacking level than
   Angular Material's legacy defaults. Keep dialogs and their backdrop above
   both so the modal header and actions remain fully visible. */
.md-dialog-backdrop {
    z-index: 1190 !important;
}

.md-dialog-container {
    z-index: 1200 !important;
}

/* Angular Material appends datepicker calendars directly to <body>. Its
   legacy z-index (100) leaves the calendar behind the raised task dialogs. */
.md-datepicker-calendar-pane.md-pane-open {
    z-index: 1220 !important;
}

/* Task save feedback: transient success, persistent actionable failures. */
.ai-task-activity-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: -6px -7px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #07927f;
    background: transparent;
    font-size: 15px;
    line-height: 1;
    vertical-align: middle;
}

.ai-task-activity-add:hover,
.ai-task-activity-add:focus {
    color: #056f64;
    background: #e7f6f2;
    outline: 0;
}

.ai-task-activity-add[disabled] {
    opacity: 0.45;
    cursor: wait;
}

.ai-task-notice-host,
.ai-global-notice-host {
    position: fixed;
    top: 86px;
    right: 28px;
    z-index: 1320;
    width: min(430px, calc(100vw - 32px));
    pointer-events: none;
}

.ai-operation-notice {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    gap: 13px;
    overflow: hidden;
    padding: 16px 14px 15px;
    border: 1px solid #b9ded5;
    border-left: 4px solid #0a8f7c;
    border-radius: 15px;
    color: #173f47;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(20, 70, 73, 0.18);
    pointer-events: auto;
    animation: ai-task-notice-enter 180ms ease-out both;
}

.ai-operation-notice__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #087f72;
    background: #e4f6f1;
    font-size: 18px;
}

.ai-operation-notice__content {
    min-width: 0;
    padding-top: 1px;
}

.ai-operation-notice__content strong {
    display: block;
    margin-bottom: 3px;
    color: #123f47;
    font-size: 15px;
    font-weight: 700;
}

.ai-operation-notice__content p {
    margin: 0;
    color: #55747a;
    font-size: 13px;
    line-height: 1.45;
}

.ai-operation-notice__close,
.ai-operation-notice__detail-action {
    border: 0;
    outline: 0;
    background: transparent;
}

.ai-operation-notice__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #789096;
}

.ai-operation-notice__close:hover,
.ai-operation-notice__close:focus {
    color: #123f47;
    background: #edf5f3;
}

.ai-operation-notice__detail-action {
    margin-top: 9px;
    padding: 0;
    color: #087f72;
    font-size: 12px;
    font-weight: 700;
}

.ai-operation-notice__detail-action i {
    margin-left: 5px;
    font-size: 10px;
}

.ai-operation-notice__detail {
    max-height: 150px;
    margin: 10px 0 0;
    padding: 10px 12px;
    overflow: auto;
    border: 1px solid #e0e9e7;
    border-radius: 9px;
    color: #5c6f73;
    background: #f7faf9;
    white-space: pre-wrap;
    word-break: break-word;
    font: 11px/1.45 Menlo, Monaco, Consolas, monospace;
}

.ai-operation-notice--warning {
    border-color: #efdca9;
    border-left-color: #c28a16;
}

.ai-operation-notice--warning .ai-operation-notice__icon {
    color: #9a6906;
    background: #fff5d9;
}

.ai-operation-notice--error {
    border-color: #efc7c7;
    border-left-color: #c84a4a;
}

.ai-operation-notice--error .ai-operation-notice__icon {
    color: #b43c3c;
    background: #fff0f0;
}

.ai-operation-notice__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #31b89f;
    transform-origin: left center;
    animation: ai-task-notice-progress 4500ms linear both;
}

@keyframes ai-task-notice-enter {
    from { opacity: 0; transform: translateY(-8px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ai-task-notice-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 767px) {
    .ai-task-notice-host,
    .ai-global-notice-host {
        top: 72px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

.ai-activity-dialog__body {
    position: relative;
}

.ai-activity-notice-host {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: min(410px, calc(100% - 28px));
}

.ai-activity-notice-host .ai-operation-notice {
    box-shadow: 0 16px 36px rgba(20, 70, 73, .2);
}

.ai-context-dialog {
    width: min(1060px, calc(100vw - 36px));
    height: min(780px, calc(100vh - 36px));
    max-width: 1060px;
    max-height: 780px;
    overflow: hidden;
    border-radius: 24px;
    background: #f5faf9;
    box-shadow: 0 28px 80px rgba(5, 52, 57, .22);
}

/* Resource grids benefit from one extra record on roomy screens. The viewport
   cap keeps the component modal-sized on smaller displays. */
.ai-resource-dialog {
    height: min(825px, calc(100vh - 36px));
    max-height: 825px;
}

.ai-resource-dialog .ai-context-dialog__body {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
}

.ai-resource-dialog .ai-context-grid-footer {
    min-height: 51px;
    flex-basis: 51px;
}

.ai-context-dialog__form {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.ai-context-dialog__toolbar {
    position: relative;
    min-height: 72px;
    flex: 0 0 72px;
    border-bottom: 1px solid #deebe8;
    color: #17464d;
    background: #fbfdfd !important;
}

.ai-context-dialog__toolbar::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    content: '';
    background: linear-gradient(90deg, #51c96b 0%, #079486 48%, #1595c6 100%);
}

.ai-context-dialog__toolbar .md-toolbar-tools {
    height: 72px;
    max-height: 72px;
    padding: 0 20px;
}

.ai-context-dialog__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.ai-context-dialog__title > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.ai-context-dialog__title > div > span {
    color: #087f72;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-context-dialog__title small {
    overflow: hidden;
    color: #769095;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-context-dialog__title-icon,
.ai-context-section-heading__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #078f81;
    background: #eaf8f5;
}

.ai-context-dialog__title-icon {
    width: 40px;
    height: 40px;
    border: 1px solid #d9ece8;
    border-radius: 12px;
    font-size: 16px;
}

.ai-context-dialog__close {
    color: #6f898e !important;
}

.ai-context-dialog__close:hover,
.ai-context-dialog__close:focus {
    color: #075e55 !important;
    background: #eaf8f5 !important;
}

.ai-context-dialog__content {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ai-context-dialog__body {
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
}

.ai-context-selected,
.ai-context-grid-section {
    border: 1px solid #dceae7;
    border-radius: 15px;
    background: #fff;
}

.ai-context-selected {
    padding: 12px 14px;
}

.ai-context-section-heading {
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #087f72;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .085em;
}

.ai-context-section-heading > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.ai-context-section-heading__icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 12px;
}

.ai-context-selected__count {
    padding: 5px 9px;
    border-radius: 999px;
    color: #54777d;
    background: #eff7f5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.ai-context-selected__content {
    max-height: 78px;
    overflow-y: auto;
    padding-top: 8px;
}

.ai-context-selected__chips md-chips-wrap {
    min-height: 0;
    padding: 0;
    box-shadow: none !important;
}

.ai-context-selected__chips .md-chip {
    height: 30px;
    margin: 3px 6px 3px 0;
    padding: 0 31px 0 11px;
    border: 1px solid #d5e9e5;
    border-radius: 999px;
    color: #28545b;
    background: #f1f8f6;
    font-size: 10px;
    font-weight: 600;
    line-height: 28px;
}

.ai-context-chip__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: 1px;
}

.ai-context-selected__chips md-chip .md-chip-remove {
    width: 28px;
    height: 28px;
}

.ai-context-selected__chips md-chip .md-chip-remove-container {
    width: 28px;
    height: 28px !important;
    overflow: hidden;
}

.ai-context-selected__chips md-chip {
    overflow: hidden;
}

.ai-context-selected__chips .md-chip .md-chip-remove md-icon {
    color: #6f898e;
    transform: scale(.8);
}

.ai-context-selected__empty {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 8px;
    padding: 7px 9px 0;
    color: #82989c;
    font-size: 10px;
}

.ai-context-grid-section {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.ai-context-section-heading--grid {
    flex: 0 0 auto;
    padding: 11px 14px 9px;
}

.ai-context-grid-section__hint {
    color: #81989c;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
}

.ai-context-table-wrap {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid #e1ecea;
    border-bottom: 1px solid #e1ecea;
}

.ai-context-table {
    width: 100%;
    min-width: 760px;
    margin: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.ai-context-table__group-col { width: 17%; }
.ai-context-table__context-col { width: 21%; }
.ai-context-table__comment-col { width: 38%; }
.ai-context-table__area-col { width: 24%; }

.ai-resource-table__team-col { width: 18%; }
.ai-resource-table__member-col { width: 24%; }
.ai-resource-table__profile-col { width: 20%; }
.ai-resource-table__position-col { width: 31%; }
.ai-resource-table__state-col { width: 7%; }

.ai-project-task-template-table__group-col { width: 22%; }
.ai-project-task-template-table__task-col { width: 42%; }
.ai-project-task-template-table__area-col { width: 29%; }
.ai-project-task-template-table__state-col { width: 7%; }

.ai-template-selected-list {
    display: flex;
    max-height: 78px;
    flex-wrap: wrap;
    gap: 6px;
    overflow-y: auto;
    padding-top: 8px;
}

.ai-template-selected-chip {
    display: inline-flex;
    min-width: 0;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    padding: 4px 5px 4px 11px;
    border: 1px solid #d5e9e5;
    border-radius: 999px;
    color: #28545b;
    background: #f1f8f6;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
}

.ai-template-selected-chip__group {
    color: #078f81;
    font-weight: 700;
}

.ai-template-selected-chip__remove {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: 0;
    color: #69868b;
    background: transparent;
    font-size: 10px;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.ai-template-selected-chip__remove:hover,
.ai-template-selected-chip__remove:focus {
    color: #fff;
    background: #6f8588;
}

.ai-context-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.ai-context-table > thead > tr > th {
    border: 0;
    vertical-align: middle;
}

.ai-context-table__headings th {
    height: 35px;
    padding: 9px 11px 5px !important;
    color: #315c63;
    background: #f2f8f6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.ai-context-table__filters th {
    padding: 5px 8px 8px !important;
    background: #f8fbfa;
}

.ai-context-filter {
    display: flex;
    height: 34px;
    margin: 0;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #d8e8e5;
    border-radius: 10px;
    color: #6d8d91;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ai-context-filter:focus-within {
    border-color: #70bfb2;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .08);
}

.ai-context-filter i {
    flex: 0 0 auto;
    color: #29a18f;
    font-size: 11px;
}

.ai-context-filter input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #214d55;
    background: transparent;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
}

.ai-context-filter input::placeholder {
    color: #9aabad;
}

.ai-context-filter-spacer {
    display: flex;
    height: 34px;
    align-items: center;
    padding: 0 10px;
    color: #a1b1b3;
    font-size: 9px;
    font-weight: 500;
}

.ai-context-table > tbody > tr > td {
    height: 43px;
    padding: 8px 11px;
    border-top: 0;
    border-bottom: 1px solid #edf3f1;
    vertical-align: middle;
}

.ai-context-table__row {
    cursor: pointer;
    transition: background-color .16s ease, box-shadow .16s ease;
}

.ai-context-table__row:hover,
.ai-context-table__row:focus {
    background: #eef8f5;
    box-shadow: inset 3px 0 0 #11a18e;
}

.ai-context-tag {
    display: inline-flex;
    max-width: 100%;
    min-height: 23px;
    align-items: center;
    overflow: hidden;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .16);
    white-space: nowrap;
}

.ai-context-tag--area {
    opacity: .92;
}

.ai-context-table__comment {
    display: block;
    overflow: hidden;
    color: #527076;
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-context-table__empty-value {
    color: #b5c2c4;
}

.ai-resource-chip__icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    margin-right: 5px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #078f81;
    background: #ddf3ef;
    font-size: 9px;
    vertical-align: middle;
}

.ai-resource-selected__chips md-chip {
    position: relative;
    padding-right: 35px !important;
}

.ai-resource-chip__remove {
    position: absolute;
    top: 3px;
    right: 4px;
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: 0;
    color: #69868b;
    background: transparent;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    transition: color .16s ease, background-color .16s ease;
}

.ai-resource-chip__remove:hover,
.ai-resource-chip__remove:focus {
    color: #fff;
    background: #6f8588;
}

.ai-resource-table__row--selected {
    background: #eef8f5;
    box-shadow: inset 3px 0 0 #11a18e;
}

.ai-resource-table__text,
.ai-resource-table__member {
    display: block;
    overflow: hidden;
    color: #456970;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-resource-table__member {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: #264f57;
    font-weight: 600;
}

.ai-resource-table__member > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-resource-table__member-icon {
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    border-radius: 8px;
    color: #789397;
    background: #f0f6f5;
    font-size: 10px;
}

.ai-resource-table__member-icon .fas {
    color: #078f81;
}

.ai-resource-table__state {
    text-align: center;
}

.ai-resource-table__state-pill {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e8e5;
    border-radius: 9px;
    color: #7e999d;
    background: #f7fbfa;
    font-size: 11px;
}

.ai-resource-table__state-pill.is-selected {
    border-color: #9fd8ce;
    color: #067a6e;
    background: #dff4ee;
}

.ai-project-task-template-table__group,
.ai-project-task-template-table__task {
    display: block;
    overflow: hidden;
    color: #456970;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-project-task-template-table__task {
    color: #264f57;
    font-weight: 600;
}

.ai-context-grid-footer {
    display: flex;
    min-height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 13px;
}

.ai-context-grid-footer__total {
    color: #668489;
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
}

.ai-context-pagination {
    margin: 0 !important;
    padding: 0 !important;
}

.ai-context-pagination > li > a,
.ai-context-pagination > li > span {
    min-width: 30px;
    height: 30px;
    padding: 6px 9px;
    border-color: #d8e8e5;
    color: #52757a;
    background: #fff;
    font-size: 9px;
    line-height: 16px;
}

.ai-context-pagination > .active > a,
.ai-context-pagination > .active > a:hover,
.ai-context-pagination > .active > span {
    border-color: #078f81;
    color: #fff;
    background: #078f81;
}

.ai-context-pagination > li:first-child > a,
.ai-context-pagination > li:first-child > span {
    border-radius: 9px 0 0 9px;
}

.ai-context-pagination > li:last-child > a,
.ai-context-pagination > li:last-child > span {
    border-radius: 0 9px 9px 0;
}

.ai-context-dialog__error:empty {
    display: none;
}

.ai-context-dialog__actions {
    min-height: 70px;
    flex: 0 0 70px;
    gap: 10px;
    box-sizing: border-box;
    padding: 13px 18px;
    border-top: 1px solid #deebe8;
    background: #fff;
}

.ai-context-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 20px !important;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.ai-context-button i {
    font-size: 13px;
}

.ai-context-button:hover,
.ai-context-button:focus {
    outline: none;
    box-shadow: 0 10px 24px rgba(7, 60, 63, .12);
    transform: translateY(-1px);
}

.ai-context-button--primary {
    border-color: #078f81 !important;
    color: #fff !important;
    background: #078f81 !important;
}

.ai-context-button--primary:hover,
.ai-context-button--primary:focus {
    border-color: #066f65 !important;
    background: #066f65 !important;
}

.ai-context-button--primary[disabled],
.ai-context-button--primary[disabled]:hover,
.ai-context-button--primary[disabled]:focus {
    border-color: #bfd3d0 !important;
    color: #819a9e !important;
    background: #e8f0ee !important;
    box-shadow: none;
    transform: none;
    cursor: default;
}

.ai-context-button--secondary {
    border-color: #cfe3df !important;
    color: #315b62 !important;
    background: #f5faf9 !important;
}

.ai-context-button--secondary:hover,
.ai-context-button--secondary:focus {
    border-color: #9bcac1 !important;
    color: #075e55 !important;
    background: #fff !important;
}

/* QUICK CUSTOMER / DISTRIBUTOR CREATION */

.ai-quick-entity-dialog {
    width: min(760px, calc(100vw - 36px));
    height: auto;
    max-width: 760px;
    max-height: calc(100vh - 36px);
}

.ai-quick-entity-dialog .ai-context-dialog__form {
    height: auto;
    max-height: calc(100vh - 36px);
}

.ai-quick-entity-dialog__content {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.ai-quick-entity-dialog__body {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
}

.ai-quick-entity-card {
    overflow: hidden;
    border: 1px solid #dceae7;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(7, 60, 63, .055);
}

.ai-quick-entity-card__heading {
    min-height: 56px;
    padding: 0 16px 0 0;
    border-bottom: 1px solid #e5efed;
    background: #fbfdfd;
}

.ai-quick-entity-card__heading .ai-context-section-heading__icon {
    width: 42px;
    height: 42px;
    border-radius: 0 12px 12px 0;
    font-size: 15px;
}

.ai-quick-entity-toggle {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid #cfe7e2;
    border-radius: 999px;
    outline: 0;
    color: #35676a;
    background: #f0f8f6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ai-quick-entity-toggle i {
    color: #078f81;
    font-size: 13px;
}

.ai-quick-entity-toggle:hover,
.ai-quick-entity-toggle:focus {
    border-color: #91c9bf;
    color: #075e55;
    background: #fff;
    box-shadow: 0 7px 18px rgba(7, 60, 63, .09);
    transform: translateY(-1px);
}

.ai-quick-entity-toggle[aria-expanded="true"] {
    border-color: #add8d0;
    color: #076e64;
    background: #e8f7f3;
}

.ai-quick-entity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px;
}

.ai-quick-entity-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.ai-quick-entity-field--wide {
    grid-column: 1 / -1;
}

.ai-quick-entity-field__label {
    display: flex;
    min-height: 15px;
    align-items: center;
    gap: 6px;
    color: #53777c;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.ai-quick-entity-field__label b,
.ai-quick-entity-required b {
    color: #078f81;
}

.ai-quick-entity-field__label small {
    padding: 2px 6px;
    border-radius: 999px;
    color: #839b9f;
    background: #eef4f3;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .045em;
}

.ai-quick-entity-field__control {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #d6e6e3;
    border-radius: 13px;
    background: #fbfdfd;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ai-quick-entity-field__control:focus-within {
    border-color: #67bbae;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .09);
}

.ai-quick-entity-field__control > i {
    display: inline-flex;
    width: 44px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    color: #078f81;
    background: #eef9f6;
    font-size: 14px;
}

.ai-quick-entity-field__control input,
.ai-quick-entity-field__control textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 0;
    outline: 0;
    color: #234d54;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
}

.ai-quick-entity-field__control input {
    height: 46px;
    padding: 0 14px;
}

.ai-quick-entity-field__control textarea {
    min-height: 80px;
    padding: 14px;
    line-height: 1.55;
    resize: vertical;
}

.ai-quick-entity-field__control input::placeholder,
.ai-quick-entity-field__control textarea::placeholder {
    color: #98aaad;
    font-weight: 400;
}

.ai-quick-entity-field__control--textarea {
    align-items: stretch;
}

.ai-quick-entity-field__control--textarea > i {
    min-height: 80px;
    align-items: flex-start;
    padding-top: 17px;
}

.ai-quick-entity-field__control--select {
    overflow: visible;
}

.ai-quick-entity-field__control--select md-select {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 0 12px;
}

.ai-quick-entity-field__control--select md-select .md-select-value {
    min-height: 46px;
    align-items: center;
    border-bottom: 0 !important;
    color: #234d54;
    font-size: 12px;
    font-weight: 500;
}

/* Angular Material appends select menus to body; keep this one above the
   modal backdrop, as in the activity dialog. */
.md-select-menu-container.ai-quick-entity-select-menu {
    z-index: 1210 !important;
}

.ai-quick-entity-field__clear {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    margin-right: 9px;
    border: 0;
    border-radius: 50%;
    outline: 0;
    color: #6d898d;
    background: transparent;
}

.ai-quick-entity-field__clear:hover,
.ai-quick-entity-field__clear:focus {
    color: #075e55;
    background: #eaf7f4;
}

.ai-quick-entity-dialog__error {
    margin-top: 12px;
}

.ai-quick-entity-required {
    color: #879b9e;
    font-size: 9px;
    font-weight: 600;
}

/* Project deletion confirmation */
.ai-project-delete-dialog {
    width: min(620px, calc(100vw - 36px));
    height: auto;
    max-width: 620px;
    max-height: min(720px, calc(100vh - 36px));
    background: #f8fbfb;
}

.ai-project-delete-dialog__toolbar::before {
    background: linear-gradient(90deg, #ef8c72 0%, #df5f63 48%, #b83f4a 100%);
}

.ai-project-delete-dialog__title-icon {
    border-color: #f3d5d6;
    color: #c4494e;
    background: #fff2f2;
}

.ai-project-delete-dialog__content {
    overflow-x: hidden;
    overflow-y: auto;
}

.ai-project-delete-dialog__body {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.ai-project-delete-warning {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px;
    border: 1px solid #f1d0d1;
    border-radius: 15px;
    background: linear-gradient(135deg, #fff8f7 0%, #fff1f1 100%);
}

.ai-project-delete-warning__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border-radius: 12px;
    color: #bf454b;
    background: #ffe3e3;
    font-size: 16px;
}

.ai-project-delete-warning h3 {
    margin: 1px 0 5px;
    color: #7f2e34;
    font-size: 14px;
    font-weight: 700;
}

.ai-project-delete-warning p {
    margin: 0;
    color: #76575a;
    font-size: 11px;
    line-height: 1.55;
}

.ai-project-delete-project {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border: 1px solid #dceae7;
    border-radius: 14px;
    background: #fff;
}

.ai-project-delete-project__icon {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    border-radius: 11px;
    color: #078f81;
    background: #eaf8f5;
}

.ai-project-delete-project > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.ai-project-delete-project small,
.ai-project-delete-field__label {
    color: #719095;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
}

.ai-project-delete-project strong {
    color: #214d55;
    font-size: 13px;
}

.ai-project-delete-project > div > span {
    overflow: hidden;
    color: #637d82;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-project-delete-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.ai-project-delete-field__label b {
    color: #a73d43;
}

.ai-project-delete-field__control {
    display: flex;
    min-height: 50px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cedfdb;
    border-radius: 13px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.ai-project-delete-field__control:focus-within {
    border-color: #d47376;
    box-shadow: 0 0 0 3px rgba(196, 73, 78, .1);
}

.ai-project-delete-field__control > i:first-child {
    display: inline-flex;
    width: 48px;
    height: 50px;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    color: #a9686b;
    background: #fff5f5;
}

.ai-project-delete-field__control input {
    min-width: 0;
    height: 48px;
    flex: 1 1 auto;
    padding: 0 13px;
    border: 0;
    outline: 0;
    color: #214d55;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
}

.ai-project-delete-field__control input::placeholder {
    color: #9badaf;
    font-weight: 400;
}

.ai-project-delete-field__control.is-invalid {
    border-color: #e2a7a9;
}

.ai-project-delete-field__control.is-valid {
    border-color: #72bfad;
    background: #fbfffe;
}

.ai-project-delete-field__valid {
    padding-right: 14px;
    color: #078f81;
}

.ai-project-delete-field > small {
    color: #7c9397;
    font-size: 10px;
    font-weight: 500;
}

.ai-project-delete-field > small.is-error {
    color: #bd494e;
}

.ai-project-delete-field > small.is-valid {
    color: #078f81;
}

.ai-project-delete-dialog__actions {
    min-height: 74px;
    flex: 0 0 74px;
}

.ai-project-delete-confirm:not([disabled]) {
    border-color: #c4474d;
    color: #fff;
    background: #c4474d;
}

.ai-project-delete-confirm:not([disabled]):hover,
.ai-project-delete-confirm:not([disabled]):focus {
    border-color: #a9393f;
    color: #fff;
    background: #a9393f;
}

.ai-project-delete-confirm[disabled] {
    border-color: #ecd9da;
    color: #bb9698;
    background: #faf4f4;
    opacity: 1;
}

@media (max-width: 767px) {
    .ai-project-planner-card {
        border-radius: 14px;
        padding: 14px;
    }

    .ai-project-planner-card__toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-project-planner-card__actions {
        flex-wrap: wrap;
    }

    .ai-project-planner-action {
        justify-content: center;
    }

    .ai-project-planner-preview figcaption {
        align-items: flex-end;
        flex-direction: column;
        gap: 3px;
    }

    .ai-activity-dialog {
        width: calc(100vw - 20px);
        min-width: 0;
        max-height: calc(100vh - 20px);
        border-radius: 15px;
    }

    .ai-activity-dialog__form {
        max-height: calc(100vh - 20px);
    }

    .ai-activity-dialog__toolbar .md-toolbar-tools {
        padding: 0 14px;
    }

    .ai-activity-dialog__body {
        gap: 10px;
        padding: 10px;
    }

    .ai-activity-section {
        padding: 14px;
    }

    .ai-activity-timing-grid,
    .ai-activity-options-grid {
        grid-template-columns: 1fr;
    }

    .ai-activity-layout {
        grid-template-columns: 1fr;
    }

    .ai-activity-dialog__actions {
        flex-wrap: wrap;
        padding: 9px 10px !important;
    }

    .ai-activity-button {
        min-width: 0;
        padding: 8px 12px;
    }

    .ai-context-dialog {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        border-radius: 18px;
    }

    .ai-context-dialog__toolbar .md-toolbar-tools {
        padding: 0 14px;
    }

    .ai-context-dialog__title small,
    .ai-context-grid-section__hint {
        display: none;
    }

    .ai-context-dialog__body {
        gap: 9px;
        padding: 10px;
    }

    .ai-context-selected {
        padding: 10px;
    }

    .ai-context-dialog__actions {
        min-height: 66px;
        flex: 0 0 66px;
        padding: 11px 13px;
    }

    .ai-quick-entity-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .ai-quick-entity-dialog .ai-context-dialog__form {
        max-height: calc(100vh - 20px);
    }

    .ai-project-delete-dialog {
        width: calc(100vw - 20px);
        height: auto;
        max-height: calc(100vh - 20px);
    }

    .ai-project-delete-dialog__body {
        padding: 12px;
    }

    .ai-project-delete-dialog__actions {
        min-height: 70px;
        flex: 0 0 70px;
        padding: 10px 12px;
    }

    .ai-project-delete-confirm {
        padding-right: 13px;
        padding-left: 13px;
    }

    .ai-quick-entity-card__heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px;
    }

    .ai-quick-entity-card__heading > div {
        width: 100%;
    }

    .ai-quick-entity-toggle {
        align-self: flex-end;
    }

    .ai-quick-entity-grid {
        grid-template-columns: 1fr;
        gap: 13px;
        padding: 14px;
    }

    .ai-quick-entity-field--wide {
        grid-column: auto;
    }

    .ai-quick-entity-required {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 920px) {
    .ai-activity-layout {
        grid-template-columns: minmax(285px, 330px) minmax(0, 1fr);
    }
}

/* Team members master data
   Two-stage management flow: inline table editing plus a complete resource card. */
.ai-team-member-dialog {
    width: min(1180px, calc(100vw - 44px));
    max-width: 1180px;
    max-height: calc(100vh - 46px);
}

.ai-team-member-dialog .ai-collect-dialog__form {
    max-height: calc(100vh - 46px);
}

.ai-team-member-dialog__body {
    padding: 18px 20px 20px;
}

.ai-team-member-steps {
    width: min(720px, 100%);
    margin-bottom: 14px;
}

.ai-team-member-steps .ai-collect-step[disabled] {
    cursor: default;
    opacity: 1;
}

.ai-team-member-card {
    padding: 20px 20px 0;
}

.ai-team-member-card__head {
    margin-bottom: 13px;
    padding-bottom: 14px;
}

.ai-team-member-card__head > div {
    min-width: 0;
    flex: 1 1 auto;
}

.ai-team-member-count {
    display: inline-flex;
    min-width: 92px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid #d7e9e5;
    border-radius: 12px;
    color: #087f72;
    background: #ecf8f5;
    font-size: 11px;
    font-weight: 700;
}

.ai-team-member-toolbar {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 3px 10px;
    color: #6e898d;
    font-size: 10px;
}

.ai-team-member-toolbar > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ai-team-member-toolbar > span i {
    color: #159788;
}

.ai-team-member-clear {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #d8e8e5;
    border-radius: 9px;
    outline: 0;
    color: #54787d;
    background: #fff;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.ai-team-member-clear:hover,
.ai-team-member-clear:focus {
    color: #087f72;
    border-color: #a8d7cf;
    background: #eef9f6;
}

.ai-team-member-loading {
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #658489;
    font-size: 12px;
}

.ai-team-member-loading i {
    color: #078f81;
    font-size: 18px;
}

.ai-team-member-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
    min-height: 300px;
    max-height: 390px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #deebe8;
    border-radius: 14px 14px 0 0;
}

.ai-team-member-table {
    min-width: 1040px;
}

.ai-team-member-table .team-col { width: 17%; }
.ai-team-member-table .member-col { width: 22%; }
.ai-team-member-table .profile-col { width: 18%; }
.ai-team-member-table .position-col { width: 21%; }
.ai-team-member-table .type-col { width: 10%; }
.ai-team-member-table .actions-col { width: 12%; }

.ai-team-member-table > tbody > tr > td {
    height: 54px;
    padding: 7px 8px;
}

.ai-team-member-row {
    cursor: default;
}

.ai-team-member-row.is-dirty {
    background: #f0faf7;
    box-shadow: inset 3px 0 0 #1bb497;
}

.ai-team-member-inline-control {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 9px;
    outline: 0;
    color: #355e65;
    background: transparent;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    text-overflow: ellipsis;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

select.ai-team-member-inline-control {
    padding-right: 20px;
    cursor: pointer;
}

.ai-team-member-inline-control:hover,
.ai-team-member-inline-control:focus {
    border-color: #c6e1dc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .06);
}

.ai-team-member-inline-name {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 3px;
}

.ai-team-member-inline-name .ai-resource-table__member-icon {
    flex: 0 0 27px;
}

.ai-team-member-type {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #dfeae8;
    border-radius: 999px;
    color: #748d91;
    background: #f6f9f8;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.ai-team-member-type.is-linked {
    color: #087f72;
    border-color: #bfe1d9;
    background: #e8f7f3;
}

.ai-team-member-actions {
    text-align: center;
    white-space: nowrap;
}

.ai-team-member-action {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    padding: 0;
    border: 1px solid #e2eae9;
    border-radius: 9px;
    outline: 0;
    color: #b4c1c2;
    background: #f7f9f9;
    font-size: 11px;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.ai-team-member-action.is-edit,
.ai-team-member-action.is-enabled {
    color: #087f72;
    border-color: #c7e2dc;
    background: #edf8f5;
    cursor: pointer;
}

.ai-team-member-action.is-edit:hover,
.ai-team-member-action.is-edit:focus,
.ai-team-member-action.is-enabled:hover,
.ai-team-member-action.is-enabled:focus {
    color: #fff;
    border-color: #078f81;
    background: #078f81;
    transform: translateY(-1px);
}

.ai-team-member-action[disabled] {
    cursor: default;
    opacity: .62;
}

.ai-team-member-grid-footer {
    min-height: 48px;
    margin: 0 -20px;
    padding-right: 20px;
    padding-left: 20px;
    border-top: 0;
}

.ai-team-member-detail {
    padding-bottom: 24px;
}

.ai-team-member-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 20px;
}

.ai-team-member-select {
    display: grid;
    min-height: 47px;
    align-items: center;
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    border: 1px solid #d7e7e4;
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ai-team-member-select:focus-within {
    border-color: #70bfb2;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .08);
}

.ai-team-member-select > i {
    color: #16988a;
    text-align: center;
}

.ai-team-member-select select {
    width: 100%;
    height: 43px;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #214d55;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
}

.ai-team-member-select button {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    outline: 0;
    color: #6e8a8e;
    background: transparent;
}

.ai-team-member-select button:hover:not(:disabled),
.ai-team-member-select button:focus:not(:disabled) {
    color: #075e55;
    background: #e9f7f4;
}

.ai-team-member-select button:disabled {
    opacity: .28;
}

.ai-team-member-link-state {
    display: grid;
    align-items: center;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 13px;
    margin-top: 20px;
    padding: 13px 15px;
    border: 1px solid #cce7e1;
    border-radius: 14px;
    background: #eff9f6;
}

.ai-team-member-link-state__icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #078f81;
    border-radius: 12px;
    background: #daf2ec;
}

.ai-team-member-link-state small,
.ai-team-member-link-state strong,
.ai-team-member-link-state p {
    display: block;
}

.ai-team-member-link-state small {
    color: #078f81;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-team-member-link-state strong {
    margin: 2px 0;
    color: #234f56;
    font-size: 11px;
}

.ai-team-member-link-state p {
    margin: 0;
    color: #70888c;
    font-size: 10px;
}

.ai-team-member-dialog__actions .ai-activity-button--danger {
    margin-left: 0;
}

/* Areas of responsibility master data
   Reuses the resource-management flow with a clearer color and ordering model. */
.ai-aor-table {
    min-width: 760px;
}

.ai-aor-table .name-col { width: 48%; }
.ai-aor-table .order-col { width: 13%; }
.ai-aor-table .color-col { width: 23%; }
.ai-aor-table .actions-col { width: 16%; }

.ai-aor-code {
    color: #087f72;
    font-weight: 700;
    letter-spacing: .025em;
}

.ai-aor-order {
    text-align: center;
}

.ai-aor-row-icon {
    color: #075e55;
    background: #e7f5f1;
}

.ai-aor-color-control {
    display: grid;
    min-width: 0;
    align-items: center;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 4px;
}

.ai-aor-color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-radius: 7px;
    box-shadow: 0 0 0 1px #ccdfdc, 0 3px 8px rgba(30, 77, 82, .12);
}

.ai-aor-field-wide {
    grid-column: 1 / -1;
}

.ai-aor-detail-color > i {
    border: 1px solid #d9ebe7;
    background: #fff;
}

.ai-aor-detail .ai-collect-field__control--textarea textarea {
    min-height: 92px;
}

/* Context master data
   Wider than the other master-data dialogs because usage and responsibility are operational data. */
.ai-context-master-dialog {
    width: min(1480px, calc(100vw - 32px));
    max-width: 1480px;
}

.ai-context-master-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-context-master-dialog .ai-team-member-steps {
    width: min(760px, 100%);
}

.ai-context-master-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-context-master-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
}

.ai-context-master-table {
    min-width: 1340px;
}

.ai-context-master-table .group-col { width: 13%; }
.ai-context-master-table .context-col { width: 18%; }
.ai-context-master-table .task-col { width: 7%; }
.ai-context-master-table .project-col { width: 8%; }
.ai-context-master-table .aor-col { width: 19%; }
.ai-context-master-table .order-col { width: 7%; }
.ai-context-master-table .color-col { width: 14%; }
.ai-context-master-table .actions-col { width: 14%; }

.ai-context-master-row-icon {
    color: #087f72;
    background: #e9f7f3;
}

.ai-context-master-use-cell {
    text-align: center;
}

.ai-context-master-use {
    display: inline-flex;
    min-width: 48px;
    height: 28px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid #dce8e6;
    border-radius: 999px;
    outline: 0;
    color: #84989b;
    background: #f6f9f8;
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.ai-context-master-use i {
    font-size: 9px;
    opacity: .36;
}

.ai-context-master-use.is-active {
    color: #087f72;
    border-color: #b9dfd7;
    background: #e8f7f3;
}

.ai-context-master-use.is-active i {
    opacity: 1;
}

.ai-context-master-use:hover,
.ai-context-master-use:focus {
    border-color: #71bfb3;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .07);
}

.ai-context-master-aor {
    display: inline-flex;
    max-width: 100%;
    min-height: 28px;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    overflow: hidden;
    border: 1px solid #dfeae8;
    border-radius: 999px;
    color: #476b70;
    background: #f6f9f8;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.ai-context-master-aor i {
    flex: 0 0 auto;
    color: var(--aor-color);
    font-size: 8px;
}

.ai-context-master-aor span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-context-master-aor.is-empty {
    color: #93a5a7;
}

.ai-context-master-aor.is-empty i {
    color: #a7b6b7;
}

.ai-context-master-order {
    text-align: center;
}

.ai-context-master-detail {
    padding-bottom: 22px;
}

.ai-context-master-form-grid {
    gap: 15px 20px;
}

.ai-context-master-usage-card {
    display: grid;
    min-height: 72px;
    align-items: center;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid #dae8e5;
    border-radius: 14px;
    outline: 0;
    color: #70898d;
    background: #f8faf9;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.ai-context-master-usage-card > span {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #7d9699;
    background: #edf2f1;
    font-size: 17px;
}

.ai-context-master-usage-card small,
.ai-context-master-usage-card strong,
.ai-context-master-usage-card em {
    display: block;
}

.ai-context-master-usage-card small {
    color: #849b9f;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-context-master-usage-card strong {
    margin: 2px 0;
    color: #365f66;
    font-size: 11px;
}

.ai-context-master-usage-card em {
    overflow: hidden;
    font-size: 9px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-context-master-usage-card > i {
    color: #9aabad;
    font-size: 21px;
}

.ai-context-master-usage-card.is-active {
    color: #54777b;
    border-color: #b9ddd6;
    background: #eff9f6;
    box-shadow: 0 5px 16px rgba(23, 99, 91, .06);
}

.ai-context-master-usage-card.is-active > span {
    color: #087f72;
    background: #dff3ee;
}

.ai-context-master-usage-card.is-active > i,
.ai-context-master-usage-card.is-active small {
    color: #078f81;
}

.ai-context-master-small-fields {
    display: grid;
    grid-template-columns: .72fr 1.28fr;
    gap: 14px;
}

.ai-context-master-field-wide {
    grid-column: 1 / -1;
}

.ai-context-master-field-wide textarea {
    min-height: 92px;
}

.ai-context-master-notice-host {
    right: 28px;
    top: 78px;
}

/* Project status master data
   Uses the same two-stage master flow and shares the project-list grouping dropdown. */
.ai-project-status-dialog {
    width: min(1320px, calc(100vw - 36px));
    max-width: 1320px;
}

.ai-project-status-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-status-dialog .ai-team-member-steps {
    width: min(760px, 100%);
}

.ai-project-status-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-status-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
}

.ai-project-status-table {
    min-width: 1160px;
}

.ai-project-status-table .group-col { width: 15%; }
.ai-project-status-table .status-col { width: 18%; }
.ai-project-status-table .order-col { width: 7%; }
.ai-project-status-table .main-col { width: 8%; }
.ai-project-status-table .review-col { width: 14%; }
.ai-project-status-table .grouping-col { width: 24%; }
.ai-project-status-table .actions-col { width: 14%; }

.ai-project-status-row-icon {
    color: #087f72;
    background: #e9f7f3;
}

.ai-project-status-order {
    text-align: center;
}

.ai-project-status-flag-cell,
.ai-project-status-review-cell {
    text-align: center;
}

.ai-project-status-review-cell {
    white-space: nowrap;
}

.ai-project-status-review-cell > label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0 0 0 5px;
    color: #789094;
    font-size: 8px;
    font-weight: 700;
}

.ai-project-status-review-cell input {
    width: 38px;
    height: 28px;
    padding: 0 4px;
    border: 1px solid #d9e8e5;
    border-radius: 8px;
    outline: 0;
    color: #355e65;
    background: #fff;
    text-align: center;
    font-size: 9px;
}

.ai-project-status-review-cell input:focus {
    border-color: #70bfb2;
    box-shadow: 0 0 0 3px rgba(7, 143, 129, .07);
}

.ai-project-status-grouping {
    color: #245860;
    font-weight: 650;
}

.ai-project-status-detail {
    padding-bottom: 22px;
}

.ai-project-status-form-grid {
    gap: 15px 20px;
}

.ai-project-status-grouping-field {
    grid-column: 1 / -1;
}

.ai-project-status-grouping-field > small {
    display: block;
    margin-top: 6px;
    color: #789094;
    font-size: 9px;
}

.ai-project-status-select-end {
    display: inline-flex;
    width: 29px;
    height: 29px;
    align-items: center;
    justify-content: center;
    color: #6e8a8e;
    pointer-events: none;
}

.ai-project-status-small-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ai-project-status-field-wide {
    grid-column: 1 / -1;
}

.ai-project-status-field-wide textarea {
    min-height: 92px;
}

.ai-project-status-notice-host {
    right: 28px;
    top: 78px;
}

/* Project status group master data
   Compact two-stage editor for the blocks that organize project states. */
.ai-project-status-group-dialog {
    width: min(1120px, calc(100vw - 36px));
    max-width: 1120px;
}

.ai-project-status-group-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-status-group-dialog .ai-team-member-steps {
    width: min(720px, 100%);
}

.ai-project-status-group-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-status-group-table-wrap {
    height: clamp(285px, calc(100vh - 490px), 380px);
}

.ai-project-status-group-table {
    min-width: 820px;
}

.ai-project-status-group-table .name-col { width: 37%; }
.ai-project-status-group-table .order-col { width: 14%; }
.ai-project-status-group-table .icon-col { width: 31%; }
.ai-project-status-group-table .actions-col { width: 18%; }

.ai-project-status-group-row-icon {
    color: #087f72;
    background: #e9f7f3;
}

.ai-project-status-group-order {
    text-align: center;
}

.ai-project-status-group-icon-editor .ai-resource-table__member-icon {
    flex: 0 0 auto;
}

.ai-project-status-group-detail {
    padding-bottom: 24px;
}

.ai-project-status-group-form-grid {
    align-items: start;
    gap: 16px 20px;
}

.ai-project-status-group-name-field,
.ai-project-status-group-preview {
    grid-column: 1 / -1;
}

.ai-project-status-group-preview {
    display: grid;
    min-height: 82px;
    align-items: center;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    padding: 14px 16px;
    border: 1px solid #dcebe8;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7fcfa 0%, #eef8f6 100%);
}

.ai-project-status-group-preview > span {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cfe8e2;
    border-radius: 13px;
    color: #078f81;
    background: #fff;
    font-size: 19px;
}

.ai-project-status-group-preview small,
.ai-project-status-group-preview strong,
.ai-project-status-group-preview em {
    display: block;
}

.ai-project-status-group-preview small {
    margin-bottom: 3px;
    color: #078f81;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .1em;
}

.ai-project-status-group-preview strong {
    overflow: hidden;
    color: #173f46;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-project-status-group-preview em {
    margin-top: 3px;
    color: #789094;
    font-size: 10px;
    font-style: normal;
}

.ai-project-status-group-notice-host {
    right: 28px;
    top: 78px;
}

/* Project type master data
   Two-stage catalog editor with fast color and ordering controls. */
.ai-project-type-dialog {
    width: min(1160px, calc(100vw - 36px));
    max-width: 1160px;
}

.ai-project-type-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-type-dialog .ai-team-member-steps {
    width: min(720px, 100%);
}

.ai-project-type-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-project-type-table-wrap {
    height: clamp(285px, calc(100vh - 490px), 380px);
}

.ai-project-type-table {
    min-width: 850px;
}

.ai-project-type-table .name-col { width: 39%; }
.ai-project-type-table .order-col { width: 14%; }
.ai-project-type-table .color-col { width: 29%; }
.ai-project-type-table .actions-col { width: 18%; }

.ai-project-type-row-icon {
    background: #edf8f5;
}

.ai-project-type-order {
    text-align: center;
}

.ai-project-type-color-editor {
    gap: 9px;
}

.ai-project-type-color-swatch {
    display: inline-block;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #d8e7e4;
}

.ai-project-type-detail {
    padding-bottom: 22px;
}

.ai-project-type-form-grid {
    align-items: start;
    gap: 15px 20px;
}

.ai-project-type-name-field,
.ai-project-type-comment-field,
.ai-project-type-preview {
    grid-column: 1 / -1;
}

.ai-project-type-color-control i {
    text-shadow: 0 0 0 #cfe0dd;
}

.ai-project-type-form-grid .ai-collect-field > small {
    display: block;
    margin-top: 6px;
    color: #789094;
    font-size: 9px;
}

.ai-project-type-comment-field textarea {
    min-height: 90px;
}

.ai-project-type-preview {
    display: grid;
    min-height: 78px;
    align-items: center;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    padding: 13px 16px;
    border: 1px solid #dcebe8;
    border-left-width: 4px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fcfb 0%, #eff8f6 100%);
}

.ai-project-type-preview > span {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e9e5;
    border-radius: 13px;
    background: #fff;
    font-size: 19px;
}

.ai-project-type-preview small,
.ai-project-type-preview strong,
.ai-project-type-preview em {
    display: block;
}

.ai-project-type-preview small {
    margin-bottom: 3px;
    color: #078f81;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .1em;
}

.ai-project-type-preview strong {
    overflow: hidden;
    color: #173f46;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-project-type-preview em {
    margin-top: 3px;
    color: #789094;
    font-size: 10px;
    font-style: normal;
}

.ai-project-type-notice-host {
    right: 28px;
    top: 78px;
}

/* Project task templates
   Keeps the operational template, task and responsibility data visible in one compact master grid. */
.ai-task-template-dialog {
    width: min(1280px, calc(100vw - 40px));
    max-width: 1280px;
}

.ai-task-template-dialog .ai-team-member-steps {
    width: min(760px, 100%);
}

.ai-task-template-table {
    min-width: 1120px;
}

.ai-task-template-table .group-col { width: 18%; }
.ai-task-template-table .task-col { width: 32%; }
.ai-task-template-table .aor-col { width: 25%; }
.ai-task-template-table .order-col { width: 9%; }
.ai-task-template-table .actions-col { width: 16%; }

.ai-task-template-row-icon {
    color: #087f72;
    background: #e8f7f3;
}

.ai-task-template-task {
    color: #234f56;
    font-weight: 600;
}

.ai-task-template-aor {
    display: inline-flex;
    max-width: 100%;
    min-height: 29px;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    overflow: hidden;
    border: 1px solid #dce9e7;
    border-radius: 999px;
    color: #466b70;
    background: #f6f9f8;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.ai-task-template-aor i {
    flex: 0 0 auto;
    color: var(--task-template-aor-color);
    font-size: 8px;
}

.ai-task-template-aor span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-task-template-aor.is-empty {
    color: #93a5a7;
}

.ai-task-template-order {
    text-align: center;
}

.ai-task-template-detail {
    padding-bottom: 22px;
}

.ai-task-template-form-grid {
    gap: 15px 20px;
}

.ai-task-template-field-wide {
    grid-column: 1 / -1;
}

.ai-task-template-summary {
    display: grid;
    align-items: center;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #cce7e1;
    border-radius: 14px;
    background: #eff9f6;
}

.ai-task-template-summary > span {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #087f72;
    background: #d9f1eb;
    font-size: 17px;
}

.ai-task-template-summary small,
.ai-task-template-summary strong,
.ai-task-template-summary p {
    display: block;
}

.ai-task-template-summary small {
    color: #078f81;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.ai-task-template-summary strong {
    margin: 2px 0 3px;
    color: #234f56;
    font-size: 11px;
}

.ai-task-template-summary p {
    margin: 0;
    color: #6c888c;
    font-size: 10px;
}

.ai-task-template-notice-host {
    right: 28px;
    top: 78px;
}

/* Task activity templates
   Gives the reusable activity text enough room in both the catalogue and the full editor. */
.ai-activity-template-dialog {
    width: min(980px, calc(100vw - 40px));
    max-width: 980px;
}

.ai-activity-template-dialog .ai-team-member-steps {
    width: min(780px, 100%);
}

.ai-activity-template-table {
    min-width: 820px;
}

.ai-activity-template-table .group-col { width: 29%; }
.ai-activity-template-table .template-col { width: 38%; }
.ai-activity-template-table .order-col { width: 13%; }
.ai-activity-template-table .actions-col { width: 20%; }

.ai-activity-template-table > tbody > tr > td {
    height: 54px;
    padding: 7px 8px;
    vertical-align: middle;
}

.ai-activity-template-row-icon {
    color: #087f72;
    background: #e8f7f3;
}

.ai-activity-template-name {
    color: #234f56;
    font-weight: 650;
}

.ai-activity-template-order {
    text-align: center;
}

.ai-activity-template-detail {
    padding-bottom: 22px;
}

.ai-activity-template-form-grid {
    gap: 15px 20px;
}

.ai-activity-template-field-wide {
    grid-column: 1 / -1;
}

.ai-activity-template-description .ai-collect-field__control--textarea {
    align-items: flex-start;
}

.ai-activity-template-description {
    width: 100%;
    justify-self: start;
}

.ai-activity-template-description .ai-collect-field__control--textarea > i {
    padding-top: 16px;
}

.ai-activity-template-description textarea {
    min-height: 282px;
    max-height: 42vh;
    padding-top: 13px;
    padding-bottom: 13px;
    line-height: 1.55;
    resize: vertical;
}

.ai-activity-template-description__hint {
    display: block;
    margin-top: 6px;
    color: #7b9397;
    font-size: 9px;
}

.ai-activity-template-notice-host {
    right: 28px;
    top: 78px;
}

/* Customers and distributors
   Shared two-stage catalogue with compact inline editing and a complete record card. */
.ai-party-master-dialog {
    width: min(1160px, calc(100vw - 36px));
    max-width: 1160px;
}

.ai-party-master-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-party-master-dialog .ai-team-member-steps {
    width: min(760px, 100%);
}

.ai-party-master-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-party-master-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
}

.ai-party-master-table {
    min-width: 960px;
}

.ai-party-master-table .code-col { width: 13%; }
.ai-party-master-table .name-col { width: 28%; }
.ai-party-master-table .legal-col { width: 20%; }
.ai-party-master-table .type-col { width: 23%; }
.ai-party-master-table .actions-col { width: 16%; }

.ai-party-row-icon {
    color: #087f72;
    background: #e8f7f3;
}

.ai-party-code {
    text-transform: uppercase;
}

.ai-party-master-detail {
    padding-bottom: 24px;
}

.ai-party-master-form-grid {
    align-items: start;
    gap: 16px 20px;
}

.ai-party-name-field,
.ai-party-comment-field {
    grid-column: 1 / -1;
}

.ai-party-comment-field textarea {
    min-height: 104px;
}

/* Objectives
   Compact perspective catalogue with the same list/detail interaction used by other masters. */
.ai-objective-master-dialog {
    width: min(1040px, calc(100vw - 36px));
    max-width: 1040px;
}

.ai-objective-master-dialog .ai-team-member-steps {
    width: min(720px, 100%);
}

.ai-objective-master-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
}

.ai-objective-master-table {
    min-width: 780px;
}

.ai-objective-master-table .name-col { width: 48%; }
.ai-objective-master-table .order-col { width: 14%; }
.ai-objective-master-table .active-col { width: 20%; }
.ai-objective-master-table .actions-col { width: 18%; }

.ai-objective-row-icon {
    color: #087f72;
    background: #e8f7f3;
}

.ai-objective-order {
    text-align: center;
}

.ai-objective-master-detail {
    padding-bottom: 24px;
}

.ai-objective-master-form-grid {
    align-items: start;
    gap: 16px 20px;
}

.ai-objective-name-field,
.ai-objective-comment-field {
    grid-column: 1 / -1;
}

.ai-objective-comment-field textarea {
    min-height: 112px;
}

/* Teams and work profiles
   Final master-data catalogues: compact inline editing plus a complete record form. */
.ai-team-master-dialog {
    width: min(1100px, calc(100vw - 40px));
    max-width: 1100px;
}

.ai-team-master-dialog__body,
.ai-team-profile-dialog__body {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-team-master-dialog .ai-team-member-steps,
.ai-team-profile-dialog .ai-team-member-steps {
    width: min(760px, 100%);
}

.ai-team-master-card,
.ai-team-profile-card {
    padding-right: 18px;
    padding-left: 18px;
}

.ai-team-master-table-wrap,
.ai-team-profile-table-wrap {
    height: clamp(300px, calc(100vh - 490px), 390px);
}

.ai-team-master-table {
    min-width: 760px;
}

.ai-team-master-table .code-col { width: 19%; }
.ai-team-master-table .name-col { width: 48%; }
.ai-team-master-table .order-col { width: 13%; }
.ai-team-master-table .actions-col { width: 20%; }

.ai-team-master-code {
    color: #087f72;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.ai-team-master-order,
.ai-team-profile-number {
    text-align: left;
}

.ai-team-master-table > thead > tr > th,
.ai-team-master-table > tbody > tr > td,
.ai-team-master-table .ai-team-member-actions {
    text-align: left;
}

.ai-team-master-row-icon {
    color: #087f72;
    background: #e8f7f3;
}

.ai-team-master-detail,
.ai-team-profile-detail {
    padding-bottom: 24px;
}

.ai-team-master-form-grid,
.ai-team-profile-form-grid {
    align-items: start;
    gap: 16px 20px;
}

.ai-team-master-name-field,
.ai-team-master-comment-field,
.ai-team-profile-team-field,
.ai-team-profile-comment-field {
    grid-column: 1 / -1;
}

.ai-team-master-comment-field textarea,
.ai-team-profile-comment-field textarea {
    min-height: 108px;
}

.ai-team-profile-dialog {
    width: min(1480px, calc(100vw - 30px));
    max-width: 1480px;
}

.ai-team-profile-table {
    min-width: 1210px;
}

.ai-team-profile-table .team-col { width: 19%; }
.ai-team-profile-table .code-col { width: 10%; }
.ai-team-profile-table .name-col { width: 21%; }
.ai-team-profile-table .order-col { width: 8%; }
.ai-team-profile-table .cost-col { width: 11%; }
.ai-team-profile-table .actions-col { width: 20%; }

.ai-team-profile-table > thead > tr > th,
.ai-team-profile-table > tbody > tr > td,
.ai-team-profile-table .ai-team-profile-number,
.ai-team-profile-table .ai-team-member-actions {
    text-align: left;
}

.ai-team-profile-team {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: #355e65;
    font-size: 10px;
    font-weight: 600;
}

.ai-team-profile-team .ai-resource-table__member-icon {
    flex: 0 0 29px;
}

.ai-team-profile-team > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-team-member-select.is-readonly {
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    background: #f5f8f7;
}

.ai-team-member-select.is-readonly select {
    color: #56777c;
    cursor: default;
    opacity: 1;
    -webkit-text-fill-color: #56777c;
}

.ai-team-member-select > span {
    color: #8aa2a5;
    text-align: center;
}

.ai-team-profile-team-field > small {
    display: block;
    margin-top: 6px;
    color: #789095;
    font-size: 9px;
}

.ai-team-master-notice-host,
.ai-team-profile-notice-host {
    right: 22px;
    top: 84px;
}

@media (max-width: 820px) {
    .ai-team-member-dialog {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }

    .ai-team-member-dialog .ai-collect-dialog__form {
        max-height: calc(100vh - 18px);
    }

    .ai-team-member-dialog__body {
        padding: 14px;
    }

    .ai-team-member-form-grid {
        grid-template-columns: 1fr;
    }

    .ai-activity-template-field-wide {
        grid-column: auto;
    }

    .ai-activity-template-description textarea {
        min-height: 240px;
    }


    .ai-team-member-card__head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .ai-team-member-count {
        margin-left: 69px;
    }

    .ai-team-member-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .ai-context-master-dialog {
        width: calc(100vw - 18px);
    }

    .ai-context-master-small-fields {
        grid-template-columns: 1fr;
    }

    .ai-context-master-field-wide {
        grid-column: auto;
    }

    .ai-project-status-dialog {
        width: calc(100vw - 18px);
    }

    .ai-project-status-grouping-field,
    .ai-project-status-field-wide {
        grid-column: auto;
    }

    .ai-project-status-small-fields {
        grid-template-columns: 1fr;
    }

    .ai-project-status-group-dialog {
        width: calc(100vw - 18px);
    }

    .ai-project-status-group-name-field,
    .ai-project-status-group-preview {
        grid-column: auto;
    }

    .ai-project-type-dialog {
        width: calc(100vw - 18px);
    }

    .ai-project-type-name-field,
    .ai-project-type-comment-field,
    .ai-project-type-preview {
        grid-column: auto;
    }

    .ai-task-template-dialog {
        width: calc(100vw - 18px);
    }

    .ai-task-template-field-wide {
        grid-column: auto;
    }

    .ai-party-master-dialog,
    .ai-objective-master-dialog {
        width: calc(100vw - 18px);
    }

    .ai-party-name-field,
    .ai-party-comment-field,
    .ai-objective-name-field,
    .ai-objective-comment-field {
        grid-column: auto;
    }

    .ai-team-master-dialog,
    .ai-team-profile-dialog {
        width: calc(100vw - 18px);
    }

    .ai-team-master-name-field,
    .ai-team-master-comment-field,
    .ai-team-profile-team-field,
    .ai-team-profile-comment-field {
        grid-column: auto;
    }
}
