.agent-skill-trigger {
    color: rgba(255, 255, 255, .78);
}

.agent-skill-trigger.is-ready {
    border-color: rgba(var(--mio-gold-rgb, 184, 137, 63), .28);
    background: rgba(var(--mio-gold-rgb, 184, 137, 63), .08);
    color: var(--mio-gold-300, #d7b56d);
}

.agent-profile-cards {
    width: min(760px, 100%);
    max-height: 0;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-5px);
    transition: max-height .25s ease, margin-top .25s ease, opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
}

.prompt-wrap.active .agent-profile-cards {
    max-height: 96px;
    margin-top: 14px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.agent-profile-card {
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    outline: none;
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018));
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.agent-profile-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,.22);
    background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
}

.agent-profile-card:focus-visible {
    box-shadow: var(--mio-focus, 0 0 0 3px rgba(184,137,63,.16));
}

.agent-profile-card.is-selected {
    border-color: rgba(var(--mio-gold-rgb, 184, 137, 63), .5);
    background: linear-gradient(145deg, rgba(var(--mio-gold-rgb, 184, 137, 63), .14), rgba(var(--mio-gold-rgb, 184, 137, 63), .045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 9px 28px rgba(0,0,0,.22);
    color: #fff;
}

.agent-profile-card-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.55);
}

.agent-profile-card.is-selected .agent-profile-card-icon {
    background: rgba(var(--mio-gold-rgb, 184, 137, 63), .14);
    color: var(--mio-gold-300, #d7b56d);
}

.agent-profile-card-icon svg { width: 15px; height: 15px; }
.agent-profile-card > strong { font-size: 13px; font-weight: 650; white-space: nowrap; }

.agent-skill-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(2, 3, 6, .74);
    backdrop-filter: blur(16px);
}

.agent-skill-modal.is-open { display: flex; }

.agent-skill-dialog {
    width: min(1040px, calc(100vw - 56px));
    height: min(720px, calc(100vh - 56px));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    overflow: hidden;
    background: #11151c;
    box-shadow: 0 32px 100px rgba(0, 0, 0, .66);
    display: grid;
    grid-template-rows: 62px minmax(0, 1fr) 66px;
}

.agent-skill-head,
.agent-skill-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.agent-skill-foot {
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 0;
}

.agent-skill-title { color: #fff; font-size: 16px; font-weight: 720; }
.agent-skill-subtitle { margin-top: 3px; color: rgba(255,255,255,.42); font-size: 11px; }

.agent-skill-close,
.agent-skill-button {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.72);
    border-radius: 9px;
    cursor: pointer;
}

.agent-skill-close { width: 32px; height: 32px; font-size: 19px; }
.agent-skill-button { min-height: 34px; padding: 0 14px; font-size: 12px; }
.agent-skill-button:hover { border-color: rgba(255,255,255,.24); color: #fff; }
.agent-skill-button.primary { border: 0; background: var(--mio-gold-400, #b8893f); color: var(--mio-text-inverse, #14110c); font-weight: 750; }
.agent-skill-button.danger { color: #ff9aab; }
.agent-skill-button:disabled { opacity: .42; cursor: wait; }

.agent-skill-body {
    display: grid;
    grid-template-columns: 246px minmax(0, 1fr);
    min-height: 0;
}

.agent-skill-nav {
    padding: 18px 14px;
    border-right: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
    overflow-y: auto;
}

.agent-skill-nav-item {
    width: 100%;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: rgba(255,255,255,.62);
    text-align: left;
    cursor: pointer;
}

.agent-skill-nav-item + .agent-skill-nav-item { margin-top: 6px; }
.agent-skill-nav-item:hover { background: rgba(255,255,255,.04); color: #fff; }
.agent-skill-nav-item.is-active { border-color: rgba(var(--mio-gold-rgb, 184, 137, 63), .24); background: rgba(var(--mio-gold-rgb, 184, 137, 63), .09); color: var(--mio-gold-300, #d7b56d); }
.agent-skill-nav-item strong { display: block; font-size: 13px; }
.agent-skill-nav-item span { display: block; margin-top: 5px; color: rgba(255,255,255,.36); font-size: 10px; line-height: 1.45; }

.agent-skill-main { padding: 22px 24px 30px; overflow: auto; }
.agent-skill-main::-webkit-scrollbar { width: 6px; }
.agent-skill-main::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255,255,255,.15); }

.agent-skill-stage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.agent-skill-stage-head h3 { margin: 0; color: #fff; font-size: 17px; }
.agent-skill-stage-head p { margin: 6px 0 0; color: rgba(255,255,255,.44); font-size: 12px; }

.agent-skill-current {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}

.agent-skill-select,
.agent-skill-input,
.agent-skill-textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 9px;
    outline: none;
    background: #0c1016;
    color: rgba(255,255,255,.86);
    font: inherit;
}

.agent-skill-select,
.agent-skill-input { height: 38px; padding: 0 11px; font-size: 12px; }
.agent-skill-textarea { min-height: 150px; padding: 11px; resize: vertical; font-size: 12px; line-height: 1.65; }
.agent-skill-textarea.is-contract { min-height: 92px; }
.agent-skill-select:focus,
.agent-skill-input:focus,
.agent-skill-textarea:focus { border-color: rgba(var(--mio-gold-rgb, 184, 137, 63), .42); box-shadow: var(--mio-focus, 0 0 0 3px rgba(184,137,63,.16)); }

.agent-skill-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.agent-skill-field { display: block; min-width: 0; }
.agent-skill-field.is-wide { grid-column: 1 / -1; }
.agent-skill-field > span { display: block; margin: 0 0 7px; color: rgba(255,255,255,.5); font-size: 11px; }
.agent-skill-field small { display: block; margin-top: 6px; color: rgba(255,255,255,.3); font-size: 10px; }

.agent-skill-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(var(--mio-gold-rgb, 184, 137, 63), .09); color: var(--mio-gold-300, #d7b56d); font-size: 10px; }
.agent-skill-status { min-height: 18px; margin-top: 14px; color: var(--mio-gold-300, #d7b56d); font-size: 11px; }
.agent-skill-status.is-error { color: #ff91a5; }

@media (max-width: 760px) {
    .prompt-wrap.active .agent-profile-cards { max-height: 144px; }
    .agent-skill-modal { padding: 12px; }
    .agent-skill-dialog { width: calc(100vw - 24px); height: calc(100vh - 24px); }
    .agent-skill-body { grid-template-columns: 1fr; }
    .agent-skill-nav { display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .agent-skill-nav-item { min-width: 170px; }
    .agent-skill-form-grid { grid-template-columns: 1fr; }
    .agent-skill-field.is-wide { grid-column: auto; }
}
