/* AiNA Report Requests (/aina/requests). White surfaces, state shown with text, border and icon colour. */
.areq-page{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);max-width:1320px;margin:0 auto;color:#1b2240}
.areq-page *,.areq-page *::before,.areq-page *::after{box-sizing:border-box}
.areq-page>*,.areq-layout>*,.areq-main>*,.areq-side>*{min-width:0}

.areq-head h1{margin:6px 0 4px;font-size:28px;line-height:1.2;color:#0f1b3d}
.areq-head p{margin:0;max-width:720px;color:#4b5565;font-size:14px;line-height:1.55}
.areq-back{display:inline-flex;align-items:center;gap:4px;color:#5b4bc4;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.areq-back:hover{color:#002366}

.areq-note{display:flex;gap:10px;align-items:flex-start;margin:0;padding:12px 15px;border:1px solid #f4c27a;border-radius:16px;background:#fff;color:#7a4b00;font-size:13px;line-height:1.5}
.areq-note svg{flex:none;margin-top:2px}

/* Summary tiles double as filters for the request list. */
.areq-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.areq-stat{display:grid;gap:2px;justify-items:start;justify-content:stretch;align-content:start;text-align:left;padding:14px 16px;min-height:96px;border:1px solid #e3e6ee;border-left:4px solid var(--areq-tone);border-radius:16px;background:#fff;color:#1b2240;font:inherit;cursor:pointer;transition:border-color .16s,box-shadow .16s}
.areq-stat:hover{box-shadow:0 6px 18px rgba(15,27,61,.06)}
.areq-stat[aria-pressed="true"]{border-color:var(--areq-tone);box-shadow:0 0 0 1px var(--areq-tone)}
.areq-stat-label{font-size:12px;font-weight:700;color:#4b5565}
.areq-stat strong{font-size:28px;line-height:1.1;color:var(--areq-tone)}
.areq-stat small{font-size:12px;color:#6b7385}
[data-tone="blue"]{--areq-tone:#1d4ed8}
[data-tone="red"]{--areq-tone:#b42318}
[data-tone="green"]{--areq-tone:#15803d}
[data-tone="amber"]{--areq-tone:#b54708}
[data-tone="neutral"]{--areq-tone:#667085}

.areq-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,380px);gap:16px;align-items:start}
.areq-main,.areq-side{display:grid;gap:16px}

.areq-card{padding:18px;border:1px solid #e3e6ee;border-radius:18px;background:#fff}
.areq-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.areq-card-head h2{margin:0;font-size:16px;color:#0f1b3d}
.areq-card-head p{margin:4px 0 0;font-size:13px;line-height:1.5;color:#5d6678}
.areq-card-head p a{color:#154192;font-weight:650}
.areq-muted{color:#6b7385}
.areq-small-text{margin:0;font-size:12px;line-height:1.5}

/* Buttons */
.areq-page button{font:inherit}
.areq-primary,.areq-secondary,.areq-ghost{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 16px;border-radius:15px;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:color .16s,border-color .16s,box-shadow .16s}
.areq-primary{border:1.5px solid #002366;background:#fff;color:#002366}
.areq-primary:hover:not(:disabled){color:#5b4bc4;border-color:#5b4bc4;box-shadow:0 4px 14px rgba(91,75,196,.14)}
.areq-secondary{border:1px solid #cfd6df;background:#fff;color:#002366}
.areq-secondary:hover{color:#5b4bc4;border-color:#5b4bc4}
.areq-ghost{border:1px solid transparent;background:#fff;color:#4b5565}
.areq-ghost:hover{color:#b42318;border-color:#f1c4bf}
.areq-small{min-height:34px;padding:6px 12px;font-size:12px}
.areq-page button:disabled{opacity:.55;cursor:not-allowed}
.areq-page button:focus-visible,.areq-page a:focus-visible,.areq-page input:focus-visible,.areq-page select:focus-visible,.areq-page textarea:focus-visible{outline:2px solid #5b4bc4;outline-offset:2px}
.areq-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Fields */
.areq-page label{display:grid;gap:6px;font-size:12px;font-weight:650;color:#4b5565}
.areq-page input:not([type=checkbox]):not([type=radio]),.areq-page select,.areq-page textarea{width:100%;min-width:0;max-width:100%;min-height:42px;padding:10px 12px;border:1px solid #d9deea;border-radius:15px;background:#fff;color:#1b2240;font:inherit;font-size:14px;font-weight:500}
.areq-page select{text-overflow:ellipsis}
.areq-page textarea{resize:vertical;line-height:1.5}
.areq-page input:focus,.areq-page select:focus,.areq-page textarea:focus{border-color:#5b4bc4}
.areq-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.areq-span-2{grid-column:1/-1}
.areq-hint{margin:0;font-size:12px;line-height:1.5;color:#7a4b00}
.areq-error{margin:10px 0 0;color:#b42318;font-size:13px}

/* Ask AiNA */
.areq-compose{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;border:1px solid #d9deea;border-radius:18px;background:#fff;transition:border-color .16s}
.areq-compose:focus-within{border-color:#5b4bc4}
.areq-compose textarea{border:0!important;padding:4px!important;min-height:64px!important;font-size:15px!important}
.areq-compose textarea:focus-visible{outline:0}
.areq-compose-foot{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex-wrap:wrap}
.areq-examples{display:flex;gap:6px;flex-wrap:wrap;min-width:0;flex:1 1 300px}
.areq-example{max-width:100%;padding:6px 11px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;color:#4b5565;font-size:12px;text-align:left;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.areq-example:hover{color:#5b4bc4;border-color:#c9c1f2}
.areq-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0 0;padding:0;list-style:none}
.areq-steps li{display:flex;gap:10px;align-items:flex-start}
.areq-steps strong{display:block;font-size:13px;color:#1b2240}
.areq-steps small{display:block;font-size:12px;line-height:1.45;color:#6b7385}
.areq-step-n{flex:none;display:grid;place-items:center;width:26px;height:26px;border:1.5px solid #5b4bc4;border-radius:50%;color:#5b4bc4;font-size:12px;font-weight:800}

/* Draft confirmation */
.areq-draft{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;margin-top:14px;padding:16px;border:1.5px solid #c9c1f2;border-radius:18px;background:#fff}
.areq-draft-head h3{margin:0;font-size:15px;color:#0f1b3d}
.areq-draft-head p{margin:2px 0 0;font-size:12px;color:#5d6678}
.areq-field{margin:0;padding:0;border:0;min-width:0;display:grid;gap:8px}
.areq-field legend{padding:0;margin-bottom:8px;font-size:12px;font-weight:650;color:#4b5565}
.areq-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(230px,100%),1fr));gap:8px}
.areq-page .areq-choice{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;cursor:pointer;font-weight:500}
.areq-choice:hover{border-color:#c9c1f2}
.areq-choice:has(input:checked){border-color:#5b4bc4;box-shadow:0 0 0 1px #5b4bc4}
.areq-page .areq-choice input[type=radio]{flex:none;width:18px;height:18px;min-width:18px;min-height:0;max-width:18px;margin:8px 0 0;padding:0;border:0;box-shadow:none;accent-color:#5b4bc4;appearance:auto;-webkit-appearance:radio}
.areq-choice-text{display:grid;gap:2px;min-width:0}
.areq-choice-text strong{font-size:13px;color:#1b2240}
.areq-choice-text small{font-size:12px;color:#6b7385}
.areq-choice-text em{font-style:normal;font-size:11px;font-weight:650;color:#5b4bc4}

.areq-avatar{flex:none;display:grid;place-items:center;width:34px;height:34px;border:1.5px solid #c9c1f2;border-radius:50%;background:#fff;color:#5b4bc4;font-size:12px;font-weight:800}

/* Requests */
.areq-tabs{display:flex;gap:6px;margin:0 0 14px;padding-bottom:2px;overflow-x:auto;scrollbar-width:thin}
.areq-tabs button{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 12px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;color:#4b5565;font-size:13px;font-weight:650;cursor:pointer}
.areq-tabs button span{min-width:20px;padding:0 6px;border:1px solid currentColor;border-radius:15px;font-size:11px;line-height:18px;text-align:center}
.areq-tabs button:hover{color:#5b4bc4}
.areq-tabs button[aria-selected="true"]{border-color:#002366;color:#002366}
.areq-list{display:grid;gap:10px}
.areq-request{display:grid;gap:10px;padding:14px 16px;border:1px solid #e3e6ee;border-left:4px solid var(--areq-tone);border-radius:16px;background:#fff}
.areq-request-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.areq-request-top h3{margin:0;font-size:14px;line-height:1.4;color:#0f1b3d;overflow-wrap:anywhere}
.areq-request-top .status-chip{flex:none;margin:0}
.areq-meta{display:flex;flex-wrap:wrap;gap:6px 16px;margin:0;padding:0;list-style:none}
.areq-meta li{display:flex;align-items:center;gap:6px;min-width:0;font-size:13px;color:#4b5565}
.areq-meta li svg{flex:none;color:#8a93a6}
.areq-meta li span{min-width:0;overflow-wrap:anywhere}
.areq-due{font-weight:700;color:var(--areq-tone)}
.areq-file{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #bfe3cb;border-radius:15px;background:#fff;color:#15803d}
.areq-file:hover{border-color:#15803d}
.areq-file span{display:grid;min-width:0}
.areq-file strong{font-size:13px;color:#154192;overflow-wrap:anywhere}
.areq-file small{font-size:12px;color:#6b7385}
.areq-request-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.areq-empty{display:grid;justify-items:center;gap:8px;padding:26px 12px;border:1px dashed #d9deea;border-radius:16px;text-align:center;color:#6b7385}
.areq-empty svg{width:22px;height:22px;color:#8a93a6}
.areq-empty p{margin:0;max-width:360px;font-size:13px;line-height:1.5}

/* Side column */
.areq-state{flex:none;padding:4px 10px;border:1px solid var(--areq-tone);border-radius:15px;color:var(--areq-tone);font-size:11px;font-weight:700}
.areq-people{display:grid;gap:0;margin:0;padding:0;list-style:none}
.areq-person{display:flex;gap:10px;align-items:flex-start;padding:12px 0;border-top:1px solid #eef0f5}
.areq-person:first-child{border-top:0;padding-top:0}
.areq-person.is-paused{opacity:.6}
.areq-person-body{display:grid;gap:4px;min-width:0;flex:1}
.areq-person-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.areq-person-top strong{font-size:14px;color:#1b2240}
.areq-person-top .status-chip{margin:0;min-height:22px;font-size:11px}
.areq-person-body>small{font-size:12px;color:#6b7385}
.areq-tags{display:flex;flex-wrap:wrap;gap:4px}
.areq-tags span{padding:2px 8px;border:1px solid #e3e6ee;border-radius:15px;font-size:11px;color:#4b5565}
.areq-tags span.is-code{border-color:#c7d7fb;color:#1d4ed8}
.areq-linked{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;color:#15803d}
.areq-link{display:grid;gap:6px;width:100%;margin-top:4px;padding:10px;border:1px solid #e3e6ee;border-radius:15px}
.areq-link>span{font-size:12px;color:#5d6678}
.areq-link code{display:block;font-size:12px;color:#154192;overflow-wrap:anywhere;word-break:break-all}
.areq-link .areq-secondary{justify-self:start}
.areq-person-form{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:14px;padding:14px;border:1px solid #c9c1f2;border-radius:16px}

.areq-escalation{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.areq-page .areq-switch{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:650;color:#1b2240;cursor:pointer}
.areq-switch input{position:absolute;opacity:0;width:1px;height:1px}
.areq-switch-track{position:relative;flex:none;width:40px;height:24px;border:1.5px solid #cfd6df;border-radius:15px;background:#fff;transition:border-color .16s}
.areq-switch-track::after{content:"";position:absolute;top:3px;left:3px;width:15px;height:15px;border-radius:50%;background:#98a2b3;transition:transform .16s,background .16s}
.areq-switch input:checked+.areq-switch-track{border-color:#15803d}
.areq-switch input:checked+.areq-switch-track::after{transform:translateX(16px);background:#15803d}
.areq-switch input:focus-visible+.areq-switch-track{outline:2px solid #5b4bc4;outline-offset:2px}
.areq-recent{margin-top:14px;padding-top:12px;border-top:1px solid #eef0f5}
.areq-recent h3{margin:0 0 8px;font-size:13px;color:#1b2240}
.areq-recent ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.areq-recent li{display:grid;gap:2px;font-size:12px;color:#4b5565}
.areq-recent li strong{color:#b54708}
.areq-recent li small{color:#6b7385}

@media (max-width:1100px){
  .areq-layout{grid-template-columns:minmax(0,1fr)}
  .areq-side{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))}
}
@media (max-width:720px){
  .areq-page{gap:12px}
  .areq-head h1{font-size:24px}
  .areq-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .areq-stat{min-height:0;padding:12px}
  .areq-stat strong{font-size:24px}
  .areq-stat small{display:none}
  .areq-card{padding:14px;border-radius:16px}
  .areq-steps{grid-template-columns:minmax(0,1fr);gap:10px}
  .areq-form-grid{grid-template-columns:minmax(0,1fr)}
  .areq-compose-foot .areq-primary{width:100%}
  .areq-examples{flex-basis:100%}
  .areq-example{white-space:normal}
  .areq-example:nth-child(n+2){display:none}
  .areq-draft{padding:12px}
  .areq-draft .areq-actions>*{flex:1 1 140px}
  .areq-request-top{flex-wrap:wrap}
  .areq-request-actions{justify-content:flex-start}
  /* 16px text keeps iOS Safari from zooming in when a field gets focus. */
  .areq-page input:not([type=checkbox]):not([type=radio]),.areq-page select,.areq-page textarea{font-size:16px}
}

/* Status chips use the workspace's filled chip colours. */
.areq-page .status-chip{display:inline-flex;align-items:center;min-height:24px;padding:3px 10px;border:0;border-radius:15px;font-size:12px;font-weight:650;line-height:1.3;white-space:nowrap}
.areq-page .status-chip[data-tone="green"]{background:#e3f7ea;color:#15803d}
.areq-page .status-chip[data-tone="blue"]{background:#e6efff;color:#1d4ed8}
.areq-page .status-chip[data-tone="amber"]{background:#fff4e0;color:#9a5b00}
.areq-page .status-chip[data-tone="red"]{background:#fde8e8;color:#b42318}
.areq-page .status-chip[data-tone="neutral"]{background:#f1f3f6;color:#475467}
