/* =====================================================================
   IT Asset Manager - app-specific components (extends style.css)
   ===================================================================== */

/* Sidebar collapsible groups */
.nav-group > .nav-group-toggle { display: flex; align-items: center; gap: 12px; padding: 7px 10px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: .86rem; cursor: pointer; user-select: none; position: relative; --c: #818cf8; transition: all .2s var(--ease); }
.nav-group > .nav-group-toggle i:first-child { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: .86rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.nav-group > .nav-group-toggle .chev { margin-left: auto; font-size: .65rem; color: var(--text-3); transition: transform .25s; }
.nav-group.open > .nav-group-toggle .chev { transform: rotate(180deg); }
.nav-group > .nav-group-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group.has-active > .nav-group-toggle { color: #fff; }
.nav-group-items { display: none; padding-left: 14px; margin: 2px 0 4px 23px; border-left: 1px solid var(--border); }
.nav-group.open > .nav-group-items { display: block; }
.nav-group-items a { padding: 6px 10px; font-size: .82rem; }
.nav-group-items a i { width: 22px; height: 22px; font-size: .72rem; border-radius: 6px; }
@media (min-width: 861px) {
    html.sb-collapsed .sidebar:not(:hover) .nav-group-items { display: none !important; }
    html.sb-collapsed .sidebar:not(:hover) .nav-group > .nav-group-toggle { justify-content: center; padding: 8px 0; }
    html.sb-collapsed .sidebar:not(:hover) .nav-group > .nav-group-toggle .chev, html.sb-collapsed .sidebar:not(:hover) .nav-group > .nav-group-toggle span { display: none; }
    html.sb-collapsed .sidebar:not(:hover) .nav-group > .nav-group-toggle i:first-child { width: 38px; height: 38px; font-size: 1.05rem; }
    html.sb-collapsed .sidebar:not(:hover) .nav-group.has-active > .nav-group-toggle i:first-child { background: var(--c); color: #0b1020; }
}
.sidebar-role { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: rgba(34,211,238,.14); color: #67e8f9; border: 1px solid rgba(34,211,238,.3); }

/* Topbar: search + notifications */
.topbar-search { position: relative; }
.topbar-search input { width: 240px; padding: 7px 12px 7px 34px; font-size: .82rem; border-radius: 10px; }
.topbar-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: .8rem; }
.topbar-search .results { display: none; position: absolute; top: calc(100% + 8px); left: 0; width: 380px; max-height: 420px; overflow-y: auto; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 1200; }
.topbar-search .results.open { display: block; }
.topbar-search .results .group { padding: 8px 14px 4px; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }
.topbar-search .results a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: var(--text); font-size: .86rem; }
.topbar-search .results a:hover { background: rgba(99,102,241,.12); }
.topbar-search .results a i { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: .75rem; color: #fff; background: var(--grad-primary); flex: none; }
.topbar-search .results a small { color: var(--text-3); margin-left: auto; font-size: .72rem; white-space: nowrap; }
.topbar-search .results .none { padding: 16px; text-align: center; color: var(--text-3); font-size: .84rem; }
@media (max-width: 1300px) { .topbar-search input { width: 180px; } }
@media (max-width: 1024px) { .topbar-search { display: none; } }

.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,.05); color: var(--text-2); cursor: pointer; display: grid; place-items: center; font-size: .9rem; transition: all .2s var(--ease); }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; border-color: var(--border-strong); }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--grad-danger); color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-menu { position: relative; }
.notif-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: 92vw; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 1200; animation: fadeUp .18s var(--ease); }
.notif-dropdown.open { display: block; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-head strong { font-size: .9rem; }
.notif-head a { font-size: .76rem; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item.unread { background: rgba(99,102,241,.08); }
.notif-item .ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: .85rem; }
.notif-item .ic.ticket { background: rgba(99,102,241,.18); color: #a5b4fc; } .notif-item .ic.reminder { background: rgba(245,158,11,.18); color: #fbbf24; }
.notif-item .ic.alert, .notif-item .ic.error { background: rgba(239,68,68,.18); color: #f87171; } .notif-item .ic.system, .notif-item .ic.info { background: rgba(59,130,246,.18); color: #93c5fd; } .notif-item .ic.success { background: rgba(16,185,129,.18); color: #34d399; }
.notif-item strong { display: block; font-size: .84rem; }
.notif-item p { font-size: .78rem; color: var(--text-2); margin: 2px 0 4px; }
.notif-item small { font-size: .7rem; color: var(--text-3); }
.notif-foot { padding: 10px; text-align: center; border-top: 1px solid var(--border); }
.notif-foot a { font-size: .8rem; }

/* Toasts (live) */
.toast-wrap .toast { align-items: flex-start; max-width: 380px; }
.toast .t-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: .8rem; }
.toast.success .t-ic { background: rgba(16,185,129,.18); color: #34d399; } .toast.error .t-ic { background: rgba(239,68,68,.18); color: #f87171; }
.toast.info .t-ic { background: rgba(59,130,246,.18); color: #93c5fd; } .toast.warning .t-ic { background: rgba(245,158,11,.18); color: #fbbf24; }
.toast.info { border-left: 3px solid var(--info); } .toast.warning { border-left: 3px solid var(--warning); }
.toast strong { display: block; font-size: .84rem; } .toast span { font-size: .8rem; color: var(--text-2); }
.toast .t-close { margin-left: auto; background: none; border: 0; color: var(--text-3); cursor: pointer; font-size: 1rem; }

/* Detail (view) modal */
.detail-hero { display: flex; gap: 18px; align-items: center; padding: 20px 22px; background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(34,211,238,.10)); border-bottom: 1px solid var(--border); }
.detail-hero .big-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 1.8rem; color: #fff; background: var(--grad-primary); box-shadow: 0 14px 30px -12px rgba(99,102,241,.9); flex: none; overflow: hidden; }
.detail-hero .big-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero h3 { font-size: 1.2rem; font-weight: 800; }
.detail-hero .sub { color: var(--text-2); font-size: .84rem; margin-top: 2px; }
.detail-hero .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.detail-item { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); min-width: 0; }
.detail-item .l { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.detail-item .l i { color: var(--accent); }
.detail-item .v { margin-top: 3px; font-weight: 600; font-size: .9rem; word-break: break-word; }
.detail-item .v.mono { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.detail-item.span-2 { grid-column: span 2; }
.copy-btn { border: 0; background: rgba(255,255,255,.06); color: var(--text-2); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; font-size: .72rem; margin-left: 6px; vertical-align: middle; }
.copy-btn:hover { background: rgba(99,102,241,.25); color: #fff; }
.secret { display: inline-flex; align-items: center; gap: 6px; }
.secret .val { font-family: ui-monospace, Menlo, monospace; letter-spacing: .08em; }

/* Modal size variants + tabs inside modal */
.modal-content.xl { max-width: 1100px; }
.modal .tabs { margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; background: rgba(0,0,0,.15); padding: 6px 14px; gap: 4px; }
.modal .tabs .tab-btn { flex: none; min-width: 0; padding: 8px 14px; }
.modal-body .form-grid { gap: 12px 14px; }
.modal-body.scroll { max-height: 62vh; overflow-y: auto; }

/* Table extras */
.tbl-avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--grad-primary); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; overflow: hidden; flex: none; }
.tbl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 6px; border: 2px solid rgba(255,255,255,.2); }
.tag-mono { font-family: ui-monospace, Menlo, monospace; font-size: .78rem; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px; background: linear-gradient(90deg, rgba(99,102,241,.22), rgba(34,211,238,.10)); border-bottom: 1px solid rgba(139,92,246,.35); }
tr.selected td { background: rgba(99,102,241,.10); }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { color: #fff; } th.sortable i { margin-left: 4px; font-size: .65rem; opacity: .6; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.view-toggle button { border: 0; background: transparent; color: var(--text-2); padding: 6px 11px; cursor: pointer; font-size: .82rem; }
.view-toggle button.active { background: rgba(99,102,241,.25); color: #fff; }

/* Card grid view */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 18px; }
.item-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,.03); padding: 14px; transition: all .2s var(--ease); display: flex; flex-direction: column; gap: 10px; }
.item-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: rgba(99,102,241,.08); }
.item-card .thumb { height: 110px; border-radius: 10px; background: rgba(0,0,0,.25); display: grid; place-items: center; overflow: hidden; color: var(--text-3); font-size: 2rem; }
.item-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-card h4 { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-card .meta { font-size: .74rem; color: var(--text-3); display: flex; justify-content: space-between; gap: 6px; }
.item-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: rgba(255,255,255,.025); border: 1px solid var(--border); border-radius: var(--radius); min-height: 320px; display: flex; flex-direction: column; }
.kanban-col.drag-over { border-color: rgba(139,92,246,.7); background: rgba(99,102,241,.08); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); border-top: 3px solid var(--kc, var(--primary)); border-radius: var(--radius) var(--radius) 0 0; }
.kanban-head h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.kanban-head h4::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--kc, var(--primary)); box-shadow: 0 0 10px var(--kc, var(--primary)); }
.kanban-head .count { font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.08); }
.kanban-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.kcard { background: var(--surface-solid); border: 1px solid var(--border); border-left: 3px solid var(--pc, var(--text-3)); border-radius: 10px; padding: 12px; cursor: grab; transition: transform .15s, box-shadow .15s; }
.kcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.kcard.dragging { opacity: .5; transform: rotate(2deg); }
.kcard .num { font-size: .7rem; color: var(--text-3); font-family: ui-monospace, Menlo, monospace; }
.kcard h5 { font-size: .88rem; margin: 4px 0 6px; font-weight: 600; line-height: 1.35; }
.kcard .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .72rem; color: var(--text-3); }
.kcard .who { display: flex; align-items: center; gap: 6px; }
.kcard .who .av { width: 22px; height: 22px; border-radius: 50%; background: var(--grad-primary); display: grid; place-items: center; font-size: .6rem; font-weight: 700; color: #fff; }
.kanban-empty { flex: 1; display: grid; place-items: center; color: var(--text-3); font-size: .78rem; border: 1px dashed var(--border); border-radius: 10px; min-height: 80px; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }
.prio-critical { --pc: #ef4444; } .prio-high { --pc: #f97316; } .prio-medium { --pc: #f59e0b; } .prio-low { --pc: #10b981; }

/* Ticket conversation */
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment .av { width: 36px; height: 36px; border-radius: 10px; background: var(--grad-primary); display: grid; place-items: center; font-weight: 700; font-size: .75rem; color: #fff; flex: none; }
.comment .bubble { flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.comment .bubble .h { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--text-3); margin-bottom: 4px; }
.comment .bubble .h strong { color: var(--text); }
.comment .bubble .b { font-size: .88rem; white-space: pre-wrap; word-break: break-word; }

/* Checklist / progress */
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border); background: rgba(255,255,255,.03); cursor: pointer; font-size: .84rem; margin: 0; color: var(--text); font-weight: 500; }
.check-item input { flex: none; }
.check-item.done { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); }
.progress.lg { height: 12px; }
.ring { --p: 0; --c: var(--success); width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); display: grid; place-items: center; font-size: .68rem; font-weight: 800; flex: none; }
.ring::after { content: attr(data-label); width: 34px; height: 34px; border-radius: 50%; background: var(--surface-solid); display: grid; place-items: center; }

