/*
 * W3 Net Certification Cycle Dashboard
 * Version 2.5.17
 *
 * Every active Application is represented once under the next required
 * certification action. The layout uses W3 Net's sharp enterprise design and
 * adapts from desktop to tablet and phone without page-level overflow.
 */

.w3net-cycle-overview {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding: 22px;
    background: var(--w3-surface);
    border: 1px solid var(--w3-border);
    border-radius: var(--w3-radius);
    box-shadow: var(--w3-shadow);
}

.w3net-cycle-heading,
.w3net-cycle-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
}

.w3net-cycle-heading {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--w3-border);
}

.w3net-cycle-heading > div:first-child,
.w3net-cycle-panel-header > div:first-child {
    min-width: 0;
}

.w3net-cycle-heading h2,
.w3net-cycle-panel-header h3,
.w3net-cycle-group h4 {
    margin: 0;
    color: var(--w3-heading);
}

.w3net-cycle-heading h2 {
    font-size: clamp(1.35rem, 1.8vw, 1.8rem);
    line-height: 1.2;
}

.w3net-cycle-heading p,
.w3net-cycle-panel-header p {
    margin: 7px 0 0;
    color: var(--w3-muted);
    line-height: 1.5;
}

.w3net-cycle-eyebrow {
    margin: 0 0 6px !important;
    color: #167d72 !important;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.w3net-cycle-heading-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    color: var(--w3-muted);
    font-size: 0.78rem;
}

.w3net-cycle-heading-meta > span {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 6px 9px;
    background: var(--w3-surface-2);
    border: 1px solid var(--w3-border);
}

.w3net-cycle-heading-meta > span.is-warning {
    color: #8f5d10;
    background: var(--w3-warning-soft);
    border-color: rgba(242, 184, 91, 0.36);
}

.w3net-cycle-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 11px;
    min-width: 0;
}

