/* YönX — əsas dizayn sistemi (Paper White + Light Cool Gray + tünd boz) */
:root {
  color-scheme: light;
  /* Palitra: Paper White #F2F2F2 + Light Cool Gray #BFC3C7, mətn və vurğu — tünd boz */
  --paper: #F2F2F2;
  --cool-gray: #BFC3C7;
  --ink: #2B2D31;

  --bg: var(--paper);
  --bg-glow: linear-gradient(transparent, transparent);
  --surface: #FFFFFF;
  --surface-2: #F7F7F8;
  --surface-3: #E7E9EB;
  --border: #DCDFE2;
  --border-strong: var(--cool-gray);
  --text: var(--ink);
  --text-2: #4B4F56;
  --muted: #7C8188;

  /* Vurğu rəngi — tünd boz; üzərindəki yazı Paper White */
  --brand-1: var(--ink);
  --brand-2: #3A3D42;
  --brand-3: var(--cool-gray);
  --brand: var(--ink);
  --brand-grad: var(--ink);
  --on-brand: var(--paper);

  /* Yuxarı panel — tünd boz */
  --top-bg: var(--ink);
  --top-text: var(--paper);
  --top-muted: var(--cool-gray);

  --success: #1f9d55;
  --warning: #b7791f;
  --danger: #d23b57;
  --info: var(--cool-gray);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(43, 45, 49, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-glow), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; color: #000; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- Üst panel ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  height: 56px; padding: 0 20px;
  background: var(--top-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .logo img { height: 26px; display: block; }
.topbar .module-title { font-weight: 600; font-size: 15px; color: var(--text); }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  color: var(--text-2); padding: 6px 12px; border-radius: var(--radius-sm); font-weight: 500;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topbar nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand-1); }
.topbar .spacer { flex: 1; }
.topbar .org-name { color: var(--text-2); font-weight: 500; }
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar .module-title, .topbar .org-name { display: none; }
  .topbar nav { overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: none; }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { padding: 6px 8px; white-space: nowrap; }
  .topbar .spacer { display: none; }
  .page { padding: 16px 16px 48px; }
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-grad); color: var(--on-brand); font-size: 12px; font-weight: 700;
}
.user-menu { position: relative; }
.user-menu > button { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text); font: inherit; }
.user-menu .dropdown {
  display: none; position: absolute; right: 0; top: 42px; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px;
}
.user-menu.open .dropdown { display: block; }
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown a, .dropdown button.link {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); background: none; border: 0; font: inherit; cursor: pointer;
}
.dropdown a:hover, .dropdown button.link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* ---------- Səhifə ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 24px 20px 64px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .spacer { flex: 1; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Düymələr ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn-primary { background: var(--brand-grad); border-color: transparent; color: var(--on-brand); font-weight: 600; }
.btn-primary:hover { filter: brightness(.9); background: var(--brand-grad); }
.btn-danger { color: var(--danger); border-color: rgba(255, 77, 109, .4); background: transparent; }
.btn-danger:hover { background: rgba(255, 77, 109, .1); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }
.btn-block { width: 100%; justify-content: center; height: 42px; }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-detail { grid-template-columns: 1fr; } }

/* ---------- Modul ekranı ---------- */
.apps-wrap { max-width: 880px; margin: 40px auto; padding: 0 20px; }
.apps-hello { text-align: center; margin-bottom: 36px; }
.apps-hello h1 { font-size: 26px; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.app-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px 18px; border-radius: 16px; border: 1px solid transparent;
  color: var(--text); text-align: center; transition: .15s ease;
}
.app-tile:hover { background: var(--surface); border-color: var(--border); text-decoration: none; transform: translateY(-2px); }
.app-tile .icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.app-tile .icon svg { width: 34px; height: 34px; stroke: var(--text); }
.app-tile .name { font-weight: 600; }
.app-tile .hint { font-size: 12px; color: var(--muted); }
.app-tile.disabled { opacity: .45; cursor: default; }
.app-tile.disabled:hover { transform: none; background: transparent; border-color: transparent; }
.badge-soon {
  position: absolute; top: 10px; right: 10px; font-size: 10px; padding: 2px 7px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-2);
}

