.agent-page { background: #f4f8fa; }
.agent-shell { max-width: 1180px; }
.agent-titlebar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; margin-bottom: 18px; }
.agent-titlebar h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.agent-titlebar .lead { max-width: 760px; }
.agent-agency { justify-self: center; min-width: 220px; display: grid; justify-items: center; gap: 8px; padding: 16px; border: 1px solid #d9e7ec; border-radius: 22px; background: #fff; box-shadow: 0 18px 50px rgba(6,35,51,.08); text-align: center; }
.agent-agency__logo { width: 72px; height: 72px; border-radius: 18px; object-fit: contain; background: #eef6f8; border: 1px solid #dbe8ed; }
.agent-login { max-width: 720px; margin-inline: auto; }
.agent-otp { margin-top: 18px; padding-top: 18px; border-top: 1px solid #dce8ec; }
.agent-workspace { display: grid; gap: 18px; }
.agent-support-banner { margin: 0; border-color: #d8b559; background: #fff8df; color: #5d4708; font-weight: 750; overflow-wrap: anywhere; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.agent-list-card .card__body { padding: clamp(18px, 3vw, 28px); }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.list-heading h2 { margin: 0; }
.agent-list { display: grid; gap: 10px; }
.agent-row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.95fr) minmax(0,.8fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid #dce8ec; border-radius: 18px; background: #fff; }
.agent-row__main, .agent-row__meta, .agent-row__status { min-width: 0; }
.agent-row__main strong { display: block; font-size: 1rem; }
.agent-row__main strong, .agent-row__main span, .agent-row__meta span, .agent-row__status span { overflow-wrap: anywhere; word-break: break-word; }
.agent-row__main span, .agent-row__meta span { display: block; color: #58707a; font-size: .9rem; line-height: 1.4; }
.agent-row__status { display: grid; gap: 4px; color: #314d59; font-size: .9rem; }
.agent-empty { padding: 18px; border: 1px dashed #c8d9df; border-radius: 18px; color: #58707a; background: rgba(255,255,255,.72); }
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; min-height: 2.1rem; padding: .3rem .65rem; border-radius: 999px; background: #e6f2f5; color: #0b5164; font-weight: 800; }
@media (max-width: 800px) {
  .agent-titlebar { grid-template-columns: 1fr; }
  .agent-agency { justify-self: stretch; }
  .agent-row { grid-template-columns: minmax(0,1fr); }
  .agent-actions { justify-content: stretch; }
  .agent-actions .button { width: 100%; }
}
.agent-row[role="button"] { cursor: pointer; }
.agent-row[role="button"]:focus-visible { outline: 3px solid rgba(19,107,120,.48); outline-offset: 3px; }
.agent-login .notice a { display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.agent-detail-card { margin-top: 2px; }
.agent-detail-card[hidden] { display: none; }
.agent-detail-grid { display: grid; grid-template-columns: minmax(130px,.35fr) minmax(0,1fr); gap: 10px 16px; margin: 0; }
.agent-detail-grid dt { color: #58707a; font-weight: 800; }
.agent-detail-grid dd { margin: 0; color: #173746; overflow-wrap: anywhere; }
@media (max-width: 640px) { .agent-detail-grid { grid-template-columns: 1fr; } }
.list-instruction { margin: -4px 0 14px; color: #58707a; font-size: .92rem; }
.agent-row__scholarship { font-weight: 800; color: #0b5164 !important; }
.agent-detail-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4,22,29,.52); backdrop-filter: blur(2px); }
.agent-detail-drawer { position: fixed; top: var(--app-header-height, 76px); right: 0; bottom: 0; z-index: 91; width: min(960px, calc(100vw - 48px)); max-width: 100vw; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; background: #f8fbfc; box-shadow: -18px 0 60px rgba(0,0,0,.25); }
.agent-detail-drawer__header { min-width: 0; display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(18px,3vw,30px); border-bottom: 1px solid #dce8ec; background: #fff; }
.agent-detail-heading { min-width: 0; }
.agent-detail-heading h2 { margin: 0; font-size: clamp(1.25rem, 2.3vw, 1.85rem); overflow-wrap: anywhere; }
.agent-detail-heading p:last-child { margin: 6px 0 0; color: #58707a; overflow-wrap: anywhere; }
.agent-detail-drawer__content { min-width: 0; overflow: auto; padding: 18px clamp(18px,3vw,30px) 30px; }
.agent-inspection-grid { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.agent-inspection-section { min-width: 0; border: 1px solid #dce8ec; border-radius: 14px; background: #fff; padding: 16px; }
.agent-inspection-section h3 { margin: 0 0 12px; font-size: 1.05rem; }
.agent-inspection-list { min-width: 0; display: grid; grid-template-columns: minmax(150px,.35fr) minmax(0,1fr); gap: 8px 14px; margin: 0; }
.agent-inspection-list dt { min-width: 0; color: #58707a; font-size: .78rem; font-weight: 850; overflow-wrap: anywhere; }
.agent-inspection-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.agent-detail-drawer__actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px clamp(18px,3vw,30px); border-top: 1px solid #dce8ec; background: #fff; }
body.agent-drawer-open { overflow: hidden; }
@media (max-width: 760px) { .agent-detail-drawer { top: 0; width: 100vw; } .agent-inspection-grid { grid-template-columns: 1fr; } .agent-inspection-list { grid-template-columns: 1fr; gap: 3px; } .agent-inspection-list dd + dt { margin-top: 9px; } }
@media (max-width: 540px) { .agent-detail-drawer__actions { flex-direction: column; } .agent-detail-drawer__actions .button { width: 100%; } }

.agent-detail-drawer__header { align-items: flex-start; }
.agent-detail-drawer__header .icon-button { flex: 0 0 auto; min-width: 44px; width: 44px; height: 44px; border: 1px solid #dce8ec; border-radius: 999px; background: #fff; color: #062333; font-size: 1.7rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.agent-detail-drawer__header .icon-button:focus-visible { outline: 3px solid rgba(19,107,120,.35); outline-offset: 2px; }
.agent-detail-drawer__actions .button--primary { min-width: 170px; }
@media (max-width: 760px) {
  .agent-detail-drawer__header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
  .agent-detail-heading { min-width: 0; }
  .agent-detail-drawer__header .icon-button { grid-column: 2; grid-row: 1; }
}

.agent-refresh-info { margin: 10px 0 0; color: #526a73; font-size: .86rem; font-weight: 760; }
.agent-refresh-info span { margin-left: .25rem; color: #0b5164; font-weight: 850; }
.agent-detail-drawer__header .icon-button { position: relative; z-index: 2; box-shadow: 0 6px 18px rgba(6,31,42,.10); }
@media (max-width: 760px) {
  .agent-detail-backdrop { z-index: 1000; }
  .agent-detail-drawer {
    inset: 0;
    z-index: 1001;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    isolation: isolate;
  }
  .agent-detail-drawer__header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 64px;
    padding-top: max(14px, env(safe-area-inset-top));
    background: #fff;
  }
  .agent-detail-drawer__header .icon-button {
    align-self: start;
  }
}
