/* Tilgo CRM — Bitrix24 ("Air") uslubi */
:root {
  --bg-1: #1f5b88;
  --bg-2: #2d7fb1;
  --bg-3: #66b3d6;
  --menu-text: rgba(255,255,255,.92);
  --menu-hover: rgba(255,255,255,.12);
  --menu-active: rgba(255,255,255,.22);
  --panel: #ffffff;
  --panel-2: #f5f7f8;
  --glass: rgba(255,255,255,.82);
  --text: #333;
  --text-2: #535c69;
  --muted: #828b95;
  --line: #e6e9ec;
  --line-2: #dfe3e7;
  --link: #2067b0;
  --accent: #2fc6f6;
  --accent-2: #3bc8f5;
  --green: #bbed21;
  --green-text: #535c69;
  --success: #7bd500;
  --danger: #ff5752;
  --warn: #ffa900;
  --counter: #f54819;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; font-size: 13px; color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(140,210,240,.55), transparent 60%),
    radial-gradient(900px 500px at 10% -10%, rgba(10,40,80,.55), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 22px; height: 22px; }
[hidden] { display: none !important; }

/* ================= Layout ================= */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: none; color: var(--menu-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; transition: width .2s; z-index: 60; }
.sidebar .brand { height: 64px; display: flex; align-items: center; gap: 4px; padding: 0 22px; font-size: 21px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; }
.sidebar .brand b { color: var(--accent); font-weight: 700; }
.sidebar .brand-mini { display: none; }
.menu { list-style: none; margin: 0; padding: 4px 10px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.menu li a {
  display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 12px; border-radius: 19px; color: var(--menu-text);
  font-size: 14px; text-decoration: none; white-space: nowrap; position: relative;
}
.menu li a:hover { background: var(--menu-hover); }
.menu li a.active { background: var(--menu-active); color: #fff; font-weight: 600; }
.menu li a .lbl { overflow: hidden; text-overflow: ellipsis; }
.menu .sep { height: 1px; background: rgba(255,255,255,.14); margin: 10px 12px; }
.menu-foot { padding: 8px 10px 14px; }
.menu-foot a { display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 12px; border-radius: 17px; color: rgba(255,255,255,.7); font-size: 13px; text-decoration: none; }
.menu-foot a:hover { background: var(--menu-hover); color: #fff; }
.cnt { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--counter); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.cnt.blue { background: var(--accent); }
.cnt.gray { background: #a8adb4; }
body.collapsed .sidebar { width: 66px; }
body.collapsed .sidebar .brand-full, body.collapsed .menu .lbl, body.collapsed .menu-foot .lbl { display: none; }
body.collapsed .sidebar .brand-mini { display: inline; }
body.collapsed .menu .cnt { position: absolute; top: 2px; right: 4px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.header { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 22px 0 8px; color: #fff; }
.hsearch { flex: 0 1 460px; position: relative; }
.hsearch input { width: 100%; height: 38px; border: 0; border-radius: 19px; padding: 0 16px 0 40px; background: rgba(255,255,255,.18); color: #fff; outline: none; transition: background .15s; }
.hsearch input:focus { background: rgba(255,255,255,.28); }
.hsearch input::placeholder { color: rgba(255,255,255,.72); }
.hsearch > svg { position: absolute; left: 13px; top: 10px; opacity: .85; }
.hright { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hbtn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.hbtn:hover { background: rgba(255,255,255,.14); }
.hbtn .cnt { position: absolute; top: 2px; right: 0; margin: 0; min-width: 18px; height: 18px; font-size: 10px; }
.clock { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 10px; border-radius: 22px; cursor: pointer; }
.clock:hover { background: rgba(255,255,255,.12); }
.clock .time { font-size: 24px; font-weight: 300; letter-spacing: .5px; }
.clock .wd { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; line-height: 1.3; opacity: .9; }
.clock .wd b { display: block; font-size: 11px; }
.wd-dot { width: 8px; height: 8px; border-radius: 50%; background: #a8adb4; display: inline-block; margin-right: 4px; }
.wd-dot.open { background: var(--success); box-shadow: 0 0 0 3px rgba(123,213,0,.25); }
.wd-dot.paused { background: var(--warn); }
.me { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 22px; cursor: pointer; }
.me:hover { background: rgba(255,255,255,.12); }
.content { flex: 1; padding: 0 22px 22px 8px; min-width: 0; }

/* ================= Top nav (CRM menyusi) ================= */
.topnav { display: flex; align-items: center; gap: 2px; background: var(--glass); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 0 10px; height: 46px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.topnav a { height: 46px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; color: var(--text-2); font-size: 14px; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.topnav a:hover { color: var(--text); }
.topnav a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.topnav .cnt { margin-left: 4px; }

/* ================= Page toolbar ================= */
.ptool { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; color: #fff; }
.ptool h1 { font-size: 26px; font-weight: 300; margin: 0; white-space: nowrap; }
.pselect { display: inline-flex; align-items: center; gap: 6px; color: #fff; background: rgba(255,255,255,.16); border-radius: 16px; padding: 5px 12px; font-size: 13px; cursor: pointer; border: 0; }
.pselect:hover { background: rgba(255,255,255,.26); }
.ptool .spacer { flex: 1; }
.subtool { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; color: #fff; }

.btn { height: 38px; border: 0; border-radius: 19px; padding: 0 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(.96); }
.btn-green { background: var(--green); color: var(--green-text); }
.btn-blue { background: var(--accent-2); color: #fff; }
.btn-light { background: #fff; color: var(--green-text); border: 1px solid #c6cdd3; }
.btn-light:hover { border-color: #a8adb4; }
.btn-ghost { background: rgba(255,255,255,.2); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-link { background: none; color: var(--link); text-transform: none; font-weight: 400; letter-spacing: 0; padding: 0 8px; font-size: 13px; }
.btn-sm { height: 30px; padding: 0 14px; font-size: 11px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-split { display: inline-flex; }
.btn-split .btn:first-child { border-radius: 19px 0 0 19px; padding-right: 14px; }
.btn-split .btn:last-child { border-radius: 0 19px 19px 0; padding: 0 10px; border-left: 1px solid rgba(0,0,0,.1); }

/* Filtr */
.filter { flex: 1 1 380px; max-width: 680px; position: relative; display: flex; align-items: center; gap: 6px; background: #fff; height: 38px; border-radius: 19px; padding: 0 6px 0 12px; color: var(--text); }
.filter > svg { color: #a8adb4; }
.filter input { border: 0; outline: none; flex: 1; height: 100%; background: transparent; min-width: 60px; }
.chip { background: #bcedfc; color: #1f6d8c; border-radius: 12px; padding: 3px 6px 3px 10px; font-size: 12px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.chip button { border: 0; background: none; color: inherit; opacity: .6; padding: 0 2px; font-size: 13px; line-height: 1; }
.chip button:hover { opacity: 1; }
.filter .fbtn { border: 0; background: none; color: #a8adb4; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.filter .fbtn:hover { background: #f0f2f4; color: var(--text); }
.fpop { position: absolute; top: 44px; left: 0; width: 640px; max-width: 94vw; background: #fff; border-radius: 12px; z-index: 80; box-shadow: 0 12px 40px rgba(0,0,0,.22); display: grid; grid-template-columns: 190px 1fr; overflow: hidden; }
.fpop .presets { background: var(--panel-2); padding: 12px 8px; }
.fpop .presets .ttl { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 4px 10px 8px; letter-spacing: .4px; }
.fpop .presets a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.fpop .presets a:hover { background: #e7ecef; }
.fpop .presets a.on { background: #d6f2fc; font-weight: 600; }
.fpop .fields { padding: 16px 18px; display: grid; gap: 12px; }
.fpop .fact { display: flex; gap: 8px; padding-top: 4px; }

/* Hisoblagichlar paneli (Bitrix "counter panel") */
.counters { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.14); border-radius: 18px; padding: 3px 4px 3px 12px; font-size: 13px; }
.counters .t { opacity: .85; margin-right: 4px; }
.counters a { color: #fff; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; text-decoration: none; }
.counters a:hover { background: rgba(255,255,255,.14); }
.counters a.on { background: #fff; color: var(--text); }
.counters a .cnt { margin: 0; }

.seg { display: inline-flex; background: rgba(255,255,255,.16); border-radius: 18px; padding: 3px; }
.seg a { color: #fff; padding: 5px 14px; border-radius: 15px; text-decoration: none; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.seg a:hover { background: rgba(255,255,255,.12); }
.seg a.active { background: #fff; color: var(--text); }
.seg.light { background: #eef2f4; }
.seg.light a { color: var(--text-2); }
.seg.light a.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* ================= Panels ================= */
.panel { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; }
.panel + .panel { margin-top: 14px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-title h4 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty svg { width: 46px; height: 46px; opacity: .35; display: block; margin: 0 auto 10px; }

/* ================= Kanban ================= */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: calc(100vh - 230px); scrollbar-width: thin; }
.kcol { width: 280px; flex: none; display: flex; flex-direction: column; }
.khead { height: 38px; margin-bottom: 3px; position: relative; }
.khead .bar { height: 38px; color: #fff; display: flex; align-items: center; padding: 0 22px 0 14px; font-weight: 600; font-size: 13px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 5px 0 0 5px; }
.khead .bar .n { margin-left: 6px; font-weight: 400; opacity: .9; }
.khead .bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ksum { background: rgba(255,255,255,.94); font-size: 16px; font-weight: 300; padding: 8px 12px 8px 14px; border-radius: 5px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; min-height: 42px; }
.kadd { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #c6cdd3; background: #fff; color: #a8adb4; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.kadd:hover { border-color: var(--accent); color: var(--accent); }
.kbody { min-height: 120px; border-radius: 6px; padding-bottom: 40px; transition: background .15s; }
.kbody.over { background: rgba(255,255,255,.22); }
.kquick { background: #fff; border-radius: 6px; padding: 12px; margin-bottom: 8px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.kquick input { border: 1px solid #c6cdd3; border-radius: 4px; padding: 7px 9px; outline: none; width: 100%; }
.kquick input:focus { border-color: var(--accent); }
.kcard { background: #fff; border-radius: 6px; padding: 12px 14px 10px; margin-bottom: 8px; cursor: grab; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.08); transition: box-shadow .15s, transform .15s; }
.kcard:hover { box-shadow: 0 4px 16px rgba(0,0,0,.16); }
.kcard.dragging { opacity: .4; }
.kcard .stripe { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; }
.kcard .t { font-size: 14px; color: var(--link); font-weight: 600; display: block; word-break: break-word; margin-bottom: 4px; padding-right: 18px; }
.kcard .amt { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.kcard .ln { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; margin: 3px 0; min-width: 0; }
.kcard .ln span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .ln b { color: var(--text); font-weight: 400; }
.kcard .kfoot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #f0f2f4; }
.kcard .kact { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.kcard .kact:hover { color: var(--link); }
.kcard .kact.over { color: #e2484d; font-weight: 600; }
.kcard .kact.plan { color: var(--text-2); }
.kcard .kfoot .avatar { margin-left: auto; }
.kcard .kmenu { position: absolute; right: 6px; top: 8px; opacity: 0; transition: opacity .15s; }
.kcard:hover .kmenu { opacity: 1; }
.kmore { text-align: center; padding: 8px; }
.kmore a { color: #fff; }

.badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: .2px; white-space: nowrap; }
.badge.pro { background: #fff1c2; color: #a26b00; }
.badge.src { background: #e5f6fd; color: #1f6d8c; }
.badge.gray { background: #eef2f4; color: var(--text-2); }
.badge.green { background: #e8f8cf; color: #4a7f00; }
.badge.red { background: #ffe1e0; color: #c4302b; }
.badge.orange { background: #fff0d4; color: #a26b00; }
.avatar { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative; text-transform: uppercase; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatar.none { background: #dfe3e7 !important; color: #8a9199; }
.avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--success); border: 2px solid #fff; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= Jadval (ro'yxat) ================= */
.tablebox { background: #fff; border-radius: var(--radius); overflow: hidden; }
.tablewrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-weight: 600; color: #6b7480; font-size: 12px; padding: 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; user-select: none; }
.grid th.sortable { cursor: pointer; }
.grid th.sortable:hover { color: var(--text); }
.grid td { padding: 10px 12px; border-bottom: 1px solid #f0f2f4; vertical-align: middle; }
.grid tr:hover td { background: #f7fbfd; }
.grid tr.sel td { background: #eef9fe; }
.grid .chk { width: 36px; }
.grid input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); }
.stmini { display: flex; gap: 2px; width: 140px; }
.stmini i { flex: 1; height: 6px; border-radius: 2px; background: #e4e8eb; }
.stcell small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--muted); flex-wrap: wrap; }
.pager select { border: 1px solid #c6cdd3; border-radius: 4px; padding: 3px 6px; }
.massbar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgba(0,0,0,.05); flex-wrap: wrap; }
.massbar select { border: 1px solid #c6cdd3; border-radius: 4px; padding: 6px 8px; }
.gridbar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.grid tr.editing td { background: #fffbea !important; vertical-align: top; }
.grid tr[data-row] { cursor: default; }
.cedit { display: grid; gap: 4px; min-width: 120px; }
.cedit .inp { padding: 5px 7px; font-size: 13px; }
.cedit .picker .inp { min-width: 150px; }
.editbar { background: #fffbea; }

/* ================= Slider ================= */
.sl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; animation: fade .2s; }
.slider { position: fixed; top: 0; right: 0; bottom: 0; background: #eef2f4; z-index: 101; box-shadow: -10px 0 30px rgba(0,0,0,.25); display: flex; flex-direction: column; animation: slidein .25s ease-out; }
.sl-close { position: absolute; left: -48px; top: 16px; width: 40px; height: 40px; border-radius: 20px 0 0 20px; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.sl-close:hover { filter: brightness(1.05); }
.sl-head { padding: 18px 26px 0; }
.sl-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 36px; }
.sl-title h2 { font-size: 24px; font-weight: 400; margin: 0; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.sl-title h2:hover { color: var(--link); }
.sl-title input.title-edit { flex: 1; font-size: 22px; border: 1px solid var(--accent); border-radius: 4px; padding: 3px 8px; outline: none; }
.sl-body { flex: 1; overflow-y: auto; padding: 0 26px 30px; }
@keyframes slidein { from { transform: translateX(80px); opacity: .3 } to { transform: none; opacity: 1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.progress { display: flex; gap: 2px; margin-bottom: 14px; }
.progress .st { flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; background: #dfe3e7; cursor: pointer; padding: 0 16px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); transition: filter .15s; }
.progress .st:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); border-radius: 17px 0 0 17px; }
.progress .st:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); border-radius: 0 17px 17px 0; }
.progress .st.off { color: #7d858e; }
.progress .st:hover { filter: brightness(.93); }
.progress .st span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dtabs { display: flex; gap: 2px; border-bottom: 1px solid #d5dbe0; overflow-x: auto; scrollbar-width: none; }
.dtabs a { padding: 10px 14px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.dtabs a:hover { color: var(--text); }
.dtabs a.active { border-color: var(--accent); color: var(--text); font-weight: 600; }
.dtabs .n { background: #dfe3e7; color: var(--text-2); border-radius: 9px; font-size: 11px; padding: 0 6px; font-weight: 600; }
.dgrid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.dtab-pad { margin-top: 16px; }

/* Maydonlar */
.fields .f { padding: 9px 0; border-bottom: 1px solid #f0f2f4; }
.fields .f:last-child { border-bottom: 0; }
.fields .f label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.fields .f .v { font-size: 14px; word-break: break-word; min-height: 19px; }
.inp, .fields .f input, .fields .f select, .fields .f textarea, .form input:not([type=checkbox]):not([type=color]):not([type=radio]), .form select, .form textarea {
  width: 100%; border: 1px solid #c6cdd3; border-radius: 4px; padding: 7px 9px; outline: none; background: #fff; transition: border-color .15s;
}
.inp:focus, .fields .f input:focus, .fields .f select:focus, .fields .f textarea:focus, .form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent); }
.form { display: grid; gap: 12px; }
.form label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form .check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.form .check input { width: 16px; height: 16px; accent-color: var(--accent); }
.dup { background: #fff7e0; border: 1px solid #ffe1a6; border-radius: 6px; padding: 8px 10px; font-size: 12px; color: #7a5a00; }

.client-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f2f4; }
.client-card:last-child { border-bottom: 0; }
.client-card .ic { width: 38px; height: 38px; border-radius: 50%; background: #e5f6fd; color: #1f6d8c; display: flex; align-items: center; justify-content: center; flex: none; }
.client-card .nm { font-size: 14px; font-weight: 600; }
.client-card .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Timeline */
.composer { background: #fff; border-radius: var(--radius); margin-bottom: 16px; }
.composer .ctabs { display: flex; gap: 2px; padding: 6px 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.composer .ctabs a { padding: 9px 11px; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.composer .ctabs a.active { border-color: var(--accent); color: var(--text); font-weight: 600; }
.composer .cbody { padding: 14px; }
.composer textarea, .composer input.inp { width: 100%; border: 1px solid #c6cdd3; border-radius: 4px; padding: 9px; outline: none; }
.composer textarea { min-height: 64px; resize: vertical; }
.composer textarea:focus, .composer input:focus { border-color: var(--accent); }
.crow { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.crow input, .crow select { border: 1px solid #c6cdd3; border-radius: 4px; padding: 7px 9px; outline: none; }
.crow .grow { flex: 1; }
.tl-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #fff; background: rgba(83,92,105,.55); display: inline-block; border-radius: 10px; padding: 3px 10px; margin: 2px 0 10px; }
.timeline { position: relative; padding-left: 50px; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 0; bottom: 0; width: 2px; background: #d8dde2; }
.tl { position: relative; background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.tl .ic { position: absolute; left: -50px; top: 8px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px solid #d8dde2; color: #8a9199; }
.tl.comment .ic { border-color: #2fc6f6; color: #2fc6f6; }
.tl.call .ic { border-color: #7bd500; color: #5aa300; }
.tl.meeting .ic { border-color: #9b51e0; color: #9b51e0; }
.tl.todo .ic { border-color: #2fc6f6; color: #1f6d8c; }
.tl.stage .ic { border-color: #ffa900; color: #d98c00; }
.tl.sms .ic { border-color: #e85a9b; color: #e85a9b; }
.tl.convert .ic { border-color: #7bd500; color: #5aa300; }
.tl.planned { border-left: 3px solid var(--accent); }
.tl.planned.over { border-left-color: #e2484d; }
.tl .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.tl .meta b { color: var(--text); font-size: 13px; }
.tl .meta .r { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.tl .body { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; }
.tl .acts { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; }
.tl.mini { background: transparent; padding: 5px 0; }
.tl.mini .ic { width: 14px; height: 14px; left: -33px; top: 9px; border-width: 2px; }
.tl.mini .ic svg { display: none; }
.tl.mini .meta { margin: 0; }
.tl-date { color: #fff; font-size: 12px; font-weight: 600; background: rgba(0,0,0,.2); display: inline-block; border-radius: 10px; padding: 2px 10px; margin: 6px 0 10px -50px; }
.deadline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef2f4; color: var(--text-2); }
.deadline.over { background: #ffe1e0; color: #c4302b; }
.deadline.today { background: #fff0d4; color: #a26b00; }

/* Mahsulot qatorlari */
.prows input { border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 6px 8px; width: 100%; outline: none; }
.prows input:hover { border-color: #e0e4e7; }
.prows input:focus { border-color: var(--accent); background: #fff; }
.prows td { padding: 6px 8px; }
.ptotal { display: flex; justify-content: flex-end; gap: 30px; padding: 14px 8px 0; font-size: 15px; }
.ptotal b { font-size: 20px; font-weight: 600; }

/* ================= Vazifalar ================= */
.task-row .ttl { font-size: 14px; color: var(--text); }
.task-row .ttl:hover { color: var(--link); }
.task-row.done .ttl { text-decoration: line-through; color: var(--muted); }
.prio { color: #f54819; }
.tstatus { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.tstatus i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.task-side { background: #fff; border-radius: var(--radius); padding: 0; overflow: hidden; }
.task-side .sbtns { padding: 16px; display: grid; gap: 8px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.task-side .srow { padding: 11px 16px; border-bottom: 1px solid #f0f2f4; }
.task-side .srow label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.checklist .ci { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.checklist .ci input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--success); }
.checklist .ci.done span { text-decoration: line-through; color: var(--muted); }
.checklist .ci button { margin-left: auto; opacity: 0; }
.checklist .ci:hover button { opacity: 1; }
.cprog { height: 6px; background: #eef2f4; border-radius: 3px; overflow: hidden; margin: 6px 0 10px; }
.cprog i { display: block; height: 100%; background: var(--success); }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment .bubble { background: #f3f6f7; border-radius: 10px; padding: 9px 12px; flex: 1; }
.comment .bubble .h { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.comment .bubble .h b { color: var(--link); }
.comment .bubble .b { white-space: pre-wrap; word-break: break-word; }

/* ================= Lenta ================= */
.feed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; max-width: 1200px; }
.post { background: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.post .ph { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.post .ph .nm { font-weight: 600; color: var(--link); }
.post .ph .tm { font-size: 12px; color: var(--muted); }
.post .pb { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.post.system .pb { font-size: 14px; }
.post.thanks { border-top: 4px solid #ffa900; }
.post .pf { display: flex; gap: 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f2f4; font-size: 13px; }
.post .pf a { color: var(--text-2); display: inline-flex; gap: 5px; align-items: center; }
.post .pf a.liked { color: var(--link); font-weight: 600; }
.post .pcomments { margin-top: 8px; background: #f8fafb; border-radius: 8px; padding: 4px 12px; }
.post .pcomments .comment .bubble { background: #fff; }
.thanks-badge { display: inline-flex; gap: 8px; align-items: center; background: #fff7e0; color: #7a5a00; padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; }
.widget { background: var(--glass); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.widget h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); }
.wrow { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.wrow:last-child { border: 0; }

/* ================= Chat ================= */
.chat { display: grid; grid-template-columns: 320px 1fr; background: #fff; border-radius: var(--radius); overflow: hidden; height: calc(100vh - 100px); min-height: 480px; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fbfcfc; }
.chat-list .top { padding: 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.chat-list .items { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: 10px; padding: 10px 12px; cursor: pointer; align-items: center; }
.chat-item:hover { background: #f0f5f7; }
.chat-item.active { background: #e5f6fd; }
.chat-item .info { flex: 1; min-width: 0; }
.chat-item .nm { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.chat-item .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .nm small { font-weight: 400; color: var(--muted); font-size: 11px; flex: none; }
.chat-item .lm { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; }
.chat-item .lm span { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chat-item .lm .cnt { margin: 0; }
.group-ic { width: 40px; height: 40px; border-radius: 50%; background: #2fc6f6; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: #e9eef1 linear-gradient(180deg, #eaf2f6, #e3ecf0); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); min-height: 60px; }
.chat-head .sub { font-size: 12px; color: var(--muted); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 72%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bub { background: #fff; border-radius: 14px 14px 14px 4px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msg.me .bub { background: #dcf4ff; border-radius: 14px 14px 4px 14px; }
.msg .bub .au { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.msg .bub .tx { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; }
.msg .bub .tm { font-size: 10px; color: var(--muted); text-align: right; margin-top: 2px; }
.msg.cont .avatar { visibility: hidden; }
.msg-day { align-self: center; background: rgba(0,0,0,.18); color: #fff; font-size: 12px; border-radius: 10px; padding: 2px 10px; margin: 8px 0; }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; background: #fff; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { flex: 1; border: 1px solid #c6cdd3; border-radius: 18px; padding: 9px 14px; resize: none; outline: none; max-height: 140px; min-height: 38px; line-height: 1.4; }
.chat-input textarea:focus { border-color: var(--accent); }

/* ================= Kalendar ================= */
.cal { background: #fff; border-radius: var(--radius); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #fafbfc; border-bottom: 1px solid var(--line); }
.cal-head div { padding: 9px 10px; font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day { min-height: 118px; border-right: 1px solid #f0f2f4; border-bottom: 1px solid #f0f2f4; padding: 6px; cursor: pointer; overflow: hidden; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: #fafcfd; }
.cal-day.other { background: #fafbfc; color: #b8bec4; }
.cal-day .dn { font-size: 13px; margin-bottom: 4px; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; }
.cal-day.today .dn { background: var(--accent); color: #fff; font-weight: 700; }
.cal-ev { font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; cursor: pointer; }
.cal-ev.task { background: #eef2f4 !important; color: var(--text-2); border-left: 3px solid #a8adb4; }
.cal-ev.act { background: #fff0d4 !important; color: #7a5a00; border-left: 3px solid #ffa900; }
.cal-more { font-size: 11px; color: var(--link); padding: 0 6px; }
.cal-legend { display: inline-flex; gap: 14px; align-items: center; font-size: 12px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; vertical-align: -1px; }

/* ================= Xodimlar ================= */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.emp { background: #fff; border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; cursor: pointer; transition: box-shadow .15s; }
.emp:hover { box-shadow: 0 4px 16px rgba(0,0,0,.14); }
.emp .nm { font-weight: 600; font-size: 14px; }
.emp .ps { font-size: 12px; color: var(--muted); }
.emp.off { opacity: .55; }
.dept-title { color: #fff; font-size: 16px; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.tree ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px dashed #d5dbe0; }
.tree > ul { padding-left: 0; border: 0; }
.tree li { padding: 6px 0; }
.tree .node { display: inline-flex; gap: 10px; align-items: center; background: #f5f8fa; border-radius: 8px; padding: 8px 12px; }

/* ================= Analitika ================= */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; }
.kpi .l { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 28px; font-weight: 300; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.frow { display: grid; grid-template-columns: 160px 1fr 70px; gap: 10px; align-items: center; margin: 7px 0; }
.frow .fb { height: 26px; border-radius: 4px; min-width: 2px; display: flex; align-items: center; padding-left: 8px; color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.frow .n { text-align: right; font-weight: 600; }
.frow .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart svg { width: 100%; height: 220px; display: block; }

/* ================= Robotlar ================= */
.robots { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.robots .kcol { width: 250px; }
.robot { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); position: relative; }
.robot.off { opacity: .55; }
.robot .rt { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; margin-bottom: 4px; padding-right: 40px; }
.robot .rt svg { color: var(--accent); }
.robot .rd { font-size: 12px; color: var(--muted); word-break: break-word; }
.robot .rbtns { position: absolute; top: 8px; right: 6px; display: flex; gap: 2px; }
.robot-add { width: 100%; border: 2px dashed rgba(255,255,255,.55); background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 12px; font-weight: 600; }
.robot-add:hover { background: rgba(255,255,255,.22); }
.rtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rtype { border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.rtype:hover { border-color: var(--accent); background: #f4fbfe; }
.rtype.on { border-color: var(--accent); background: #e5f6fd; }
.rtype svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 6px; }
.rtype div { font-size: 12px; }

/* ================= Popup, modal, toast ================= */
.popup { position: fixed; z-index: 250; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.22); padding: 6px 0; min-width: 200px; max-height: 70vh; overflow-y: auto; animation: fade .12s; }
.popup .pi { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; }
.popup .pi:hover { background: #f0f5f7; text-decoration: none; }
.popup .pi.danger { color: #d93b3b; }
.popup .pi .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.popup .psep { height: 1px; background: var(--line); margin: 5px 0; }
.popup .ph { padding: 6px 16px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.popup.wide { width: 380px; padding: 0; }
.popup.wide .phead { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.notif { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f0f2f4; cursor: pointer; }
.notif:hover { background: #f7fafb; }
.notif.unread { background: #f0f9fe; }
.notif .tx { font-size: 13px; line-height: 1.4; }
.notif .tm { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sres { display: flex; gap: 10px; align-items: center; padding: 8px 16px; cursor: pointer; }
.sres:hover, .sres.on { background: #f0f5f7; }
.sres .ic { width: 30px; height: 30px; border-radius: 50%; background: #e5f6fd; color: #1f6d8c; display: flex; align-items: center; justify-content: center; flex: none; }
.sres .sub { font-size: 12px; color: var(--muted); }
.wdpop { width: 300px; padding: 18px; text-align: center; }
.wdpop .big { font-size: 34px; font-weight: 300; margin: 6px 0 2px; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 14px; width: 560px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { margin: 0; padding: 18px 22px; font-size: 18px; font-weight: 400; border-bottom: 1px solid var(--line); }
.modal .mb { padding: 18px 22px; overflow-y: auto; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: #fafbfc; border-radius: 0 0 14px 14px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; justify-items: center; }
#toast div { background: rgba(30,40,50,.92); color: #fff; padding: 10px 18px; border-radius: 8px; animation: fade .2s; max-width: 90vw; }
#toast div.e { background: #d93b3b; }

/* ================= Login ================= */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { background: #fff; border-radius: 18px; padding: 36px; width: 400px; max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login .brand { font-size: 28px; font-weight: 700; color: #1f5b88; margin-bottom: 6px; }
.login .brand b { color: var(--accent); }
.login p { color: var(--muted); margin: 0 0 22px; }
.login .btn { width: 100%; margin-top: 6px; }
.err { color: #e2484d; font-size: 12px; min-height: 16px; }

/* Settings */
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f2f4; gap: 16px; }
.set-row:last-child { border-bottom: 0; }
.set-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.st-edit { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
.st-edit .inp { flex: 1; }
.st-edit input[type=color] { width: 34px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; }
.st-edit .drag { cursor: grab; color: #a8adb4; padding: 0 4px; }
.st-edit.dragging { opacity: .4; }
.icon-btn { background: none; border: 0; color: #a8adb4; padding: 4px 6px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #f0f2f4; color: var(--text); }
.mob-only { display: none; }

@media (max-width: 1100px) {
  .feed-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; background: #1f4f72; transition: left .2s; width: 240px !important; }
  body.menu-open .sidebar { left: 0; box-shadow: 10px 0 30px rgba(0,0,0,.3); }
  body.collapsed .sidebar .brand-full, body.collapsed .menu .lbl { display: inline; }
  body.collapsed .sidebar .brand-mini { display: none; }
  .mob-only { display: inline-flex; }
  .header { padding: 0 12px; gap: 6px; }
  .clock .wd, .me .nm { display: none; }
  .clock .time { font-size: 18px; }
  .content { padding: 0 12px 16px; }
  .dgrid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .slider { width: 100vw !important; }
  .sl-close { left: auto; right: 10px; top: 10px; border-radius: 50%; z-index: 2; }
  .sl-head, .sl-body { padding-left: 14px; padding-right: 14px; }
  .progress .st { padding: 0 10px; font-size: 11px; }
  .form .two, .form .three { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 90px); }
  .chat.has-active .chat-list { display: none; }
  .chat:not(.has-active) .chat-main { display: none; }
  .fpop { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 110px 1fr 50px; }
  .cal-day { min-height: 74px; }
  .cal-ev { font-size: 10px; padding: 1px 3px; }
}

/* Kanban kartasi: ID, tez aloqa, faoliyat hisoblagichi (Bitrix) */
.kcard .kid { color: var(--muted); font-weight: 400; font-size: 12px; }
.kcard .kquickc { position: absolute; right: 10px; top: 34px; display: flex; flex-direction: column; gap: 6px; }
.kcard .kquickc a, .kcard .kquickc span { color: #2fc6f6; display: inline-flex; }
.kcard .kquickc .off { color: #d5dbe0; }
.kcard .kcount { position: absolute; right: 9px; top: 9px; min-width: 18px; height: 18px; border-radius: 9px; background: #dfe3e7; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.kcard .kcount.blue { background: var(--accent); }
.kcard .kcount.red { background: var(--counter); }
.kcard .ln, .kcard .amt { padding-right: 22px; }

/* ===== Kanban v2 — Bitrix24 uslubiga yaqin ===== */
.kanban { gap: 0; padding-top: 2px; }
.kcol { width: 286px; padding: 0 7px; border-right: 1px dashed rgba(255,255,255,.28); transition: opacity .15s; }
.kcol:first-child { padding-left: 0; }
.kcol.col-dragging { opacity: .45; }
.khead { position: relative; height: 34px; margin-bottom: 8px; }
.khead[draggable="true"] { cursor: grab; }
.khead[draggable="true"]:active { cursor: grabbing; }
.khead .bar {
  position: relative; height: 34px; padding: 0 30px 0 12px; border-radius: 6px 0 0 6px; color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; letter-spacing: .1px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 60%), var(--c);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%);
  text-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.khead .bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.khead .bar .n { font-weight: 400; opacity: .85; font-size: 12px; margin-left: 0; flex: none; }
.khead .hb-edit { position: absolute; right: 16px; top: 8px; border: 0; background: none; color: #fff; padding: 2px; opacity: 0; transition: opacity .15s; cursor: pointer; display: inline-flex; }
.khead .hb-add {
  position: absolute; right: -10px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: 0; z-index: 3; padding: 0;
  background: #fff; color: #535c69; box-shadow: 0 1px 4px rgba(0,0,0,.25); display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; cursor: pointer;
}
.khead:hover .hb-edit, .khead:hover .hb-add { opacity: 1; transform: none; }
.khead .hb-add:hover { background: var(--accent); color: #fff; }
.khead .hb-edit:hover { opacity: 1; filter: drop-shadow(0 0 2px rgba(0,0,0,.3)); }
.ksum { background: none; padding: 0; min-height: 0; justify-content: center; margin-bottom: 8px; }
.sumpill { display: inline-block; background: rgba(255,255,255,.18); color: #fff; border-radius: 6px; padding: 4px 14px; font-size: 18px; font-weight: 300; letter-spacing: .2px; }
.sumpill.muted-sum { opacity: .6; }
.kquickbtn {
  width: 100%; height: 30px; border: 0; border-radius: 6px; margin-bottom: 8px; background: rgba(255,255,255,.16); color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: background .15s;
}
.kquickbtn:hover { background: rgba(255,255,255,.28); }
.kbody.over { background: rgba(255,255,255,.12); outline: 2px dashed rgba(255,255,255,.45); outline-offset: -2px; }
.kcard { border-radius: 8px; padding: 11px 32px 9px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.kcard:hover { box-shadow: 0 6px 18px rgba(0,0,0,.18); transform: translateY(-1px); }
.kcard .t { font-size: 13.5px; padding-right: 0; }
.kcard .ln, .kcard .amt { padding-right: 0; }
.kcard .amt { font-size: 15px; font-weight: 300; margin-bottom: 4px; }
.kcard .kquickc { right: 9px; top: 32px; }
.kcard .kfoot { margin-right: -22px; }
.hedit { background: #fff; border-radius: 8px; padding: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.22); position: relative; z-index: 20; }
.hedit .inp { width: 100%; margin-bottom: 8px; }
.hcolors { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.hcolors i { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px #dfe3e7; }
.hcolors i.on { box-shadow: 0 0 0 2px var(--text); }
.hbtns { display: flex; gap: 6px; align-items: center; }
.hbtns .icon-btn { margin-left: auto; }
.knew { animation: fade .2s; }
.knew .khead { height: auto; }

/* ===== Ruxsatlar matritsasi ===== */
.perm-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 14px; align-items: start; }
.perm-side { background: var(--glass); backdrop-filter: blur(10px); border-radius: var(--radius); padding: 10px; position: sticky; top: 10px; }
.perm-side a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.perm-side a:hover { background: rgba(255,255,255,.6); }
.perm-side a.on { background: #fff; font-weight: 600; box-shadow: var(--shadow); }
.perm-main { background: #fff; border-radius: var(--radius); overflow: hidden; }
.perm-grid th { text-align: center; vertical-align: top; min-width: 150px; background: #fafbfc; position: sticky; top: 0; z-index: 2; }
.perm-grid th.act, .perm-grid td.act { text-align: left; min-width: 230px; color: var(--text); font-weight: 400; }
.perm-grid td { text-align: center; padding: 8px 10px; }
.perm-grid tr.sec td { text-align: left; background: #f3f6f8; font-weight: 600; color: var(--text-2); padding: 10px 14px; }
.perm-grid tr.sec td svg { color: var(--accent); }
.rname { font-size: 14px; color: var(--text); margin-bottom: 6px; }
.rname a { color: var(--text); display: inline-flex; gap: 4px; align-items: center; }
.rusers { display: flex; justify-content: center; align-items: center; gap: 2px; min-height: 26px; }
.lvl { border: 0; background: transparent; font-size: 12px; padding: 3px 6px; border-radius: 4px; cursor: pointer; border-bottom: 1px dashed currentColor; font-family: inherit; }
span.lvl { cursor: default; border-bottom: 0; }
.lvl-none { color: #a8adb4; }
.lvl-own { color: #2067b0; }
.lvl-dept { color: #a26b00; }
.lvl-all { color: #4a7f00; font-weight: 600; }
.tgl { position: relative; display: inline-block; width: 34px; height: 18px; vertical-align: middle; }
.tgl input { opacity: 0; width: 0; height: 0; }
.tgl span { position: absolute; inset: 0; background: #dfe3e7; border-radius: 9px; cursor: pointer; transition: background .15s; }
.tgl span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.tgl input:checked + span { background: #2fc6f6; }
.tgl input:checked + span::after { transform: translateX(16px); }
.tgl input:disabled + span { cursor: default; opacity: .7; }
@media (max-width: 900px) { .perm-wrap { grid-template-columns: 1fr; } .perm-side { position: static; display: flex; flex-wrap: wrap; } }
.kcol { position: relative; z-index: 1; }
.kcol:hover, .kcol:focus-within { z-index: 5; }

/* ===== Yuqori menyu: ochiladigan guruhlar ===== */
.topnav a[data-navg] { cursor: pointer; }
.topnav a svg.sm { opacity: .6; }

/* ===== Sotuv rejasi ===== */
.pbar { height: 8px; background: #eef2f4; border-radius: 4px; overflow: hidden; display: inline-block; width: calc(100% - 44px); vertical-align: middle; }
.pbar i { display: block; height: 100%; border-radius: 4px; }
.pcell small { margin-left: 6px; font-weight: 600; }

/* ===== Skriptlar ===== */
.script-body h5 { margin: 12px 0 6px; font-size: 13px; color: #1f6d8c; text-transform: uppercase; letter-spacing: .3px; }
.script-body h5:first-child { margin-top: 0; }
.script-body p { margin: 0 0 6px; line-height: 1.55; }
.script-body .sli { padding: 3px 0 3px 18px; position: relative; line-height: 1.5; }
.script-body .sli::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.script-pop { width: 440px; max-width: 90vw; padding: 14px 16px; max-height: 60vh; overflow-y: auto; }

/* ===== Kontakt-markaz ===== */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cc-card { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cc-ic { width: 48px; height: 48px; border-radius: 14px; background: #e5f6fd; color: #1f6d8c; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.cc-t { font-size: 15px; font-weight: 600; }
.cc-d { color: var(--muted); font-size: 12.5px; line-height: 1.5; flex: 1; }
.cc-s { margin: 4px 0 8px; }

/* ===== Onlayn-yozilish ===== */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; }
.bk-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 14px; align-items: start; }
.bk-main { background: #fff; border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 150px); }
.bk-grid { min-width: calc(60px + var(--cols) * 170px); }
.bk-head { display: grid; grid-template-columns: 60px repeat(var(--cols), 1fr); position: sticky; top: 0; background: #fafbfc; border-bottom: 1px solid var(--line); z-index: 3; }
.bk-rh { padding: 10px; border-left: 1px solid #f0f2f4; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.bk-rh small { width: 100%; color: var(--muted); font-size: 11px; }
.bk-body { display: grid; grid-template-columns: 60px repeat(var(--cols), 1fr); position: relative; }
.bk-tcol { position: relative; }
.bk-hour { position: absolute; right: 8px; font-size: 11px; color: var(--muted); transform: translateY(-50%); }
.bk-col { position: relative; border-left: 1px solid #f0f2f4; }
.bk-line { position: absolute; left: 0; right: 0; border-top: 1px solid #f3f5f6; }
.bk-slot { position: absolute; left: 3px; right: 3px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; transition: background .12s; }
.bk-slot:hover { background: #eaf8fe; color: #1f6d8c; }
.bk-ev { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 4px 8px; background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); cursor: pointer; overflow: hidden; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.bk-ev:hover { box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.bk-ev b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-ev small { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.bk-now { position: absolute; left: 60px; right: 0; border-top: 2px solid #ff5752; z-index: 4; pointer-events: none; }
.bk-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #ff5752; }
.mcal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mcal-h a { cursor: pointer; color: var(--text-2); display: inline-flex; }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.mcal .w { color: var(--muted); font-size: 10px; padding: 2px 0; }
.mcal a { padding: 5px 0; border-radius: 50%; color: var(--text); cursor: pointer; text-decoration: none; }
.mcal a:hover { background: rgba(0,0,0,.06); }
.mcal a.o { color: #b8bec4; }
.mcal a.t { color: var(--accent); font-weight: 700; }
.mcal a.s { background: var(--accent); color: #fff; }
@media (max-width: 1000px) { .bk-wrap { grid-template-columns: 1fr; } }

/* ===== Tasdiqlash ===== */
.ap { margin-bottom: 12px; }
.ap-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 18px; background: #eef2f4; font-size: 12.5px; }
.ap-step b { width: 18px; height: 18px; border-radius: 50%; background: #c6cdd3; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.ap-step.cur { background: #fff0d4; }
.ap-step.cur b { background: #ffa900; }
.ap-step.approved { background: #e8f8cf; color: #4a7f00; }
.ap-step.rejected { background: #ffe1e0; color: #c4302b; }
.ap-step small { color: var(--muted); font-style: italic; }
.ap-arrow { color: #a8adb4; }

/* ===== Sdelka kartasidagi Telegram yozishmasi ===== */
.tg-mini { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #eef4f7; border-radius: 8px; }
.tg-mini .msg { max-width: 85%; }

/* Mobil: sahifa ekrandan kengaymasin */
.grid-2 > *, .grid-3 > *, .feed-grid > *, .dgrid > *, .bk-wrap > *, .perm-wrap > * { min-width: 0; }
.chart svg { max-width: 100%; }
@media (max-width: 900px) {
  .counters { flex-wrap: wrap; border-radius: 12px; }
  .filter { flex-basis: 100%; min-width: 0; }
  .ptool h1 { font-size: 22px; }
  .post textarea, .post .form { max-width: 100%; }
  .kpi .v { font-size: 22px; }
}
@media (max-width: 900px) { .panel { overflow-x: auto; } }
.mention { color: var(--link); background: #e5f6fd; border-radius: 4px; padding: 0 3px; font-weight: 600; }
details.panel summary { outline: none; }

/* Kartadagi maydonlarni joyida tahrirlash */
.fields .f.editable { cursor: pointer; border-radius: 6px; margin: 0 -8px; padding: 9px 8px; transition: background .12s; }
.fields .f.editable:hover { background: #f3f8fb; }
.fields .f.editable:hover .v::after { content: "✎"; color: #a8adb4; font-size: 12px; margin-left: 8px; }
.fields .f.editing { background: #fffbea; cursor: default; }
.fields .f.editing:hover { background: #fffbea; }
.sl-savebar { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; padding: 12px 26px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.08); z-index: 5; animation: fade .15s; }

/* Kanban: har bir ustun alohida suriladi (Bitrix kabi); doska faqat yonga suriladi */
.kanban.fit { overflow-x: auto; overflow-y: hidden; align-items: stretch; min-height: 0; padding-bottom: 0; }
.kanban.fit .kcol { height: 100%; min-height: 0; }
.kanban.fit .khead, .kanban.fit .ksum, .kanban.fit .knew, .kanban.fit .kquickbtn { flex: none; }
.kanban.fit .sumpill { background: rgba(35,95,140,.85); }
.kanban.fit .kcol:hover, .kanban.fit .kcol:focus-within { z-index: 7; }
.kanban.fit .kbody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; overscroll-behavior-x: auto; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.45) transparent; }
.kanban.fit .kbody::-webkit-scrollbar { width: 6px; }
.kanban.fit .kbody::-webkit-scrollbar-thumb { background: rgba(255,255,255,.45); border-radius: 3px; }
/* Ro'yxat: jadval sarlavhasi joyida */
.tablewrap.fit { overflow: auto; }
.tablewrap.fit thead th { position: sticky; top: 0; z-index: 3; }

/* Eslatmalar */
.rm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
#reminders { position: fixed; right: 18px; bottom: 18px; z-index: 400; display: grid; gap: 10px; width: 340px; max-width: calc(100vw - 24px); }
.rm-card { background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.28); padding: 14px 16px; border-left: 5px solid #ffa900; animation: rmIn .3s ease-out; }
.rm-card.rm-out { opacity: 0; transform: translateX(30px); transition: all .25s; }
.rm-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #d98c00; text-transform: uppercase; letter-spacing: .3px; }
.rm-head .icon-btn { margin-left: auto; }
.rm-title { font-size: 16px; font-weight: 600; margin: 6px 0 2px; }
.rm-sub { color: var(--link); font-size: 13px; }
.rm-body { color: var(--text-2); font-size: 12.5px; margin-top: 6px; white-space: pre-wrap; }
.rm-btns { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
@keyframes rmIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.rm-chip { position: relative; display: inline-flex; }
.rm-chip.edit .btn { padding-right: 26px; }
.rm-chip .rm-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ffe1e0; color: #c4302b; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.rm-chip .rm-x:hover { background: #ff5752; color: #fff; }
.rm-plus { border-style: dashed !important; }
.rm-addform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 10px; background: #f5f8fa; border-radius: 8px; }
.rm-addform .inp { width: auto; }
.rm-presets .btn[disabled] { opacity: .45; }

/* CSV import */
.imp-info { background: #eef9fe; border: 1px solid #bcedfc; color: #1f5f7a; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.55; }
.imp .imp-drop { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; border: 2px dashed #c6cdd3; border-radius: 10px; padding: 22px; cursor: pointer; color: var(--text-2); font-size: 14px; transition: all .15s; }
.imp .imp-drop:hover, .imp .imp-drop.over { border-color: var(--link); background: #f3faff; color: var(--link); }
.imp-file { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; font-size: 13px; }
.imp-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.imp-file select { margin-left: auto; width: auto; }
.imp-x { font-size: 18px; color: #c4302b; cursor: pointer; padding: 0 4px; }
.imp-res { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.imp-h { font-weight: 600; margin-bottom: 6px; }
.imp-nums { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.imp-nums span { background: #f1f4f6; padding: 3px 9px; border-radius: 12px; }
.imp-nums .g { background: #e6f7d9; color: #3b7a12; } .imp-nums .b { background: #e5f4fd; color: #1a6a99; } .imp-nums .r { background: #ffe6e5; color: #b3261e; }
.imp-cols { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.imp-cols span { font-size: 11.5px; padding: 2px 7px; border-radius: 4px; }
.imp-cols .ok { background: #e6f7d9; color: #2f6b0c; } .imp-cols .no { background: #f1f4f6; color: #8a949c; text-decoration: line-through; }
.imp-warn { margin-top: 8px; font-size: 12px; color: #9a6a00; background: #fff7e0; padding: 6px 9px; border-radius: 6px; }
.imp-err { margin-top: 8px; font-size: 12px; color: #b3261e; background: #fff1f0; padding: 6px 9px; border-radius: 6px; max-height: 160px; overflow: auto; }

/* Kanban: belgilash (Bitrix «Выбрано») */
.kcard .kchk { position: absolute; right: 7px; top: 7px; width: 22px; height: 22px; display: none; align-items: center; justify-content: center; z-index: 2; cursor: pointer; background: #fff; border-radius: 4px; }
.kcard .kchk input { width: 17px; height: 17px; margin: 0; cursor: pointer; accent-color: #2fc6f6; }
.kcard.sel .kchk { display: inline-flex; }
.kcard.sel .kcount { visibility: hidden; }
.kcard { cursor: pointer; }
.kcard.sel { background: #d4f1fc; box-shadow: 0 0 0 2px #2fc6f6, 0 2px 8px rgba(47,198,246,.25); }
.kcard.sel .kfoot { border-top-color: #bfe7f6; }
.kcard .kupd { margin-left: auto; font-size: 11.5px; color: #a8adb4; white-space: nowrap; }
.kcard .kfoot .kupd + .avatar { margin-left: 0; }
.kmass { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 2px; background: #fff; border-radius: 12px; padding: 8px 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0,0,0,.08); min-height: 52px; animation: fade .15s; }
.kmass .kmass-n { display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; margin-right: 6px; border-right: 1px solid #e6e9ec; font-size: 14px; color: var(--text-2); }
.kmass .kmass-x { border: 0; background: none; color: #a8adb4; cursor: pointer; display: inline-flex; padding: 2px; }
.kmass .kmass-x:hover { color: #333; }
.kmass button[data-mk]:not(.kmass-x) { border: 0; background: none; display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .2px; color: #525c69; cursor: pointer; white-space: nowrap; }
.kmass button[data-mk]:not(.kmass-x):hover { background: #f1f4f6; color: #333; }
.kmass .kmass-all { margin-left: auto; font-size: 12.5px; }
/* Kanban: chet strelkalari */
.kwrap { position: relative; }
.kscroll { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 92px; border: 0; background: rgba(255,255,255,.28); color: #fff; z-index: 20; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, opacity .2s; }
.kscroll:hover { background: rgba(255,255,255,.5); }
.kscroll.l { left: 0; border-radius: 0 92px 92px 0; padding-right: 8px; }
.kscroll.r { right: 0; border-radius: 92px 0 0 92px; padding-left: 8px; }
.kscroll.off { opacity: 0; pointer-events: none; }
.kscroll .icon { width: 22px; height: 22px; }
@media (hover: none) { .kscroll { display: none; } }
/* Kontakt kartasi: ixcham */
.about-wrap { display: grid; gap: 14px; }
.fields .f.f-empty { display: none; }
.show-empty .f.f-empty { display: block; }
.card-title.f-empty { display: none; }
.show-empty .card-title.f-empty { display: flex; }
.show-empty-link { display: inline-block; margin-top: 10px; font-size: 12.5px; }
/* Tarix: maydon o'zgarishlari */
.tl.change .chg { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.tl.change .chg .cf { color: var(--muted); }
.tl.change .chg s { color: #a8adb4; }
.tl-who { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.tl-via { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.ptool[hidden] { display: none !important; }

/* Sdelka kartasi: mijoz bloki tepada */
.client-top .ctop { display: grid; gap: 6px; }
.client-top .ctop-nm { font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.client-top .ctop-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #f0f2f4; font-size: 15px; }
.client-top .ctop-ph a { display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px dashed currentColor; }
.client-top .ctop-ph .muted { font-size: 12px; }

/* Dashboard'dan yuklash */
.ti-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.ti-filters { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 13px; }
.ti-log summary { cursor: pointer; color: var(--link); font-size: 13px; margin-bottom: 8px; }
.ti-log .grid td, .ti-log .grid th { font-size: 12.5px; padding: 6px 8px; }

/* Pro berish */
.pro-form { gap: 10px; }
.pro-user { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pro-user > div { flex: 1; min-width: 0; }
.pro-sub { margin-top: 4px; font-size: 12.5px; }
.pro-h { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .3px; margin-top: 6px; }
.pro-plans { display: grid; gap: 6px; }
.pro-opt { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.pro-opt:has(input:checked) { border-color: var(--accent); background: #f0fbff; }
.pro-opt input[type=radio] { margin: 0; }

/* Sudrash paytida pastki panel (Bitrix: Удалить / Сделка провалена / ...) */
.kdropbar { position: fixed; bottom: 0; z-index: 500; display: flex; height: 64px; transform: translateY(100%); transition: transform .18s ease-out; box-shadow: 0 -6px 24px rgba(0,0,0,.25); }
.kdropbar.on { transform: none; }
.kdz { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-size: 15px; font-weight: 600; background: var(--c, #a8adb4); opacity: .88; transition: opacity .12s, filter .12s; text-align: center; padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kdz.del { background: #a8adb4; flex: 0 0 auto; padding: 0 28px; }
.kdz.over { opacity: 1; filter: brightness(1.12); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7); }
.kdz .i { pointer-events: none; }
.kanban { will-change: scroll-position; }

/* ===== Tilgo Pro bo'limi ===== */
.pro-sub-h { color: rgba(255,255,255,.75); font-size: 14px; }
.pro-page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pro-col { display: grid; gap: 16px; min-width: 0; }
.pro-col .panel + .panel { margin-top: 0; }
.pro-sn { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.pro-sn span { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.pro-search { display: flex; gap: 10px; }
.pro-phone { flex: 1; display: flex; align-items: center; border: 2px solid #dfe3e7; border-radius: 10px; padding: 0 14px; height: 50px; transition: border-color .15s; }
.pro-phone:focus-within { border-color: var(--accent); }
.pro-phone span { color: var(--muted); font-size: 18px; margin-right: 8px; }
.pro-phone input { border: 0; outline: 0; font-size: 20px; letter-spacing: .5px; width: 100%; background: none; }
.pro-search .btn { height: 50px; padding: 0 22px; font-size: 14px; }
.pro-hint { font-size: 12.5px; margin: 8px 0 4px; }
.pro-loading, .pro-none { padding: 18px; text-align: center; color: var(--text-2); background: #f5f7f8; border-radius: 10px; margin-top: 12px; }
.pro-ucard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid #e6e9ec; border-radius: 12px; margin-top: 10px; cursor: pointer; transition: all .12s; }
.pro-ucard:hover { border-color: #bfe7f6; }
.pro-ucard.on { border-color: var(--accent); background: #f0fbff; }
.pro-ava { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2fc6f6, #2067b0); color: #fff; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; flex: none; text-transform: uppercase; }
.pro-uinfo { flex: 1; min-width: 0; }
.pro-uinfo b { font-size: 15px; }
.pro-uinfo .muted, .pro-ustat .muted { font-size: 12px; margin-top: 2px; }
.pro-ustat { text-align: right; }
.pro-crm { margin-top: 10px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pro-plans2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pro-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 2px solid #e6e9ec; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; transition: all .12s; font: inherit; }
.pro-plan:hover { border-color: #bfe7f6; }
.pro-plan.on { border-color: #ffa900; background: #fff8e8; box-shadow: 0 4px 14px rgba(255,169,0,.18); }
.pp-name { font-size: 16px; font-weight: 700; }
.pp-days { font-size: 12px; color: var(--muted); }
.pp-price { font-size: 18px; font-weight: 600; color: #333; margin-top: 4px; }
.pro-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin: 18px 0 8px; }
.pro-amts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pro-amt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 2px solid #e6e9ec; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font: inherit; transition: all .12s; }
.pro-amt.on { border-color: var(--accent); background: #f0fbff; }
.pro-amt span { color: var(--text-2); font-size: 13px; }
.pro-amt input { width: 100%; border: 1px solid #dfe3e7; border-radius: 6px; padding: 6px 8px; font-size: 14px; outline: 0; }
.pro-amt input:focus { border-color: var(--accent); }
.pro-sum { position: sticky; top: 10px; }
.pro-rows { display: grid; gap: 0; }
.pro-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f4; font-size: 14px; }
.pro-rows > div span { color: var(--muted); }
.pro-rows > div b { text-align: right; font-weight: 600; }
.pro-rows > div.big { border-bottom: 0; padding-top: 14px; }
.pro-rows > div.big b { font-size: 22px; }
.pro-note { background: #fff7e0; color: #8a6100; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-top: 8px; }
.pro-go { width: 100%; height: 50px; font-size: 15px; margin-top: 14px; }
.pro-revoke2 { width: 100%; margin-top: 10px; background: #fff; color: #d93025; border: 1px solid #f3b8b3; }
.pro-revoke2:hover { background: #fff1f0; }
.pro-log { display: grid; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f2f4; font-size: 13px; }
.pl-row:last-child { border-bottom: 0; }
.pl-ic { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #fff3d6; }
.pl-ic.revoke { background: #ffe6e5; }
.pl-main { flex: 1; min-width: 0; }
.pl-main .muted { font-size: 12px; margin-top: 2px; }
.pl-at { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 900px) {
  .pro-page { grid-template-columns: 1fr; }
  .pro-amts { grid-template-columns: 1fr; }
  .pro-sum { position: static; }
}

.pro-hi { color: #1a6a99; background: #d9f3fd; border-radius: 3px; padding: 0 2px; font-weight: 700; }
[data-users].pro-busy { opacity: .55; transition: opacity .15s; }
.pro-ulist { max-height: 300px; overflow-y: auto; padding-right: 4px; margin-right: -4px; scrollbar-width: thin; }

/* Xodim formasi: ruxsatlar */
.up-box { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.up-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.up-src { font-size: 12px; background: #eef2f4; color: var(--text-2); padding: 3px 9px; border-radius: 10px; }
.up-src.custom { background: #fff3d6; color: #8a6100; }
.up-head a { font-size: 12.5px; margin-left: auto; }
.up-note { font-size: 12px; margin: 6px 0 4px; line-height: 1.5; }
.up-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--text-2); margin: 14px 0 6px; }
.up-sec .muted { text-transform: none; font-weight: 400; letter-spacing: 0; }
.up-grid-wrap { overflow-x: auto; }
.up-grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.up-grid th { font-weight: 600; color: var(--muted); font-size: 11.5px; text-align: left; padding: 4px 6px; white-space: nowrap; }
.up-grid td { padding: 3px 4px; border-top: 1px solid #f0f2f4; }
.up-grid .up-ent { font-weight: 600; white-space: nowrap; padding-right: 10px; }
.form .up-grid select.up-lvl { width: 100%; min-width: 92px; padding: 4px 6px; font-size: 12px; height: auto; border-radius: 6px; }
.up-lvl.lvl-none { color: #a8adb4; } .up-lvl.lvl-own { color: #2067b0; } .up-lvl.lvl-dept { color: #8a6100; } .up-lvl.lvl-all { color: #3b7a12; }
.up-checks { display: grid; gap: 6px; margin-top: 8px; }
.up-checks.cols { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.up-checks .check { font-size: 13px; }
@media (max-width: 700px) { .up-checks.cols { grid-template-columns: 1fr; } }

/* To'lov havolasi */
.pay-prov { display: flex; gap: 8px; margin: 10px 0 12px; }
.pay-prov button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 2px solid #e6e9ec; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pay-prov button i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #c6cdd3; }
.pay-prov button.on { border-color: var(--accent); background: #f0fbff; }
.pay-prov button.on i { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.pay-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.pay-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pay-row select, .pay-row input { height: 40px; border: 1px solid #dfe3e7; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; color: #333; outline: 0; background: #fff; }
.pay-row select:focus, .pay-row input:focus { border-color: var(--accent); }
.pay-row .btn { height: 40px; }
.pay-res { margin-top: 14px; background: #e9f8ef; border: 1px solid #bfe8cf; border-radius: 10px; padding: 12px 14px; }
.pay-url { display: flex; gap: 10px; align-items: flex-start; word-break: break-all; font-size: 13px; }
.pay-url .ok { width: 22px; height: 22px; border-radius: 6px; background: #2fb36b; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 13px; }
.pay-url a { color: #1d7a45; }
.pay-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 0 32px; font-size: 12.5px; }
.pay-sms textarea { width: 100%; border: 1px solid #dfe3e7; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13.5px; resize: vertical; outline: 0; }
.pay-sms textarea:focus { border-color: var(--accent); }
.pay-sms-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; }
.pl-ic.link { background: #e5f4fd; } .pl-ic.sms { background: #eef0ff; }
@media (max-width: 700px) { .pay-row { grid-template-columns: 1fr; } }

.u-del { color: #d93025; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 4px; }
.u-del:hover { text-decoration: underline; }

.ptool .ti-btn { box-shadow: 0 2px 10px rgba(47,198,246,.35); }

.ctop-tilgo { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #f0f2f4; margin-top: 4px; }
.paydlg .pro-ucard { margin-top: 0; margin-bottom: 8px; cursor: default; }
