/* Frox CRM prototype. Keep custom styles separate from the supplied vendor CSS. */
@charset "UTF-8";

.crm {
  --brand: #7364db;
  --brand-hover: #6251c7;
  --brand-soft: #eeebfb;
  --surface: #ffffff;
  --surface-muted: #f8f8fc;
  --canvas: #f5f5fa;
  --border: #e9e9f1;
  --text: #262631;
  --muted: #7e7e8f;
  --faint: #aaaabb;
  margin: 0;
  padding: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text);
  font: 400 16px/1.6 "Segoe UI", "Noto Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.crm.dark {
  --surface: #1f2128;
  --surface-muted: #262831;
  --canvas: #17181f;
  --border: #343540;
  --text: #eaeaf4;
  --muted: #aaaab9;
  --faint: #818190;
  --brand-soft: #312b49;
}
.crm *, .crm *::before, .crm *::after { box-sizing: border-box; }
.crm [hidden] { display: none !important; }
.crm a { color: inherit; text-decoration: none; }
.crm button, .crm input, .crm select, .crm textarea { font: inherit; }
.crm button, .crm select { cursor: pointer; }
.crm button { border: 0; }
.crm button:disabled { cursor: not-allowed; opacity: .45; }
.crm :focus-visible { outline: 3px solid #aa9cf1; outline-offset: 3px; }
.crm h1, .crm h2, .crm h3, .crm h4, .crm p { margin: 0; }
.crm h1 { font-size: 29px; font-weight: 700; line-height: 1.25; letter-spacing: -.9px; }
.crm h2 { font-size: 17px; font-weight: 650; letter-spacing: -.25px; }
.crm h3 { font-size: 16px; font-weight: 650; }
.crm small { font-size: 14px; }
.crm .icon { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.crm .skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 12px; background: var(--surface); }
.crm .skip-link:focus { top: 12px; }
.crm .app-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: 86px 1fr auto; min-height: 100vh; }
.crm .sidebar { position: sticky; top: 0; height: 100vh; grid-column: 1; grid-row: 1/4; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 30; overflow-y: auto; scrollbar-width: thin; }
.crm .brand { display: flex; align-items: center; gap: 12px; padding: 30px 28px 27px; font-size: 25px; line-height: 1; font-weight: 750; letter-spacing: -.6px; }
.crm .brand-symbol { position: relative; width: 41px; height: 41px; border-radius: 13px; background: var(--brand); color: white; font-size: 40px; line-height: 33px; padding-left: 10px; font-weight: 600; overflow: hidden; }
.crm .brand-symbol > span { position: absolute; background: #c3baf3; width: 7px; height: 7px; border-radius: 50%; right: 7px; bottom: 9px; }
.crm .brand-subtitle { display: block; font-size: 14px; font-weight: 550; letter-spacing: 3.3px; margin-top: 5px; color: var(--muted); }
.crm .workspace-label { display: flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--border); border-radius: 9px; margin: 0 21px 24px; padding: 10px 12px; font-size: 14px; }
.crm .workspace-dot { width: 6px; height: 6px; background: #50b79c; border-radius: 50%; }
.crm .workspace-version { margin-left: auto; font-size: 14px; color: var(--faint); }
.crm .sidebar nav { padding: 0 17px; }
.crm .nav-group { margin-bottom: 22px; }
.crm .nav-label { text-transform: uppercase; letter-spacing: 1.35px; font-size: 14px; font-weight: 700; color: var(--faint); margin: 0 12px 9px; }
.crm .nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin-bottom: 4px; color: var(--muted); border-radius: 9px; font-size: 14px; font-weight: 500; transition: background .18s, color .18s; }
.crm .nav-item .icon { width: 19px; height: 19px; }
.crm .nav-item:hover { color: var(--brand); background: var(--brand-soft); }
.crm .nav-item.active { color: white; background: var(--brand); box-shadow: 0 5px 14px #7364db22; }
.crm .nav-count { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--brand); background: var(--brand-soft); min-width: 21px; text-align: center; padding: 1px 5px; border-radius: 5px; }
.crm .nav-item.active .nav-count { background: #ffffff30; color: white; }
.crm .sidebar-bottom { margin: auto 20px 0; padding-top: 17px; padding-bottom: 16px; border-top: 1px solid var(--border); }
.crm .sidebar-profile { display: flex; align-items: center; gap: 10px; }
.crm .sidebar-profile strong { display: block; font-size: 14px; }
.crm .sidebar-profile small { display: block; color: var(--muted); font-size: 14px; }
.crm .sidebar-profile > .icon { margin-left: auto; width: 14px; color: var(--muted); }
.crm .logout { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-top: 16px; padding-left: 5px; }
.crm .logout .icon { width: 17px; }
.crm .topbar { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 34px; }
.crm .topbar-left, .crm .topbar-right { display: flex; align-items: center; gap: 16px; }
.crm .topbar-location { font-size: 14px; color: var(--muted); }
.crm .topbar-right { gap: 15px; }
.crm .prototype-pill { font-size: 14px; font-weight: 650; color: var(--muted); padding: 4px 8px; border: 1px solid var(--border); border-radius: 5px; }
.crm .role-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.crm .role-switch select { width: 158px; background: var(--surface-muted); color: var(--text); padding: 8px 22px 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; }
.crm .icon-button { display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); width: 34px; height: 34px; border-radius: 8px; }
.crm .icon-button:hover { background: var(--brand-soft); color: var(--brand); }
.crm .notification-button { position: relative; }
.crm .notification-button > span { position: absolute; width: 5px; height: 5px; background: #ef8c9a; border-radius: 50%; right: 7px; top: 5px; }
.crm .menu-toggle { display: none; }
.crm .avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; font-size: 14px; font-weight: 650; }
.crm .avatar.small { width: 34px; height: 34px; border-radius: 50%; }
.crm .avatar-purple { background: #eeeafb; color: #7364db; }
.crm .avatar-green { background: #e6f5ef; color: #3d967b; }
.crm .avatar-blue { background: #e8efff; color: #5280c7; }
.crm .avatar-orange { background: #fff0e4; color: #c58a4e; }
.crm .main-content { grid-column: 2; min-width: 0; width: 100%; max-width: 1800px; padding: 26px 34px 34px; margin: 0 auto; }
.crm .breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 14px; margin-bottom: 18px; }
.crm .breadcrumb a { display: flex; align-items: center; gap: 6px; }
.crm .breadcrumb .icon { width: 13px; height: 13px; }
.crm .breadcrumb > span { color: var(--muted); }
.crm .page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.crm .page-heading p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.crm .heading-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; padding-top: 3px; }
.crm .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap; transition: background .15s, transform .15s; }
.crm .button .icon { width: 17px; height: 17px; }
.crm .button:active { transform: translateY(1px); }
.crm .button-primary { background: var(--brand); color: white; box-shadow: 0 3px 9px #7364db15; }
.crm .button-primary:hover { background: var(--brand-hover); }
.crm .button-secondary { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.crm .button-secondary:hover { border-color: #bab0ec; }
.crm .button-soft { background: var(--brand-soft); color: var(--brand); }
.crm .button-ghost { background: transparent; color: var(--brand); padding-left: 0; padding-right: 0; }
.crm .button-danger { color: #c55e6c; background: #fcebee; }
.crm .button-success { color: white; background: #479f85; }
.crm .button-wide { width: 100%; }
.crm .app-footer { grid-column: 2; display: flex; justify-content: space-between; padding: 15px 34px 24px; color: var(--faint); font-size: 14px; }
.crm .card { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; overflow: hidden; }
.crm .card-heading { padding: 21px 23px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crm .card-heading p { color: var(--muted); font-size: 14px; margin-top: 5px; }
.crm .card-body { padding: 20px 23px 23px; }
.crm .stack { display: flex; flex-direction: column; gap: 22px; }
.crm .two-columns { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 22px; align-items: start; }
.crm .balanced-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.crm .section-gap { margin-bottom: 22px; }
.crm .stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.crm .stat-card { padding: 20px; }
.crm .stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.crm .stat-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); }
.crm .stat-number { display: block; font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -1px; margin: 14px 0 9px; }
.crm .stat-caption { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.crm .stat-caption strong { font-weight: 600; color: #43987c; }
.crm .dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 28px; background: linear-gradient(105deg,#eae5fa,#f0ecfc 60%,#e6e1f9); border: 1px solid #e0d9f4; border-radius: 13px; margin-bottom: 24px; overflow: hidden; position: relative; }
.crm .dashboard-hero h2 { font-size: 20px; color: #423367; }
.crm .dashboard-hero p { color: #7b6e96; font-size: 14px; max-width: 480px; margin: 8px 0 16px; }
.crm .hero-illustration { position: relative; width: 185px; height: 119px; flex-shrink: 0; }
.crm .hero-sheet { position: absolute; right: 40px; top: 0; width: 100px; height: 120px; border-radius: 10px; background: #fff; box-shadow: 0 10px 35px #6650aa25; transform: rotate(-9deg); padding: 18px 13px; }
.crm .hero-sheet > span { display: block; width: 70%; height: 5px; background: #eae5f9; border-radius: 4px; margin-bottom: 10px; }
.crm .hero-sheet > span:first-child { height: 20px; width: 24px; background: #c9bdf0; }
.crm .hero-check { position: absolute; right: 5px; bottom: 5px; display: grid; place-items: center; width: 55px; height: 55px; border-radius: 16px; background: #7364db; color: white; transform: rotate(8deg); box-shadow: 0 8px 20px #7364db30; }
.crm .hero-check .icon { width: 27px; height: 27px; }
.crm .quick-link { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.crm .quick-link:last-child { border-bottom: 0; padding-bottom: 0; }
.crm .quick-link:first-child { padding-top: 0; }
.crm .quick-link strong { font-size: 14px; display: block; }
.crm .quick-link small { font-size: 14px; color: var(--muted); display: block; margin-top: 3px; }
.crm .quick-link > .icon:last-child { margin-left: auto; width: 15px; color: var(--faint); }
.crm .filter-bar { display: flex; align-items: center; gap: 12px; padding: 19px 22px; border-bottom: 1px solid var(--border); }
.crm .search-field { display: flex; align-items: center; gap: 9px; min-width: 180px; max-width: 360px; flex: 1; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 10px 12px; color: var(--faint); }
.crm .search-field .icon { width: 17px; height: 17px; }
.crm .search-field input { border: none; outline: none; background: transparent; color: var(--text); min-width: 0; width: 100%; font-size: 14px; padding: 0; }
.crm .filter-bar select { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); min-height: 39px; padding: 8px 30px 8px 12px; font-size: 14px; max-width: 220px; }
.crm .filter-spacer { flex: 1; }
.crm .table-scroll { overflow-x: auto; }
.crm .data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.crm .data-table th { text-align: left; font-size: 14px; text-transform: uppercase; letter-spacing: .65px; font-weight: 600; padding: 14px 22px; color: var(--muted); background: var(--surface-muted); border-bottom: 1px solid var(--border); }
.crm .data-table td { padding: 17px 22px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.crm .data-table tr:last-child td { border-bottom: 0; }
.crm .data-table tbody tr:hover { background: var(--surface-muted); }
.crm .data-table th:last-child, .crm .data-table td:last-child { text-align: right; }
.crm .data-table strong { font-weight: 600; }
.crm .cell-note { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.crm .text-link { color: var(--brand); font-weight: 600; }
.crm .text-link:hover { text-decoration: underline; }
.crm .money { font-variant-numeric: tabular-nums; font-weight: 550; }
.crm .badge-status { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 550; padding: 4px 8px; line-height: 1.5; border-radius: 5px; white-space: nowrap; }
.crm .status-dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.crm .badge-amber { color: #af8535; background: #fff4db; }
.crm .badge-green { color: #429479; background: #e6f5ee; }
.crm .badge-blue { color: #5082c7; background: #e9f0ff; }
.crm .badge-red { color: #c76776; background: #fcecef; }
.crm .badge-gray { color: #89899a; background: #f0f0f6; }
.crm .badge-purple { color: #8270c8; background: #efebfa; }
.crm .row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.crm .row-actions a, .crm .row-actions button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; background: transparent; color: var(--muted); }
.crm .row-actions .icon { width: 15px; height: 15px; }
.crm .row-actions a:hover, .crm .row-actions button:hover { color: var(--brand); background: var(--brand-soft); }
.crm .table-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.crm .pagination { display: flex; gap: 5px; }
.crm .pagination button { width: 28px; height: 28px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 6px; }
.crm .pagination .current { color: var(--brand); background: var(--brand-soft); border-color: var(--brand-soft); }
.crm .entity { display: flex; align-items: center; gap: 10px; }
.crm .entity strong { display: block; font-size: 14px; }
.crm .entity small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.crm .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 20px; }
.crm .form-grid.three { grid-template-columns: repeat(3,1fr); }
.crm .field { min-width: 0; }
.crm .field-full { grid-column: 1/-1; }
.crm .field label, .crm .field-label { display: block; color: var(--text); font-size: 14px; font-weight: 550; margin-bottom: 7px; }
.crm .field input, .crm .field select, .crm .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 11px 12px; color: var(--text); background: var(--surface); outline: none; font-size: 14px; min-height: 41px; }
.crm .field input:focus, .crm .field select:focus, .crm .field textarea:focus { border-color: #ac9ce6; box-shadow: 0 0 0 3px #7364db0b; }
.crm .field input::placeholder, .crm .field textarea::placeholder { color: var(--faint); }
.crm .field input[readonly] { background: var(--surface-muted); color: var(--muted); }
.crm .field small { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.crm .field textarea { resize: vertical; }
.crm input[type="checkbox"], .crm input[type="radio"] { accent-color: var(--brand); width: 15px; height: 15px; flex-shrink: 0; }
.crm .check-label { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 14px; padding: 4px 0; cursor: pointer; }
.crm .check-list { display: flex; flex-direction: column; gap: 10px; }
.crm .check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crm .check-grid .check-label { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 7px; padding: 12px; }
.crm .form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 22px 0 0; }
.crm .notice { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 12px 14px; font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.crm .notice .icon { width: 17px; height: 17px; margin-top: 1px; }
.crm .notice-info { color: #8170a9; background: #f0ecf9; }
.crm .notice-warning { color: #a08342; background: #fff6e3; }
.crm .upload-zone { border: 1px dashed #cec8e5; border-radius: 9px; background: var(--surface-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 145px; padding: 22px; text-align: center; cursor: pointer; }
.crm .upload-zone .icon { width: 27px; height: 27px; color: var(--brand); margin-bottom: 12px; }
.crm .upload-zone strong { font-size: 14px; color: var(--brand); font-weight: 550; }
.crm .upload-zone span { font-size: 14px; color: var(--muted); margin-top: 5px; }
.crm .upload-zone input { width: 100%; margin-top: 12px; max-width: 270px; font-size: 14px; color: var(--muted); }
.crm .upload-zone input::file-selector-button { border: 0; border-radius: 4px; background: var(--brand-soft); color: var(--brand); padding: 5px 8px; cursor: pointer; }
.crm .file-list { margin: 10px 0 0; padding: 0; list-style: none; }
.crm .file-list li { font-size: 14px; padding: 7px 0; color: var(--muted); }
.crm .summary-sticky { position: sticky; top: 20px; }
.crm .summary-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); padding: 11px 0; }
.crm .summary-row strong { color: var(--text); font-size: 14px; }
.crm .summary-divider { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.crm .summary-total { padding-top: 17px; font-weight: 600; color: var(--text); }
.crm .summary-total strong { font-size: 21px; color: var(--brand); }
.crm .summary-note { font-size: 14px; color: var(--muted); margin-top: 12px; line-height: 1.7; }
.crm .manual-value { width: 100px; text-align: right; padding: 7px 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.crm .order-lines th, .crm .order-lines td { padding: 12px 9px; }
.crm .order-lines th:first-child, .crm .order-lines td:first-child { padding-left: 22px; }
.crm .order-lines input { width: 62px; min-width: 50px; border: 1px solid var(--border); padding: 8px; border-radius: 6px; background: var(--surface); color: var(--text); font-size: 14px; }
.crm .order-lines .wide-input { width: 79px; }
.crm .order-lines strong { display: block; font-size: 14px; white-space: normal; min-width: 160px; }
.crm .order-lines .bonus-cell input { background: #f1eefc; border-color: #e2dcf6; color: #7364db; }
.crm .order-search { display: flex; align-items: center; gap: 10px; padding: 20px 22px; }
.crm .order-search .search-field { max-width: none; }
.crm .product-picker { padding: 0 22px 18px; }
.crm .product-picker button { display: flex; width: 100%; justify-content: space-between; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 6px; padding: 12px; color: var(--text); font-size: 14px; margin-bottom: 7px; }
.crm .product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.crm .product-card { position: relative; }
.crm .product-card .card-body { padding: 17px 20px 20px; }
.crm .product-card h3 { font-size: 14px; min-height: 39px; line-height: 1.5; margin-top: 8px; }
.crm .product-card .product-meta { font-size: 14px; color: var(--muted); margin: 6px 0 14px; }
.crm .product-card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; }
.crm .product-card-footer span { font-size: 14px; color: var(--muted); }
.crm .product-art { height: 160px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: #f1eff9; --pack: #9283cf; }
.crm .tone-blue { background: #edf2fa; --pack: #7296c6; }
.crm .tone-green { background: #edf4ee; --pack: #7caa86; }
.crm .tone-orange { background: #fcf1e8; --pack: #d8a774; }
.crm .tone-pink { background: #f8edf1; --pack: #cf8ea9; }
.crm .tone-teal { background: #eaf4f2; --pack: #67a89d; }
.crm .product-orbit { position: absolute; width: 185px; height: 185px; border: 1px solid #ffffff90; border-radius: 50%; right: -20px; top: -65px; }
.crm .product-package { width: 74px; height: 109px; background: white; border-radius: 5px; box-shadow: 10px 12px 12px #4f466a12; transform: rotate(-7deg); border-right: 8px solid #eae9ed; z-index: 1; }
.crm .package-top { background: var(--pack); height: 9px; }
.crm .package-label { padding: 9px 8px; }
.crm .package-label span { font-size: 14px; letter-spacing: 1px; color: #8b8795; display: block; }
.crm .package-label strong { color: var(--pack); font-size: 34px; line-height: 1.3; font-weight: 600; display: block; }
.crm .package-label small { font-size: 14px; color: #94909c; }
.crm .product-art-small { height: 120px; border-radius: 10px; }
.crm .product-art-small .product-package { transform: scale(.8) rotate(-7deg); }
.crm .campaign-grid, .crm .document-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.crm .campaign-banner { height: 112px; padding: 22px; position: relative; overflow: hidden; background: #ece7f9; color: #7663bc; display: flex; align-items: flex-end; }
.crm .campaign-banner::after { content: '%'; position: absolute; right: 20px; top: -10px; font-size: 116px; line-height: 1.2; font-weight: 700; color: #c7bbe650; transform: rotate(-15deg); }
.crm .campaign-banner.green { background: #e6f3ee; color: #69a18d; }
.crm .campaign-banner.orange { background: #fff1e2; color: #c89864; }
.crm .campaign-banner strong { font-size: 20px; z-index: 1; font-weight: 600; }
.crm .campaign-card h3 { margin-bottom: 7px; }
.crm .campaign-card p { font-size: 14px; color: var(--muted); margin: 10px 0; }
.crm .campaign-card .campaign-dates { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.crm .campaign-dates .icon { width: 13px; }
.crm .document-card { padding: 21px; }
.crm .document-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.crm .document-icon { display: grid; place-items: center; width: 47px; height: 55px; border-radius: 9px; background: #fceef0; color: #d68690; font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.crm .document-icon.blue { background: #ecf1ff; color: #7394d4; }
.crm .document-card h3 { font-size: 14px; min-height: 39px; line-height: 1.5; }
.crm .document-card p { font-size: 14px; color: var(--muted); margin: 8px 0 19px; }
.crm .document-footer { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 15px; }
.crm .tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 23px; overflow-x: auto; }
.crm .tab-button { padding: 0 0 13px; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.crm .tab-button.active { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.crm .timeline { padding-left: 7px; }
.crm .timeline-item { position: relative; border-left: 1px solid var(--border); padding: 0 0 25px 21px; }
.crm .timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.crm .timeline-item::before { content: ''; position: absolute; width: 7px; height: 7px; background: var(--brand); border: 3px solid var(--brand-soft); box-sizing: content-box; border-radius: 50%; left: -7px; top: 2px; }
.crm .timeline-item strong { font-size: 14px; display: block; }
.crm .timeline-item p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.crm .detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.crm .detail-list dt { color: var(--muted); font-size: 14px; margin-bottom: 5px; }
.crm .detail-list dd { margin: 0; font-size: 14px; font-weight: 550; }
.crm .bulk-toolbar { display: flex; gap: 12px; align-items: center; padding: 15px 22px; background: var(--brand-soft); color: var(--brand); font-size: 14px; flex-wrap: wrap; }
.crm .bulk-toolbar select { border: 1px solid #cfc6ed; border-radius: 7px; background: var(--surface); color: var(--text); padding: 8px 12px; font-size: 14px; }
.crm .bulk-toolbar .button { margin-left: auto; }
.crm .info-key { color: var(--muted); font-size: 14px; }
.crm .tag-list { display: flex; gap: 5px; flex-wrap: wrap; }
.crm .tag { padding: 4px 8px; background: var(--surface-muted); border: 1px solid var(--border); color: var(--muted); border-radius: 5px; font-size: 14px; }
.crm .chat-layout { display: grid; grid-template-columns: 225px minmax(0,1fr); min-height: 570px; }
.crm .chat-sidebar { padding: 22px 18px; background: var(--surface-muted); border-right: 1px solid var(--border); }
.crm .chat-sidebar p { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 25px 0 10px; }
.crm .chat-history-item { padding: 11px 8px; font-size: 14px; color: var(--muted); border-radius: 7px; display: block; }
.crm .chat-history-item.active { background: var(--brand-soft); color: var(--brand); }
.crm .chat-main { display: flex; flex-direction: column; min-width: 0; padding: 26px; }
.crm .chat-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.crm .chat-context select { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 7px; padding: 8px; font-size: 14px; max-width: 230px; }
.crm .chat-welcome { margin: auto; padding: 45px 15px; max-width: 550px; text-align: center; }
.crm .ai-mark { width: 59px; height: 59px; margin: 0 auto 20px; border-radius: 18px; color: var(--brand); background: var(--brand-soft); display: grid; place-items: center; }
.crm .ai-mark .icon { width: 29px; height: 29px; }
.crm .chat-welcome h2 { font-size: 22px; }
.crm .chat-welcome > p { color: var(--muted); font-size: 14px; margin: 10px 0 24px; }
.crm .prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crm .prompt-chip { text-align: left; padding: 13px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 14px; line-height: 1.6; }
.crm .prompt-chip:hover { color: var(--brand); border-color: #c5b9ed; }
.crm .chat-compose { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface); }
.crm .chat-compose textarea { flex: 1; resize: vertical; border: 0; min-height: 43px; max-height: 150px; padding: 8px; background: transparent; color: var(--text); font-size: 14px; outline: none; }
.crm .chat-compose button { flex-shrink: 0; }
.crm .chat-note { color: var(--faint); font-size: 14px; text-align: center; margin-top: 9px; }
.crm .portfolio-panel { padding: 45px; background: linear-gradient(125deg,#e6e0f5,#f2eefb); display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; min-height: 370px; }
.crm .portfolio-panel h2 { font-size: 29px; line-height: 1.25; color: #4e3f76; }
.crm .portfolio-panel p { font-size: 14px; color: #85769f; margin: 17px 0 23px; max-width: 350px; }
.crm .portfolio-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; transform: rotate(-6deg); }
.crm .portfolio-tile { border: 6px solid #ffffffb0; border-radius: 11px; overflow: hidden; box-shadow: 0 7px 18px #6c579715; }
.crm .portfolio-tile:nth-child(2) { transform: translateY(28px); }
.crm .eyebrow { display: block; font-size: 14px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 15px; color: var(--brand); }
.crm .article-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.crm .article-cover { height: 137px; background: #ece8f8; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.crm .article-cover .icon { width: 50px; height: 50px; color: #a795d4; stroke-width: 1; }
.crm .article-cover::before { content: ''; width: 120px; height: 120px; position: absolute; border: 1px solid #d9d0ef; border-radius: 50%; right: -30px; top: -15px; }
.crm .article-cover.green { background: #e8f2ed; }
.crm .article-cover.green .icon { color: #8bb09f; }
.crm .article-cover.orange { background: #f8eddf; }
.crm .article-cover.orange .icon { color: #c7ac83; }
.crm .article-card h3 { font-size: 15px; margin: 10px 0; line-height: 1.5; }
.crm .article-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.crm .article-toolbar { display: flex; gap: 5px; border: 1px solid var(--border); padding: 8px; border-radius: 7px 7px 0 0; background: var(--surface-muted); }
.crm .article-toolbar button { background: transparent; padding: 5px 9px; color: var(--muted); }
.crm .code-example { padding: 18px; background: #242431; color: #d7d2ee; border-radius: 9px; font-size: 14px; overflow-x: auto; line-height: 1.8; }
.crm .crm-dialog { margin: auto; max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); padding: 24px; width: min(520px,calc(100% - 32px)); box-shadow: 0 20px 80px #24203340; }
.crm .crm-dialog::backdrop { background: #22202e60; backdrop-filter: blur(3px); }
.crm .modal-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.crm .notification-item { display: flex; align-items: flex-start; gap: 15px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.crm .notification-item > .icon { color: var(--brand); margin-top: 3px; }
.crm .notification-item strong { font-size: 14px; }
.crm .notification-item p { font-size: 14px; margin: 5px 0; color: var(--muted); }
.crm .notification-item a { color: var(--brand); font-size: 14px; }
.crm .toast { position: fixed; right: 24px; bottom: 25px; z-index: 100; display: flex; align-items: flex-start; gap: 10px; padding: 16px 20px; max-width: 420px; border-radius: 10px; background: #353047; color: #fff; font-size: 14px; box-shadow: 0 10px 35px #24203330; }
.crm .toast .icon { color: #b5a4ed; width: 18px; height: 18px; }
.crm .empty-state { text-align: center; padding: 55px 25px; }
.crm .empty-state p { margin: 12px auto 22px; max-width: 400px; color: var(--muted); }
.crm .article-reader { max-width: 800px; }
.crm .article-reader p { color: var(--muted); line-height: 1.9; font-size: 14px; margin-bottom: 18px; }
.crm .login-layout { min-height: 100vh; display: grid; grid-template-columns: 48% 52%; background: var(--surface); }
.crm .login-story { background: #eeebf8; padding: 0 56px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.crm .login-story .brand { padding-left: 0; padding-top: 38px; }
.crm .login-story-copy { padding-top: 55px; max-width: 440px; position: relative; z-index: 1; }
.crm .login-story h1 { font-size: 43px; line-height: 1.15; color: #473866; letter-spacing: -1.8px; font-weight: 650; }
.crm .login-story-copy > p { color: #8b7c9e; max-width: 350px; margin-top: 20px; font-size: 14px; line-height: 1.8; }
.crm .login-feature { display: flex; align-items: center; gap: 9px; font-size: 14px; color: #807196; margin-top: 12px; }
.crm .login-feature .icon { width: 16px; color: #8c79c6; }
.crm .login-visual { width: 100%; max-width: 430px; height: 230px; position: relative; margin-top: 44px; }
.crm .login-mock { position: absolute; left: 20px; top: 15px; width: 330px; height: 187px; border-radius: 12px; background: white; padding: 19px; box-shadow: 0 16px 40px #68528815; transform: rotate(-5deg); }
.crm .login-mock-title { font-size: 14px; color: #655780; font-weight: 650; margin-bottom: 18px; display: flex; justify-content: space-between; }
.crm .login-mock-title span { font-size: 14px; font-weight: 500; color: #b1a6c3; }
.crm .login-mock-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; color: #a89db8; font-size: 14px; }
.crm .login-mock-row > span:first-child { width: 25px; height: 25px; border-radius: 6px; background: #f1edf9; color: #aa99d0; display: grid; place-items: center; font-size: 14px; }
.crm .login-mock-row > span:nth-child(2) { flex: 1; }
.crm .login-float { position: absolute; right: 0; bottom: 0; background: white; box-shadow: 0 12px 40px #68528816; border-radius: 10px; padding: 14px 20px; display: flex; align-items: center; gap: 13px; transform: rotate(4deg); }
.crm .login-float strong { display: block; font-size: 14px; color: #5e5274; }
.crm .login-float small { color: #a59ab6; font-size: 14px; }
.crm .login-story-footer { margin-top: auto; padding: 32px 0; color: #a395b4; font-size: 14px; }
.crm .login-form-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 45px; }
.crm .login-form-card { width: 100%; max-width: 380px; }
.crm .login-form-card h2 { font-size: 28px; letter-spacing: -.7px; margin-bottom: 9px; }
.crm .login-form-card > p { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.crm .login-form-card .field { margin-bottom: 20px; }
.crm .login-form-card .field input { padding: 13px; }
.crm .login-form-card .button-primary { width: 100%; margin-top: 6px; padding: 13px; }
.crm .login-options { display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 23px; }
.crm .login-options button { background: transparent; color: var(--brand); font-size: 14px; }
.crm .demo-role-picker { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 28px; }
.crm .demo-role-picker > p { font-size: 14px; letter-spacing: .7px; color: var(--muted); text-transform: uppercase; margin-bottom: 12px; }
.crm .demo-role-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.crm .demo-role-options label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 13px 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; color: var(--muted); text-align: center; cursor: pointer; }
.crm .demo-role-options label:has(input:checked) { border-color: #baace7; color: var(--brand); background: var(--brand-soft); }
.crm .demo-role-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.crm .demo-role-options label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.crm .login-disclaimer { font-size: 14px; line-height: 1.7; color: var(--faint); margin-top: 18px; text-align: center; }
.crm .mobile-login-brand { display: none; }
.crm .sidebar-overlay { display: none; }
.crm .permission-matrix td { white-space: normal; }
.crm .permission-matrix th:not(:first-child), .crm .permission-matrix td:not(:first-child) { text-align: center; }
.crm .chip-check { padding: 9px 12px; border: 1px solid var(--border); border-radius: 7px; }
.crm .subtle { color: var(--muted); font-size: 14px; }
.crm .section-caption { color: var(--muted); font-size: 14px; margin: 10px 0 18px; }
.crm .group-code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--brand); }
.crm .align-right { text-align: right; }

@media (min-width: 1500px) {
  .crm .main-content { padding: 32px 45px 40px; }
  .crm .topbar { padding: 0 45px; }
  .crm .two-columns { grid-template-columns: minmax(0,1fr) 330px; }
  .crm .product-grid, .crm .document-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 1180px) {
  .crm .app-layout { grid-template-columns: 226px minmax(0,1fr); }
  .crm .main-content { padding: 24px; }
  .crm .topbar { padding: 0 24px; }
  .crm .topbar-location { display: none; }
  .crm .two-columns { grid-template-columns: minmax(0,1fr) 285px; gap: 18px; }
  .crm .stats-grid { gap: 12px; }
  .crm .stat-card { padding: 15px; }
  .crm .stat-top { font-size: 14px; }
  .crm .stat-icon { width: 30px; height: 30px; }
  .crm .card-body { padding: 18px; }
  .crm .card-heading { padding: 18px 18px 0; }
  .crm .document-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm .login-story { padding: 0 35px; }
  .crm .login-story h1 { font-size: 37px; }
}
@media (max-width: 1020px) {
  .crm .two-columns { grid-template-columns: minmax(0,1fr); }
  .crm .summary-sticky { position: static; }
  .crm .product-grid, .crm .campaign-grid, .crm .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .crm .balanced-columns { grid-template-columns: 1fr; }
  .crm .chat-layout { grid-template-columns: minmax(0,1fr); }
  .crm .chat-sidebar { display: none; }
  .crm .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .crm .page-heading { flex-wrap: wrap; }
  .crm .portfolio-panel { gap: 20px; padding: 30px; }
  .crm .login-story-copy { padding-top: 40px; }
  .crm .login-story h1 { font-size: 32px; }
  .crm .login-visual { transform: scale(.85); transform-origin: left top; }
}
@media (max-width: 800px) {
  .crm .app-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: 72px 1fr auto; }
  .crm .sidebar { position: fixed; left: -260px; width: 250px; transition: left .22s; }
  .crm.sidebar-open .sidebar { left: 0; }
  .crm.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: #24203350; z-index: 25; }
  .crm .topbar, .crm .main-content, .crm .app-footer { grid-column: 1; }
  .crm .topbar { padding: 0 18px; }
  .crm .menu-toggle { display: inline-flex; }
  .crm .topbar-right { gap: 10px; }
  .crm .prototype-pill { display: none; }
  .crm .main-content { padding: 22px 20px; }
  .crm .role-switch > span { display: none; }
  .crm .login-layout { grid-template-columns: 1fr; }
  .crm .login-story { display: none; }
  .crm .login-form-side { padding: 20px 28px 40px; }
  .crm .mobile-login-brand { display: flex; }
  .crm .mobile-login-brand.brand { padding: 15px 0 35px; align-self: flex-start; }
}
@media (max-width: 540px) {
  .crm .stats-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .crm h1 { font-size: 25px; }
  .crm .main-content { padding: 20px 14px; }
  .crm .page-heading { gap: 14px; margin-bottom: 21px; }
  .crm .page-heading p { font-size: 14px; }
  .crm .heading-actions { width: 100%; justify-content: flex-start; }
  .crm .heading-actions .button { padding: 9px 12px; font-size: 14px; }
  .crm .dashboard-hero { padding: 23px; }
  .crm .dashboard-hero h2 { font-size: 18px; }
  .crm .hero-illustration { display: none; }
  .crm .product-grid, .crm .campaign-grid, .crm .article-grid, .crm .document-grid { grid-template-columns: 1fr; }
  .crm .product-art { height: 175px; }
  .crm .form-grid, .crm .form-grid.three, .crm .check-grid { grid-template-columns: 1fr; }
  .crm .filter-bar { flex-wrap: wrap; padding: 15px; }
  .crm .search-field { max-width: none; flex-basis: 100%; }
  .crm .filter-bar select { flex: 1; max-width: none; }
  .crm .filter-spacer { display: none; }
  .crm .topbar-right { gap: 5px; }
  .crm .role-switch select { width: 141px; font-size: 14px; padding: 8px; }
  .crm .topbar-right > a { display: none; }
  .crm .app-footer { flex-direction: column; gap: 6px; padding: 14px 20px 22px; }
  .crm .chat-main { padding: 17px; }
  .crm .chat-welcome { padding: 35px 0; }
  .crm .chat-welcome h2 { font-size: 20px; }
  .crm .prompt-grid { grid-template-columns: 1fr; }
  .crm .chat-context { flex-wrap: wrap; }
  .crm .chat-compose .button span { display: none; }
  .crm .chat-layout { min-height: 600px; }
  .crm .portfolio-panel { grid-template-columns: 1fr; padding: 30px 25px; }
  .crm .portfolio-visual { max-width: 300px; margin-bottom: 25px; }
  .crm .portfolio-panel h2 { font-size: 25px; }
  .crm .detail-list { grid-template-columns: 1fr; }
  .crm .toast { right: 14px; left: 14px; bottom: 14px; max-width: none; }
  .crm .bulk-toolbar .button { margin-left: 0; }
  .crm .order-search { padding: 15px; flex-wrap: wrap; }
  .crm .order-search .search-field { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .crm * { scroll-behavior: auto !important; transition: none !important; }
}
