:root{
  --kf-green:#004643;
  --kf-coral:#DF6162;
  --accent:#004643;
  --urgent:#ff5f60;
  --ai:#9B5AF6;      /* [AI] в названии поста — рамка/свечение карточки, .card.ai/.status.ai. Активный. */
  --spark:#F6E95A;   /* про запас — второй "особый" цвет, пока нигде не подключён. */
  --ink:#17201F;
  --muted:#707A78;
  --bg:#F4F6F5;
  --line:#E6EAE9;
  --card:#FFFFFF;
  --radius:24px;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;overscroll-behavior-x:none}
body{min-height:100vh}
button,textarea{font:inherit}
button{cursor:pointer}
.page{max-width:660px;margin:0 auto;padding:18px 14px 70px}
.head{background:#fff;border:1px solid var(--line);border-radius:25px;padding:18px;margin-bottom:24px;position:relative;box-shadow:none}
.head-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.head-right{display:flex;align-items:center;gap:10px;min-width:0}
.cal-toggle{flex:0 0 auto;border:1px solid var(--line);background:#fff;border-radius:12px;width:40px;height:40px;font-size:17px;display:grid;place-items:center}
.kf img{width:70px;height:auto;display:block}
.client-brand{display:flex;align-items:center;gap:9px;min-width:0}
.client-brand img{width:42px;height:42px;object-fit:contain;border-radius:10px;background:#fff}
.client-brand strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
.client-logo-demo{width:42px;height:42px;border-radius:10px;background:#eee;display:grid;place-items:center;font-weight:900;color:var(--accent)}
.week-row{display:flex;gap:8px;overflow:auto;margin-top:15px;padding-bottom:2px;scrollbar-width:none}
.week-row::-webkit-scrollbar{display:none}
.week{border:1px solid var(--line);background:#f8f9f9;border-radius:999px;padding:8px 12px;white-space:nowrap;font-weight:750;font-size:12px;color:#697371}
.week.active{background:var(--ink);color:#fff;border-color:var(--ink)}
.week.has-waiting{border-color:var(--urgent);box-shadow:0 0 0 1px var(--urgent) inset}
.week.active.has-waiting{border-color:var(--urgent);box-shadow:0 0 0 1px var(--urgent) inset}
.week-marker{display:inline-block;vertical-align:middle}
.week-marker.dot{width:6px;height:6px;border-radius:50%;background:var(--urgent);margin-right:5px}
.week.active .week-marker.dot{background:#fff}
.week-marker.fire{margin-right:3px;font-size:11px}
.progress-line{display:flex;align-items:center;gap:12px;margin-top:15px}
.progress-track{height:8px;background:#edf0ef;border-radius:999px;overflow:hidden;flex:1}
.progress-fill{height:100%;background:var(--accent);width:0;transition:.25s}
.progress-text{font-size:12px;color:var(--muted);white-space:nowrap;font-weight:750}
.filters{display:flex;gap:7px;overflow:auto;padding:3px 1px 11px;scrollbar-width:none}
.filters::-webkit-scrollbar{display:none}
.filter{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 11px;font-size:12px;font-weight:750;color:#687270;white-space:nowrap}
.filter.active{background:var(--accent);border-color:var(--accent);color:#fff}
.attention{background:#fff;border:1px solid var(--line);border-radius:18px;padding:13px 16px;margin:0 0 12px;display:grid;gap:6px}
.attention.urgent{background:#FFF3F2;border-color:var(--urgent)}
.attention.urgent .attention-row1 .attention-link{color:#E0484A}
.attention.waiting{background:#E8F4EA;border-color:#BFDFC5}
.attention.waiting .attention-row1 .attention-link{color:#2E7D4F}
.attention.clear{background:#F6F7F7;border-color:var(--line)}
.attention-link{display:block;text-align:left;width:100%;border:0;background:transparent;padding:0;font:inherit;line-height:1.45;cursor:pointer}
.attention-row1 .attention-link{font-size:14px;font-weight:800}
.attention-row2{font-size:12px;color:var(--muted);font-weight:650}
.stack{display:grid;gap:16px;position:relative}
/* "Всё согласовано" banner with the КРАСАВА mascot — shown at the top of
   the stack whenever no task anywhere on the board is still awaiting
   approval (see render() in app.js). */
.all-done{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px;box-shadow:0 8px 24px rgba(16,45,42,.04)}
.all-done-mascot{width:76px;height:76px;border-radius:50%;object-fit:cover;flex:0 0 auto;box-shadow:0 0 0 3px #fff,0 4px 14px rgba(155,90,246,.4)}
.all-done-title{font-weight:850;font-size:16px}
.all-done-sub{font-size:12.5px;color:var(--muted);line-height:1.45;margin-top:3px}
@media(max-width:430px){
  .all-done{padding:12px;gap:12px}
  .all-done-mascot{width:60px;height:60px}
}
/* Team landing page (frontend/team.html) — placeholder: the mascot + a
   "coming soon" note, no data yet. */
.team-coming{display:grid;justify-items:center;gap:10px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:42px 22px;box-shadow:0 8px 24px rgba(16,45,42,.04)}
.team-coming-mascot{width:132px;height:132px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 4px #fff,0 6px 20px rgba(155,90,246,.4)}
.team-coming-title{font-weight:850;font-size:18px;margin-top:6px}
.team-coming-sub{font-size:13px;color:var(--muted);line-height:1.5}
/* Client cabinet "bad link" state — no project id in the URL (app.js): the
   404 mascot + a "contact your manager" note instead of a raw error. */
.not-found{display:grid;justify-items:center;gap:8px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:36px 22px;box-shadow:0 8px 24px rgba(16,45,42,.04)}
.not-found-img{width:230px;max-width:72%;height:auto;border-radius:18px;object-fit:contain}
.not-found-title{font-weight:850;font-size:17px;margin-top:8px}
.not-found-sub{font-size:13px;color:var(--muted);line-height:1.5;max-width:340px}
.card{position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 24px rgba(16,45,42,.035)}
.card.pending-action{opacity:.6;pointer-events:none}
.card.urgent{border-color:var(--urgent);box-shadow:0 0 0 2px var(--urgent),0 10px 26px rgba(255,95,96,.28);background:#FFF5F4}
.card.urgent .meta{background:linear-gradient(180deg,rgba(255,95,96,.12),rgba(255,95,96,0))}
.card.ai{border-color:var(--ai);box-shadow:0 0 0 2px var(--ai),0 10px 24px rgba(155,90,246,.22);background:linear-gradient(180deg,#FBF9FF,#fff 120px);animation:ai-pulse 2.8s ease-in-out infinite}
.card.ai .meta{background:linear-gradient(180deg,rgba(155,90,246,.10),rgba(155,90,246,0));padding-right:64px}
@keyframes ai-pulse{
  0%,100%{box-shadow:0 0 0 2px var(--ai),0 10px 24px rgba(155,90,246,.22)}
  50%{box-shadow:0 0 0 2px var(--ai),0 14px 34px rgba(155,90,246,.42)}
}
@media (prefers-reduced-motion: reduce){
  .card.ai{animation:none}
}
/* Tinder-style swipe (list view only): each non-terminal card sits in a
   .swipe-wrap with two zones behind it that light up as the card is
   dragged — green "✓ СОГЛАСОВАТЬ" on the right, red "✎ ЕСТЬ ПРАВКИ" on the
   left. Only the card moves; zones stay put underneath (see app.js). */
.swipe-wrap{position:relative}
.swipe-zone{
  position:absolute;
  inset:0;
  z-index:0;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  font-weight:850;
  font-size:15px;
  letter-spacing:.02em;
  color:#fff;
  opacity:0;
  pointer-events:none;
}
.swipe-zone.right{background:linear-gradient(90deg,#2E9E4F,#58B972);justify-content:flex-start;padding-left:24px}
.swipe-zone.left{background:linear-gradient(90deg,#D04848,#E27A6A);justify-content:flex-end;padding-right:24px}
.swipe-zone span{display:flex;align-items:center;gap:8px;text-shadow:0 1px 2px rgba(0,0,0,.18)}
.swipe-zone{transition:opacity .18s ease-out}
.swipe-wrap.swiping .swipe-zone{transition:none}
.card.swipeable{position:relative;z-index:1;touch-action:pan-y;cursor:grab}
.card.swipeable.swiping{cursor:grabbing;user-select:none;-webkit-user-select:none;transition:none;animation:none;will-change:transform}
.swipe-wrap:not(.swiping) .card.swipeable{transition:transform .25s ease-out}
.swipe-wrap.swipe-right .card{border-color:#2E9E4F;box-shadow:0 0 0 2px #2E9E4F}
.swipe-wrap.swipe-left .card{border-color:#D04848;box-shadow:0 0 0 2px #D04848}
.card.flying{transition:transform .22s ease-in;z-index:2}
@media (prefers-reduced-motion: reduce){
  .card.flying{transition-duration:.01ms}
}
/* Avatar bubble (top-right of an [AI] card) — glossy sphere: dark base +
   specular highlight, white ring to separate it from the media below. Sits
   inside the card's own rounded/clipped box, so it never fights .card's
   overflow:hidden. It's a real <button> (see app.js) — tap/click shows a
   toast explaining the tag, native title="" covers hover on desktop. */
.ai-avatar{
  position:absolute;
  top:10px;
  right:12px;
  width:46px;
  height:46px;
  border:0;
  border-radius:50%;
  z-index:5;
  background:radial-gradient(circle at 32% 26%,#2a2f45,#0d0f1c 72%);
  box-shadow:
    0 0 0 3px #fff,
    0 3px 10px rgba(155,90,246,.5),
    0 1px 2px rgba(17,20,30,.25),
    inset 0 -6px 9px rgba(0,0,0,.35),
    inset 0 5px 8px rgba(255,255,255,.10);
}
.ai-avatar img{
  position:absolute;
  inset:3px;
  width:calc(100% - 6px);
  height:calc(100% - 6px);
  border-radius:50%;
  object-fit:cover;
  display:block;
  pointer-events:none;
}
.ai-avatar::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:50%;
  background:radial-gradient(circle at 30% 22%,rgba(255,255,255,.65),rgba(255,255,255,0) 42%);
  pointer-events:none;
}
/* Small, non-intrusive AI disclaimer at the bottom of every [AI] card. */
.ai-disclaimer{margin:10px 17px 0;padding:9px 11px;background:#F4EEFE;border-radius:12px;font-size:10.5px;line-height:1.4;color:#5B3FA0}
.meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:17px 17px 10px}
.meta-left{min-width:0}
.eyebrow{font-size:11px;color:var(--muted);font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.meta h2{margin:5px 0 0;font-size:20px;letter-spacing:-.035em;line-height:1.18;display:flex;align-items:flex-start;gap:7px}
.h2-text{min-width:0}
.social-badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:10px;font-weight:900;letter-spacing:.02em;border-radius:7px;padding:4px 6px;line-height:1;margin-top:3px}
.badges{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.status{font-size:11px;font-weight:800;padding:7px 9px;border-radius:999px;white-space:nowrap}
.status.waiting{background:#FFF3C9;color:#755600}
.status.approved{background:#E1F3E5;color:#216A39}
.status.changes{background:#FBE0E0;color:#A12E2E}
.status.published{background:#DCEAF7;color:#1E4E7A}
.status.urgent{background:var(--urgent);color:#fff}
.status.ai{background:var(--ai);color:#fff}
.status.date{background:#EDEFEF;color:#4B5654}
.media{margin:4px 12px 0;border-radius:19px;overflow:hidden;background:#EEF1F0;position:relative;aspect-ratio:4/5}
.carousel{display:flex;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.carousel::-webkit-scrollbar{display:none}
.slide{flex:0 0 100%;width:100%;height:100%;scroll-snap-align:start;scroll-snap-stop:always;display:flex;align-items:center;justify-content:center;background:#EEF1F0;overflow:hidden}
.slide img{width:100%;height:100%;object-fit:contain;display:block;background:#EEF1F0}
.video-frame{background:#101313;width:100%;height:100%}
.video-frame video{width:100%;height:100%;display:block;object-fit:contain;background:#101313;touch-action:manipulation}
.file-link{min-height:100%;width:100%;padding:26px;display:grid;place-items:center;text-align:center}
.file-link a{color:var(--accent);font-weight:800;text-decoration:none}
.dots{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);background:rgba(15,25,24,.62);color:#fff;border-radius:999px;padding:5px 9px;font-size:11px;pointer-events:none}
.media-reorder-btn{position:absolute;top:10px;right:10px;z-index:2;width:34px;height:34px;border:0;border-radius:999px;background:rgba(15,25,24,.62);color:#fff;display:grid;place-items:center;cursor:pointer}
.media-reorder-btn svg{width:17px;height:17px;display:block}
.media-reorder-btn:active{background:rgba(15,25,24,.8)}
.mo-list{display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow-y:auto;margin:4px 0 2px}
.mo-row{display:flex;align-items:center;gap:11px;padding:7px;border:1px solid var(--line);border-radius:14px}
.mo-thumb{width:46px;height:46px;border-radius:10px;object-fit:cover;flex:0 0 auto;background:#EEF1F0}
.mo-thumb-icon{display:grid;place-items:center;font-size:19px}
.mo-label{flex:1;min-width:0;font-size:13px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mo-arrows{display:flex;gap:6px;flex:0 0 auto}
.mo-btn{width:32px;height:32px;border:0;border-radius:10px;background:#F2F4F4;color:#33413F;font-size:15px;font-weight:800;cursor:pointer}
.mo-btn:disabled{opacity:.35;cursor:default}
.caption-wrap{padding:15px 17px 4px}
.caption-wrap.editing{padding-bottom:12px}
.caption-wrap.empty{padding-bottom:12px}
.caption{font-size:14px;line-height:1.52;max-height:126px;overflow:hidden;position:relative}
.caption.open{max-height:none}
.caption-head{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin:0 0 6px}
.caption-tip{flex:1;min-width:0;color:var(--muted);font-size:12px;font-weight:650}
.caption-head-actions{display:flex;gap:8px;flex:0 0 auto}
.caption-edit{width:34px;height:34px;border:0;border-radius:999px;background:#FFF1F1;color:var(--urgent);display:grid;place-items:center;cursor:pointer;box-shadow:0 0 0 1px rgba(255,95,96,.22) inset}
.caption-edit svg{width:16px;height:16px;display:block}
.caption-edit:disabled{opacity:.45;cursor:default}
.caption-btn{border:0;border-radius:12px;padding:9px 12px;font-size:13px;font-weight:850;cursor:pointer}
.caption-btn.cancel{background:#F2F4F4;color:#33413F}
.caption-btn.save{background:var(--urgent);color:#fff}
.caption-editor{width:100%;min-height:140px;border:1px solid #D8DFDE;border-radius:16px;padding:12px 13px;resize:vertical;outline:none;line-height:1.52;font-size:14px}
.caption-editor:focus{border-color:var(--urgent);box-shadow:0 0 0 3px rgba(255,95,96,.10)}
.caption b,.caption strong{font-weight:800}
.caption u{text-decoration:underline}
.caption s{text-decoration:line-through}
.caption a{color:var(--accent);font-weight:700;word-break:break-all}
.caption code{background:#F1F4F3;border-radius:5px;padding:1px 5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}
.caption pre{background:#F1F4F3;border-radius:10px;padding:10px 12px;margin:8px 0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;white-space:pre-wrap;overflow-x:auto}
.more{border:0;background:transparent;color:var(--accent);font-weight:800;padding:8px 0 0;font-size:12px}
.post-link{margin:12px 17px 0}
.post-link a{display:inline-block;color:var(--accent);font-weight:800;font-size:13px;text-decoration:none;border-bottom:1px solid currentColor}
/* Диалог клиента с агентством (task.clientComments, kind:'feedback'/
   'agency') — клиентские ПРАВКИ и сообщения команды из кабинета команды,
   вкладка «Чат с клиентом». Свёрнут по умолчанию до последнего сообщения;
   .expanded показывает всю переписку (toggle-dialog в app.js). */
.client-dialog{margin:10px 17px 0;display:flex;flex-direction:column;gap:6px}
.client-chat-msg{max-width:85%;padding:10px 12px;border-radius:15px;font-size:13px;line-height:1.4;word-break:break-word}
.client-chat-msg.hidden-msg{display:none}
.client-chat-msg.theirs{align-self:flex-start;background:#EAF3F1;color:#17322E;border-bottom-left-radius:4px}
.client-chat-msg.mine{align-self:flex-end;background:var(--accent);color:#fff;border-bottom-right-radius:4px}
.client-chat-label{display:block;font-size:10px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:var(--accent);margin-bottom:3px}
.client-dialog-toggle{align-self:flex-start;display:inline-flex;align-items:center;gap:5px;margin-top:2px;background:transparent;border:0;padding:2px 0;font-size:12px;font-weight:800;color:var(--accent)}
.client-dialog-toggle svg{transition:transform .2s ease}
.client-dialog.expanded .client-dialog-toggle svg{transform:rotate(180deg)}
.client-chat-img{display:block;max-width:170px;max-height:170px;border-radius:11px;margin-top:6px;cursor:zoom-in;object-fit:cover}

/* Полноэкранный просмотр фото из переписки (openLightbox в app.js/team.js)
   — до 80% ширины/высоты экрана; закрывается крестиком, кликом по фону или
   аппаратной кнопкой "назад" (см. history.pushState в openLightbox). */
.lightbox{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center}
.lightbox[hidden]{display:none}
.lightbox-backdrop{position:absolute;inset:0;background:rgba(8,14,13,.88)}
.lightbox img{position:relative;max-width:80vw;max-height:80vh;border-radius:12px;object-fit:contain;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.lightbox-close{position:absolute;top:18px;right:18px;width:38px;height:38px;border:0;border-radius:999px;background:rgba(255,255,255,.16);color:#fff;font-size:17px;display:grid;place-items:center;cursor:pointer;z-index:1}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:15px 17px 17px}
.btn{border:0;border-radius:14px;padding:14px 12px;font-weight:850;font-size:14px}
.approve{background:var(--accent);color:#fff}
.changes{background:#F2F4F4;color:#33413F}
.btn:disabled{opacity:.55;cursor:default}
.approved-box{grid-column:1/-1;background:#E5F4E8;color:#216A39;text-align:center;border-radius:14px;padding:14px;font-weight:850}
.approved-box.published-box{background:#DCEAF7;color:#1E4E7A}
.empty{background:#fff;border:1px dashed #C7CECD;border-radius:22px;padding:50px 22px;text-align:center;color:var(--muted)}
.loading{min-height:84px;place-items:center;color:var(--muted);font-weight:750;background:#fff;border:1px solid var(--line);border-radius:22px;margin-bottom:12px}
.loading:not([hidden]){display:grid}
.modal-wrap{position:fixed;inset:0;background:rgba(12,28,26,.4);display:none;align-items:flex-end;justify-content:center;z-index:40}
.modal-wrap.show{display:flex}
.sheet{background:#fff;border-radius:26px 26px 0 0;width:min(660px,100%);padding:20px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -16px 50px rgba(0,0,0,.13)}
.sheet h3{margin:0 0 5px;font-size:20px}
.sheet p{margin:0 0 13px;color:var(--muted);font-size:13px}
.sheet textarea{width:100%;min-height:130px;border:1px solid var(--line);border-radius:15px;padding:13px;resize:vertical;outline:none}
.sheet textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(0,70,67,.08)}
.sheet-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:10px}

/* Прикрепить фото к правкам (feedbackModal) — кнопка + превью выбранного
   фото с крестиком убрать. См. pick-feedback-image/uploadFeedbackImage в
   app.js. */
.fb-attach-row{margin-top:10px}
.fb-attach-btn{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 13px;font-size:12.5px;font-weight:750;color:var(--ink)}
.fb-attach-btn:active{background:#F2F4F4}
.fb-image-preview{margin-top:10px}
.fb-pending-img{position:relative;display:inline-flex;width:64px;height:64px;border-radius:12px;overflow:hidden;background:#F2F4F4;border:1px solid var(--line)}
.fb-pending-img img{width:100%;height:100%;object-fit:cover;display:block}
.fb-pending-img.uploading{opacity:.5}
.fb-pending-remove{position:absolute;top:2px;right:2px;width:20px;height:20px;border:0;border-radius:999px;background:rgba(15,25,24,.72);color:#fff;font-size:11px;line-height:1;display:grid;place-items:center;cursor:pointer}
.toast{position:fixed;left:50%;bottom:18px;transform:translate(-50%,10px);background:#17201f;color:#fff;border-radius:14px;padding:12px 15px;font-size:13px;font-weight:750;opacity:0;pointer-events:none;transition:.2s;z-index:80;max-width:calc(100vw - 30px)}
.toast.show{opacity:1;transform:translate(-50%,0)}
.error-box{background:#FBE0E0;color:#7F2E2E;border-radius:18px;padding:16px;text-align:center;font-size:13px;line-height:1.5}

/* Calendar view — month grid of publish dates, toggled from the header
   button instead of a separate page (state.tasks is already loaded, so it
   builds instantly with no extra request). */
.calendar-view{background:#fff;border:1px solid var(--line);border-radius:22px;padding:14px}
.cal-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.cal-back{border:0;background:transparent;color:var(--accent);font-weight:800;font-size:13px;padding:6px 2px}
.cal-nav{display:flex;align-items:center;gap:9px}
.cal-nav-btn{border:1px solid var(--line);background:#fff;border-radius:10px;width:30px;height:30px;font-size:16px;font-weight:800;color:var(--ink);line-height:1}
.cal-title{font-weight:850;font-size:13px;min-width:110px;text-align:center}
.cal-legend{display:flex;flex-wrap:wrap;gap:8px 13px;margin-bottom:13px;font-size:10.5px;color:var(--muted);font-weight:750}
.cal-legend span{display:inline-flex;align-items:center;gap:5px}
.cal-legend i{font-style:normal}
.cal-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.cal-dot.published{background:#3FA9F5}
.cal-dot.approved{background:#79C94A}
.cal-dot.waiting{background:#F5C518}
.cal-dot.changes{background:#E64545}
.cal-dot-fire{font-size:10px;line-height:1}
.cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;margin-bottom:6px;font-size:10.5px;font-weight:800;color:var(--muted);text-align:center}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}
.cal-day{background:#fff;border:1px solid var(--line);border-radius:10px;padding:4px 3px 5px;min-height:50px;display:flex;flex-direction:column;gap:3px}
.cal-day.other-month{background:#F7F8F8;border-color:#EEF0EF}
.cal-day.other-month .cal-day-num{color:#C9CFCD}
.cal-day.today{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.cal-day-num{font-size:10px;font-weight:800;color:var(--muted);text-align:right;padding-right:1px}
.cal-post{display:flex;align-items:flex-start;gap:3px;border:0;background:transparent;padding:0;margin:0;text-align:left;cursor:pointer;width:100%}
.cal-mark{flex:0 0 auto}
.cal-mark.dot{width:6px;height:6px;border-radius:50%;display:inline-block;margin-top:3px}
.cal-mark.dot.published{background:#3FA9F5}
.cal-mark.dot.approved{background:#79C94A}
.cal-mark.dot.waiting{background:#F5C518}
.cal-mark.dot.changes{background:#E64545}
.cal-mark.fire{font-size:8px;line-height:1.3}
.cal-post-title{font-size:9px;line-height:1.25;font-weight:750;color:var(--ink);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

@media(min-width:700px){.page{padding-top:28px}.card{border-radius:28px}.media{margin-left:16px;margin-right:16px}}
@media(max-width:430px){
  .page{padding-left:9px;padding-right:9px}.head{border-radius:21px;padding:14px;margin-bottom:22px}.kf img{width:60px}
  .client-brand strong{max-width:150px}.meta h2{font-size:18px}.actions{grid-template-columns:1fr}
  .cal-toggle{width:36px;height:36px;font-size:15px}
  .cal-day{min-height:44px;padding:3px 2px 4px}
  .cal-post-title{font-size:8.3px}
  .cal-legend{font-size:10px;gap:6px 10px}
  .ai-avatar{width:38px;height:38px;top:8px;right:9px}
  .card.ai .meta{padding-right:54px}
}

/* Маленькие кнопки-иконки в шапке — общий стиль для всех трёх кабинетов:
   «Админка»/«Статистика» в кабинете команды (team.html) и «Статистика»/
   «CEO-дашборд» на странице /admin (projects.html). app.css грузится на
   всех трёх страницах, поэтому стиль объявлен один раз здесь, а не
   дублируется по файлам. Та же геометрия, что у кнопки выхода (.cal-toggle). */
.head-icon-link{flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;color:var(--ink);text-decoration:none;background:#fff}
.head-icon-link:hover{background:#F2F6F5}
.head-icon-link svg{width:18px;height:18px;display:block}
@media(max-width:430px){
  .head-icon-link{width:36px;height:36px}
  .head-icon-link svg{width:16px;height:16px}
}
