:root {
  --lapis: #1D3A8A;
  --lapis-deep: #13285F;
  --turq: #0F8C89;
  --turq-soft: #DDF3F2;
  --saffron: #D9962B;
  --saffron-soft: #FBEFD8;
  --pom: #C23B4E;
  --pom-soft: #F9E3E6;
  --paper: #F4F5F9;
  --surface: #FFFFFF;
  --ink: #1A1E2C;
  --muted: #687089;
  --line: #E2E5EE;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 30, 44, .06), 0 4px 14px rgba(26, 30, 44, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Onest', system-ui, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
a { color: inherit; }
code { background: var(--paper); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.ic { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }

/* ---------- Brend ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.mark { width: 26px; height: 26px; flex: none; background: var(--saffron); clip-path: polygon(50% 0, 64% 21%, 85% 15%, 79% 36%, 100% 50%, 79% 64%, 85% 85%, 64% 79%, 50% 100%, 36% 79%, 15% 85%, 21% 64%, 0 50%, 21% 36%, 15% 15%, 36% 21%); }

/* ---------- Qobiq ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 28px; padding: 22px 14px;
  color: #E7ECFA; background-color: var(--lapis-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Cpath d='M0 28h4M52 28h4M28 0v4M28 52v4'/%3E%3C/g%3E%3C/svg%3E");
}
.side .brand { padding: 0 10px; color: #fff; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: #C3CDEB; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: rgba(255, 255, 255, .13); color: #fff; }
.side nav a.on .ic { color: var(--saffron); }
.count { margin-left: auto; background: var(--saffron); color: var(--lapis-deep); font-size: 12px; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 99px; }
.dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.me div { flex: 1; min-width: 0; }
.me b { display: block; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: #9FAED6; }
.me form { margin: 0; }
.me .icon-btn { color: #9FAED6; }
.me .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.main { min-width: 0; padding: 28px 32px 48px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.top h1 { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 28px; letter-spacing: -.02em; }
.sub { margin: 6px 0 0; color: var(--muted); }
.late-txt { color: var(--pom); }

/* ---------- Tugmalar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--lapis); color: #fff; }
.btn.primary:hover { background: var(--lapis-deep); }
.btn.success { background: var(--turq); color: #fff; }
.btn.success:hover { background: #0B7572; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--paper); }
.btn.wide { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn.danger:hover { background: var(--pom-soft); color: var(--pom); }

/* ---------- Filtrlar ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: #E8EAF1; border-radius: 11px; width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs a { padding: 6px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.notice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 18px; border-radius: 10px; background: var(--saffron-soft); color: #7A5310; text-decoration: none; font-weight: 500; }
.notice:hover { background: #F8E6C2; }

/* ---------- Doska ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.col { background: #EAECF2; border-radius: 14px; padding: 10px; border: 2px dashed transparent; transition: border-color .15s, background .15s; }
.col.can-drop { border-color: #C5CBDB; }
.col.over { border-color: var(--turq); background: var(--turq-soft); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 6px 6px 12px; }
.col-head h3 { font-size: 14px; font-weight: 600; }
.col-dot { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); }
.col-open .col-dot { background: var(--saffron); }
.col-taken .col-dot { background: var(--lapis); }
.col-done .col-dot { background: var(--turq); }
.col-n { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.empty { margin: 0; padding: 22px 10px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed #CDD2DF; border-radius: 10px; }

.card { background: var(--surface); border-radius: 10px; padding: 12px 13px; box-shadow: var(--shadow); cursor: pointer; border: 1px solid transparent; position: relative; }
.card:hover { border-color: #CBD1E0; }
.card[draggable] { cursor: grab; }
.card.dragging { opacity: .45; }
.card h4 { font-size: 15px; font-weight: 600; margin: 8px 0 12px; word-break: break-word; }
.col-done .card h4 { color: var(--muted); text-decoration: line-through; text-decoration-color: #B5BBCC; }
.card-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.dept { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.dept-IT { background: var(--turq-soft); color: #0A6A68; }
.dept-Marketing { background: var(--pom-soft); color: #9C2738; }
.prio { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.prio::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #B9BFCE; }
.prio-high .prio { color: var(--pom); font-weight: 600; }
.prio-high .prio::before { background: var(--pom); }
.prio-medium .prio::before { background: var(--saffron); }
.priv { margin-left: auto; color: var(--muted); display: inline-flex; }
.priv .ic { width: 15px; height: 15px; }
.prio-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #B9BFCE; }
.prio-dot.prio-high { background: var(--pom); }
.prio-dot.prio-medium { background: var(--saffron); }

.due { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 2px 8px 2px 6px; border-radius: 6px; background: var(--paper); }
.due .ic { width: 14px; height: 14px; }
.due.soon { background: var(--saffron-soft); color: #8A5A0B; }
.due.late { background: var(--pom-soft); color: var(--pom); }
.due.done { background: var(--turq-soft); color: #0A6A68; }

/* ---------- Avatar ---------- */
.av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 11px; }
.av.lg { width: 46px; height: 46px; font-size: 16px; }
.av.av-none { background: transparent; color: var(--muted); border: 1.5px dashed #B9BFCE; }

/* ---------- Oynalar ---------- */
dialog.sheet { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 0; border-radius: 16px; padding: 26px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 60px rgba(19, 40, 95, .25); }
dialog.sheet[open] { animation: pop .18s ease-out; }
dialog::backdrop { background: rgba(19, 40, 95, .35); backdrop-filter: blur(2px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.sheet-close { position: absolute; top: 14px; right: 14px; margin: 0; }
.sheet h2 { font-size: 21px; font-weight: 700; margin: 12px 40px 18px 0; word-break: break-word; }
.status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.st-open { background: var(--saffron-soft); color: #8A5A0B; }
.st-taken { background: #E1E7F7; color: var(--lapis); }
.st-done { background: var(--turq-soft); color: #0A6A68; }
.meta { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; margin: 0 0 18px; font-size: 14px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta .ic { width: 16px; height: 16px; color: var(--muted); }
.desc { white-space: pre-wrap; background: var(--paper); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; word-break: break-word; }
.muted { color: var(--muted); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-actions form { margin: 0; }
.sheet-actions .assign { display: flex; gap: 6px; }
.sheet-actions .assign select { width: auto; max-width: 210px; }
.sheet-actions .push { margin-left: auto; }

/* ---------- Formalar ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lapis); box-shadow: 0 0 0 3px rgba(29, 58, 138, .12); }
textarea { resize: vertical; }
input.big { font-size: 17px; font-weight: 600; padding: 12px 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg legend { font-size: 13px; font-weight: 500; color: var(--muted); padding: 0; margin-bottom: 6px; }
.seg label { flex-direction: row; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; color: var(--ink); font-size: 14px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { border-color: var(--lapis); background: #EEF2FC; color: var(--lapis); }
.seg label:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--turq); outline-offset: 2px; }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.error { color: var(--pom); background: var(--pom-soft); padding: 10px 12px; border-radius: 9px; margin: 0 0 16px; }
.okmsg { color: #0A6A68; background: var(--turq-soft); padding: 10px 12px; border-radius: 9px; margin: 0 0 12px; }

/* ---------- Jamoa ---------- */
.people { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.person { font: inherit; color: inherit; text-align: left; width: 100%; background: none; border: 0; border-radius: 0; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person:hover { background: #F8F9FC; }
.person-info small { display: block; }
.person form { margin: 0; }
.person-info b { display: block; font-weight: 600; }
.person-info small { color: var(--muted); }
.stats { display: flex; gap: 22px; }
.stats span { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); min-width: 64px; }
.stats b { font-size: 18px; color: var(--ink); font-weight: 600; }
.stats .late-txt b { color: var(--pom); }
.tg { color: #C2C7D4; display: inline-flex; }
.tg.on { color: var(--turq); }

/* ---------- Invite ---------- */
.invite { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 12px; }
.invite div { background: var(--paper); border-radius: 10px; padding: 12px 14px; }
.invite small { display: block; color: var(--muted); font-size: 12px; }
.invite b { font-size: 20px; font-weight: 600; word-break: break-all; }
.invite .pin { font-family: 'Unbounded', sans-serif; letter-spacing: .12em; color: var(--lapis); }
.invite-text { font-size: 13px; color: var(--muted); margin-bottom: 12px; resize: none; }
.more { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); }
.more[open] summary { margin-bottom: 12px; }
.btn.danger-text { color: var(--pom); }
.btn.danger-text:hover { background: var(--pom-soft); }

/* ---------- Profil ---------- */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 900px; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; margin-bottom: 12px; }
.panel > p { color: var(--muted); margin: 0 0 16px; }
.steps { margin: 0 0 16px; padding-left: 20px; color: var(--ink); }
.steps li { margin-bottom: 6px; }
.steps a, .hint a { color: var(--lapis); font-weight: 500; }
.row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.hint.alt { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.pill { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--paper); color: var(--muted); }
.pill.ok { background: var(--turq-soft); color: #0A6A68; }

/* ---------- Kirish ---------- */
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 48px; color: #fff; background-color: var(--lapis-deep); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.09'%3E%3Crect x='24' y='24' width='36' height='36'/%3E%3Crect x='24' y='24' width='36' height='36' transform='rotate(45 42 42)'/%3E%3Ccircle cx='42' cy='42' r='8'/%3E%3Cpath d='M0 42h6M78 42h6M42 0v6M42 78v6'/%3E%3C/g%3E%3C/svg%3E"); }
.brand.big { font-size: 44px; }
.brand.big .mark { width: 44px; height: 44px; }
.login-art p { max-width: 380px; font-size: 18px; color: #C3CDEB; margin: 0; }
.login-form { align-self: center; justify-self: center; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 16px; padding: 32px 0; }
.login-form h1 { font-family: 'Unbounded', sans-serif; font-size: 26px; margin-bottom: 4px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.login-form .error { margin: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .side nav { flex-direction: row; flex-wrap: wrap; order: 3; width: 100%; }
  .side nav a { padding: 7px 10px; font-size: 14px; }
  .side nav a span { display: none; }
  .side nav a.on span { display: inline; }
  .me { margin: 0 0 0 auto; padding: 0; border: 0; }
  .me div { display: none; }
  .main { padding: 20px 16px 40px; }
  .board { grid-template-columns: 1fr; }
  .person { grid-template-columns: auto 1fr auto; }
  .person .stats { grid-column: 1 / -1; justify-content: space-around; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 32px 24px; min-height: 200px; }
  .brand.big { font-size: 30px; }
}
@media (max-width: 520px) {
  .grid2 { grid-template-columns: 1fr; }
  .meta { grid-template-columns: 1fr; gap: 2px; }
  .meta dd { margin-bottom: 8px; }
  .top h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