/* Permission matrix */
.perm-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.perm-group-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: rgba(255,255,255,.04); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.perm-group-head label { margin: 0; font-size: .7rem; font-weight: 600; text-transform: none; letter-spacing: 0; display: flex; gap: 6px; align-items: center; cursor: pointer; color: var(--text-2); }
.perm-group-body { padding: 6px 8px; display: grid; gap: 2px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; font-size: .82rem; cursor: pointer; margin: 0; color: var(--text); font-weight: 500; }
.perm-row:hover { background: rgba(255,255,255,.04); }
.perm-row code { font-size: .68rem; color: var(--text-3); background: transparent; padding: 0; margin-left: auto; }
.role-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 10px; transition: all .2s; }
.role-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.role-card .lvl { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); font-weight: 700; }

/* Timeline with icons (activity log) */
.timeline li.has-ic { padding-left: 26px; }
.timeline li.has-ic::before { display: none; }
.timeline .dot-ic { position: absolute; left: -13px; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .6rem; color: #fff; background: var(--grad-primary); box-shadow: 0 0 0 3px var(--surface-solid); }

/* Public portal */
.portal-body { padding: 24px 16px; }
.portal-wrap { max-width: 1100px; margin: 0 auto; }
.portal-hero { text-align: center; padding: 24px 20px 10px; }
.portal-hero .auth-logo { margin-bottom: 14px; }
.portal-hero h1 { font-size: 1.7rem; font-weight: 800; }
.portal-hero p { color: var(--text-2); margin-top: 6px; }
.captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.captcha-row img { height: 46px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; }
.status-track { display: flex; align-items: center; margin: 10px 0 4px; }
.status-track .step { flex: 1; text-align: center; font-size: .7rem; color: var(--text-3); position: relative; padding-top: 22px; }
.status-track .step::before { content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid var(--border-strong); z-index: 1; }
.status-track .step::after { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); }
.status-track .step:first-child::after { display: none; }
.status-track .step.done { color: var(--text); } .status-track .step.done::before { background: var(--success); border-color: var(--success); } .status-track .step.done::after { background: var(--success); }
.status-track .step.current::before { background: var(--grad-primary); border-color: transparent; box-shadow: 0 0 0 4px rgba(99,102,241,.25); } .status-track .step.current { color: #fff; font-weight: 700; }

/* Misc */
.stat-mini { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.stat-mini i { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: .85rem; color: #fff; background: var(--grad-primary); flex: none; }
.stat-mini b { font-size: 1.05rem; display: block; line-height: 1.1; } .stat-mini span { font-size: .7rem; color: var(--text-3); }
.tab-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-pills a { padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.tab-pills a:hover { color: #fff; background: rgba(255,255,255,.07); }
.tab-pills a.active { background: var(--grad-primary); color: #fff; border-color: transparent; }
.avatar-lg { width: 96px; height: 96px; border-radius: 26px; background: var(--grad-primary); display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: #fff; overflow: hidden; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { pointer-events: none; opacity: .7; }
.form-error { border-color: rgba(239,68,68,.7) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.2) !important; }
.hint-danger { color: #f87171; font-size: .74rem; margin-top: 4px; }
.qr-box { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; }
.dz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); background: rgba(255,255,255,.02); cursor: pointer; text-align: center; color: var(--text); font-weight: 500; transition: all .2s; }
.dz i { font-size: 1.8rem; color: var(--accent); }
.dz:hover, .dz.over { border-color: rgba(139,92,246,.7); background: rgba(99,102,241,.08); }
.dz img.preview { max-height: 120px; border-radius: 8px; }
.expiry-warn { color: #fbbf24; } .expiry-bad { color: #f87171; } .expiry-ok { color: #34d399; }
.legend-list { display: grid; gap: 6px; }
.legend-list li { display: flex; align-items: center; gap: 8px; font-size: .8rem; list-style: none; }
.legend-list .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-list b { margin-left: auto; }
.sidebar-tickets a { padding: 6px 10px; }
.sidebar-tickets small { display: block; font-size: .68rem; color: var(--text-3); }

/* fixes */
.filter-bar .check { white-space: nowrap; } .filter-bar .check input { min-width: 0; width: 16px; height: 16px; padding: 0; }
.filter-bar input[type=date] { min-width: 140px; }

/* long text cells: clamp with ellipsis, full text on hover */
.clamp-cell { max-width: 240px; }
.clamp { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emp-cell .name { max-width: 260px; }
table td.muted { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Custom select / combobox (replaces native dropdowns inside modals) ---------- */
.cs { position: relative; width: 100%; }
.cs-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 36px 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; min-height: 40px; transition: border-color .2s, box-shadow .2s; }
.cs-toggle:hover { border-color: rgba(139,92,246,.5); }
.cs.open .cs-toggle, .cs-toggle:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.cs-toggle .cs-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-toggle .cs-text.placeholder { color: var(--text-3); }
.cs-toggle .cs-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .7rem; color: var(--text-3); transition: transform .2s; }
.cs.open .cs-toggle .cs-chev { transform: translateY(-50%) rotate(180deg); }
.cs-panel { position: fixed; z-index: 12000; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; display: none; animation: fadeUp .14s var(--ease); min-width: 200px; }
.cs-panel.open { display: flex; flex-direction: column; }
.cs-panel.up { animation-name: fadeDown; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cs-search { padding: 8px; border-bottom: 1px solid var(--border); position: relative; }
.cs-search i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: .75rem; }
.cs-search input { width: 100%; padding: 7px 10px 7px 30px; font-size: .84rem; border-radius: 8px; }
.cs-list { overflow-y: auto; max-height: 260px; padding: 4px; }
.cs-opt { padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: .86rem; display: flex; align-items: center; gap: 8px; color: var(--text); }
.cs-opt small { color: var(--text-3); margin-left: auto; font-size: .72rem; white-space: nowrap; }
.cs-opt:hover, .cs-opt.hl { background: rgba(99,102,241,.16); color: #fff; }
.cs-opt.sel { background: rgba(99,102,241,.3); color: #fff; font-weight: 600; }
.cs-opt.sel::after { content: "\f00c"; font: 900 .7rem "Font Awesome 6 Free"; margin-left: auto; }
.cs-opt.group { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-3); cursor: default; padding: 8px 12px 2px; font-weight: 700; }
.cs-opt.group:hover { background: none; }
.cs-empty { padding: 14px; text-align: center; color: var(--text-3); font-size: .82rem; }
.cs select.cs-native, .cs-native { display: none !important; }
.combo-wrap { position: relative; }

/* Quick-add "+ Add" button in form labels */
.form-group > label.has-qa { display: flex; align-items: center; gap: 6px; }
.qa-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); color: #67e8f9; font: 600 .7rem/1.6 inherit; cursor: pointer; transition: background .15s, border-color .15s, color .15s; text-transform: none; letter-spacing: 0; }
.qa-btn:hover { background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .6); color: #fff; }
.qa-btn i { font-size: .62rem; }
.modal.qa-modal { z-index: 11000; align-items: center; }
.qa-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qa-colors input[type=color] { width: 46px; height: 34px; padding: 2px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; }
.qa-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; transition: transform .12s; }
.qa-swatch:hover { transform: scale(1.15); border-color: #fff; }