/* ---------- Cədvəl ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .title { font-weight: 600; color: var(--text); }
.table .sub { color: var(--muted); font-size: 12px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; stroke: var(--muted); margin-bottom: 8px; }

/* ---------- Etiketlər ---------- */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag-client { background: var(--ink); color: var(--paper); }
.tag-partner { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tag-other { background: var(--surface-3); color: var(--text-2); }
.tag-ok { background: rgba(31, 157, 85, .12); color: #17773f; }
.tag-off { background: rgba(210, 59, 87, .1); color: #b42443; }

/* ---------- Toolbar / filtr ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); }
.search input { padding-left: 34px !important; }

/* ---------- Formalar ---------- */
input[type=text], input[type=email], input[type=search], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=password],
input[type=file], select, textarea {
  width: 100%; background: #FFFFFF; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 11px; font: inherit; min-height: 36px;
}
select { cursor: pointer; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(43, 45, 49, .12); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .help { font-size: 12px; color: var(--muted); }
.field .error, .form-error { color: var(--danger); font-size: 12px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; }
.form-error { background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .35); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.lang-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 5px; cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--surface-3); color: var(--text); }
.auth-lang { display: flex; justify-content: center; margin-top: 16px; }
.site-link { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--muted); }
.site-link:hover { color: var(--brand-1); }
.site-link svg { width: 14px; height: 14px; }
.tag-link { gap: 5px; color: var(--brand-1); }
.tag-link:hover { text-decoration: none; background: var(--surface-2); }
.tag-link svg { width: 12px; height: 12px; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; }
.segmented-opt { position: relative; cursor: pointer; }
.segmented-opt input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-opt span { display: inline-flex; align-items: center; height: 34px; padding: 0 18px; border-radius: 7px; color: var(--text-2); font-weight: 500; }
.segmented-opt:hover span { color: var(--text); }
.segmented-opt.active span { background: var(--brand-grad); color: var(--on-brand); }
.segmented-opt input:focus-visible + span { outline: 2px solid var(--brand-1); outline-offset: 2px; }
[hidden] { display: none !important; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 8px 0 -2px; }

/* ---------- Detal ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.company-hero { display: flex; gap: 16px; align-items: center; }
.company-hero .logo-box {
  width: 56px; height: 56px; border-radius: 14px; background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: var(--on-brand);
}
.list-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .actions { display: flex; gap: 4px; opacity: .55; }
.list-row:hover .actions { opacity: 1; }
.file-ext {
  width: 38px; height: 38px; border-radius: 8px; background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
}
details.inline-form > summary { list-style: none; cursor: pointer; }
details.inline-form > summary::-webkit-details-marker { display: none; }
details.inline-form[open] > summary { display: none; }
.notes { white-space: pre-wrap; color: var(--text-2); }

/* ---------- Bildirişlər ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--info);
  box-shadow: var(--shadow); padding: 10px 14px; border-radius: var(--radius-sm); max-width: 380px;
  animation: toast-in .2s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Səhifələmə ---------- */
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 14px; border-top: 1px solid var(--border); color: var(--muted); }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px 32px; box-shadow: var(--shadow); }
.auth-card .logo { display: flex; justify-content: center; margin-bottom: 26px; }
.auth-card .logo img { height: 40px; }
.auth-card h1 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.auth-card .lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 20px; }
.code-input { text-align: center; font-size: 26px !important; letter-spacing: .5em; font-weight: 600; padding-left: .5em !important; }
.auth .toasts { position: static; margin-bottom: 14px; }
.auth .toast { max-width: none; box-shadow: none; }

/* ---------- CRM ---------- */
.text-danger { color: #b42443; }
.text-warning { color: var(--warning); }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; flex: none; }
.deal-no { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--brand-1); }
.deal-no-lg { font-size: 12px; margin-bottom: 2px; }
.stage-open { background: var(--surface-3); color: var(--ink); }
.stage-won { background: rgba(31, 157, 85, .12); color: #17773f; }
.stage-lost { background: rgba(210, 59, 87, .1); color: #b42443; }
a.row-link { color: inherit; align-items: center; }
a.row-link:hover { background: var(--surface-2); text-decoration: none; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { flex: 1 0 200px; min-width: 200px; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.kanban-col header { padding: 12px 12px 10px; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; box-shadow: inset 0 3px 0 var(--border-strong); }
.kanban-col.kind-won header { box-shadow: inset 0 3px 0 var(--success); }
.kanban-col.kind-lost header { box-shadow: inset 0 3px 0 var(--danger); }
.kanban-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.kanban-title .count { color: var(--muted); font-weight: 500; }
.kanban-sum { font-size: 12px; color: var(--muted); margin-top: 2px; min-height: 18px; }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 80px; flex: 1; }
.kanban-cards.drag-over { background: rgba(43, 45, 49, .04); outline: 2px dashed var(--cool-gray); outline-offset: -6px; }
.kanban-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 0; }
.deal-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text); cursor: pointer; }
.deal-card:hover { border-color: var(--border-strong); text-decoration: none; box-shadow: 0 4px 12px rgba(43, 45, 49, .1); }
.deal-card[draggable=true] { cursor: grab; }
.deal-card.dragging { opacity: .4; }
.deal-top { display: flex; justify-content: space-between; align-items: center; }
.deal-title { font-weight: 600; margin: 3px 0 1px; line-height: 1.35; }
.deal-company { font-size: 12px; color: var(--text-2); }
.deal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; font-weight: 600; min-height: 24px; }
.deal-people { display: flex; gap: 4px; align-items: center; }
.deal-card .sub { color: var(--muted); font-size: 12px; }
.act-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.act-dot.today { background: var(--warning); }
.act-dot.overdue { background: var(--danger); }
.act-dot.none { background: transparent; border: 1.5px solid var(--muted); }

