/* ADS ticket screens (Create / Edit / View / Team) - compact layouts from the design guide */

/* ---------- Create + Edit: shared form, 7:5 split ---------- */
html body #issueForm .form-grid#form-grid-inner{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:16px;align-items:start;padding:0;background:none;border:0}
html body #issueForm .ads-form-main{display:flex;flex-direction:column;gap:12px;min-width:0}
html body #issueForm .ads-form-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;min-width:0;align-content:start;
  padding:12px;border:1px solid var(--ads-line);border-radius:var(--ads-r-lg);background:#f8fafc}
html body #issueForm .field-group{border:0;background:none;box-shadow:none;padding:0;margin:0;min-width:0;width:auto;max-width:none;flex:none}
html body #issueForm .field-group>label,html body #issueForm .field-group .field-label{display:flex;align-items:center;gap:6px;margin:0 0 4px;
  font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ads-muted)}
html body #issueForm .field-group>label i{color:var(--ads-green);font-size:11px}
html body #issueForm #fg-gtnum{grid-column:1/-1}
html body #issueForm #fg-repo{grid-column:1/-1}
html body #issueForm .subissue-role-help{margin-top:6px;padding:6px 8px;font-size:11.5px;line-height:1.4;border-radius:var(--ads-r)}
html body #issueForm #description{min-height:260px;resize:vertical}
html body #issueForm #fg-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;padding-top:10px;border-top:1px solid var(--ads-line)}
html body #issueForm #fg-actions button{height:34px;padding:0 18px;font-size:12.5px;font-weight:700;border-radius:var(--ads-r);letter-spacing:.02em}
html body .form-wrapper-screen{padding:14px 16px}

@media (max-width:1100px){
  html body #issueForm .form-grid#form-grid-inner{grid-template-columns:1fr}
}

/* Create/Edit refinements */
html body #issueForm #fg-actions button,html body #issueForm #fg-actions button.create,html body #issueForm #fg-actions button.edituh{width:auto;min-width:150px;flex:none}
html body #issueForm{padding:0;border:0;background:none;box-shadow:none}
html body .form-wrapper-screen{padding:12px}
html body .form-wrapper-screen>*{max-width:none}
html body #issueForm #description{min-height:230px}
html body #issueForm .ads-checkbox-dropdown,html body #issueForm .ads-checkbox-dropdown>*:first-child{min-height:var(--ads-ctl-h);font-size:13px}
html body #issueForm .ads-checkbox-dropdown>*:first-child{padding-top:0;padding-bottom:0;display:flex;align-items:center}

/* ---------- View Tickets: toolbar + table ---------- */
html body .vt-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:0 0 10px!important}
html body .vt-toolbar .field-group{border:0;background:none;box-shadow:none;padding:0;min-width:240px}
html body .vt-toolbar .field-label{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ads-muted);margin-bottom:4px}
html body .vt-toolbar .field-group:last-child{margin-left:auto;min-width:0}
html body .vt-multiselect-btn{height:var(--ads-ctl-h);font-size:13px;border-radius:var(--ads-r);padding:0 10px}
html body .vt-export-excel-btn{height:var(--ads-ctl-h);padding:0 12px;font-size:12.5px;border-radius:var(--ads-r);width:auto}
html body #page-view-ticket .ts-workflow-hint{margin:0 0 8px;padding:6px 10px;font-size:12px;border-radius:var(--ads-r)}
html body #vt-empty-notice{padding:10px 12px;font-size:12.5px;border-radius:var(--ads-r)}
html body #vt-tickets-table tbody tr.vt-row{cursor:pointer}
html body #vt-tickets-table tbody tr.vt-row:hover{background:#f8fafc}
html body #vt-tickets-table tbody tr.vt-row:focus-visible{outline:2px solid var(--ads-green);outline-offset:-2px}
html body #vt-tickets-table tbody tr.vt-row.is-active{background:var(--ads-green-tint)}
html body #vt-tickets-table td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------- Slide-over drawer (View + Team) ---------- */
.ads-drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.28);opacity:0;pointer-events:none;transition:opacity .18s;z-index:2000}
.ads-drawer-backdrop.is-open{opacity:1;pointer-events:auto}
.ads-drawer{position:fixed;top:0;right:0;bottom:0;width:min(480px,100vw);background:#fff;border-left:1px solid var(--ads-line);
  box-shadow:-12px 0 30px -12px rgba(15,23,42,.25);display:flex;flex-direction:column;transform:translateX(100%);
  transition:transform .2s ease;z-index:2001;visibility:hidden}
