/* ==========================================================================
   FORTO OS — единый стиль интерфейса. Usability First (Документ 5, п.8).
   Один файл, без внешних зависимостей. Адаптивен под разные экраны.
   ========================================================================== */

:root {
  --brand: #2f5bd4;
  --brand-dark: #234aad;
  --brand-soft: #e8eefc;
  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #ffffff;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --text: #1f2733;
  --muted: #667085;
  --muted-2: #98a2b3;

  --green: #12805c;
  --green-soft: #d6f2e6;
  --amber: #b25e09;
  --amber-soft: #fdf0d5;
  --red: #c0392b;
  --red-soft: #fbe3e0;
  --blue: #2f5bd4;
  --blue-soft: #e8eefc;
  --gray-soft: #eceff3;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 8px 24px rgba(16, 24, 40, .12);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.ico { width: 18px; height: 18px; flex: none; }
p, dd, .card, .file-item, .comment .text { overflow-wrap: break-word; }

/* ----------------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: var(--sidebar-text);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .2s ease;
}
.sidebar__brand {
  display: block;
  padding: 14px 16px 12px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  display: block;
  width: 100%;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}
.sidebar__brand small { display:block; color: var(--muted-2); font-size: 11px; font-weight: 400; margin-top: 7px; }

.nav { padding: 10px; overflow-y: auto; flex: 1; }
.nav__section { color: var(--muted-2); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-weight: 500;
  margin-bottom: 2px;
}
.nav a:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; }
.nav a .ico { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav a .badge-count {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600;
}

.sidebar__foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.userbox { display: flex; align-items: center; gap: 10px; color: #fff; }
.userbox .avatar { background: var(--brand); }
.userbox small { color: var(--muted-2); font-size: 12px; display: block; }

/* content */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  position: sticky; top: 0; z-index: 40;
}
.topbar__title { font-size: 16px; font-weight: 650; }
.topbar__spacer { flex: 1; }
.topbar .search {
  display: flex; align-items: center; gap: 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px; width: 320px; max-width: 40vw;
}
.topbar .search input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--text); }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--surface); }

.content { padding: 24px; max-width: 1360px; width: 100%; }
.menu-toggle { display: none; }

/* ----------------------------------------------------------------- headings */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; font-weight: 680; }
.page-head p { margin: 0; color: var(--muted); }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

