/* HandyMCP Help Desk: customer screens. Uses the theme's colour tokens when present. */
.hmhd{--hd-accent:var(--hm-btn,#C2410C);--hd-line:var(--line,#ECEAE6);--hd-surface:var(--surface,#fff);--hd-muted:var(--muted,#6B7280);--hd-fg:var(--fg,#14161B);display:grid;gap:18px}
.hmhd-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px}
.hmhd-head h2{margin:4px 0 0;font-size:clamp(22px,2.4vw,28px);line-height:1.2;letter-spacing:-.02em;color:var(--hd-fg)}
.hmhd-head p{margin:6px 0 0;color:var(--hd-muted);font-size:15px}
.hmhd-back{font-size:13.5px;font-weight:600;color:var(--hd-muted)!important;text-decoration:none!important}
.hmhd-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 22px;border:0;border-radius:999px;font:600 15px/1 inherit;color:#fff!important;background:var(--hd-accent)!important;text-decoration:none!important;cursor:pointer;transition:background .25s,transform .25s}
.hmhd-btn:hover{background:#9A3412!important;transform:translateY(-1px)}
.hmhd-btn[disabled]{opacity:.6;cursor:progress}
.hmhd-btn--sm{min-height:40px;padding:0 18px;font-size:14px}
.hmhd-link{padding:0;border:0;background:none;font-size:14px;font-weight:600;color:var(--hd-muted);text-decoration:underline;cursor:pointer}
.hmhd-help{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hmhd-help a{display:grid;gap:2px;padding:14px 16px;border-radius:14px;background:var(--hd-surface);box-shadow:inset 0 0 0 1px var(--hd-line);text-decoration:none!important;transition:box-shadow .25s}
.hmhd-help a:hover{box-shadow:inset 0 0 0 1px var(--hd-accent)}
.hmhd-help b{font-size:14.5px;color:var(--hd-fg)}
.hmhd-help span{font-size:13px;color:var(--hd-muted)}
.hmhd-tabs{display:flex;gap:6px;border-bottom:1px solid var(--hd-line)}
.hmhd-tabs a{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;margin-bottom:-1px;border-bottom:2px solid transparent;font-size:14.5px;font-weight:600;color:var(--hd-muted)!important;text-decoration:none!important}
.hmhd-tabs a[aria-current]{color:var(--hd-fg)!important;border-color:var(--hd-accent)}
.hmhd-tabs em{min-width:22px;padding:2px 7px;border-radius:999px;font-style:normal;font-size:12px;text-align:center;background:rgba(0,0,0,.06)}
.hmhd-list{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.hmhd-list a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;border-radius:16px;background:var(--hd-surface);box-shadow:inset 0 0 0 1px var(--hd-line);text-decoration:none!important;transition:box-shadow .25s,transform .25s}
.hmhd-list a:hover{transform:translateY(-1px);box-shadow:inset 0 0 0 1px var(--hd-accent)}
.hmhd-list__main{display:grid;gap:3px;min-width:0}
.hmhd-list__num{font:600 12px/1.4 var(--f-mono,monospace);color:var(--hd-accent)}
.hmhd-list b{font-size:15.5px;color:var(--hd-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hmhd-list small{font-size:13px;color:var(--hd-muted)}
.hmhd-pill{flex:none;padding:4px 11px;border-radius:999px;font-size:12.5px;font-weight:600;white-space:nowrap}
.hmhd-pill.is-warn{color:#B45309;background:rgba(245,158,11,.14)}
.hmhd-pill.is-info{color:#1D4ED8;background:rgba(59,130,246,.12)}
.hmhd-pill.is-accent{color:#C2410C;background:rgba(255,107,53,.14)}
.hmhd-pill.is-ok{color:#15803D;background:rgba(22,163,74,.12)}
.hmhd-pill.is-muted{color:#6B7280;background:rgba(107,114,128,.12)}
.hmhd-plan{padding:6px 12px;border-radius:999px;font-size:12.5px;font-weight:700;color:#6B7280;background:rgba(107,114,128,.12)}
.hmhd-plan.is-pro{color:#C2410C;background:rgba(255,107,53,.12)}
.hmhd-plan.is-agency{color:#fff;background:#14161B}
.hmhd-empty{display:grid;justify-items:center;gap:6px;padding:40px 20px;border-radius:18px;text-align:center;background:var(--hd-surface);box-shadow:inset 0 0 0 1px var(--hd-line)}
.hmhd-empty b{font-size:17px;color:var(--hd-fg)}
.hmhd-empty p{margin:0 0 10px;color:var(--hd-muted)}
.hmhd-card{display:grid;gap:16px;padding:clamp(20px,3vw,28px);border-radius:20px;background:var(--hd-surface);box-shadow:inset 0 0 0 1px var(--hd-line)}
.hmhd-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hmhd-field{display:grid;gap:6px;margin:0}
.hmhd-field>span{font-size:14px;font-weight:600;color:var(--hd-fg)}
.hmhd-field input,.hmhd-field select,.hmhd-field textarea,.hmhd-rate textarea{width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--hd-line);border-radius:12px;font:inherit;font-size:15px;background:var(--bg,#FAF9F7);color:var(--hd-fg)}
.hmhd-field textarea{min-height:140px;resize:vertical;line-height:1.55}
.hmhd-field :focus{outline:0;border-color:var(--hd-accent);box-shadow:0 0 0 3px rgba(255,107,53,.18)}
.hmhd-drop{position:relative;display:grid;gap:4px;padding:18px;border:1.5px dashed var(--hd-line);border-radius:14px;text-align:center;cursor:pointer;transition:border-color .25s,background .25s}
.hmhd-drop:hover,.hmhd-drop.is-over{border-color:var(--hd-accent);background:rgba(255,107,53,.04)}
.hmhd-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.hmhd-drop b{font-size:14.5px;color:var(--hd-fg)}
.hmhd-drop span{font-size:13px;color:var(--hd-muted)}
.hmhd-drop ul{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0 0;padding:0;list-style:none}
.hmhd-drop li{padding:3px 10px;border-radius:999px;font-size:12.5px;background:rgba(0,0,0,.06)}
.hmhd-note{margin:0;font-size:13px;color:var(--hd-muted)}
.hmhd-form .hmhd-btn,.hmhd-actions .hmhd-btn{justify-self:start}
.hmhd-meta{display:flex;flex-wrap:wrap;gap:6px}
.hmhd-meta span{padding:3px 10px;border-radius:999px;font-size:12.5px;background:rgba(0,0,0,.05)}
.hmhd-thread{display:grid;gap:14px;margin:0;padding:0;list-style:none}
.hmhd-msg{display:flex;gap:12px;align-items:flex-start}
.hmhd-msg__av{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;font-weight:700;font-size:14px;color:#fff;background:#6B7280}
.hmhd-msg.is-agent .hmhd-msg__av{background:linear-gradient(135deg,#FF8B4D,#EE4B22)}
.hmhd-msg__body{flex:1;min-width:0;padding:14px 18px;border-radius:4px 16px 16px 16px;background:var(--hd-surface);box-shadow:inset 0 0 0 1px var(--hd-line)}
.hmhd-msg.is-agent .hmhd-msg__body{background:rgba(255,107,53,.05);box-shadow:inset 0 0 0 1px rgba(255,107,53,.25)}
.hmhd-msg__who{display:flex;justify-content:space-between;gap:10px;margin:0 0 6px;font-size:13.5px}
.hmhd-msg__who b{color:var(--hd-fg)}
.hmhd-msg__who time{color:var(--hd-muted)}
.hmhd-msg__text{font-size:15px;line-height:1.65;color:var(--fg-2,#3B3F48);overflow-wrap:anywhere}
.hmhd-msg__text p{margin:0 0 10px}
.hmhd-msg__text p:last-child{margin:0}
.hmhd-msg__text code{padding:1px 6px;border-radius:6px;background:rgba(0,0,0,.06);font-size:.9em}
.hmhd-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.hmhd-file{display:inline-flex;align-items:center;gap:8px;max-width:240px;padding:6px 10px;border-radius:10px;font-size:13px;background:rgba(0,0,0,.05);text-decoration:none!important;color:var(--hd-fg)!important}
.hmhd-file img{width:40px;height:40px;object-fit:cover;border-radius:6px}
.hmhd-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hmhd-rate{justify-items:start}
.hmhd-stars{display:inline-flex;flex-direction:row-reverse;gap:2px}
.hmhd-stars input{position:absolute;opacity:0}
.hmhd-stars label{font-size:30px;line-height:1;color:#D1D5DB;cursor:pointer;transition:color .15s}
.hmhd-stars input:checked~label,.hmhd-stars label:hover,.hmhd-stars label:hover~label{color:#F59E0B}
.hmhd-closeform{margin:0;text-align:right}
@media (max-width:700px){.hmhd-grid,.hmhd-help{grid-template-columns:1fr}.hmhd-list a{flex-direction:column;align-items:flex-start}}
