@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
    --ink: #292d2f;
    --muted: #666a70;
    --subtle: #96999e;
    --primary: #6d2ce8;
    --primary-dark: #4820aa;
    --primary-soft: #f0e9ff;
    --accent: #a7dc22;
    --accent-dark: #82b10e;
    --accent-soft: #f0f9d7;
    --blue: #8750ee;
    --cyan: #31c87a;
    --success: #27b96f;
    --success-soft: #e8f8ef;
    --warning: #e59324;
    --warning-soft: #fff5e3;
    --danger: #e35365;
    --danger-soft: #feebef;
    --info: #3478ef;
    --info-soft: #eaf2ff;
    --surface: #ffffff;
    --canvas: #f5f5f6;
    --border: #e7e7e9;
    --border-strong: #d9d9dd;
    --sidebar: #222729;
    --sidebar-soft: #2d3234;
    --shadow-sm: 0 5px 18px rgba(35, 25, 62, .055);
    --shadow: 0 18px 44px rgba(35, 25, 62, .11);
    --radius: 16px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: 'DM Sans', sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4, h5, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; letter-spacing: -.035em; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 100; width: 246px; display: flex; flex-direction: column; color: #e5e7e8; background: radial-gradient(circle at -5% 5%, rgba(109,44,232,.34) 0, transparent 34%), var(--sidebar); border-right: 1px solid rgba(255,255,255,.07); transition: transform .25s ease; }