.ads-drawer.is-open{transform:none;visibility:visible}
.ads-drawer-head{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-bottom:1px solid var(--ads-line)}
.ads-drawer-heading{flex:1;min-width:0}
.ads-drawer-ref{font-size:11.5px;font-weight:600;color:var(--ads-green-d)}
.ads-drawer-title{margin:2px 0 0;font-size:14px;font-weight:700;color:var(--ads-ink);line-height:1.3;overflow-wrap:anywhere}
.ads-drawer-close{width:28px;height:28px;border:0;border-radius:var(--ads-r);background:#f1f5f9;color:var(--ads-ink-2);cursor:pointer}
.ads-drawer-close:hover{background:#e2e8f0}
.ads-drawer-body{flex:1;overflow:auto;padding:12px 14px 20px}
.ads-drawer-body .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;padding:0;border:0;background:none}
.ads-drawer-body .field-group{border:0;background:none;box-shadow:none;padding:0;min-width:0}
.ads-drawer-body .field-label{font-size:10.5px;font-weight:600;letter-spacing:.04em;color:var(--ads-muted);margin-bottom:3px}
.ads-drawer-body input[readonly]{height:30px;font-size:12.5px;background:#f8fafc}
@media (prefers-reduced-motion:reduce){.ads-drawer,.ads-drawer-backdrop{transition:none}}
.ads-drawer-body .markdown-body,.ads-drawer-body .vt-description-body{font-size:13px;line-height:1.5;color:var(--ads-ink-2)}
.ads-drawer-body .vt-comment{border:1px solid var(--ads-line);border-radius:var(--ads-r);padding:8px 10px;margin-top:6px;background:#fff}
.ads-drawer-body .vt-comment-meta{font-size:11.5px;color:var(--ads-muted)}
.ads-drawer-body input[readonly]{height:var(--ads-ctl-h)}

/* ---------- Team Tickets ---------- */
html body #page-team-tickets .timesheet-week-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 10px!important}
html body #page-team-tickets .ticket-filter-select{height:var(--ads-ctl-h);font-size:13px;border-radius:var(--ads-r)}
html body #page-team-tickets .ts-workflow-hint{margin:0 0 8px;padding:6px 10px;font-size:12px;border-radius:var(--ads-r)}
html body #tt-table tbody tr.tt-row{cursor:pointer}
html body #tt-table tbody tr.tt-row:hover{background:#f8fafc}
html body #tt-table tbody tr.tt-row:focus-visible{outline:2px solid var(--ads-green);outline-offset:-2px}
html body #tt-table tbody tr.tt-row.is-active{background:var(--ads-green-tint)}
.tt-member{display:inline-flex;align-items:center;gap:8px}
.tt-avatar{width:24px;height:24px;border-radius:50%;background:var(--ads-green-tint);color:var(--ads-green-d);font-size:10.5px;font-weight:700;display:grid;place-items:center}
.tt-member-name{font-weight:600;color:var(--ads-ink)}
.tt-summary{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.tt-ticket-list{display:flex;flex-direction:column;gap:6px}
.tt-ticket{border:1px solid var(--ads-line);border-radius:var(--ads-r);padding:8px 10px;cursor:pointer;background:#fff}
.tt-ticket:hover{border-color:var(--ads-green);background:#f8fffb}
.tt-ticket:focus-visible{outline:2px solid var(--ads-green)}
.tt-ticket-top{display:flex;align-items:center;gap:8px}
.tt-ticket-top .status-badge{margin-left:auto}
.tt-ticket-title{margin-top:4px;font-size:13px;font-weight:600;color:var(--ads-ink);line-height:1.35}
.tt-ticket-meta{margin-top:4px;display:flex;flex-wrap:wrap;gap:2px 12px;font-size:11.5px;color:var(--ads-muted)}
html body #page-team-tickets .timesheet-week-bar .ticket-filter-select{width:auto;flex:0 0 auto;min-width:170px;margin:0}
html body #page-team-tickets .timesheet-week-bar #tt-search{flex:1 1 220px;max-width:340px}
html body #page-team-tickets .timesheet-week-bar .ts-btn{margin:0}

/* ===== compact density pass: ticket screens ===== */
html body .form-wrapper-screen{padding:8px}
html body #issueForm .form-grid#form-grid-inner{gap:10px}
html body #issueForm .ads-form-main{gap:8px}
html body #issueForm .ads-form-side{gap:6px 8px;padding:8px}
html body #issueForm .field-group>label,html body #issueForm .field-group .field-label{font-size:10.5px;margin-bottom:2px}
html body #issueForm .subissue-role-help{padding:4px 8px;font-size:11px;margin-top:4px}
html body #issueForm #description{min-height:190px;padding:6px 8px;font-size:12.5px}
html body #issueForm #fg-actions{padding-top:8px}
html body #issueForm #fg-actions button{height:30px;min-width:130px;font-size:12px}
html body #issueForm .ads-checkbox-dropdown,html body #issueForm .ads-checkbox-dropdown>*:first-child{min-height:var(--ads-ctl-h)}
.ads-drawer-head{padding:8px 12px}.ads-drawer-body{padding:8px 12px 14px}
.tt-ticket{padding:6px 8px}.tt-avatar{width:20px;height:20px;font-size:9.5px}
html body #issueForm{width:100%;max-width:none;margin:0}
html body .form-wrapper-screen #issueForm,html body .form-wrapper-screen .form-card{max-width:none;width:100%}