.w3net-cycle-summary-card {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
    min-height: 124px;
    padding: 15px 16px;
    color: var(--w3-text);
    background: #f8fafc;
    border: 1px solid var(--w3-border);
    border-left: 4px solid #8ea3b9;
    border-radius: var(--w3-radius);
    text-decoration: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.w3net-cycle-summary-card:hover,
.w3net-cycle-summary-card:focus-visible {
    color: var(--w3-text);
    border-color: rgba(41, 160, 215, 0.62);
    box-shadow: 0 12px 24px rgba(15, 35, 66, 0.09);
    transform: translateY(-1px);
    text-decoration: none;
}

.w3net-cycle-summary-label {
    color: var(--w3-muted);
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.35;
}

.w3net-cycle-summary-card > strong {
    color: var(--w3-heading);
    font-size: clamp(1.55rem, 1.8vw, 2.05rem);
    line-height: 1;
}

.w3net-cycle-summary-card > small {
    color: var(--w3-muted);
    font-size: 0.7rem;
    line-height: 1.38;
}

.w3net-cycle-summary-card.is-primary {
    background: linear-gradient(180deg, #fff 0%, #f1fbfa 100%);
    border-left-color: var(--w3-primary);
}

.w3net-cycle-summary-card.is-danger {
    background: linear-gradient(180deg, #fff 0%, #fff5f7 100%);
    border-left-color: var(--w3-danger);
}

.w3net-cycle-summary-card.is-blocked {
    background: linear-gradient(180deg, #fff 0%, #fff8ed 100%);
    border-left-color: #d77b1e;
}

.w3net-cycle-summary-card.is-warning {
    background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
    border-left-color: var(--w3-warning);
}

.w3net-cycle-summary-card.is-success {
    background: linear-gradient(180deg, #fff 0%, #f2fbf7 100%);
    border-left-color: var(--w3-success);
}

.w3net-cycle-summary-card.is-neutral {
    background: linear-gradient(180deg, #fff 0%, #f5f8fb 100%);
    border-left-color: var(--w3-primary-2);
}

.w3net-cycle-panel {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--w3-border);
    border-radius: var(--w3-radius);
}

.w3net-cycle-panel-header {
    padding: 16px 18px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--w3-border);
}

.w3net-cycle-panel-header h3 {
    font-size: 1.02rem;
}

.w3net-cycle-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 10px;
    color: var(--w3-heading);
    background: #fff;
    border: 1px solid var(--w3-border);
    font-size: 0.75rem;
    font-weight: 750;
    text-decoration: none;
}

.w3net-cycle-clear:hover,
.w3net-cycle-clear:focus-visible {
    color: #fff;
    background: var(--w3-primary-2);
    border-color: var(--w3-primary-2);
    text-decoration: none;
}

.w3net-cycle-groups {
    display: grid;
    gap: 15px;
    padding: 17px;
}

.w3net-cycle-group {
    min-width: 0;
}

.w3net-cycle-group + .w3net-cycle-group {
    padding-top: 14px;
    border-top: 1px solid var(--w3-border);
}

.w3net-cycle-group h4 {
    margin-bottom: 9px;
    color: var(--w3-muted);
    font-size: 0.72rem;
    font-weight: 830;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.w3net-cycle-stage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    min-width: 0;
}

.w3net-cycle-stage-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name count"
        "flags flags";
    gap: 8px 12px;
    min-width: 0;
    min-height: 86px;
    padding: 13px 14px;
    color: var(--w3-text);
    background: #fff;
    border: 1px solid var(--w3-border);
    border-left: 4px solid #a3b3c4;
    border-radius: var(--w3-radius);
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.w3net-cycle-stage-card:hover,
.w3net-cycle-stage-card:focus-visible {
    color: var(--w3-text);
    border-color: rgba(41, 160, 215, 0.62);
    box-shadow: 0 9px 20px rgba(15, 35, 66, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
}

.w3net-cycle-stage-card.has-records {
    border-left-color: var(--w3-primary-2);
    background: #f8fcff;
}

.w3net-cycle-stage-card.is-selected {
    border-color: var(--w3-primary-2);
    outline: 3px solid rgba(41, 160, 215, 0.14);
}

.w3net-cycle-stage-card.is-empty {
    background: #fbfcfd;
    opacity: 0.82;
}

.w3net-cycle-stage-name {
    grid-area: name;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--w3-heading);
    font-size: 0.82rem;
    font-weight: 760;
    line-height: 1.35;
}

.w3net-cycle-stage-card > strong {
    grid-area: count;
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
    color: #126d64;
    background: var(--w3-primary-soft);
    border: 1px solid rgba(38, 198, 180, 0.22);
    font-size: 0.96rem;
    font-weight: 850;
}

.w3net-cycle-stage-flags {
    grid-area: flags;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-wrap: wrap;
}

.w3net-cycle-stage-flags em {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 3px 6px;
    color: var(--w3-muted);
    background: var(--w3-surface-2);
    border: 1px solid var(--w3-border);
    font-size: 0.64rem;
    font-style: normal;
    font-weight: 690;
    line-height: 1.25;
}

.w3net-cycle-stage-flags em.is-overdue {
    color: #aa3140;
    background: var(--w3-danger-soft);
    border-color: rgba(236, 93, 108, 0.28);
}

.w3net-cycle-stage-flags em.is-blocked {
    color: #a15c0d;
    background: #fff3df;
    border-color: #efc786;
}

.w3net-cycle-stage-flags em.is-due-soon {
    color: #8f6118;
    background: var(--w3-warning-soft);
    border-color: rgba(242, 184, 91, 0.34);
}

.w3net-cycle-filter-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.w3net-cycle-filter-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 7px 10px;
    color: var(--w3-heading);
    background: #fff;
    border: 1px solid var(--w3-border);
    font-size: 0.73rem;
    font-weight: 750;
    text-decoration: none;
}

.w3net-cycle-filter-bar a:hover,
.w3net-cycle-filter-bar a:focus-visible,
.w3net-cycle-filter-bar a.is-active {
    color: #fff;
    background: var(--w3-primary-2);
    border-color: var(--w3-primary-2);
    text-decoration: none;
}

.w3net-cycle-filter-bar a.is-active.is-danger {
    background: var(--w3-danger);
    border-color: var(--w3-danger);
}

.w3net-cycle-filter-bar a.is-active.is-warning {
    color: #5b3b08;
    background: var(--w3-warning);
    border-color: var(--w3-warning);
}

.w3net-cycle-filter-bar a.is-active.is-blocked {
    background: #d77b1e;
    border-color: #d77b1e;
}

.w3net-cycle-table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.w3net-cycle-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    table-layout: fixed;
}

.w3net-cycle-table th,
.w3net-cycle-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--w3-border);
    vertical-align: top;
    text-align: left;
    overflow-wrap: anywhere;
}

.w3net-cycle-table th {
    color: var(--w3-heading);
    background: #f5f8fb;
    font-size: 0.71rem;
    font-weight: 820;
}