.brand { height: 74px; padding: 0 22px; display: flex; align-items: center; gap: 9px; color: white; }
.brand:hover { color: white; }
.brand-logo { width: 150px; height: 58px; display: block; object-fit: cover; object-position: center; border-radius: 8px; }
.brand-product { margin-left: -7px; padding: 4px 5px; align-self: flex-end; color: #dfe2e3; background: var(--sidebar); border: 1px solid rgba(255,255,255,.12); border-radius: 5px; font: 700 8px/1 'Montserrat', sans-serif; letter-spacing: .15em; transform: translateY(-13px); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 13px 24px; scrollbar-width: thin; scrollbar-color: #313d5e transparent; }
.nav-label { display: block; padding: 22px 12px 8px; color: #74809f; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-link { min-height: 42px; margin: 3px 0; padding: 0 12px; display: flex; align-items: center; gap: 12px; color: #aeb8d0; border-radius: 9px; font-weight: 500; transition: .18s ease; }
.nav-link i { width: 19px; color: #8995b4; font-size: 17px; text-align: center; }
.nav-link:hover { color: white; background: rgba(255,255,255,.05); }
.nav-link.active { color: white; background: linear-gradient(90deg, rgba(109,93,252,.24), rgba(76,126,250,.12)); box-shadow: inset 3px 0 #7769ff; }
.nav-link.active i { color: #a79fff; }
.nav-pill { margin-left: auto; padding: 1px 6px; color: #b9b4ff; background: rgba(109,93,252,.18); border-radius: 99px; font-size: 9px; font-weight: 700; }
.sidebar-footer { padding: 12px; }
.sidebar-help { padding: 12px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; }
.sidebar-help > i { width: 29px; height: 29px; display: grid; place-items: center; color: #a89fff; background: rgba(109,93,252,.16); border-radius: 8px; }
.sidebar-help div { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.sidebar-help strong { color: #eef1fa; font-size: 12px; }
.sidebar-help small { color: #7e89a8; font-size: 10px; }
.live-dot { width: 7px; height: 7px; background: #25d797; border-radius: 50%; box-shadow: 0 0 0 4px rgba(37,215,151,.1); }
.sidebar-overlay { display: none; }

.main-area { min-height: 100vh; margin-left: 246px; }
.topbar { position: sticky; top: 0; z-index: 80; height: 74px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.global-search { width: min(370px, 34vw); height: 40px; padding: 0 10px 0 13px; display: flex; align-items: center; gap: 9px; color: var(--subtle); background: #f7f8fb; border: 1px solid var(--border); border-radius: 9px; }
.global-search input { min-width: 0; flex: 1; color: var(--ink); background: transparent; border: 0; outline: 0; }
.global-search kbd { padding: 2px 6px; color: #8b93a7; background: white; border: 1px solid #dde1e9; border-radius: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.03); font: 10px 'DM Sans'; }
.icon-button { position: relative; width: 39px; height: 39px; display: inline-grid; place-items: center; color: #68718a; background: white; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; transition: .18s ease; }
.icon-button:hover { color: var(--primary); border-color: #d3cffd; background: var(--primary-soft); }
.notification-count { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; color: white; background: var(--danger); border: 2px solid white; border-radius: 99px; font-size: 9px; font-weight: 700; }
.profile-button { padding: 0 0 0 4px; display: flex; align-items: center; gap: 9px; color: var(--ink); background: none; border: 0; cursor: pointer; }
.profile-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.profile-copy strong { max-width: 145px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { max-width: 145px; overflow: hidden; color: var(--subtle); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; color: white; background: linear-gradient(145deg, #6d5dfc, #4a8afa); border-radius: 50%; font-weight: 700; }
.avatar-sm { width: 34px; height: 34px; font-size: 11px; }
.avatar-md { width: 42px; height: 42px; font-size: 13px; }
.avatar-lg { width: 50px; height: 50px; font-size: 15px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid white; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 110; width: 230px; display: none; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.dropdown.open .dropdown-menu { display: block; animation: dropIn .16s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-5px); } }
.dropdown-header { padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.dropdown-header span { color: var(--subtle); font-size: 11px; }
.notifications-menu { width: min(360px, calc(100vw - 24px)); }
.notification-item { padding: 12px 14px; display: flex; gap: 11px; color: var(--ink); border-bottom: 1px solid #f0f2f6; }
.notification-item:hover { background: #f8f9fc; }
.notification-item > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.notification-item strong { font-size: 12px; }
.notification-item small { color: var(--muted); font-size: 11px; white-space: normal; }
.notification-item time { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.notification-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: var(--primary); background: var(--primary-soft); border-radius: 8px; }
.dropdown-footer { padding: 9px; text-align: center; }
.dropdown-footer button { color: var(--primary); background: none; border: 0; font-size: 11px; font-weight: 600; cursor: pointer; }
.empty-mini { padding: 25px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--subtle); }
.empty-mini i { color: var(--success); font-size: 24px; }
.profile-menu a, .profile-menu button { width: 100%; padding: 10px 13px; display: flex; align-items: center; gap: 9px; color: var(--ink); background: none; border: 0; text-align: left; cursor: pointer; }
.profile-menu a:hover, .profile-menu button:hover { background: #f7f8fb; }
.dropdown-divider { border-top: 1px solid var(--border); }

.page-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 27px 30px 50px; }
.page-header { margin-bottom: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-title { margin: 0 0 4px; font-size: 25px; line-height: 1.3; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.breadcrumb { margin-bottom: 10px; display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb i { font-size: 8px; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #b7b3ff; }

.btn { min-height: 39px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink); background: white; border: 1px solid var(--border-strong); border-radius: 9px; font-weight: 600; line-height: 1; cursor: pointer; transition: .18s ease; }
.btn:hover { color: var(--ink); border-color: #c4cad8; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { color: white; background: linear-gradient(135deg, #7566ff, #5b55e8); border-color: transparent; box-shadow: 0 5px 14px rgba(93,79,231,.22); }
.btn-primary:hover { color: white; background: linear-gradient(135deg, #6857f7, #4e45d6); border-color: transparent; }
.btn-danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.btn-danger:hover { color: #bf3649; background: #fbdde3; }
.btn-soft { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.btn-success { color: #087853; background: var(--success-soft); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: 12px; }
.btn-lg { min-height: 48px; }
.btn-block { width: 100%; }
.btn-icon { width: 35px; min-height: 35px; padding: 0; }
.link-button { padding: 0; color: var(--primary); background: none; border: 0; cursor: pointer; font-weight: 600; }

.alert { margin-bottom: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.alert button { margin-left: auto; color: currentColor; background: none; border: 0; cursor: pointer; font-size: 18px; opacity: .6; }
.alert-success { color: #08734f; background: var(--success-soft); border: 1px solid #ccefe2; }
.alert-warning { color: #95601b; background: var(--warning-soft); border: 1px solid #fae4bb; }
.alert-danger { color: #a83343; background: var(--danger-soft); border: 1px solid #f7ced5; }
.alert-info { color: #245eb5; background: var(--info-soft); border: 1px solid #d4e5ff; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { min-height: 59px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; }
.card-header p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 18px; }
.card-footer { padding: 13px 18px; border-top: 1px solid var(--border); }
.stat-grid { margin-bottom: 19px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; }
.stat-grid.six { grid-template-columns: repeat(6, minmax(0,1fr)); }
.stat-card { min-height: 122px; padding: 16px; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; right: -30px; bottom: -35px; width: 90px; height: 90px; background: var(--stat-color, var(--primary)); border-radius: 50%; opacity: .05; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--stat-color, var(--primary)); background: color-mix(in srgb, var(--stat-color, var(--primary)) 10%, white); border-radius: 9px; }
.stat-trend { color: var(--success); font-size: 10px; font-weight: 600; }
.stat-value { margin: 10px 0 0; font: 800 25px/1 'Manrope',sans-serif; letter-spacing: -.04em; }
.stat-label { margin-top: 5px; color: var(--muted); font-size: 11px; }
.metric-note { color: var(--subtle); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,.85fr); gap: 18px; }
.dashboard-grid.equal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dashboard-stack { display: grid; gap: 18px; }
.chart-box { position: relative; height: 265px; }
.chart-box.sm { height: 220px; }
.chart-box canvas { max-height: 100%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }

.toolbar { margin-bottom: 15px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.toolbar-filters { display: flex; align-items: center; flex: 1; flex-wrap: wrap; gap: 8px; }
.search-field { min-width: 220px; flex: 1; position: relative; }
.search-field i { position: absolute; top: 50%; left: 12px; color: var(--subtle); transform: translateY(-50%); }
.search-field input { width: 100%; padding-left: 34px; }
.filter-toggle { white-space: nowrap; }
.advanced-filters { margin: -5px 0 15px; padding: 15px; display: none; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; background: white; border: 1px solid var(--border); border-radius: 12px; }
.advanced-filters.open { display: grid; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.form-group { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
label { color: #3d465e; font-size: 11px; font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row a { font-size: 11px; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; color: var(--ink); background: white; border: 1px solid var(--border-strong); border-radius: 8px; outline: 0; transition: .16s ease; }
textarea { min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #9287fa; box-shadow: 0 0 0 3px rgba(109,93,252,.1); }
input::placeholder, textarea::placeholder { color: #a6adbd; }
input[type=color] { padding: 3px; }
input[type=checkbox], input[type=radio] { width: 16px; min-height: 16px; accent-color: var(--primary); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; }
.checkbox label { color: var(--ink); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; top: 50%; left: 13px; color: var(--subtle); transform: translateY(-50%); }
.input-icon input { padding-left: 38px; }
.password-toggle { position: absolute; top: 50%; right: 6px; width: 34px; height: 32px; color: var(--muted); background: none; border: 0; transform: translateY(-50%); cursor: pointer; }
.form-error { color: var(--danger); }
.form-hint { color: var(--subtle); font-size: 10px; }
.form-actions { padding-top: 18px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--border); }
.segmented { padding: 3px; display: inline-flex; gap: 2px; background: #f1f3f7; border-radius: 8px; }
.segmented button, .segmented a { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; color: var(--muted); background: none; border: 0; border-radius: 6px; font-size: 11px; cursor: pointer; }
.segmented .active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(0,0,0,.07); }

.table-card { overflow: hidden; }
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 14px; color: #80889e; background: #fafbfc; border-bottom: 1px solid var(--border); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: .15s ease; }
.data-table tbody tr:hover { background: #fafbfe; }
.data-table a.row-title { display: block; color: var(--ink); font-weight: 600; }
.data-table a.row-title:hover { color: var(--primary); }
.cell-title { display: flex; align-items: center; gap: 10px; }
.cell-title > span:last-child { min-width: 0; }
.cell-title small, .cell-muted { display: block; color: var(--subtle); font-size: 10px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.empty-state { padding: 55px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty-state i { width: 52px; height: 52px; margin-bottom: 12px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 15px; font-size: 23px; }
.empty-state h3 { margin-bottom: 5px; font-size: 16px; }
.empty-state p { max-width: 380px; color: var(--muted); }
.pagination-wrap { padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); border-top: 1px solid var(--border); font-size: 11px; }
.pagination { display: flex; gap: 4px; }
.page-link { min-width: 31px; height: 31px; padding: 0 7px; display: grid; place-items: center; color: var(--muted); background: white; border: 1px solid var(--border); border-radius: 7px; }
.page-link.active { color: white; background: var(--primary); border-color: var(--primary); }
.page-link.disabled { pointer-events: none; opacity: .45; }

.badge { padding: 4px 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge-success { color: #0e8760; background: var(--success-soft); }
.badge-warning { color: #a36b1e; background: var(--warning-soft); }
.badge-danger { color: #bf4052; background: var(--danger-soft); }
.badge-info { color: #2a6acb; background: var(--info-soft); }
.badge-neutral { color: #667087; background: #eef1f5; }
.badge-solid { color: white; background: var(--badge-color,var(--primary)); }
.badge-solid::before { background: white; }
.tag { padding: 3px 7px; color: #6255d4; background: #f1efff; border: 1px solid #e5e1ff; border-radius: 6px; font-size: 9px; }
.priority-dot { width: 8px; height: 8px; display: inline-block; background: var(--priority-color); border-radius: 50%; }
.progress { height: 6px; overflow: hidden; background: #edf0f5; border-radius: 99px; }
.progress-bar { height: 100%; background: var(--progress-color,var(--primary)); border-radius: inherit; }
.sla-cell { min-width: 110px; }
.sla-label { margin-bottom: 4px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { padding: 12px 0; display: flex; gap: 11px; border-bottom: 1px solid #edf0f5; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 9px; height: 9px; margin-top: 5px; flex: 0 0 auto; background: var(--primary); border: 3px solid #e8e5ff; border-radius: 50%; box-sizing: content-box; }
.activity-copy { min-width: 0; flex: 1; }
.activity-copy p { margin: 0; font-size: 12px; }
.activity-copy small { color: var(--subtle); font-size: 10px; }
.attention-list { padding: 0; }
.attention-item { padding: 13px 16px; display: flex; align-items: center; gap: 11px; color: var(--ink); border-bottom: 1px solid #edf0f5; }
.attention-item:last-child { border-bottom: 0; }
.attention-item:hover { background: #fafbfe; }
.attention-item > span:nth-child(2) { min-width: 0; flex: 1; }
.attention-item strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attention-item small { color: var(--subtle); font-size: 9px; }
.attention-time { color: var(--danger); font-size: 9px; white-space: nowrap; }

.ticket-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 18px; }
.ticket-hero { margin-bottom: 17px; padding: 20px; }
.ticket-heading { display: flex; justify-content: space-between; gap: 15px; }
.ticket-number { color: var(--primary); font-size: 11px; font-weight: 700; }
.ticket-heading h1 { margin: 5px 0 9px; font-size: 22px; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 11px; }
.ticket-meta span { display: flex; align-items: center; gap: 5px; }
.ticket-description { padding: 20px; white-space: pre-wrap; word-break: break-word; }
.ticket-tabs { padding: 0 18px; display: flex; gap: 20px; border-bottom: 1px solid var(--border); }
.ticket-tab { padding: 14px 2px 11px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.ticket-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.conversation { padding: 3px 18px; }
.comment { padding: 17px 0; display: flex; gap: 12px; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-content { min-width: 0; flex: 1; }
.comment-head { margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.comment-head strong { font-size: 12px; }
.comment-head time { margin-left: auto; color: var(--subtle); font-size: 9px; }
.comment-body { color: #3e475e; white-space: pre-wrap; word-break: break-word; }
.comment.internal { margin: 9px -8px; padding: 14px 10px; background: #fff9ea; border: 1px solid #fae8bb; border-radius: 9px; }
.composer { padding: 16px 18px; background: #fafbfc; border-top: 1px solid var(--border); }
.composer-toolbar { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.composer-actions { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.file-input { color: var(--muted); font-size: 10px; }
.ticket-sidebar { display: flex; flex-direction: column; gap: 15px; }
.property-list { padding: 7px 17px; }
.property-row { padding: 10px 0; display: grid; grid-template-columns: 95px minmax(0,1fr); align-items: center; gap: 8px; border-bottom: 1px solid #edf0f5; }
.property-row:last-child { border-bottom: 0; }
.property-row > span:first-child { color: var(--subtle); font-size: 10px; }
.property-row > span:last-child { min-width: 0; font-size: 11px; font-weight: 500; }
.side-form .form-group { margin-bottom: 10px; }
.side-form select { min-height: 35px; padding: 6px 8px; font-size: 11px; }
.attachment-list { padding: 8px 15px; }
.attachment-item { padding: 9px 0; display: flex; align-items: center; gap: 9px; color: var(--ink); border-bottom: 1px solid var(--border); }
.attachment-item:last-child { border-bottom: 0; }
.attachment-item i { width: 29px; height: 29px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 7px; }
.attachment-item span { min-width: 0; flex: 1; }
.attachment-item strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item small { color: var(--subtle); font-size: 9px; }
.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { display: none; }
.stars label { color: #d9deea; font-size: 24px; cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f4b740; }

.kanban-board { padding-bottom: 18px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px,1fr); gap: 13px; overflow-x: auto; }
.kanban-column { min-height: 540px; padding: 11px; background: #eceff5; border: 1px solid #e1e5ed; border-radius: 13px; }
.kanban-column.drag-over { background: #e6e3ff; border-color: #b6aefb; }
.kanban-header { padding: 3px 3px 12px; display: flex; align-items: center; justify-content: space-between; }
.kanban-title { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.kanban-count { min-width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); background: white; border-radius: 99px; font-size: 9px; }
.kanban-cards { min-height: 475px; display: flex; flex-direction: column; gap: 9px; }
.kanban-card { padding: 13px; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 3px 10px rgba(29,39,63,.04); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); }
.kanban-card.is-saving { opacity: .62; pointer-events: none; cursor: progress; }
.kanban-card h3 { margin: 7px 0 11px; font-size: 12px; line-height: 1.45; }
.kanban-card-top, .kanban-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kanban-card-top span:first-child { color: var(--primary); font-size: 9px; font-weight: 700; }
.kanban-card-foot { color: var(--subtle); font-size: 9px; }

.project-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.project-card { padding: 17px; color: var(--ink); transition: .18s ease; }
.project-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-symbol { width: 39px; height: 39px; display: grid; place-items: center; color: white; background: var(--project-color); border-radius: 10px; font: 700 12px 'Manrope'; }
.project-card h3 { margin: 12px 0 3px; font-size: 14px; }
.project-card p { color: var(--muted); font-size: 10px; }
.project-progress { margin: 13px 0 9px; }
.project-progress div:first-child { margin-bottom: 5px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.project-card-foot { padding-top: 11px; display: flex; justify-content: space-between; color: var(--subtle); border-top: 1px solid var(--border); font-size: 9px; }
.profit-box { margin-top: 13px; padding: 12px; background: linear-gradient(135deg,#f2f0ff,#eef6ff); border-radius: 9px; }
.profit-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.profit-grid small { display: block; color: var(--subtle); font-size: 8px; }
.profit-grid strong { font-size: 11px; }
.margin-positive { color: var(--success); }

.article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.article-card { padding: 17px; color: var(--ink); }
.article-card:hover { color: var(--ink); border-color: #d4cffd; box-shadow: var(--shadow); }
.article-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 9px; }
.article-card h3 { margin: 13px 0 6px; font-size: 14px; }
.article-card p { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.article-meta { margin-top: 14px; padding-top: 11px; display: flex; justify-content: space-between; color: var(--subtle); border-top: 1px solid var(--border); font-size: 9px; }
.article-page { max-width: 900px; margin: 0 auto; }
.article-content { padding: 28px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 18px; background: rgba(11,18,35,.52); backdrop-filter: blur(3px); }
.modal-backdrop.open { display: grid; }
.modal { width: min(620px,100%); max-height: calc(100vh - 36px); overflow: auto; background: white; border-radius: 15px; box-shadow: 0 25px 80px rgba(8,14,30,.3); animation: modalIn .2s ease; }
.modal-sm { width: min(450px,100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-header { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close { color: var(--muted); background: none; border: 0; font-size: 20px; cursor: pointer; }
.modal-body { padding: 18px; }
.modal-footer { padding: 13px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }

.settings-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 18px; }
.settings-nav { align-self: start; position: sticky; top: 95px; padding: 8px; }
.settings-nav button { width: 100%; min-height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 9px; color: var(--muted); background: none; border: 0; border-radius: 8px; text-align: left; cursor: pointer; }
.settings-nav button.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.catalog-list { display: grid; gap: 9px; }
.catalog-row { padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fafbfc; border: 1px solid var(--border); border-radius: 9px; }
.catalog-info { display: flex; align-items: center; gap: 9px; }
.color-swatch { width: 10px; height: 10px; background: var(--swatch); border-radius: 50%; }

.error-page { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.error-code { color: #e8e5ff; font: 800 92px/1 'Manrope'; }
.error-icon { width: 58px; height: 58px; margin: -26px 0 17px; display: grid; place-items: center; color: var(--primary); background: white; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); font-size: 25px; }
.error-page h1 { margin-bottom: 6px; }
.error-page p { max-width: 450px; color: var(--muted); }

.guest-body { min-height: 100vh; background: white; }
.guest-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(410px,46%) minmax(0,1fr); }
.guest-story { position: relative; overflow: hidden; padding: 0 8%; display: flex; flex-direction: column; color: white; background: radial-gradient(circle at 80% 15%, rgba(101,94,255,.42), transparent 25%), radial-gradient(circle at 20% 80%, rgba(28,137,222,.25), transparent 30%), #111a32; }
.guest-story .brand { padding: 0; }
.brand-light { height: 88px; }
.guest-message { position: relative; z-index: 3; max-width: 525px; margin: auto 0 30px; }
.guest-message h1 { margin-bottom: 18px; font-size: clamp(34px,4vw,58px); line-height: 1.07; letter-spacing: -.055em; }
.guest-message p { max-width: 470px; color: #aeb9d5; font-size: 16px; }
.guest-proof { position: relative; z-index: 3; margin-bottom: 8vh; display: flex; align-items: center; gap: 11px; }
.guest-proof div { display: flex; flex-direction: column; }
.guest-proof small { color: #8996b7; }
.pulse-orb { width: 34px; height: 34px; position: relative; background: radial-gradient(circle,#8d84ff 0 18%,#6358ed 20% 36%,transparent 38%), rgba(109,93,252,.15); border: 1px solid rgba(157,149,255,.3); border-radius: 50%; }
.vortex-rings { position: absolute; right: -23%; bottom: -15%; width: 70%; aspect-ratio: 1; opacity: .25; }
.vortex-rings span { position: absolute; inset: calc(var(--i,0) * 10%); border: 1px solid #8177f5; border-radius: 43% 57% 56% 44%; transform: rotate(calc(var(--i,0) * 23deg)); }
.vortex-rings span:nth-child(1){--i:0}.vortex-rings span:nth-child(2){--i:1}.vortex-rings span:nth-child(3){--i:2}.vortex-rings span:nth-child(4){--i:3}
.guest-main { padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.auth-container { width: min(420px,100%); }
.auth-heading { margin-bottom: 27px; }
.auth-heading h2 { margin-bottom: 7px; font-size: 30px; }
.auth-heading p { color: var(--muted); }
.auth-form { display: flex; flex-direction: column; gap: 17px; }
.auth-form input { min-height: 48px; }
.demo-credentials { margin-top: 22px; padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; color: var(--muted); background: #f7f8fb; border: 1px dashed var(--border-strong); border-radius: 9px; font-size: 10px; }
.demo-credentials span { grid-row: 1/3; align-self: center; }
.demo-credentials code { color: #596077; }
.back-link { margin-bottom: 35px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.guest-footer { margin-top: 50px; color: var(--subtle); }
.mobile-only { display: none; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; }.mt-2 { margin-top: 16px; }.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }.mb-1 { margin-bottom: 8px; }.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }.align-center { align-items: center; }.justify-between { justify-content: space-between; }.gap-1 { gap: 8px; }.gap-2 { gap: 16px; }.flex-wrap { flex-wrap: wrap; }

/* Vortex corporate visual system */
body {
    background:
        radial-gradient(circle at 92% 4%, rgba(109,44,232,.055), transparent 24%),
        var(--canvas);
}

.sidebar-nav { scrollbar-color: #555a5c transparent; }
.nav-label { color: #818789; }
.nav-link { color: #c3c7c9; border: 1px solid transparent; }
.nav-link i { color: #92989a; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.065); border-color: rgba(255,255,255,.04); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(109,44,232,.95), rgba(93,38,197,.62));
    border-color: rgba(167,220,34,.22);
    box-shadow: inset 3px 0 var(--accent), 0 8px 22px rgba(65,24,147,.24);
}
.nav-link.active i { color: var(--accent); }
.nav-pill { color: #263005; background: var(--accent); }
.sidebar-help { background: linear-gradient(145deg, rgba(109,44,232,.22), rgba(255,255,255,.045)); border-color: rgba(167,220,34,.12); }
.sidebar-help > i { color: var(--accent); background: rgba(167,220,34,.1); }
.sidebar-help strong { color: #fff; }
.sidebar-help small { color: #a6abad; }
.live-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(167,220,34,.11); }

.topbar {
    background: rgba(34,39,41,.97);
    border-bottom: 1px solid rgba(255,255,255,.07);
    box-shadow: 0 7px 24px rgba(24,19,38,.08);
}
.global-search { color: #aeb3b5; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
.global-search input { color: #f7f8f8; }
.global-search input::placeholder { color: #a4aaac; }
.global-search kbd { color: #bfc3c4; background: rgba(0,0,0,.16); border-color: rgba(255,255,255,.11); box-shadow: none; }
.topbar .icon-button { color: #e0e2e3; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.1); }
.topbar .icon-button:hover { color: var(--accent); background: rgba(167,220,34,.08); border-color: rgba(167,220,34,.25); }
.topbar .profile-button { color: #fff; }
.topbar .profile-copy small { color: #a8adaf; }
.notification-count { color: #252a2c; background: var(--accent); border-color: var(--sidebar); }
.avatar { background: linear-gradient(145deg, var(--primary), #8f4ff2); box-shadow: 0 0 0 2px rgba(167,220,34,.28); }

.page-content { padding-top: 24px; }
.page-header {
    min-height: 132px;
    padding: 25px 27px;
    position: relative;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(125deg, #42209b 0%, #6326d6 46%, #7a31ea 100%);
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 20px;
    box-shadow: 0 18px 38px rgba(71,30,156,.18);
}
.page-header::before,
.page-header::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.19);
    border-radius: 50%;
}
.page-header::before { width: 470px; height: 220px; right: -115px; bottom: -145px; transform: rotate(-9deg); }
.page-header::after { width: 310px; height: 145px; right: -28px; bottom: -95px; transform: rotate(12deg); }
.page-header > * { position: relative; z-index: 1; }
.page-title { color: #fff; font-size: 27px; }
.page-subtitle { color: #e6dcfa; }
.page-header .eyebrow { color: var(--accent); }
.page-header .btn:not(.btn-primary) { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.page-header .btn:not(.btn-primary):hover { color: #fff; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }

.btn { border-radius: 10px; }
.btn-primary {
    color: #252a2c;
    background: linear-gradient(135deg, #afe625, #99d313);
    border-color: transparent;
    box-shadow: 0 7px 18px rgba(136,187,16,.22);
}
.btn-primary:hover { color: #202426; background: linear-gradient(135deg, #b9ed35, #8fc70b); border-color: transparent; box-shadow: 0 9px 22px rgba(136,187,16,.3); }
.btn-soft { color: var(--primary); background: var(--primary-soft); }
.link-button { color: var(--primary); }

.card { border-color: rgba(64,47,92,.09); box-shadow: var(--shadow-sm); }
.card-header { border-bottom-color: #ece8f2; }
.card-header h2, .card-header h3 { color: #303235; }
.stat-card { border-top: 3px solid color-mix(in srgb, var(--stat-color, var(--primary)) 88%, white); transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before { content: ''; position: absolute; top: -45px; right: -32px; width: 90px; height: 90px; border: 1px solid color-mix(in srgb, var(--stat-color, var(--primary)) 22%, transparent); border-radius: 50%; }
.stat-card::after { opacity: .065; }
.stat-icon { border-radius: 50%; }
.stat-value { font-family: 'Montserrat', sans-serif; }

.toolbar,
.advanced-filters { border-color: rgba(64,47,92,.09); }
input:focus, select:focus, textarea:focus { border-color: #8d58ed; box-shadow: 0 0 0 3px rgba(109,44,232,.11); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.data-table th { color: #6e647d; background: #faf8fd; }
.data-table tbody tr:hover { background: #fcfaff; }
.badge-info { color: #5b24bd; background: var(--primary-soft); }
.badge-neutral { color: #626668; background: #f0f1f1; }
.tag { color: #5c27bd; background: var(--primary-soft); border-color: #e1d4fb; }
.progress { background: #eeeaf4; }
.activity-dot { background: var(--accent); border-color: var(--accent-soft); }
.notification-icon,
.article-icon,
.attachment-item i { color: var(--primary); background: var(--primary-soft); }
.attention-item:hover { background: #fcfaff; }
.ticket-number,
.kanban-card-top span:first-child { color: var(--primary); }
.ticket-tab.active { color: var(--primary); border-bottom-color: var(--accent); }
.kanban-column { background: #efedf2; border-color: #e5e0eb; }
.kanban-column.drag-over { background: var(--primary-soft); border-color: #b99af0; }
.kanban-card { border-color: rgba(74,42,118,.12); }
.project-card:hover,
.article-card:hover { border-color: #d8c7f6; }
.profit-box { background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); }
.settings-nav button.active { color: var(--primary); background: var(--primary-soft); box-shadow: inset 3px 0 var(--accent); }
.catalog-row { background: #fbfafc; }

.guest-body { background: #f7f7f8; }
.guest-story {
    background:
        radial-gradient(circle at 78% 16%, rgba(169,95,255,.48), transparent 25%),
        radial-gradient(circle at 11% 84%, rgba(44,201,117,.18), transparent 28%),
        linear-gradient(145deg, #3d188f 0%, #5d23ca 52%, #722be8 100%);
}
.guest-story::before,
.guest-story::after {
    content: '';
    position: absolute;
    left: -18%;
    width: 116%;
    height: 45%;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    pointer-events: none;
}
.guest-story::before { top: 22%; transform: rotate(8deg); }
.guest-story::after { top: 36%; transform: rotate(-3deg); }
.brand-light { height: 94px; position: relative; z-index: 4; }
.brand-light .brand-logo { width: 190px; height: 73px; box-shadow: 0 11px 28px rgba(28,10,67,.18); }
.brand-light .brand-product { background: #4b1ca7; }
.guest-message { margin-bottom: 38px; }
.guest-message h1 { max-width: 590px; font-family: 'Montserrat', sans-serif; }
.guest-message p { color: #eee8fb; }
.guest-proof small { color: #d0c5e7; }
.pulse-orb { background: radial-gradient(circle,var(--accent) 0 18%,#7fbc0b 20% 36%,transparent 38%), rgba(167,220,34,.12); border-color: rgba(202,240,106,.45); }
.vortex-rings { opacity: .36; }
.vortex-rings span { border-color: rgba(255,255,255,.46); }
.guest-main {
    background:
        radial-gradient(circle at 82% 15%, rgba(109,44,232,.06), transparent 24%),
        radial-gradient(circle at 10% 86%, rgba(167,220,34,.09), transparent 22%),
        #f8f8f9;
}
.auth-container { padding: 36px; background: #fff; border: 1px solid rgba(72,42,112,.1); border-top: 4px solid var(--accent); border-radius: 18px; box-shadow: 0 24px 60px rgba(50,28,83,.12); }
.auth-heading h2 { font-family: 'Montserrat', sans-serif; }
.auth-heading .eyebrow { color: var(--primary); }
.auth-form input { background: #fbfbfc; }
.demo-credentials { background: linear-gradient(135deg, #faf8ff, var(--accent-soft)); border-color: #d9c9f5; }
.guest-footer { color: #85898e; }
.error-code { color: #ece5fb; font-family: 'Montserrat', sans-serif; }
.error-icon { color: var(--primary); border-top: 3px solid var(--accent); }

@media (max-width: 1280px) {
    .stat-grid.six { grid-template-columns: repeat(3,1fr); }
    .project-grid, .article-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.22); }
    body.sidebar-open .sidebar-overlay { position: fixed; inset: 0; z-index: 90; display: block; background: rgba(11,18,35,.4); }
    .main-area { margin-left: 0; }
    .mobile-only { display: inline-grid; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2,1fr); }
    .ticket-layout { grid-template-columns: 1fr; }
    .ticket-sidebar { display: grid; grid-template-columns: repeat(2,1fr); }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; }
    .settings-nav button { width: auto; white-space: nowrap; }
}
@media (max-width: 760px) {
    .topbar { height: 64px; padding: 0 15px; }
    .page-content { padding: 20px 15px 40px; }
    .global-search { width: 42px; padding: 0; justify-content: center; border: 0; background: transparent; }
    .global-search input, .global-search kbd { display: none; }
    .profile-copy, .profile-button > i, .topbar-actions > .btn span { display: none; }
    .page-header { min-height: 0; padding: 22px; align-items: flex-start; flex-direction: column; }
    .page-actions { width: 100%; }
    .stat-grid, .stat-grid.six, .dashboard-grid.equal, .form-grid, .form-grid.three, .form-grid.four, .advanced-filters, .project-grid, .article-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2,1fr); }
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar-filters { align-items: stretch; }
    .toolbar-filters > * { flex: 1; }
    .ticket-sidebar { display: flex; }
    .ticket-heading { flex-direction: column; }
    .pagination-wrap { align-items: flex-start; flex-direction: column; }
    .data-table th, .data-table td { padding: 11px 10px; }
    .guest-shell { display: block; }
    .guest-story { min-height: 220px; padding: 0 25px 25px; }
    .guest-story .brand { height: 70px; }
    .guest-message { margin: auto 0 0; }
    .guest-message h1 { margin-bottom: 8px; font-size: 28px; }
    .guest-message p { margin-bottom: 0; font-size: 12px; }
    .guest-proof { display: none; }
    .guest-main { min-height: calc(100vh - 220px); padding: 30px 20px; }
    .auth-container { padding: 27px; }
    .brand-light .brand-logo { width: 145px; height: 56px; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar-actions { gap: 6px; }
    .btn { padding-inline: 11px; }
    .modal-backdrop { padding: 8px; }
    .guest-story { min-height: 190px; }
    .guest-message h1 { font-size: 24px; }
}

@media print {
    .sidebar, .topbar, .page-actions, .toolbar, .btn, .composer { display: none !important; }
    .main-area { margin: 0; }
    .page-content { padding: 0; }
    .card { box-shadow: none; }
}