/* ----------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.card__head h3 { margin: 0; font-size: 15px; font-weight: 640; }
.card__body { padding: 18px; }
.card__body.tight { padding: 0; overflow-x: auto; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.sidebar-layout { grid-template-columns: 1fr 320px; align-items: start; }

/* stat tiles */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 720; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .ico { float: right; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 15px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer;
  font-size: 14px; line-height: 1; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active { background: #a93428; border-color: #a93428; color: #fff; filter: none; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ----------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--gray-soft); color: var(--muted); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.gray { background: var(--gray-soft); color: var(--muted); }
.badge.priority { background: #f9e7e4; color: #9d3329; }
.badge .dotc { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill { padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }

/* avatar */
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }
.avatar-group { display: flex; }
.avatar-group .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ----------------------------------------------------------------- tables */
.table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}
.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  font-weight: 600;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }
.table a.row-title { font-weight: 600; color: var(--text); }
.table a.row-title:hover { color: var(--brand); }
.table .muted { color: var(--muted); font-size: 13px; }
.table .cell-text,
.table .col-text { white-space: normal; overflow-wrap: break-word; }
.table .cell-atom,
.table .cell-date,
.table .cell-num,
.table .cell-status,
.table .cell-actions { white-space: nowrap; }
.table .cell-num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-actions { text-align: right; }
.table .col-avatar { width: 48px; }
.table .col-sm { width: 1%; white-space: nowrap; }
.table .col-md { width: 14rem; }
.table .col-lg { width: 22rem; }
.table .col-fill { width: auto; }
.table-users { min-width: 680px; }
.table-tasks { min-width: 980px; }
.table-projects,
.table-documents,
.table-control,
.table-counterparties { min-width: 900px; }
.table-meetings { min-width: 760px; }
.table-user {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.table-user__meta { min-width: 0; }
.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}
.sort-link:hover { color: var(--text); text-decoration: none; }
.sort-link.active { color: var(--brand); }
.sort-mark {
  display: inline-block;
  min-width: 10px;
  color: currentColor;
  font-size: 12px;
}

/* ----------------------------------------------------------------- forms */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.form-row .hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.checkbox input { width: auto; }
.choice-list {
  display: grid;
  gap: 18px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.choice-list.compact { max-height: 180px; }
.choice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid transparent;
  font-weight: 500;
}
.choice-item:hover { border-color: var(--border); }
.choice-item input { width: auto; margin: 0; }
.choice-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.selected-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid #c3d4f7;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.selected-chip:hover {
  border-color: var(--brand);
  text-decoration: none;
}
.select-filter {
  margin-bottom: 6px;
  background: var(--surface-2) !important;
}
.readonly-note {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
fieldset legend { font-weight: 640; padding: 0 6px; font-size: 13.5px; }

/* ----------------------------------------------------------------- flash */
.flash-stack {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
}
.flash { padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; display: flex; gap: 9px; align-items: center; border: 1px solid; font-weight: 500; box-shadow: var(--shadow-lg); }
.flash-stack .flash { margin-bottom: 0; background: var(--surface); }
.flash .ico { width: 16px; height: 16px; }
.flash.is-hiding { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
.flash.success { background: var(--green-soft); border-color: #a7e0c9; color: var(--green); }
.flash.error { background: var(--red-soft); border-color: #f0b9b2; color: var(--red); }
.flash.info { background: var(--blue-soft); border-color: #c3d4f7; color: var(--blue); }
.flash.warning { background: var(--amber-soft); border-color: #f2d59a; color: var(--amber); }

/* ----------------------------------------------------------------- misc */
.muted { color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--muted-2); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-weight: 620; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 13px; } .text-lg { font-size: 16px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.user-link { font-weight: 600; color: var(--text); }
.user-link:hover { color: var(--brand); }
.mention-link {
  color: var(--brand);
  font-weight: 650;
  white-space: nowrap;
}
.mention-link:hover { color: var(--brand-dark); }
.route-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.route-line span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.route-line span:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  color: var(--muted);
}

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.mini-tabs {
  display: inline-flex;
  gap: 4px;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.mini-tab {
  border: 0;
  border-radius: 6px;
  padding: 6px 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}
.mini-tab.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
}
.view-tabs { margin: 0; border: none; }
.view-tabs a {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  padding: 7px 10px;
}
.view-tabs a.active { background: var(--brand-soft); border-color: #c3d4f7; }

/* filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-width: 160px; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban__col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); width: 300px; flex: none; }
.kanban__col h4 { margin: 0; padding: 12px 14px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.kanban__col h4 .count { margin-left: auto; color: var(--muted); font-weight: 600; }
.kanban__list { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 12px; box-shadow: var(--shadow); cursor: grab; user-select: none; }
.kcard:hover { border-color: var(--brand); }
.kcard .t { font-weight: 600; margin-bottom: 8px; display: block; color: var(--text); }
.kcard .meta { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.kcard.dragging { opacity: .5; }

/* comments / timeline */
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment .body { flex: 1; }
.comment .head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.comment .head b { font-size: 13.5px; }
.comment .head time { color: var(--muted-2); font-size: 12px; }
.comment .text { white-space: pre-wrap; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-item .fico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
}
.mention-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 70;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.mention-menu button {
  display: grid;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.mention-menu button:hover { background: var(--surface-2); }
.mention-menu span { color: var(--muted); font-size: 12px; }

/* file list */
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; background: var(--surface); }
.file-item .fico { width: 36px; height: 36px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.file-item .fname { font-weight: 600; }
.file-item .fmeta { color: var(--muted); font-size: 12.5px; }
.file-item .spacer { flex: 1; }

/* photo grid */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-grid button {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  background: var(--surface-2);
  cursor: zoom-in;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .82);
}
.photo-viewer[hidden] { display: none; }
.photo-viewer__frame {
  width: min(1040px, 100%);
  max-height: min(760px, 92vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}
.photo-viewer__top,
.photo-viewer__bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}
.photo-viewer__top { justify-content: flex-end; }
.photo-viewer__bottom { justify-content: space-between; }
.photo-viewer__stage {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
}
.photo-viewer__stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  background: #111827;
}
.photo-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--text);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.photo-viewer__nav.prev { left: 8px; }
.photo-viewer__nav.next { right: 8px; }
.photo-viewer .btn {
  background: rgba(255, 255, 255, .95);
  border-color: transparent;
}
body.modal-open { overflow: hidden; }

/* description list */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
.dl dt { color: var(--muted); font-size: 13.5px; }
.dl dd { margin: 0; font-weight: 500; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0f172a, #1e293b); padding: 20px; }
.auth-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px; padding: 32px; }
.auth-logo {
  display: block;
  width: 100%;
  max-height: 86px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 10px;
}
.auth-card h1 { font-size: 21px; margin: 0 0 4px; }
.auth-card p.sub { color: var(--muted); margin: 0 0 22px; }

/* dropdown */
.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 260px; padding: 8px; display: none; z-index: 60; }
.dropdown.open .dropdown__menu { display: block; }
.dropdown__menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--text); }
.dropdown__menu a:hover { background: var(--surface-2); text-decoration: none; }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--brand-soft); }
.notif-item .t { font-weight: 600; font-size: 13.5px; }
.notif-item .b { color: var(--muted); font-size: 12.5px; }

.progress { height: 7px; background: var(--gray-soft); border-radius: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); }

/* news feed */
.news-feed {
  display: grid;
  gap: 16px;
  max-width: 860px;
}
.news-post h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}
.news-post img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 8px 0 12px;
}
.news-post__body {
  white-space: normal;
  color: var(--text);
}

/* responsive */
@media (max-width: 980px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid.sidebar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .topbar .search { display: none; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .flash-stack { top: 70px; left: 16px; right: 16px; width: auto; }
  .filters form.flex { width: 100%; align-items: stretch; }
  .filters form.flex input,
  .filters form.flex select { width: 100%; }
  .view-tabs { width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 8px; }
}
