.agent-panel { min-width: 0; color: var(--ink, #253746); }
.agent-panel label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.agent-panel input:not([type=checkbox]), .agent-panel select, .agent-panel textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid var(--line, #cfdae2); border-radius: 8px; padding: 11px 12px; background: var(--surface, #fff); color: inherit; font: inherit; }
.agent-panel input[type=checkbox] { width: 18px; height: 18px; accent-color: #247ca0; }
.agent-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; border: 1px solid #246b89; background: #246b89; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.agent-button.secondary { border-color: var(--line, #cad9e2); background: var(--surface, #fff); color: var(--ink, #253746); }
.agent-button:disabled { opacity: .5; cursor: not-allowed; }
.agent-button:focus-visible, .agent-panel input:focus-visible, .agent-panel select:focus-visible, .agent-panel textarea:focus-visible { outline: 3px solid #56a8c9; outline-offset: 2px; }
.agent-hint { color: var(--muted, #647584); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.agent-error { color: #c33d39; font-size: 14px; line-height: 1.7; }
.agent-notice { color: #27806b; font-size: 14px; line-height: 1.7; }
.agent-empty, .agent-editor { margin-block: 20px; padding: 22px; border: 1px solid var(--line, #d9e3e9); border-radius: 12px; background: var(--surface, #fff); }
.agent-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 20px; margin: 24px 0; padding: 22px; background: rgba(37,125,157,.08); border-radius: 12px; }
.agent-balance strong { font-size: 28px; color: #2785a5; font-variant-numeric: tabular-nums; }
.agent-balance small { flex-basis: 100%; color: var(--muted, #647584); }
.agent-buy-form { display: grid; grid-template-columns: minmax(0,1fr) 110px; gap: 18px; }
.agent-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block: 12px; }
.agent-total strong { font-size: 22px; }
.agent-buy-form > .agent-button { align-self: end; }
.agent-subtitle { margin-top: 32px; font-size: 18px; }
.agent-orders { display: grid; gap: 14px; }
.agent-order { border: 1px solid var(--line, #d9e3e9); border-radius: 10px; padding: 18px; min-width: 0; }
.agent-order p { margin-block: 10px; }
.agent-order-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-state { font-size: 12px; white-space: nowrap; color: #9d6819; }
.agent-state.DELIVERED { color: #27806b; }
.agent-state.REJECTED, .agent-state.REVIEW { color: #bd4039; }
.agent-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(9,22,35,.62); padding: 18px; }
.agent-dialog { box-sizing: border-box; width: min(100%,560px); max-height: 90dvh; overflow: auto; border-radius: 14px; padding: 26px; background: var(--surface, #fff); color: var(--ink, #253746); box-shadow: 0 22px 70px #0004; }
.agent-dialog h3 { font-size: 22px; margin: 0 0 20px; }
.agent-dialog p { line-height: 1.8; overflow-wrap: anywhere; }
.agent-dialog textarea { font-family: Consolas, monospace; font-size: 14px; resize: vertical; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.agent-processing { margin: 20px 0; font-size: 13px; }
.agent-progress { display: block; height: 5px; border-radius: 5px; margin-bottom: 10px; background: linear-gradient(90deg,transparent,#2986aa,transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: agent-progress 1.8s ease-in-out infinite; }
@keyframes agent-progress { from { background-position: -80% 0; } to { background-position: 180% 0; } }
.agent-lookup { display: flex; gap: 16px; align-items: end; margin-block: 22px; }
.agent-lookup label { flex: 1; max-width: 420px; }
.agent-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; margin-block: 24px; }
.agent-check { display: flex !important; flex-direction: row; align-items: center; }
.agent-filter { max-width: 420px; margin-bottom: 20px; }
.agent-table-scroll { width: 100%; overflow-x: auto; }
.agent-price-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.agent-price-table th, .agent-price-table td { padding: 14px 10px; border-bottom: 1px solid var(--line, #d9e3e9); }
.agent-price-table th { font-size: 12px; color: var(--muted, #647584); white-space: nowrap; }
.agent-price-table td small { display: block; font-size: 12px; margin-top: 5px; }
.agent-price-table td input[type=number] { min-width: 120px; max-width: 160px; }
.agent-pager { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 20px; font-size: 13px; }
@media(max-width:760px) { .agent-buy-form { grid-template-columns: 1fr; } .agent-lookup { flex-direction: column; align-items: stretch; } .agent-lookup label { max-width: none; } .agent-settings { grid-template-columns: 1fr; } .agent-empty, .agent-editor { padding: 16px; } .agent-dialog { padding: 20px; } .agent-total { gap: 14px; } .agent-order-top { align-items: start; } }
@media(prefers-reduced-motion:reduce) { .agent-progress { animation: none; background-position: center; } }
