.support-shell { min-height: 100vh; background: var(--bg-dark, #10121b); color: var(--text-main, #e5e7eb); }
.support-topbar { min-height: 70px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border-color, #303345); }
.support-topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.support-topbar a { color: inherit; text-decoration: none; }
.support-topbar form { margin: 0; }
.support-page { padding-top: 24px; }
.support-workspace { height: 100dvh; }
.support-workspace .main-content { height: 100dvh; min-height: 0; overflow: hidden; }
.support-workspace .sidebar-brand { text-decoration: none; }
.support-workspace .sidebar-menu > .menu-item { display: flex; align-items: center; gap: 12px; }
.support-workspace .sidebar-menu > .menu-item span { overflow-wrap: anywhere; }
.support-workspace .support-page { flex: 1; min-height: 0; padding: 20px; overflow: hidden; }
.support-workspace .support-desk { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.support-workspace .support-desk .support-columns { flex: 1; height: auto; min-height: 0; }
.support-workspace .header-left { min-width: 0; }
.support-workspace .header-left h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-workspace .profile-info { min-width: 0; max-width: 200px; }
.support-workspace .username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-mobile-brand { display: none; }
.support-chat { background: var(--card-bg, #191c29); border: 1px solid var(--border-color, #34374b); border-radius: 12px; box-shadow: 0 12px 40px #0003; overflow: hidden; color: var(--text-main, #e5e7eb); font-family: 'Inter', 'Segoe UI', sans-serif; font-size: 13px; font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.support-chat :is(button, input, select, textarea) { font-family: inherit; font-size: 13px; font-weight: 400; }
.support-chat :is(strong, h2, h3) { font-weight: 600; letter-spacing: -.01em; }
.support-chat .btn { font-size: 12px; font-weight: 500; }
.support-chat[hidden], .support-chat [hidden] { display: none !important; }
.support-heading { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(110deg, #7c3aed1f, transparent); border-bottom: 1px solid var(--border-color,#34374b); }
.support-heading strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.support-heading strong > i { color: #a78bfa; font-size: 16px; }
.support-heading small { display: block; margin-top: 4px; max-width: 70ch; font-size: 11px; font-weight: 400; color: var(--text-muted,#a5adc1); line-height: 1.5; }
.support-icon { border: 0; background: transparent; color: inherit; padding: 8px; cursor: pointer; }
.support-columns { display: grid; grid-template-columns: 280px minmax(0, 1fr) 230px; min-height: 580px; height: min(76vh, 900px); }
.support-inbox { border-right: 1px solid var(--border-color, #34374b); display: flex; flex-direction: column; min-height: 0; }
.support-inbox-tools { padding: 12px; display: grid; gap: 10px; }
.support-chat input:not([type=checkbox]):not([type=file]), .support-chat select, .support-chat textarea { width: 100%; min-width: 0; border: 1px solid var(--border-color, #3c4157); background: var(--bg-dark, #121622); color: var(--text-main,#e5e7eb); border-radius: 8px; padding: 10px; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.5; }
.support-list { overflow-y: auto; flex: 1; }
.support-list > p { padding: 16px; color: var(--text-muted, #a5adc1); }
.support-item { display: block; width: 100%; padding: 15px; border: 0; border-bottom: 1px solid var(--border-color, #34374b); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.support-item.active { background: #8645df26; box-shadow: inset 3px 0 #a975fa; }
.support-item strong, .support-item small { display: block; overflow-wrap: anywhere; }
.support-item small { margin-top: 6px; color: var(--text-muted, #a5adc1); }
.support-item .support-count, #support-unread { background: #e55371; color: white; padding: 2px 7px; border-radius: 12px; margin-left: 6px; font-size: 11px; }
.support-pager { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.support-pager button, .support-older { background: transparent; color: inherit; border: 1px solid var(--border-color, #3c4157); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
.support-thread { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#support-conversation { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.support-thread-heading { padding: 16px 20px; border-bottom: 1px solid var(--border-color, #34374b); }
.support-thread-heading h2 { margin: 0 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.support-thread-heading small { color: var(--text-muted, #a5adc1); }
.support-actions { display: flex; align-items: center; gap: 8px; padding: 10px; flex-wrap: wrap; }
.support-actions select { width: auto; max-width: 210px; }
.support-actions .btn { font-size: 12px; }
.support-messages { flex: 1; overflow-y: auto; padding: 16px; min-height: 100px; }
.support-message { max-width: 85%; width: fit-content; background: var(--bg-dark, #111622); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; overflow-wrap: anywhere; }
.support-message.mine { margin-left: auto; background: #7438c7; color: white; }
.support-message.note { border: 1px dashed #d2a33e; background: #765e2026; color: inherit; }
.support-message p { white-space: pre-wrap; margin: 6px 0; }
.support-message small { display: block; font-size: 11px; opacity: .8; }
.support-message img { display: block; max-width: 100%; max-height: 280px; border-radius: 6px; margin: 8px 0; }
.support-composer { border-top: 1px solid var(--border-color, #34374b); padding: 12px; }
.support-composer textarea { resize: vertical; max-height: 150px; }
.support-keyboard-help { display: block; margin-top: 4px; color: var(--text-muted,#a5adc1); font-size: 10px; font-weight: 400; }
.support-compose-tools { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.support-compose-tools .btn { margin-left: auto; }
.support-attach { position: relative; cursor: pointer; font-size: 12px; padding: 8px; border: 1px solid var(--border-color,#3c4157); border-radius: 6px; }
.support-attach input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.support-attach:focus-within { outline: 2px solid #a975fa; outline-offset: 2px; }
.support-composer small, .support-create small { font-size: 11px; color: var(--text-muted, #a5adc1); }
.support-note-toggle { display: block; font-size: 12px; margin-bottom: 8px; }
.support-create { overflow-y: auto; padding: 20px; }
.support-create h3 { font-size: 15px; margin: 0 0 16px; }
.support-create label { display: block; margin: 12px 0; font-size: 12px; font-weight: 400; color: var(--text-muted,#a5adc1); }
.support-create :is(input,select,textarea) { color: var(--text-main,#e5e7eb); font-weight: 400; }
.support-create input, .support-create textarea, .support-create select { margin-top: 6px; }
.support-create > div { margin-top: 16px; }
.support-context { padding: 18px; border-left: 1px solid var(--border-color, #34374b); overflow-y: auto; }
.support-context h3 { font-size: 15px; margin: 0 0 20px; }
#support-info { display: none; }
.support-context p { overflow-wrap: anywhere; font-size: 12px; color: var(--text-muted, #a5adc1); line-height: 1.6; }
.support-context strong { display: block; color: var(--text-main, #e5e7eb); }
.support-launcher { position: relative; flex-shrink: 0; font-weight: 500; }
.support-launcher > i { color: #a78bfa; }
.support-launcher:hover, .support-launcher[aria-expanded=true] { border-color: #a78bfa; background: #7c3aed1a; }
.support-launcher #support-unread { position: absolute; top: -5px; right: -5px; margin: 0; min-width: 18px; padding: 1px 5px; font-size: 10px; }
.support-launcher [hidden] { display: none !important; }
.support-widget { position: fixed; right: 18px; top: 66px; bottom: auto; width: min(680px, calc(100vw - 36px)); height: min(640px,calc(100dvh - 84px)); max-height: calc(100dvh - 84px); z-index: 1049; display: flex; flex-direction: column; }
.support-widget .support-columns { grid-template-columns: 190px minmax(0, 1fr); height: auto; flex: 1; min-height: 0; }
.support-widget .support-heading { padding: 12px 16px; }
.workspace-page { max-width: 1050px; padding-top: 60px; }
.workspace-page > p { color: var(--text-muted, #a5adc1); margin: 18px 0 30px; }
.workspace-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; margin-top: 24px; }
.workspace-option { border: 1px solid var(--border-color, #34374b); border-radius: 16px; padding: 28px; background: var(--bg-card, #191c29); color: inherit; text-align: left; cursor: pointer; }
.workspace-option:hover { border-color: #a975fa; }
.workspace-option > i { font-size: 28px; color: #ac7bf5; }
.workspace-option strong, .workspace-option span { display: block; margin-top: 20px; }
.workspace-option span { color: var(--text-muted, #a5adc1); }
@media(max-width:1150px) {
    .support-workspace .support-sidebar { width: 80px; }
    .support-workspace .support-sidebar .sidebar-brand { padding: 24px 22px; }
    .support-workspace .support-sidebar .brand-text,
    .support-workspace .support-sidebar .menu-item > span { display: none; }
    .support-workspace .support-sidebar .menu-item { justify-content: center; padding: 12px; }
    .client-system-header:has(.support-launcher) .client-control-label,
    .client-system-header:has(.support-launcher) .client-brand .brand-version { display: none; }
    .support-launcher-label { display: none; }
    .support-launcher.client-header-control { width: 36px; height: 36px; min-height: 36px; padding: 0; }
    .support-desk .support-columns { grid-template-columns: 250px minmax(0,1fr); }
    #support-info { display: block; }
    .support-context { display: none; }
    .support-context.is-open { display: block; position: fixed; z-index: 1060; right: 18px; top: 25vh; width: min(320px,calc(100vw - 36px)); max-height: 60vh; background: var(--bg-card,#191c29); border: 1px solid var(--border-color,#34374b); border-radius: 12px; box-shadow: 0 12px 40px #0007; }
}
@media(max-width:560px) {
    .client-system-header:has(.support-launcher) { padding-inline: 10px; }
    .client-system-header:has(.support-launcher) .client-header-actions { gap: 4px; }
    .client-system-header:has(.support-launcher) :is(.client-header-control,.client-credit-badge,.client-package-badge) { width: 32px; height: 32px; min-height: 32px; padding: 0; }
}
@media(max-width:380px) {
    .client-system-header:has(.support-launcher) :is(.client-credit-badge,.client-package-badge) { display: none; }
}
@media(max-width:650px) {
    .support-workspace .support-sidebar { display: none; }
    .support-workspace .support-mobile-brand { display: inline-flex; flex-shrink: 0; }
    .support-workspace .top-bar { padding-inline: 12px; }
    .support-workspace .header-left { gap: 10px; }
    .support-workspace .header-left h1 { font-size: 14px; font-weight: 600; }
    .support-workspace .admin-user-trigger { min-width: 0; padding: 6px; }
    .support-workspace .admin-user-trigger .profile-info { display: none; }
    .support-workspace .support-page { padding: 12px; }
    .support-workspace .support-desk .support-columns { grid-template-rows: minmax(110px,155px) minmax(0,1fr); }
    .support-topbar { padding: 12px; align-items: flex-start; flex-direction: column; }
    .support-topbar nav { gap: 10px; font-size: 12px; }
    .support-widget { right: 8px; top: 64px; bottom: auto; width: calc(100vw - 16px); height: calc(100dvh - 76px); max-height: calc(100dvh - 76px); }
    .support-columns, .support-widget .support-columns, .support-desk .support-columns { grid-template-columns: minmax(0,1fr); height: 72vh; min-height: 0; }
    .support-widget .support-columns { height: auto; grid-template-rows: minmax(110px,auto) minmax(0,1fr); }
    .support-widget.is-creating .support-inbox { display: none; }
    .support-widget.is-creating .support-columns { grid-template-rows: minmax(0,1fr); }
    .support-widget .support-thread { min-height: 0; }
    .support-inbox { max-height: 220px; border-bottom: 1px solid var(--border-color,#34374b); border-right: 0; }
    .support-chat.has-selection .support-inbox { max-height: 155px; }
    .support-thread { min-height: 240px; }
    .support-chat .support-list { min-height: 50px; }
    .support-item { padding: 8px 12px; }
    .support-heading small { font-size: 11px; }
    .support-composer small { display: none; }
}
