/* A3 sheet uses the application theme tokens, including native form controls. */
#modal.a3-create-sheet { width:min(1740px,97vw); max-width:97vw; height:94vh; max-height:94vh; }
#modal.a3-create-sheet .modal-body { background:var(--surface); padding:22px 26px 30px; }
.a3-form-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:18px; color:var(--foreground); font-size:12px; }
.a3-eyebrow { color:var(--accent); font-size:10px; font-weight:800; letter-spacing:1.8px; }
.a3-form-intro p { font-size:20px; font-weight:750; margin:5px 0 0; letter-spacing:-.5px; }
.a3-form-intro > span { text-align:right; }
.a3-required-note { display:block; margin-top:5px; color:var(--muted-foreground); font-size:11px; }
.a3-workbook { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; }
.a3-workbook-column { display:flex; flex-direction:column; gap:12px; min-width:0; }
.a3-cell { min-width:0; background:var(--card); border:1px solid var(--border); border-radius:5px; overflow:hidden; color:var(--foreground); }
#modal .a3-cell > h3 { display:flex; align-items:center; gap:9px; background:var(--primary); color:var(--primary-fg); margin:0; padding:9px 12px; font-size:12px; font-weight:700; line-height:1.4; }
.a3-cell h3 > span { display:inline-grid; place-items:center; width:21px; height:21px; border:1px solid #ffffff55; border-radius:3px; font-size:11px; flex-shrink:0; }
.a3-workbook-footer .a3-cell h3 > span { display:none; }
.a3-cell-body { padding:13px; display:grid; gap:12px; }
#modal.a3-create-sheet .field { margin:0; min-width:0; }
#modal.a3-create-sheet .field label { color:var(--muted-foreground); font-size:11px; font-weight:600; margin-bottom:6px; }
#modal.a3-create-sheet .form-grid { gap:12px; }
#modal.a3-create-sheet .a3-cell input, #modal.a3-create-sheet .a3-cell textarea, #modal.a3-create-sheet .a3-cell select { color-scheme:inherit; background:var(--card); border:1px solid var(--input); border-radius:4px; color:var(--foreground); font:inherit; font-size:12px; padding:8px 9px; width:100%; min-width:0; box-shadow:none; }
#modal.a3-create-sheet .a3-cell textarea { background:var(--background); min-height:90px; line-height:1.65; resize:vertical; }
#modal.a3-create-sheet .a3-cell input::placeholder, #modal.a3-create-sheet .a3-cell textarea::placeholder { color:var(--muted-foreground); opacity:1; }
#modal.a3-create-sheet .a3-cell :is(input,textarea,select):focus { outline:2px solid var(--ring); outline-offset:1px; border-color:var(--ring); }
#modal.a3-create-sheet #f-title { background:var(--background); font-size:16px; font-weight:600; padding:12px; }
#modal.a3-create-sheet .a3-cell-body > button { justify-self:start; color:var(--accent-soft-fg); background:var(--accent-soft); border:1px solid var(--accent-border); font-size:11px; }
#modal.a3-create-sheet .a3-cell .table-wrap { border:1px solid var(--border); border-radius:3px; margin:0; }
#modal.a3-create-sheet .a3-cell table { border-collapse:collapse; width:100%; table-layout:fixed; }
#modal.a3-create-sheet .a3-cell th { background:var(--muted); color:var(--muted-foreground); font-size:10px; font-weight:650; padding:8px 5px; text-align:left; white-space:normal; border-bottom:1px solid var(--border); }
#modal.a3-create-sheet .a3-cell td { padding:0; border:1px solid var(--border); vertical-align:top; }
#modal.a3-create-sheet .a3-cell td :is(input,textarea,select) { border:0; border-radius:0; padding:8px 5px; font-size:11px; min-height:35px; background:var(--card); }
#modal.a3-create-sheet .a3-cell td textarea { min-height:65px; line-height:1.5; }
#modal.a3-create-sheet .a3-cell td button { padding:5px; min-width:24px; height:32px; border:0; background:transparent; color:var(--red); }
.a3-edit-table { min-width:520px; }
.a3-edit-table th:nth-child(1) { width:19%; }
.a3-edit-table th:nth-child(2) { width:25%; }
.a3-edit-table th:last-child { width:27px; }
#modal.a3-create-sheet .a3-plan-editor { min-width:650px; }
.a3-plan-editor th:nth-child(1) { width:5%; }
.a3-plan-editor th:nth-child(2) { width:29%; }
.a3-plan-editor th:nth-child(3) { width:16%; }
.a3-plan-editor th:nth-child(4), .a3-plan-editor th:nth-child(5) { width:16%; }
.a3-plan-editor th:nth-child(6) { width:15%; }
.a3-plan-editor th:last-child { width:26px; }
.a3-cell-hint, .a3-plan-note { color:var(--muted-foreground); font-size:11px; margin:0; line-height:1.5; }
.a3-plan-note { padding:8px 0; }
.a3-image-slot { border:1px dashed var(--input); background:var(--surface); border-radius:4px; padding:12px; min-height:115px; }
#modal.a3-create-sheet .a3-image-slot input { background:var(--background); }
#modal.a3-create-sheet .a3-cell .sub { color:var(--muted-foreground); font-size:10px; line-height:1.5; }
.a3-image-slot .evidence { display:block; max-width:100%; max-height:320px; object-fit:contain; margin:12px auto 0; }
#a3-section-9 .a3-image-slot { min-height:185px; }
.a3-workbook-footer { margin-top:16px; display:grid; grid-template-columns:minmax(0,1fr); gap:12px; align-items:start; }
.a3-management { margin-top:18px; border:1px solid var(--border); background:var(--card); border-radius:5px; padding:14px; color:var(--foreground); }
.a3-management summary { cursor:pointer; font-weight:600; font-size:12px; }
.a3-management > .form-grid { margin-top:18px; }
#modal.a3-create-sheet .a3-management :is(input,textarea,select) { background:var(--background); color:var(--foreground); border-color:var(--border); color-scheme:inherit; }
@media(max-width:1100px) {
  .a3-workbook { grid-template-columns:minmax(0,1fr); }
  .a3-workbook-footer { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
  #modal.a3-create-sheet { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border-radius:0; }
  #modal.a3-create-sheet .modal-body { padding:12px; }
  .a3-workbook-footer { grid-template-columns:1fr; }
  .a3-form-intro { align-items:start; }
  .a3-form-intro p { font-size:16px; }
  .a3-form-intro > span { max-width:110px; font-size:10px; }
}
#modal.a3-create-sheet .date-display { color:var(--foreground); background:var(--card); border:1px solid var(--input); border-radius:4px; font-size:12px; box-shadow:none; }
#modal.a3-create-sheet .date-display .date-text { color:var(--foreground); }
#modal.a3-create-sheet .date-display svg { color:var(--muted-foreground); }
#modal.a3-create-sheet .a3-cell td .date-display { border:0; border-radius:0; padding:8px 5px; min-height:35px; font-size:11px; }
.a3-team-paste { border:1px solid var(--border); border-radius:4px; padding:12px; background:var(--surface); font-size:12px; }
.a3-team-paste summary { cursor:pointer; color:var(--accent); font-weight:600; }
.a3-team-paste > p, .a3-team-paste > label, .a3-team-paste > textarea { margin-top:12px; }
.a3-team-paste label { display:block; font-size:11px; color:var(--muted-foreground); }
.a3-team-paste [hidden] { display:none !important; }
#modal.a3-create-sheet .a3-team-paste [data-team-paste-apply] { background:var(--primary); color:var(--primary-fg); border-color:var(--primary); }
.a3-cell [data-team-paste-result] { color:var(--success); }
#modal.a3-create-sheet .a3-grid-paste [data-grid-apply] { background:var(--primary); color:var(--primary-fg); border-color:var(--primary); }
.a3-grid-paste [data-grid-result] { color:var(--success); }
#modal.a3-create-sheet .a3-kpi-table th:first-child { width:32%; }
#modal.a3-create-sheet .a3-kpi-table th:nth-child(2) { width:16%; }
/* Keep the saved A3 sheet in the same reading order as its editor. */
.a3-sheet { grid-template-columns:minmax(0,1fr); }
