/* =========================================
   TRUSTIT WORKSPACE OS - AGENTS
========================================= */

.page-heading {
    margin-bottom: 28px;
}

    .page-heading h1 {
        margin: 0;
        color: var(--os-text);
        font-size: clamp(28px, 3vw, 38px);
        font-weight: 760;
        letter-spacing: -0.8px;
    }

    .page-heading p {
        margin: 7px 0 0;
        color: var(--os-muted);
        font-size: 14px;
    }

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 22px;
    width: 100%;
}

.agent-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    color: var(--os-text);
    background: linear-gradient( 145deg, rgba(19, 35, 58, 0.94), rgba(11, 24, 42, 0.94) );
    border: 1px solid var(--os-border);
    border-radius: 20px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

    .agent-card:hover {
        transform: translateY(-3px);
        border-color: rgba(47, 129, 247, 0.34);
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
    }

.agent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--os-border);
}

    .agent-header h3 {
        margin: 0;
        color: var(--os-text);
        font-size: 17px;
        font-weight: 750;
        letter-spacing: -0.2px;
    }

.agent-version {
    margin-top: 6px;
    color: var(--os-muted);
    font-size: 12px;
}

.agent-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 25px 0;
}

.agent-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    padding: 20px 0 22px;
    border-top: 1px solid var(--os-border);
}

    .agent-info > div {
        min-width: 0;
    }

    .agent-info span {
        display: block;
        margin-bottom: 6px;
        color: var(--os-muted);
        font-size: 10px;
        font-weight: 750;
        letter-spacing: 0.45px;
        text-transform: uppercase;
    }

    .agent-info strong {
        display: block;
        overflow: hidden;
        color: var(--os-text-soft);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.45;
        text-overflow: ellipsis;
    }

.agent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}

    .agent-actions .workspace-button {
        min-height: 41px;
        padding: 0 13px;
        color: var(--os-text-soft);
        font: inherit;
        font-size: 12px;
        font-weight: 700;
        background: rgba(148, 163, 184, 0.08);
        border: 1px solid var(--os-border);
        border-radius: 11px;
        cursor: pointer;
        transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
    }

        .agent-actions .workspace-button:hover {
            color: var(--os-text);
            background: rgba(148, 163, 184, 0.14);
            border-color: var(--os-border-strong);
        }

        .agent-actions .workspace-button:active {
            transform: translateY(1px);
        }

    .agent-actions .workspace-button-primary {
        color: white;
        background: var(--os-primary);
        border-color: var(--os-primary);
        box-shadow: 0 8px 20px rgba(47, 129, 247, 0.22);
    }

        .agent-actions .workspace-button-primary:hover {
            color: white;
            background: #2475df;
            border-color: #2475df;
        }

@media (max-width: 850px) {
    .agent-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .agent-card {
        padding: 18px;
    }

    .agent-info {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .agent-actions {
        grid-template-columns: 1fr;
    }
}


/* Live backup panel: original ring layout with the new progress engine */
.agent-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 255px;
    padding: 24px 0 28px;
}

.agent-progress .progress-ring-container {
    width: 100%;
}

.agent-progress .progress-ring {
    width: 164px;
    height: 164px;
    margin: 0 auto;
}

.agent-progress .progress-ring-number {
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -1px;
}

.agent-progress .progress-ring-center-text {
    max-width: 110px;
    margin-top: 5px;
    color: var(--os-muted);
    font-size: 11px;
    font-weight: 700;
}

.agent-progress .progress-ring-label {
    margin-top: 14px;
    color: var(--os-text);
    font-size: 15px;
    font-weight: 760;
}

.agent-progress .progress-ring-description {
    min-height: 20px;
    max-width: 440px;
    margin: 6px auto 0;
    color: var(--os-muted);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

.agent-progress-info .progress-ring-value {
    filter: drop-shadow(0 0 5px rgba(47, 129, 247, .42));
}

@media (max-width: 560px) {
    .agent-progress {
        min-height: 225px;
    }

    .agent-progress .progress-ring {
        width: 146px;
        height: 146px;
    }
}

/* v1.0 polish */
.agent-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.agent-heading-summary {
    display: flex;
    align-items: center;
    gap: 9px;
}

.agent-heading-summary span {
    padding: 8px 11px;
    color: var(--workspace-text-secondary);
    background: var(--workspace-surface);
    border: 1px solid var(--workspace-border);
    border-radius: 10px;
    font-size: 11px;
    box-shadow: var(--workspace-shadow-small);
}

.agent-heading-summary strong {
    color: var(--workspace-text-primary);
}

.agent-progress .progress-ring-number {
    font-size: 38px;
}

.agent-progress .progress-ring-label {
    margin-top: 16px;
}

@media (max-width: 620px) {
    .agent-page-heading {
        align-items: stretch;
        flex-direction: column;
    }
}
