:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#23342d;background:#f7f8f3;font-synthesis:none;--green:#275c42;--muted:#65736a;--line:#dce2d8}
*{box-sizing:border-box}
body{margin:0}
button,input,textarea,select{font:inherit}
button,a,input,textarea,select{touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #78a98a;outline-offset:4px}
header,footer{display:flex;align-items:center;justify-content:space-between;padding:25px 5%;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;color:#23342d;font-size:21px;font-weight:700;text-decoration:none;letter-spacing:-.6px}
.brand>span:last-child{font-weight:400}
.mark{display:grid;place-items:center;background:var(--green);color:#fff;width:35px;height:35px;border-radius:10px;margin-right:10px;font-size:23px}
.private{display:flex;align-items:center;gap:22px;color:var(--muted);font-size:13px}
button{border:1px solid var(--line);border-radius:7px;padding:10px 16px;background:transparent;color:inherit}
main{max-width:1190px;margin:auto;padding:55px 36px;min-height:calc(100vh - 170px)}
.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:40px}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.7px;color:var(--green);margin:0 0 15px}
h1{font-size:clamp(31px,4vw,46px);font-weight:550;letter-spacing:-1.7px;margin:0 0 15px;line-height:1.14}
p{line-height:1.6}
.intro p:last-child,.section-heading p{color:var(--muted);margin:0}
.project-tag{font-size:13px;border:1px solid var(--line);border-radius:25px;padding:12px 17px;white-space:nowrap}
.project-tag span{color:var(--muted)}
nav{display:flex;border-bottom:1px solid var(--line);gap:30px;margin-bottom:34px}
nav button{border:0;border-radius:0;padding:17px 2px;color:var(--muted);font-size:15px}
nav button[aria-current]{border-bottom:3px solid var(--green);color:var(--green);font-weight:650}
nav button span{margin-left:16px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}
h2{font-weight:550;font-size:24px;letter-spacing:-.5px;margin:0 0 9px}
.section-heading p{font-size:14px}
.section-heading button{font-size:13px}
.filters{display:flex;gap:8px;margin-bottom:24px;flex-wrap:wrap}
.filters button{font-size:13px;border-color:transparent;border-radius:20px;padding:8px 16px}
.filters .active{background:#e2ecdf;color:#244d35}
.notice{font-size:13px;color:var(--muted);padding:12px 0}
.ticket{border:0;border-top:1px solid var(--line);border-radius:0;display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;padding:24px 4px;gap:24px}
.ticket:last-child{border-bottom:1px solid var(--line)}
.ticket:hover{background:#edf1e8}
.ticket-info{display:flex;align-items:center;gap:22px}
.ticket strong{font-size:15px;font-weight:550;line-height:1.5}
.key{font-size:12px;color:var(--muted);min-width:60px}
.ticket-meta{display:flex;gap:24px;align-items:center}
.status{font-size:11px;padding:6px 10px;border-radius:20px;white-space:nowrap;background:#eceee9}
.status.indeterminate{background:#f8ebcc;color:#775318}
.status.done{background:#e1eedf;color:#285139}
.arrow{color:#849083}
.footnote,.small{font-size:12px}
.footnote{color:var(--muted);margin-top:30px}
.empty{padding:58px 24px;border:1px dashed var(--line);text-align:center;color:var(--muted);border-radius:10px}
.chat-space{padding:42px;background:#edf1e8;border-radius:12px;max-width:780px}
.chat-space h3{font-size:23px;font-weight:500}
.chat-space p{max-width:580px;font-size:15px}
.label{display:inline-block;font-size:11px;letter-spacing:1px;color:var(--green);font-weight:650}
.composer{max-width:100%;margin-top:20px}
.composer textarea{height:100px;resize:vertical}
.composer button{margin-top:10px}
.primary{display:inline-flex;align-items:center;justify-content:space-between;gap:25px;background:var(--green);color:white;text-decoration:none;border:0;border-radius:7px;padding:14px 21px;font-size:14px}
label{display:block;font-size:13px;margin-bottom:10px}
input,textarea,select{width:100%;padding:14px;border:1px solid #bac9b9;border-radius:7px;background:#fff;color:inherit}
textarea:disabled{background:#f0f2ed}
.muted{color:var(--muted)}
#release-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px}
.release{border:1px solid var(--line);background:#fff;padding:28px;border-radius:10px}
.release h3{font-size:28px;font-weight:500;margin:0}
.release .primary{margin:14px 0}
.login{max-width:610px;margin:35px auto}
.login>p:not(.eyebrow){max-width:500px;color:var(--muted)}
.login form{max-width:390px;margin:35px 0}
.login .primary{width:100%;margin-top:15px}
#login-error{color:#9a3f30;font-size:13px}
footer{border-top:1px solid var(--line);border-bottom:0;padding:22px 5%;color:var(--muted);font-size:12px}
dialog{border:1px solid var(--line);border-radius:14px;max-width:700px;width:calc(100% - 32px);padding:38px;color:inherit;background:#fafbf7}
dialog::backdrop{background:#16261dc0}
.close{float:right;border:0;margin:-20px -20px 10px 10px}
#detail-body{white-space:pre-wrap;line-height:1.75;font-size:15px;margin-top:20px;overflow-wrap:anywhere}
#more{margin-top:20px}
[hidden]{display:none!important}
.project-selector-wrapper{display:flex;align-items:center;gap:10px}
.selector-label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:1px;font-weight:600;margin:0}
.project-select{font-size:14px;border:1px solid var(--line);border-radius:25px;padding:10px 18px;background:#fff;color:inherit;cursor:pointer;font-weight:600}
.project-select:focus-visible{outline:3px solid #78a98a;outline-offset:2px}
#setup-error{color:#9a3f30;font-size:13px}

/* Chat Layout & Multi-Thread Responsive UI */
.chat-layout{display:grid;grid-template-columns:270px 1fr;gap:24px;align-items:start;margin-top:10px}
.chat-sidebar{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:12px}
.chat-sidebar-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;border-bottom:1px solid var(--line)}
.chat-sidebar-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:var(--muted)}
.thread-list{display:flex;flex-direction:column;gap:6px;max-height:540px;overflow-y:auto}
.thread-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 12px;border-radius:8px;border:1px solid transparent;text-align:left;background:transparent;width:100%;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.thread-item:hover{background:#edf1e8}
.thread-item.active{background:#e2ecdf;border-color:#c4dac1}
.thread-title{font-size:13.5px;font-weight:600;color:#23342d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
.thread-meta{font-size:11px;color:var(--muted)}
.mobile-thread-picker{display:none}
.empty-threads{padding:20px 8px;text-align:center}

.chat-main{display:flex;flex-direction:column;min-width:0}
.chat-main-header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 18px;background:#fff;border:1px solid var(--line);border-radius:10px;margin-bottom:18px}
.chat-current-info{display:flex;flex-direction:column;gap:2px;min-width:0}
#active-thread-title{font-size:15px;color:#23342d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.btn-primary-sm{display:inline-flex;align-items:center;gap:6px;background:var(--green);color:#fff;border:0;border-radius:7px;padding:9px 15px;font-size:13px;font-weight:600}
.btn-primary-sm:hover{background:#1e4632}
.btn-danger-sm{display:inline-flex;align-items:center;gap:4px;background:#fdf2f2;color:#9b1c1c;border:1px solid #f8b4b4;border-radius:7px;padding:7px 12px;font-size:12px;font-weight:600}
.btn-danger-sm:hover{background:#fde8e8}

.chat-history{display:flex;flex-direction:column;gap:18px;max-width:100%;margin-bottom:24px;max-height:550px;overflow-y:auto;padding-right:6px}
.chat-bubble{padding:18px 22px;border-radius:12px;border:1px solid var(--line);max-width:90%;word-break:break-word}
.chat-bubble.user{align-self:flex-end;background:#f2f7f1;border-color:#c8dac5}
.chat-bubble.assistant{align-self:flex-start;background:#edf1e8;border-color:var(--line)}
.chat-bubble-header{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:10px;font-size:12px}
.chat-sender{font-weight:650;color:var(--green)}
.chat-bubble.user .chat-sender{color:#1b4332}
.chat-time{color:var(--muted);font-size:11px}
.chat-meta-bar{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.chat-badge{font-size:11px;padding:3px 8px;border-radius:12px;background:#e2ecdf;color:#244d35;font-weight:600}
.chat-badge.bug{background:#fde8e8;color:#9b1c1c}
.chat-ticket-btn{font-size:11px;padding:3px 10px;border-radius:12px;background:#f8ebcc;color:#775318;font-weight:700;border:1px solid #e2d2a4;cursor:pointer}
.chat-ticket-btn:hover{background:#f0deb0}
.chat-body{font-size:14.5px;line-height:1.6;white-space:pre-wrap}
.msg-type-selector{display:flex;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.radio-label{display:flex;align-items:center;gap:10px;font-size:13px;cursor:pointer;border:1px solid var(--line);padding:10px 14px;border-radius:8px;background:#fff;user-select:none}
.radio-label:has(input:checked){border-color:var(--green);background:#f2f7f1}
.radio-label input{width:auto;margin:0;cursor:pointer}
.radio-text strong{color:#23342d}
#summary-container{margin-bottom:14px}
.composer-footer{display:flex;align-items:center;gap:16px;margin-top:12px}

/* Responsive Styles */
@media(max-width:768px){
  header{padding:18px 20px}
  .private{font-size:11px;gap:10px}
  main{padding:28px 16px}
  .intro{flex-direction:column;align-items:flex-start;gap:16px}
  .project-selector-wrapper{width:100%}
  .project-select{width:100%}
  nav{gap:18px;overflow-x:auto}
  .section-heading{flex-direction:column;align-items:flex-start;gap:12px}
  .chat-header-actions{width:100%;justify-content:space-between}
  h2{font-size:21px}
  .ticket{align-items:flex-start;gap:12px}
  .ticket-info{display:block}
  .key{display:block;margin-bottom:8px}
  .ticket-meta{gap:8px}
  .arrow{display:none}
  .chat-space{padding:25px}
  dialog{padding:24px}
  .login{margin-top:20px}

  /* Chat responsive rules */
  .chat-layout{display:flex;flex-direction:column;gap:16px}
  .chat-sidebar{background:transparent;border:0;padding:0}
  .chat-sidebar-header{display:none}
  .thread-list{display:none}
  .mobile-thread-picker{display:flex;flex-direction:column;gap:6px;width:100%}
  #thread-select{width:100%;padding:10px 14px;font-size:14px;border:1px solid var(--line);border-radius:8px;background:#fff}
  .chat-main-header{padding:10px 14px}
  .msg-type-selector{flex-direction:column;gap:8px}
}