.w3net-cycle-table th:nth-child(1) { width: 23%; }
.w3net-cycle-table th:nth-child(2) { width: 17%; }
.w3net-cycle-table th:nth-child(3) { width: 31%; }
.w3net-cycle-table th:nth-child(4) { width: 16%; }
.w3net-cycle-table th:nth-child(5) { width: 13%; }

.w3net-cycle-table tbody tr:last-child td { border-bottom: 0; }
.w3net-cycle-row.is-overdue { background: #fff8f9; }
.w3net-cycle-row.is-blocked { background: #fffaf2; }
.w3net-cycle-row.is-due_soon { background: #fffdf7; }

.w3net-cycle-table td > strong,
.w3net-cycle-table td > span,
.w3net-cycle-table td > small {
    display: block;
}

.w3net-cycle-table td > * + * {
    margin-top: 4px;
}

.w3net-cycle-table td small {
    color: var(--w3-muted);
    font-size: 0.69rem;
    line-height: 1.4;
}

.w3net-cycle-stage-badge,
.w3net-cycle-urgency {
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 25px;
    padding: 4px 8px;
    color: var(--w3-heading);
    background: #f4f7fa;
    border: 1px solid var(--w3-border);
    font-size: 0.68rem;
    font-weight: 760;
    line-height: 1.3;
}

.w3net-cycle-urgency.is-overdue {
    color: #ab3040;
    background: var(--w3-danger-soft);
    border-color: rgba(236, 93, 108, 0.28);
}

.w3net-cycle-urgency.is-due_soon {
    color: #8e6017;
    background: var(--w3-warning-soft);
    border-color: rgba(242, 184, 91, 0.34);
}

.w3net-cycle-urgency.is-blocked {
    color: #a05a0c;
    background: #fff3df;
    border-color: #efc786;
}

.w3net-cycle-urgency.is-on_track,
.w3net-cycle-urgency.is-complete {
    color: #176e4e;
    background: var(--w3-success-soft);
    border-color: rgba(40, 182, 122, 0.25);
}

.w3net-cycle-urgency.is-neutral {
    color: var(--w3-muted);
    background: var(--w3-surface-2);
}

.w3net-cycle-table .w3net-table-actions {
    display: grid;
    align-content: start;
    gap: 7px;
}

.w3net-cycle-action,
.w3net-cycle-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 35px;
    padding: 7px 10px;
    border: 1px solid transparent;
    font-size: 0.7rem;
    font-weight: 760;
    text-align: center;
    text-decoration: none;
}

.w3net-cycle-action {
    color: #fff;
    background: linear-gradient(135deg, var(--w3-primary), var(--w3-primary-2));
}

.w3net-cycle-secondary-action {
    color: var(--w3-heading);
    background: #fff;
    border-color: var(--w3-border);
}

.w3net-cycle-action:hover,
.w3net-cycle-action:focus-visible,
.w3net-cycle-secondary-action:hover,
.w3net-cycle-secondary-action:focus-visible {
    text-decoration: none;
    filter: brightness(0.98);
}

.w3net-cycle-empty {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 31px 20px;
    color: var(--w3-muted);
    text-align: center;
}

.w3net-cycle-empty strong {
    color: var(--w3-heading);
}

.w3net-cycle-limit-note {
    margin: 0;
    padding: 11px 15px;
    color: var(--w3-muted);
    background: #fbfcfe;
    border-top: 1px solid var(--w3-border);
    font-size: 0.72rem;
}

@media (max-width: 1440px) {
    .w3net-cycle-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .w3net-cycle-stage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .w3net-cycle-overview { padding: 18px; }
    .w3net-cycle-heading,
    .w3net-cycle-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    .w3net-cycle-heading-meta,
    .w3net-cycle-filter-bar {
        justify-content: flex-start;
    }
    .w3net-cycle-stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .w3net-cycle-overview {
        gap: 14px;
        padding: 14px;
        box-shadow: none;
    }

    .w3net-cycle-summary-grid,
    .w3net-cycle-stage-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .w3net-cycle-summary-card { min-height: 0; }
    .w3net-cycle-stage-card { min-height: 82px; }

    .w3net-cycle-filter-bar a {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .w3net-cycle-table {
        min-width: 0;
        display: block;
    }

    .w3net-cycle-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    .w3net-cycle-table tbody,
    .w3net-cycle-table tr,
    .w3net-cycle-table td {
        display: block;
        width: 100%;
    }

    .w3net-cycle-table tr {
        padding: 11px 13px;
        border-bottom: 1px solid var(--w3-border);
    }

    .w3net-cycle-table td {
        display: grid;
        grid-template-columns: minmax(108px, 35%) minmax(0, 1fr);
        gap: 8px;
        padding: 8px 0;
        border: 0;
    }

    .w3net-cycle-table td::before {
        content: attr(data-label);
        color: var(--w3-muted);
        font-size: 0.65rem;
        font-weight: 820;
        letter-spacing: 0.025em;
        text-transform: uppercase;
    }

    .w3net-cycle-table .w3net-table-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 440px) {
    .w3net-cycle-table td {
        grid-template-columns: minmax(0, 1fr);
    }

    .w3net-cycle-table td::before {
        margin-bottom: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .w3net-cycle-summary-card,
    .w3net-cycle-stage-card {
        transition: none;
    }

    .w3net-cycle-summary-card:hover,
    .w3net-cycle-summary-card:focus-visible,
    .w3net-cycle-stage-card:hover,
    .w3net-cycle-stage-card:focus-visible {
        transform: none;
    }
}

@media print {
    .w3net-cycle-filter-bar,
    .w3net-cycle-clear,
    .w3net-cycle-table th:last-child,
    .w3net-cycle-table td:last-child {
        display: none !important;
    }

    .w3net-cycle-overview,
    .w3net-cycle-panel {
        box-shadow: none;
        border-color: #aaa;
    }
}

/*
 * Compact lifecycle controls — 2.5.18
 * The lifecycle stage area is a control strip, not a card dashboard. The
 * detailed queue below remains the place for narrative workflow information.
 */
.w3net-cycle-stage-panel.is-compact .w3net-cycle-panel-header {
    align-items: center;
    padding: 10px 12px;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-panel-header p {
    margin-top: 3px;
    font-size: 0.7rem;
    line-height: 1.35;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-groups {
    gap: 0;
    padding: 5px 12px 8px;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-group {
    display: grid;
    grid-template-columns: minmax(118px, 0.17fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
    padding: 7px 0;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-group + .w3net-cycle-group {
    padding-top: 7px;
    border-top: 1px solid var(--w3-border);
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-group h4 {
    margin: 0;
    font-size: 0.64rem;
    line-height: 1.25;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-grid {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-wrap: wrap;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 4px 5px 4px 8px;
    color: var(--w3-heading);
    background: #fff;
    border: 1px solid var(--w3-border);
    border-left: 3px solid #a3b3c4;
    border-radius: 0;
    box-shadow: none;
    white-space: nowrap;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card:hover,
.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card:focus-visible {
    background: #f3f9fc;
    border-color: var(--w3-primary-2);
    box-shadow: 0 3px 8px rgba(15, 35, 66, 0.08);
    transform: none;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.has-records {
    color: #0b3653;
    background: #f5fbfe;
    border-left-color: var(--w3-primary-2);
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.is-empty {
    background: #fbfcfd;
    opacity: 0.72;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.is-selected {
    background: #eaf7fb;
    border-color: var(--w3-primary-2);
    outline: 2px solid rgba(41, 160, 215, 0.14);
    outline-offset: 0;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.is-overdue {
    border-left-color: var(--w3-danger);
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.is-blocked {
    border-left-color: #d77b1e;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card.is-due-soon {
    border-left-color: var(--w3-warning);
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-name {
    min-width: 0;
    color: inherit;
    font-size: 0.68rem;
    font-weight: 760;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card > strong {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 4px;
    color: #126d64;
    background: var(--w3-primary-soft);
    border: 1px solid rgba(38, 198, 180, 0.22);
    font-size: 0.67rem;
    font-weight: 850;
    line-height: 1;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-flags {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-flags em {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0 3px;
    font-size: 0.54rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
}

@media (max-width: 1024px) {
    .w3net-cycle-stage-panel.is-compact .w3net-cycle-group {
        grid-template-columns: minmax(105px, 0.22fr) minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .w3net-cycle-stage-panel.is-compact .w3net-cycle-panel-header {
        padding: 10px;
    }

    .w3net-cycle-stage-panel.is-compact .w3net-cycle-groups {
        padding: 3px 10px 7px;
    }

    .w3net-cycle-stage-panel.is-compact .w3net-cycle-group {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        padding: 8px 0;
    }

    .w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-grid {
        gap: 5px;
    }

    .w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card {
        flex: 1 1 calc(50% - 5px);
        justify-content: space-between;
        min-height: 34px;
        white-space: normal;
    }

    .w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-name {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }
}

@media (max-width: 430px) {
    .w3net-cycle-stage-panel.is-compact .w3net-cycle-stage-card {
        flex-basis: 100%;
    }
}
