/* assistants-page.css — Assistants Manager page */

.am-page {
    font-family: var(--app-font-primary, "Geist", sans-serif);
    color: var(--app-text-primary, rgba(17, 24, 39, 0.87));
    font-size: 14px;
    line-height: 22px;
    max-width: 1800px;
}



/* ── Two-column layout ──────────────────────────────────────── */

.am-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 1399px) {
    .am-container {
        flex-direction: column;
    }
}

/* ── Create panel (left) ────────────────────────────────────── */

.am-create {
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 8px;
    padding: 20px;
    background: var(--app-bg-primary, #fff);
}

@media (max-width: 1399px) {
    .am-create {
        flex: none;
        width: 100%;
    }
}

.am-create h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    margin: 0 0 16px 0;
}

/* ── Preset grid ────────────────────────────────────────────── */

.am-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.am-preset {
    display: flex;
    gap: 10px;
    padding: 12px;
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 8px;
    cursor: pointer;
    background: var(--app-bg-primary, #fff);
    transition: border-color 0.15s ease;
}

.am-preset:hover {
    border-color: var(--app-action-hover, #141b9b);
}

.am-preset:has(input:checked) {
    border-color: var(--app-action-hover, #141b9b);
    background: var(--app-bg-selected, rgba(20, 27, 155, 0.11));
}

.am-preset input[type="radio"] {
    margin-top: 2px;
    accent-color: var(--app-action-hover, #141b9b);
    flex-shrink: 0;
}

.am-preset-content {
    flex: 1;
    min-width: 0;
}

.am-preset-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
}

.am-preset-desc {
    font-size: 12px;
    line-height: 18px;
    color: var(--app-text-secondary, #919191);
    margin-top: 4px;
}

.am-continue {
    margin-top: 16px;
    padding: 9px 16px;
    background: var(--app-action-primary, #212121);
    color: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    transition: background-color 0.15s ease;
}

.am-continue:hover {
    background: var(--app-action-hover, #141b9b);
}

.am-continue:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Assistants list (right) ────────────────────────────────── */

/* Right column: title row (heading + Type filter) above the bordered card,
 * which wraps only the column headers, rows and pagination — per the design. */
.am-list-col {
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 1399px) {
    .am-list-col {
        width: 100%;
    }
}

.am-list {
    border: 1px solid hsla(0, 0%, 40%, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: var(--app-bg-primary, #fff);
}

.am-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin-bottom: 10px;
}

.am-table-header h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    margin: 0;
}

.am-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* The Type select gets its look from the shared select.dlg-select rules in
   dialogue.css (this page's root isn't .dlg-page, so the blanket doesn't
   reach it); only the cursor is ours. */
.am-filter select {
    cursor: pointer;
}

/* ── Table ──────────────────────────────────────────────────── */

.am-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 22px;
}

.am-table th {
    text-align: left;
    padding: 8px 16px;
    background: var(--app-bg-secondary, #f9f9f9);
    font-weight: 600;
}

.am-table td {
    padding: 10px 16px;
}

/* Zebra striping per the design — rows are separated by alternating
 * background, not borders. The class is set by renderPagination() on the
 * visible rows, since hidden (filtered/paged-out) rows would throw off a
 * CSS :nth-child count. Must precede :hover so hover wins. */
.am-table tr.am-row-even td {
    background: var(--app-bg-secondary, #f9f9f9);
}

.am-table tr:hover td {
    background: rgba(20, 27, 155, 0.03);
}

.am-copy-btn,
.am-rename-btn,
.am-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--app-text-secondary, #919191);
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.am-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.am-copy-btn:hover,
.am-rename-btn:hover {
    color: var(--app-text-primary, rgba(17, 24, 39, 0.87));
    background: rgba(20, 27, 155, 0.06);
}

.am-delete-btn:hover {
    color: var(--app-text-alert, #dc172e);
    background: rgba(220, 23, 46, 0.06);
}

.am-private-icon {
    margin-left: 6px;
    font-size: 13px;
    cursor: default;
}

/* ── Pagination ─────────────────────────────────────────────── */

/* Design layout: count + page-size select on the left, ‹ 1 2 › on the
 * right. Selected page is the translucent blue chip, nav chevrons sit on
 * the secondary gray — no solid dark pill, no borders. */
.am-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--app-bg-primary, #fff);
    /* Faint divider against the last (possibly gray) zebra row, as in the
     * page design. Not in central-ui's .app-pagination CSS, which the
     * Figma page mock appears to have moved past. */
    border-top: 1px solid var(--app-stroke-primary, hsla(0, 0%, 40%, 0.15));
}

.am-pagination__info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    line-height: 20px;
    color: var(--app-text-primary, rgba(17, 24, 39, 0.87));
}

.am-page-size {
    padding: 3px 24px 3px 8px;
    border: 1px solid var(--app-stroke-primary, hsla(0, 0%, 40%, 0.15));
    border-radius: 6px;
    background: var(--app-bg-primary, #fff);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    /* Same design chevron as select.dlg-select, scaled to the compact
     * 16px size the design's page-size select uses. */
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8L10 12L14 8' stroke='rgba(17,24,39,0.57)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 16px 16px;
}

.am-pagination__pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.am-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 5px 6px;
    border: none;
    border-radius: 6px;
    background: var(--app-bg-hover, #f5f5f5);
    color: var(--app-text-primary, rgba(17, 24, 39, 0.87));
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.am-page-btn--nav {
    background: var(--app-bg-secondary, #f9f9f9);
    padding: 6px;
}

.am-page-btn--nav svg {
    display: block;
}

.am-page-btn:disabled {
    color: var(--app-icon-disable, #c4c5c7);
    cursor: default;
}

.am-page-btn.am-page-active {
    background: var(--app-bg-selected, rgba(20, 27, 155, 0.11));
    cursor: default;
}