.statusbar { display: flex; flex-wrap: wrap; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); width: fit-content; max-width: 100%; }
.statusbar form { display: contents; }
.statusbar .step { border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; padding: 8px 14px; white-space: nowrap; }
.statusbar .step:last-child { border-right: 0; }
.statusbar button.step { cursor: pointer; }
.statusbar button.step:hover { background: var(--surface-2); color: var(--text); }
.statusbar .step.current { background: var(--brand-grad); color: var(--on-brand); font-weight: 600; }
.statusbar .step.current.kind-won { background: var(--success); }
.statusbar .step.current.kind-lost { background: var(--danger); }

.composer { border-bottom: 1px solid var(--border); }
.composer form { display: flex; flex-direction: column; gap: 10px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); }
.timeline { padding: 6px 0; }
.tl-item { display: flex; gap: 12px; padding: 10px 18px; }
.tl-item .grow { flex: 1; min-width: 0; }
.tl-item p { margin: 2px 0 0; }
.tl-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tl-report .report { margin-top: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.report-title { font-weight: 600; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.report .section-title { margin: 8px 0 0; }
.table-form td { vertical-align: middle; }
.table-form tbody tr, .table-form tbody tr td { cursor: default; }
.table-form tbody tr:hover td { background: transparent; }

/* Pipeline bütün ekran enində */
.page.page-wide { max-width: none; padding-left: 20px; padding-right: 20px; }

/* ---------- Tünd boz yuxarı panel ---------- */
.topbar { border-bottom-color: transparent; color: var(--top-text); }
.topbar .module-title, .topbar .org-name { color: var(--top-text); }
.topbar nav a { color: var(--top-muted); }
.topbar nav a:hover { background: rgba(242, 242, 242, .08); color: var(--top-text); }
.topbar nav a.active { color: var(--top-text); background: rgba(242, 242, 242, .1); box-shadow: inset 0 -2px 0 var(--paper); }
.topbar .lang-switch { background: transparent; border-color: rgba(191, 195, 199, .35); }
.topbar .lang-switch button { color: var(--top-muted); }
.topbar .lang-switch button:hover { color: var(--top-text); }
.topbar .lang-switch button.active { background: rgba(242, 242, 242, .14); color: var(--top-text); }
.topbar .avatar { background: var(--paper); color: var(--ink); }
.topbar .dropdown { color: var(--text); }
/* Loqo ağ yazılıdır — açıq fonda tünd lövhə üzərində göstərilir */
.auth-card .logo { background: var(--ink); border-radius: 12px; padding: 14px; margin-left: auto; margin-right: auto; width: fit-content; }
.auth-card form.lang-switch { flex-direction: row; gap: 2px; }

/* ---------- Satış ---------- */
.qbadge { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.q-draft { background: var(--surface-3); color: var(--text-2); }
.q-sent { background: var(--ink); color: var(--paper); }
.q-accepted { background: var(--success); color: #fff; }
.q-rejected { background: rgba(210, 59, 87, .12); color: #b42443; }
.q-replaced, .q-cancelled { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.q-expired.q-sent, .q-expired.q-draft { box-shadow: inset 0 0 0 2px var(--danger); }
.table td.amount, td.amount { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.table .total-row td { background: var(--surface-2); font-weight: 700; border-top: 1px solid var(--ink); }
.text-ok { color: #17773f; }
.btn-success { background: var(--success); border-color: transparent; color: #fff; }
.btn-success:hover { filter: brightness(.95); background: var(--success); }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.notice-ok { border-color: rgba(31, 157, 85, .35); background: rgba(31, 157, 85, .07); color: #17773f; }
.lines-table td { vertical-align: top; }
.lines-table tr.has-error td { background: rgba(210, 59, 87, .04); }
.lines-table tr.is-deleted td { opacity: .4; }
/* İş kartında təklif sətirləri */
a.row-link-plain { color: inherit; display: block; min-width: 0; }
a.row-link-plain:hover { text-decoration: none; }
a.row-link-plain:hover strong { text-decoration: underline; }
.list-row > form { display: flex; }
/* İnvoys yoxlaması */
.check-dot { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: rgba(210, 59, 87, .12); color: #b42443; flex: none; }
.check-dot.ok { background: rgba(31, 157, 85, .14); color: #17773f; }
/* ---------- Rekvizitlər ---------- */
.kv-tight { grid-template-columns: 110px 1fr; gap: 8px 12px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.row-changed td { background: rgba(31, 157, 85, .05); }
.strike { text-decoration: line-through; }
button[disabled].btn { opacity: .6; cursor: progress; }
/* ---------- Sənədlər və maliyyə ---------- */
.c-draft, .i-draft { background: var(--surface-3); color: var(--text-2); }
.c-pending { background: rgba(183, 121, 31, .14); color: #8a5a12; }
.c-approved, .i-issued { background: var(--ink); color: var(--paper); }
.c-signed, .i-paid { background: var(--success); color: #fff; }
.c-cancelled, .i-cancelled { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.c-expired, .i-overdue { background: rgba(210, 59, 87, .12); color: #b42443; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.step-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 500; }
.step-item span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); font-size: 12px; font-weight: 700; }
.step-item.done { color: var(--text); }
.step-item.done span { background: var(--success); color: #fff; }
.step-item.current { color: var(--text); border-color: var(--ink); }
.step-item.current span { background: var(--ink); color: var(--paper); }

/* ---------- Böyük panel və 3D görünüş ---------- */
.topbar {
  height: 72px; padding: 0 28px; gap: 28px;
  background: linear-gradient(180deg, #34363b 0%, var(--ink) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 6px 18px rgba(43, 45, 49, .28);
}
.topbar .logo { display: flex; align-items: center; perspective: 400px; }
.topbar .logo img {
  height: 36px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .25)) drop-shadow(0 3px 2px rgba(0, 0, 0, .45)) drop-shadow(0 10px 14px rgba(0, 0, 0, .35));
  transition: transform .25s ease;
}
.topbar .logo:hover img { transform: rotateX(12deg) rotateY(-10deg) translateY(-1px); }
.topbar .module-title { font-size: 17px; }
.topbar nav a { font-size: 15px; padding: 8px 14px; }
.topbar .avatar { width: 38px; height: 38px; font-size: 13px; box-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .3); }
.topbar .org-name { font-size: 15px; }
.user-menu .dropdown { top: 50px; }
.kanban-col { max-height: calc(100vh - 230px); }
@media (max-width: 720px) { .topbar { height: 60px; padding: 0 12px; gap: 10px; } .topbar .logo img { height: 28px; } }

.apps-wrap { max-width: 1120px; margin: 64px auto; }
.apps-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px 26px; perspective: 900px; }
.app-tile { padding: 26px 14px 22px; gap: 14px; border-radius: 22px; transition: transform .25s ease, background .2s; }
.app-tile .icon {
  width: 118px; height: 118px; border-radius: 30px; border: 0;
  background: linear-gradient(145deg, #ffffff 0%, #eef0f2 55%, #dfe2e5 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .95),
    inset 0 -5px 0 rgba(43, 45, 49, .08),
    0 2px 0 #c9cdd1,
    0 4px 0 #b9bdc2,
    0 14px 22px rgba(43, 45, 49, .20),
    0 28px 40px rgba(43, 45, 49, .10);
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .25s ease;
}
.app-tile .icon svg {
  width: 54px; height: 54px; stroke: var(--ink); stroke-width: 1.7;
  filter: drop-shadow(0 1px 0 #fff) drop-shadow(0 4px 3px rgba(43, 45, 49, .28));
  transform: translateZ(20px);
}
.app-tile .name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.app-tile .hint { font-size: 13px; }
.app-tile:hover { background: transparent; border-color: transparent; transform: translateY(-6px); }
.app-tile:hover .icon {
  transform: rotateX(14deg) rotateY(-8deg);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .95),
    inset 0 -5px 0 rgba(43, 45, 49, .08),
    0 2px 0 #c9cdd1,
    0 5px 0 #b3b7bc,
    0 22px 30px rgba(43, 45, 49, .26),
    0 40px 54px rgba(43, 45, 49, .12);
}
.app-tile:active .icon { transform: translateY(3px); box-shadow: inset 0 2px 0 #fff, 0 1px 0 #b9bdc2, 0 6px 10px rgba(43, 45, 49, .2); }
.app-tile.disabled .icon { box-shadow: inset 0 2px 0 #fff, 0 2px 0 #d5d8db, 0 8px 14px rgba(43, 45, 49, .08); }
.app-tile.disabled:hover { transform: none; }
.app-tile.disabled:hover .icon { transform: none; }
.badge-soon { top: 14px; right: 22px; }
.apps-wrap { max-width: 1180px; }
.apps-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
@media (max-width: 1000px) { .apps-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); } }
@media (max-width: 720px) { .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } .app-tile .icon { width: 92px; height: 92px; border-radius: 24px; } .app-tile .icon svg { width: 42px; height: 42px; } }

/* ---------- Zəng (bildirişlər) ---------- */
.bell { position: relative; }
.bell > button { position: relative; background: none; border: 0; cursor: pointer; color: var(--top-text); width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.bell > button:hover { background: rgba(242, 242, 242, .1); }
.bell > button svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.bell-count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--ink); }
.bell .dropdown { display: none; position: absolute; right: 0; top: 52px; width: 360px; max-height: 460px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; color: var(--text); z-index: 30; }
.bell.open .dropdown { display: block; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.bell-head button.link { background: none; border: 0; color: var(--text-2); cursor: pointer; font: inherit; font-size: 12px; }
.bell-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--text); align-items: flex-start; }
.bell-item:hover { background: var(--surface-2); text-decoration: none; }
.bell-item .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-item.unread { background: rgba(43, 45, 49, .05); }
.bell-item.unread .bell-text { font-weight: 600; }
.bell-text { font-size: 13px; line-height: 1.4; }

/* ---------- @tag ---------- */
.mention { background: rgba(43, 45, 49, .09); color: var(--ink); font-weight: 600; padding: 0 4px; border-radius: 5px; }
.mention-pop { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 4px; min-width: 220px; max-height: 240px; overflow-y: auto; }
.mention-pop button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 7px 9px; border-radius: 6px; font: inherit; cursor: pointer; color: var(--text); }
.mention-pop button.active, .mention-pop button:hover { background: var(--surface-3); }

/* ---------- Çat ---------- */
.toasts { bottom: 96px; }
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.chat-fab { width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(180deg, #3a3d42, var(--ink)); color: var(--paper); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 #17181b, 0 12px 24px rgba(43, 45, 49, .35); position: relative; transition: transform .15s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { width: 26px; height: 26px; }
.chat-count { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--paper); }
.chat-panel { position: absolute; right: 0; bottom: 72px; width: 360px; height: 500px; max-height: calc(100vh - 140px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 48px rgba(43, 45, 49, .28); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--ink); color: var(--paper); }
.chat-head .spacer { flex: 1; }
.chat-head button.link { background: none; border: 0; color: var(--paper); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; }
.chat-list { flex: 1; overflow-y: auto; padding: 6px; }
.chat-person { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); text-align: left; }
.chat-person:hover { background: var(--surface-2); }
.chat-person .grow { flex: 1; }
.chat-person .n { min-width: 20px; height: 20px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.chat-thread { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.chat-msg { max-width: 82%; padding: 8px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.chat-msg.mine { align-self: flex-end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chat-msg .meta { display: block; font-size: 10.5px; opacity: .65; margin-bottom: 2px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { min-height: 36px; max-height: 110px; resize: none; }
.chat-empty { color: var(--muted); text-align: center; padding: 24px; font-size: 13px; }
@media (max-width: 720px) { .chat { right: 14px; bottom: 14px; } .chat-panel { width: calc(100vw - 28px); } }
/* ---------- Müvəqqəti parol ---------- */
.temp-pass { border: 2px solid var(--ink); background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.temp-pass-row { display: flex; gap: 10px; align-items: center; margin: 10px 0 8px; }
.temp-pass code { font-size: 22px; font-weight: 700; letter-spacing: .06em; background: var(--paper); padding: 6px 12px; border-radius: 8px; border: 1px dashed var(--cool-gray); user-select: all; }
button.link-btn { background: none; border: 0; padding: 0; color: var(--brand-1); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Fon #E3EDE7 və ikonlar #4C6588 ---------- */
:root { --bg: #E3EDE7; --icon: #4C6588; }
.app-tile .icon svg { stroke: var(--icon); filter: drop-shadow(0 1px 0 #fff) drop-shadow(0 4px 3px rgba(76, 101, 136, .35)); }
.app-tile.disabled .icon svg { stroke: #8fa0b8; }
/* Birbaşa mavi fonun üstündəki mətnlər oxunaqlı qalsın */
.app-tile .hint, .page-head .muted, .page-head p.muted, .breadcrumb, .breadcrumb a, .page-head > .muted { color: #2F4563; }
.app-tile .name { color: var(--ink); }
.app-tile.disabled .name, .app-tile.disabled .hint { color: #4C6588; }
.badge-soon { background: rgba(255, 255, 255, .6); color: var(--icon); }
.auth .lang-switch, .segmented { background: var(--paper); }
/* ---------- Layihələr ---------- */
.tag-warn { background: rgba(183, 121, 31, .14); color: #8a5a12; }
.health { font-size: 12px; font-weight: 600; white-space: nowrap; }
.h-green { color: #17773f; } .h-yellow { color: #b7791f; } .h-red { color: #b42443; } .h-done { color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.project-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: 0 2px 6px rgba(43, 45, 49, .05); }
.project-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: 0 8px 18px rgba(43, 45, 49, .1); }
.pc-top { display: flex; justify-content: space-between; align-items: center; }
.pc-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.pc-warn { font-size: 12px; color: #8a5a12; background: rgba(183, 121, 31, .1); border-radius: 6px; padding: 3px 8px; width: fit-content; }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.progress.big { height: 8px; margin: -6px 0 16px; background: rgba(43, 45, 49, .1); }
.avatar.lead { box-shadow: 0 0 0 2px var(--success); }
.phase { border-bottom: 1px solid var(--border); padding: 12px 18px; }
.phase:last-of-type { border-bottom: 0; }
.phase-head { display: flex; gap: 10px; align-items: flex-start; }
.phase-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--surface-3); box-shadow: inset 0 0 0 2px var(--border-strong); }
.ph-active .phase-dot { background: #4C6588; box-shadow: none; }
.ph-ready .phase-dot { background: var(--warning); box-shadow: none; }
.ph-delivered .phase-dot { background: var(--success); box-shadow: none; }
.phase.overdue .phase-dot { background: var(--danger); box-shadow: none; }
.ph-delivered .ph-tag { background: rgba(31, 157, 85, .12); color: #17773f; }
.ph-ready .ph-tag { background: rgba(183, 121, 31, .14); color: #8a5a12; }
.ph-active .ph-tag { background: rgba(76, 101, 136, .14); color: #34496a; }
.phase .actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.act-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 0 22px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.inline-edit { position: relative; }
.inline-edit > summary { list-style: none; cursor: pointer; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit-body { position: absolute; right: 0; top: 36px; z-index: 20; width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.task { display: flex; gap: 8px; align-items: center; padding: 6px 0 6px 22px; font-size: 13px; }
.task.done .grow { text-decoration: line-through; color: var(--muted); }
.task.overdue .grow { color: #b42443; }
.task form { display: flex; }
.task-check { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; padding: 0; color: #fff; }
.task.done .task-check { background: var(--success); border-color: var(--success); }
.list-mini { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; }
.check-item { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text); cursor: pointer; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 16px; }
.week-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.week-day.today { border-color: var(--ink); }
.week-day strong { font-size: 18px; }
/* ---------- Əməkdaşlar və Parametrlər ---------- */
.avatar-img { object-fit: cover; padding: 0; background: var(--surface-3); }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; flex: none; }
.avatar-xl { width: 64px; height: 64px; font-size: 20px; flex: none; border-radius: 18px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.person-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); align-items: flex-start; }
.person-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: 0 8px 18px rgba(43, 45, 49, .08); }
.person-card .grow { flex: 1; min-width: 0; }
.person-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.person-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 22px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.setting-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); }
.setting-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: 0 8px 18px rgba(43, 45, 49, .08); }
.setting-card > div { flex: 1; }
.sc-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--icon); font-weight: 800; font-size: 18px; flex: none; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #d5d8db; }
.sc-icon svg { width: 22px; height: 22px; stroke: var(--icon); }
/* ---------- To-do ---------- */
.tile-count { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #b42443; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.app-tile { position: relative; }
.todo-add { display: flex; gap: 8px; align-items: center; padding: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.todo-add input[name=title] { flex: 1; min-width: 220px; }
.todo-add input[type=date], .todo-add select { width: auto; }
.todo-imp { display: inline-flex; align-items: center; gap: 4px; color: #c08a00; font-size: 16px; cursor: pointer; }
.todo-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.todo-tabs a { padding: 7px 14px; border-radius: 999px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 13px; }
.todo-tabs a:hover { text-decoration: none; border-color: var(--border-strong); }
.todo-tabs a.active { background: var(--text); color: var(--surface); border-color: var(--text); }
.todo-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: 11px; text-align: center; }
.todo-tabs a.active .todo-n { background: rgba(255, 255, 255, .2); color: inherit; }
.todo-n.hot { background: #b42443; color: #fff; }
.todo-item { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.todo-item:last-child { border-bottom: 0; }
.todo-item form { display: flex; }
.todo-item .grow { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; }
.todo-title a { color: var(--text); }
.todo-item.done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-item.done .task-check { background: var(--success); border-color: var(--success); }
.todo-item.overdue .todo-title, .todo-item.overdue .todo-title a { color: #b42443; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text-2); margin-top: 3px; align-items: center; }
.todo-star { color: #c08a00; }
.todo-due { font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.todo-due.todo-today { color: var(--text); }
.todo-move { position: relative; }
.todo-move .dropdown { right: 0; min-width: 140px; }
.todo-move .dropdown button.link { display: block; width: 100%; text-align: left; padding: 7px 12px; }
.tag-sm { font-size: 11px; padding: 1px 7px; }
.todo-move .dropdown { display: none; position: absolute; top: 34px; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
.todo-move.open .dropdown { display: block; }
/* ---------- Kalendar ---------- */
.cal-head { flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; gap: 4px; }
.cal-filters { display: flex; gap: 14px; align-items: center; }
.cal-filters label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.cal-wd { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.weekend { background: rgba(0, 0, 0, .015); }
.cal-cell.other { background: var(--surface-2); }
.cal-cell.other .cal-daynum a:first-child { color: var(--muted); }
.cal-daynum { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.cal-daynum a:first-child { color: var(--text); width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-cell.today .cal-daynum a:first-child { background: var(--text); color: var(--surface); }
.cal-add { opacity: 0; color: var(--text-2); font-size: 16px; font-weight: 700; padding: 0 4px; border-radius: 6px; }
.cal-cell:hover .cal-add, .cal-col:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--surface-2); text-decoration: none; }
.cal-entry { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); border-left: 3px solid var(--cal, #4C6588); background: color-mix(in srgb, var(--cal, #4C6588) 12%, transparent); }
.cal-entry:hover { text-decoration: none; filter: brightness(.96); }
.cal-more { font-size: 11px; color: var(--text-2); padding-left: 6px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-col { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 300px; min-width: 0; }
.cal-col.today { border-color: var(--text); }
.cal-col-head { display: flex; gap: 6px; align-items: center; font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.cal-col-head .cal-add { margin-left: auto; }
.cal-wentry { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; padding: 6px 8px; border-radius: 7px; color: var(--text); border-left: 3px solid var(--cal, #4C6588); background: color-mix(in srgb, var(--cal, #4C6588) 12%, transparent); overflow-wrap: anywhere; }
.cal-wentry:hover { text-decoration: none; filter: brightness(.96); }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--cal, #4C6588); flex: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.cal-legend span { display: inline-flex; gap: 6px; align-items: center; }
.cal-tag { border-left: 3px solid var(--cal); }
.cal-meeting { --cal: #4C6588; } .cal-call { --cal: #2f855a; } .cal-demo { --cal: #7b4fa0; } .cal-internal { --cal: #5b6478; } .cal-other { --cal: #8a8f98; }
.cal-todo { --cal: #c08a00; } .cal-activity { --cal: #d0672a; } .cal-task { --cal: #2c7a9b; } .cal-phase { --cal: #b42443; } .cal-deal { --cal: #3a8f6d; } .cal-invoice { --cal: #9b6b2c; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 14px; padding: 4px 0; }
.check-grid .check { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.check-grid input { width: auto; }
.avatars { display: flex; gap: 2px; }
@media (max-width: 900px) {
  .cal-week { grid-template-columns: 1fr; }
  .cal-col { min-height: 0; }
  .cal-cell { min-height: 74px; }
  .cal-entry { font-size: 10px; padding: 1px 4px; }
}
/* ---------- Kalendar: saat şəbəkəsi (Odoo kimi) ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cal-toolbar .cal-nav .btn { min-width: 40px; justify-content: center; }
.cal-title { font-size: 20px; margin: 0 0 0 8px; display: flex; gap: 8px; align-items: center; }
.segmented-links { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.segmented-links a { padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.segmented-links a + a { border-left: 1px solid var(--border); }
.segmented-links a:hover { text-decoration: none; background: var(--surface-2); }
.segmented-links a.active { background: var(--text); color: var(--surface); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.cal-grid { --hour: 48px; overflow: hidden; }
.cg-head, .cg-allday, .cg-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.cg-head { border-bottom: 1px solid var(--border); }
.cg-dayhead { display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; color: var(--text); border-left: 1px solid var(--border); }
.cg-dayhead:hover { text-decoration: none; background: var(--surface-2); }
.cg-wd { font-size: 12px; font-weight: 700; color: var(--text-2); text-transform: uppercase; }
.cg-num { font-size: 20px; font-weight: 700; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; margin-top: 2px; }
.cg-dayhead.today .cg-num { background: #b42443; color: #fff; }
.cg-dayhead.today .cg-wd { color: #b42443; }
.cg-allday { border-bottom: 2px solid var(--border); min-height: 34px; }
.cg-gutter { display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 11px; text-align: right; }
.cg-allday-col { border-left: 1px solid var(--border); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cg-scroll { max-height: calc(100vh - 290px); min-height: 360px; overflow-y: auto; }
.cg-hours { flex-direction: column; align-items: stretch; padding: 0; }
.cg-hour { height: var(--hour); position: relative; }
.cg-hour span { position: absolute; top: -7px; right: 6px; font-size: 11px; color: var(--text-2); background: var(--surface); padding: 0 2px; }
.cg-col { position: relative; border-left: 1px solid var(--border); }
.cg-col.weekend { background: rgba(0, 0, 0, .015); }
.cg-col.today { background: color-mix(in srgb, #4C6588 4%, transparent); }
.cg-slot { display: block; height: var(--hour); border-top: 1px solid var(--border); }
.cg-col .cg-slot:first-child { border-top: 0; }
a.cg-slot:hover { background: color-mix(in srgb, #4C6588 8%, transparent); }
.cg-event { position: absolute; z-index: 2; border-radius: 6px; padding: 3px 6px; overflow: hidden; color: #fff; font-size: 12px; line-height: 1.25; background: var(--cal, #4C6588); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); display: flex; flex-direction: column; min-height: 20px; }
.cg-event:hover { text-decoration: none; filter: brightness(1.08); z-index: 3; }
.cg-event strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-event span { opacity: .9; font-size: 11px; }
.cg-now { position: absolute; left: 0; right: 0; height: 2px; background: #b42443; z-index: 4; pointer-events: none; }
.cg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #b42443; }
.cal-side { display: flex; flex-direction: column; gap: 12px; }
.mini-cal { padding: 12px; }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mini-head a { color: var(--text-2); font-size: 18px; padding: 0 8px; border-radius: 6px; }
.mini-head a:hover { background: var(--surface-2); text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-wd { font-size: 11px; font-weight: 700; color: var(--text-2); padding: 4px 0; }
.mini-grid a { font-size: 13px; color: var(--text); padding: 6px 0; border-radius: 50%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.mini-grid a:hover { background: var(--surface-2); text-decoration: none; }
.mini-grid a.other { color: var(--muted); }
.mini-grid a.selected { background: color-mix(in srgb, #4C6588 16%, transparent); }
.mini-grid a.today { background: #b42443; color: #fff; font-weight: 700; }
.side-filters, .side-upcoming { padding: 12px 14px; }
.side-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-2); margin-bottom: 6px; }
.side-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; cursor: pointer; }
.side-check input { width: auto; margin: 0; }
.side-all { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
.side-ev { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; color: var(--text); font-size: 13px; }
.side-ev .cal-dot { margin-top: 4px; }
.side-ev:hover { text-decoration: none; }
.avatar-xs { width: 22px; height: 22px; font-size: 9px; flex: none; }
@media (max-width: 1280px) { .cal-layout { grid-template-columns: minmax(0, 1fr) 240px; } }
@media (max-width: 960px) { .cal-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cg-head, .cg-allday, .cg-body { grid-template-columns: 40px repeat(var(--cols), minmax(0, 1fr)); } .cg-event span { display: none; } }
.cg-head, .cg-allday { overflow-y: hidden; scrollbar-gutter: stable; }
.cg-scroll { scrollbar-gutter: stable; }
.cg-body { padding-top: 8px; }
/* ---------- Təlimatlar ---------- */
.help-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: var(--top-text); border: 1.5px solid rgba(242, 242, 242, .45); margin-right: 4px; }
.help-btn:hover { text-decoration: none; background: rgba(242, 242, 242, .12); }
.g-h { font-size: 16px; margin: 22px 0 10px; }
.g-dim { opacity: .75; }
.g-note { background: #fff7e0; border: 1px solid #f0d48a; color: #6b5200; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.g-first { margin-bottom: 8px; }
.g-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.g-table td:not(:first-child), .g-table th:not(:first-child) { text-align: center; white-space: nowrap; }
.g-table td:first-child { font-weight: 500; }
.g-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 1180px; }
.g-nav { display: flex; flex-direction: column; padding: 8px; position: sticky; top: 84px; }
.g-nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.g-nav a svg { width: 18px; height: 18px; stroke: var(--icon); flex: none; }
.g-nav a:hover { background: var(--surface-2); text-decoration: none; }
.g-nav a.active { background: var(--text); color: var(--surface); }
.g-nav a.active svg { stroke: var(--surface); }
.g-nav-home { color: var(--text-2) !important; border-bottom: 1px solid var(--border); border-radius: 0 !important; margin-bottom: 6px; }
.g-toggle { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 10px; cursor: pointer; color: var(--text-2); }
.g-toggle input { width: auto; }
.g-body { padding: 6px 24px 18px; font-size: 14.5px; line-height: 1.6; }
.g-sec { padding: 16px 0; border-bottom: 1px solid var(--border); }
.g-sec:last-child { border-bottom: 0; }
.g-sec h2 { font-size: 17px; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-sec ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.g-sec p { margin: 0 0 8px; }
.g-sec.g-other { opacity: .55; }
.g-sec[hidden] { display: none; }
.g-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.g-chip.me { background: color-mix(in srgb, #4C6588 18%, transparent); color: #33465f; }
.g-tip { background: color-mix(in srgb, #4C6588 8%, transparent); border-left: 3px solid #4C6588; padding: 8px 12px; border-radius: 0 8px 8px 0; margin-top: 10px !important; font-size: 13.5px; }
.g-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.g-flow span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; }
.g-flow span + span::before { content: "→"; margin-right: 6px; color: var(--muted); }
.g-flow span.ok { background: rgba(31, 157, 85, .14); color: #17773f; }
.g-hidden-note { color: var(--text-2); font-size: 13px; padding: 12px 0 0; }
mark.g-hl { background: #ffe58a; border-radius: 3px; padding: 0 2px; }
.g-pager { display: flex; margin-top: 14px; }
@media (max-width: 860px) { .g-layout { grid-template-columns: 1fr; } .g-nav { position: static; display: none; } }
/* ---------- Marketinq ---------- */
.lead-new { background: rgba(180, 36, 67, .12); color: #b42443; }
.lead-contacted { background: color-mix(in srgb, #4C6588 16%, transparent); color: #33465f; }
.lead-converted { background: rgba(31, 157, 85, .14); color: #17773f; }
.lead-rejected { background: var(--surface-2); color: var(--muted); }
tr.row-alert td:first-child { box-shadow: inset 3px 0 0 #b42443; }
.rate-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.rate-bar i { display: block; height: 100%; background: #3a8f6d; }
.notice-warn { border-color: rgba(192, 138, 0, .4); background: #fff7e0; color: #6b5200; }
.table .num { text-align: right; white-space: nowrap; }

.mini-grid a { position: relative; }
.mini-grid a.has::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #4C6588; }
.mini-grid a.today.has::after { background: #fff; }
.side-ev .side-when { display: block; font-size: 12px; color: var(--text-2); }
.side-ev.overdue .side-when { color: #b42443; }
/* ---------- Profil şəkli ---------- */
.who-row { display: flex; gap: 12px; align-items: center; }
.who-photo { position: relative; flex: none; }
.who-photo:hover { text-decoration: none; }
.who-cam { position: absolute; right: -4px; bottom: -4px; font-size: 12px; background: var(--surface); border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.hero-photo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-card { max-width: 640px; }
.photo-body { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.photo-preview { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 700; color: var(--icon); box-shadow: inset 0 0 0 1px var(--border); flex: none; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; flex: 1; min-width: 220px; }
.photo-pick { cursor: pointer; }
.photo-buttons { display: flex; gap: 8px; }
/* Təşkilatın loqosu — yuxarı paneldə adın qabağında */
.topbar .org-name { display: inline-flex; align-items: center; gap: 8px; }
.org-logo { width: 26px; height: 26px; border-radius: 7px; flex: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
