/* CRM: календарь, клиенты, абонементы (этап G1). Стиль сайта: кремовый фон, тонкие чёрные рамки. */
.crm-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:16px; }
.crm-bar .spacer { flex:1 1 auto; }
.crm-chip { border:1px solid #000; background:transparent; color:#000; padding:7px 14px; font:inherit; font-size:13px; cursor:pointer; text-transform:uppercase; letter-spacing:.04em; }
.crm-chip.on { background:#000; color:#fff; }
.crm-month { font-family:'Cormorant Garamond','Cormorant',serif; font-size:26px; text-transform:uppercase; min-width:190px; text-align:center; }
.crm-nav-btn { border:1px solid #000; background:transparent; width:38px; height:38px; font-size:18px; cursor:pointer; }

.cal-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); border-top:1px solid #000; border-left:1px solid #000; }
.cal-head { border-right:1px solid #000; border-bottom:1px solid #000; padding:6px 8px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; background:#f4efe3; }
.cal-cell { border-right:1px solid #000; border-bottom:1px solid #000; min-height:112px; padding:6px; display:flex; flex-direction:column; gap:4px; background:#fff; }
.cal-cell.empty { background:#f4efe3; }
.cal-cell.today { outline:2px solid #411d00; outline-offset:-2px; background:#fbf3e0; }
.cal-cell.today .cal-day { font-weight:800; }
.cal-list .row.today { background:#fbf3e0; outline:2px solid #411d00; outline-offset:-2px; }
.cal-cell.flash, .cal-list .row.flash { animation: calflash 1.4s ease; }
@keyframes calflash { 0%,100% { background:#fbf3e0; } 30% { background:#f3d98f; } }
.cal-day { font-size:13px; font-weight:600; }
.cal-item { display:block; width:100%; text-align:left; border:1px solid #000; border-left-width:5px; background:#fff; padding:3px 6px; font:inherit; font-size:11.5px; line-height:1.25; cursor:pointer; color:#000; }
.cal-item:hover { background:#f4efe3; }
.cal-item .t { font-weight:600; }
.cal-item.cancelled { opacity:.45; text-decoration:line-through; }
.cal-item.d-art { border-left-color:#8c5a2b; }
.cal-item.d-chess { border-left-color:#2f4f6f; }
.cal-item.d-mk { border-left-color:#a33b3b; }
.cal-item.d-kino { border-left-color:#4a6b3a; }
.cal-legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; margin-top:10px; }
.cal-legend i { display:inline-block; width:12px; height:12px; margin-right:5px; vertical-align:-1px; }
.d-art-bg { background:#8c5a2b; } .d-chess-bg { background:#2f4f6f; } .d-mk-bg { background:#a33b3b; } .d-kino-bg { background:#4a6b3a; }
.cal-list { display:none; }

.crm-table { width:100%; border-collapse:collapse; font-size:14px; }
.crm-table th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; padding:8px; background:#f4efe3; border-bottom:1px solid #000; white-space:nowrap; }
.crm-table td { padding:8px; border-bottom:1px solid #d5cdbf; vertical-align:middle; }
.crm-table tr.click { cursor:pointer; }
.crm-table tr.click:hover td { background:#f9f5ea; }
.pill { display:inline-block; padding:2px 8px; border:1px solid #000; font-size:12px; white-space:nowrap; }
.pill.ok { background:#e3efdc; } .pill.warn { background:#f8e8c8; } .pill.bad { background:#f5d9d6; } .pill.fam { background:#e9e1f3; }

.crm-modal { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:300; display:flex; align-items:flex-start; justify-content:center; overflow:auto; padding:24px 12px; }
.crm-modal > .box { background:#fcf9f1; border:1px solid #000; width:100%; max-width:980px; padding:22px; position:relative; }
.crm-modal h3 { font-family:'Cormorant Garamond','Cormorant',serif; font-size:26px; text-transform:uppercase; margin:0 0 4px; font-weight:500; }
.crm-modal .x { position:absolute; right:12px; top:8px; border:0; background:none; font-size:26px; cursor:pointer; }
.crm-sub { color:#5b5348; font-size:13px; margin-bottom:14px; }
.crm-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
.crm-form label { display:block; font-size:12px; text-transform:uppercase; letter-spacing:.04em; margin-bottom:3px; }
.crm-form input, .crm-form select, .crm-form textarea { width:100%; box-sizing:border-box; }
.crm-form .full { grid-column:1/-1; }
.crm-sec { margin:18px 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:.05em; border-bottom:1px solid #000; padding-bottom:4px; }
.crm-dir-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.crm-dir { border:1px solid #000; padding:8px; background:#fff; font-size:13px; }
.crm-dir b { display:block; font-size:12px; text-transform:uppercase; margin-bottom:4px; }
.crm-dir .n { font-size:26px; font-family:'Cormorant Garamond',serif; line-height:1; }
.crm-actions { display:flex; gap:6px; flex-wrap:wrap; }
.crm-actions button, .crm-btn { border:1px solid #000; background:#fff; padding:6px 10px; font:inherit; font-size:12.5px; cursor:pointer; }
.crm-actions button.on { background:#000; color:#fff; }
.crm-btn.primary { background:#000; color:#fff; }
.crm-note { font-size:12.5px; color:#5b5348; }
.crm-empty { padding:24px; text-align:center; color:#5b5348; border:1px dashed #000; background:#fff; }
.sub-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; }
.sub-card { border:1px solid #000; background:#fff; padding:12px; display:flex; flex-direction:column; gap:6px; }
.sub-card h4 { margin:0; font-size:15px; }
.sub-card .price { font-family:'Cormorant Garamond',serif; font-size:30px; line-height:1; }

@media (max-width:820px) {
  .cal-grid { display:none; }
  .cal-list { display:block; }
  .cal-list .row { border:1px solid #000; background:#fff; margin-bottom:8px; padding:8px; }
  .cal-list .row .d { font-weight:600; font-size:13px; margin-bottom:5px; }
  .crm-form { grid-template-columns:1fr; }
  .crm-dir-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .crm-month { font-size:22px; min-width:140px; }
  .crm-table.stack thead { display:none; }
  .crm-table.stack tr { display:block; border:1px solid #000; background:#fff; margin-bottom:8px; padding:6px; }
  .crm-table.stack td { display:flex; justify-content:space-between; gap:10px; border:0; padding:3px 4px; }
  .crm-table.stack td::before { content:attr(data-l); font-size:11px; text-transform:uppercase; color:#5b5348; flex:0 0 38%; }
}

.nav-hide { display:none !important; }

/* Мастер «Спецпредложения» */
.wz-card { display:flex; gap:28px; border:1px solid #000; background:#fff; padding:24px; margin-bottom:16px; }
.wz-thumb { flex:0 0 197px; width:197px; height:197px; border:1px solid #000; overflow:hidden; background:#f4efe3; display:flex; align-items:center; justify-content:center; }
.wz-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.wz-thumb.q { font-size:64px; font-family:'Cormorant Garamond',serif; }
.wz-thumb.sm { flex-basis:150px; width:150px; height:150px; }
.wz-main { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:10px; }
.wz-head { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:baseline; }
.wz-name { font-size:20px; }
.wz-per { font-size:13px; color:#5b5348; }
.wz-pages { display:flex; gap:10px; flex-wrap:wrap; }
.wz-page { border:1px solid #000; background:#fff; color:#000; padding:8px 18px; font:inherit; font-size:13px; cursor:pointer; min-width:82px; }
.wz-page.on { background:#000; color:#fff; }
.wz-btns { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-top:6px; }
.wz-btns .spacer { flex:1 1 auto; }
.wz-b { border:1px solid #000; background:#fff; color:#000; padding:12px 22px; font:inherit; font-size:15px; cursor:pointer; display:inline-block; }
.wz-b.dark { background:#000; color:#fff; }
.wz-b.big { padding:14px 40px; }
.wz-box { border:1px solid #000; background:#fff; padding:32px 40px; max-width:1100px; position:relative; }
.wz-close { position:absolute; top:10px; right:12px; width:40px; height:40px; border:1px solid #000; background:#fff; font-size:26px; line-height:1; cursor:pointer; padding:0; }
.wz-close:hover { background:#000; color:#fff; }
.wz-title { font-size:44px; font-family:'Montserrat',sans-serif; font-weight:300; margin-bottom:14px; }
.wz-of { font-size:14px; color:#5b5348; }
.wz-body { min-height:360px; display:flex; flex-direction:column; gap:10px; }
.wz-lab { margin-top:12px; font-size:15px; }
.wz-body input:not([type=checkbox]):not([type=file]), .wz-body select, .wz-body textarea { max-width:520px; width:100%; box-sizing:border-box; }
.wz-yn { display:flex; gap:14px; flex-wrap:wrap; }
.wz-opt { border:1px solid #000; background:#fff; color:#000; padding:12px 20px; font:inherit; font-size:15px; cursor:pointer; min-width:150px; text-align:center; }
.wz-opt.wide { min-width:260px; }
.wz-opt.sm { min-width:0; padding:6px 12px; font-size:13px; }
.wz-opt.on { background:#000; color:#fff; }
.wz-grid5 { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.wz-grid5 .wz-opt { min-width:0; }
.wz-tslot { display:flex; flex-direction:column; gap:8px; }
.wz-days { display:flex; gap:10px; flex-wrap:wrap; }
.wz-days .wz-opt { min-width:64px; padding:10px 14px; }
.wz-dayages { font-size:14px; display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:6px; }
.wz-dates { display:flex; gap:12px; align-items:center; }
.wz-fields { display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.wz-two { display:grid; grid-template-columns:1fr 1fr; gap:36px; margin-top:8px; }
.wz-upbody { display:flex; gap:20px; align-items:flex-start; margin-top:8px; }
.wz-file { color:#3a3ab0; margin-bottom:14px; word-break:break-all; }
.wz-more { margin-top:14px; } .wz-more summary { cursor:pointer; font-size:14px; }
.wz-chk { display:flex; gap:8px; align-items:center; margin-top:18px; }
.wz-nav { display:flex; justify-content:space-between; align-items:flex-end; margin-top:26px; }
.wz-arrow { border:1px solid #000; background:#fff; width:90px; height:50px; font-size:26px; cursor:pointer; }
.wz-cap { font-size:14px; margin-top:6px; text-align:center; }
.wz-prev { border:1px solid #000; background:#fff; display:flex; overflow:hidden; margin-top:8px; }
.wz-prev.d { max-width:560px; min-height:190px; }
.wz-prev.m { flex-direction:column-reverse; max-width:240px; }
.wz-prev-t { padding:18px; flex:1 1 55%; display:flex; flex-direction:column; gap:8px; }
.wz-prev-h { font-family:'Cormorant Garamond',serif; font-size:22px; text-transform:uppercase; line-height:1.1; }
.wz-prev-s { font-size:11px; color:#5b5348; }
.wz-prev-b { border:1px solid #000; padding:5px 12px; font-size:11px; align-self:flex-start; margin-top:auto; }
.wz-prev-i { flex:1 1 45%; min-height:140px; background:#f4efe3; }
.wz-prev-i img { width:100%; height:100%; object-fit:cover; display:block; }
@media (max-width:820px) {
  .wz-card { flex-direction:column; gap:14px; padding:16px; }
  .wz-thumb { flex-basis:auto; width:100%; max-width:240px; height:auto; aspect-ratio:1; }
  .wz-box { padding:18px 14px; }
  .wz-title { font-size:32px; }
  .wz-two { grid-template-columns:1fr; gap:14px; }
  .wz-grid5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .wz-opt.wide { min-width:0; width:100%; }
  .wz-fields { align-items:stretch; }
  .wz-nav { position:sticky; bottom:0; background:#fff; padding:10px 0; border-top:1px solid #000; }
  .wz-b { padding:10px 14px; }
}
label.wz-b { margin:0 !important; text-transform:none !important; letter-spacing:0 !important; font-size:15px !important; }
.wz-b.dark, label.wz-b.dark { background:#000 !important; color:#fff !important; }

.wz-frow { display:flex; align-items:stretch; gap:12px; margin-bottom:10px; max-width:640px; }
.wz-frow .wz-opt { flex:1 1 auto; margin:0; }
.wz-req { display:flex; align-items:center; gap:8px; border:1px solid #000; padding:0 14px; background:#fff; cursor:pointer; white-space:nowrap; font-size:14px; text-transform:none; }
.wz-req input { flex:0 0 18px; width:18px; height:18px; margin:0; padding:0; align-self:center; accent-color:#000; }
.wz-req span { line-height:1; font-weight:500; }
.wz-req.off { opacity:.45; cursor:default; }
.wz-frow .wz-req { display:flex !important; flex-direction:row !important; align-items:center !important; gap:10px; }
.wz-frow .wz-req input[type=checkbox] { position:static !important; display:inline-block !important; flex:0 0 18px; width:18px !important; height:18px !important; margin:0 !important; padding:0 !important; }
.wz-frow .wz-req span { display:inline !important; margin:0 !important; }

.wz-pvbox { width:100%; max-width:1100px; }
#nav-events { display:none !important; }
.mv-btns { display:inline-flex; gap:6px; } .mv-btns button { min-width:34px; font-size:16px; line-height:1; } .mv-btns button[disabled] { opacity:.35; cursor:default; }
.drag-h { cursor:grab; font-size:20px; line-height:1; padding:0 6px; color:var(--muted,#888); user-select:none; align-self:center; } tr.dragging { opacity:.4; } tr.drop-before td { box-shadow: inset 0 3px 0 #000; } tr.drop-after td { box-shadow: inset 0 -3px 0 #000; }
.tpl-ed { width:100%; box-sizing:border-box; min-height:64px; padding:10px 12px; border:1px solid #000; background:#fff; font-size:15px; line-height:2; white-space:pre-wrap; outline:none; } .tpl-ed:focus { box-shadow:0 0 0 2px rgba(0,0,0,.15); } .tpl-chip { display:inline-block; background:#e9e5da; color:#555; border:1px solid #cfc9b8; border-radius:4px; padding:0 8px; margin:0 2px; font-size:13px; line-height:1.6; user-select:all; cursor:default; }

.rt-bar { display:flex; flex-wrap:wrap; gap:4px; align-items:center; margin-bottom:6px; padding:6px; background:#f4efe8; border:1px solid #d8d0c2; }
.rt-b { min-width:32px; height:32px; padding:0 8px; background:#fff; border:1px solid #bbb; cursor:pointer; font-size:14px; text-transform:none; letter-spacing:0; }
.rt-b:hover { background:#eee; } .rt-sep { width:1px; height:22px; background:#cfc9b8; margin:0 4px; }
.rt-bar select { height:32px; width:auto; min-width:90px; padding:0 6px; font-size:13px; text-transform:none; letter-spacing:0; }
.rt-col { display:inline-flex; align-items:center; gap:4px; height:32px; padding:0 6px; background:#fff; border:1px solid #bbb; font-weight:700; cursor:pointer; text-transform:none; } .rt-col input { width:26px; height:22px; padding:0; border:0; background:none; }
.rt-ed { min-height:90px; padding:10px 12px; border:1px solid #000; background:#fff; outline:none; line-height:1.6; color:#2b2118; }
.rt-ed.rt-title { min-height:48px; font:700 24px/1.3 Georgia,'Times New Roman',serif; } .rt-ed.rt-text { font:16px/1.6 Arial,Helvetica,sans-serif; }
.rt-ed:empty::before { content:attr(data-ph); color:#999; font-weight:400; font-size:15px; font-family:Arial,sans-serif; } .rt-ed ul,.rt-ed ol { margin:0 0 0 22px; padding:0; } .rt-ed a { color:#2b2118; }

/* кнопки-иконки с подсказкой при наведении (рассылка: черновик/шаблон/открыть) */
.nl-ico { position:relative; width:40px; height:40px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:18px; line-height:1; }
.nl-ico::after { content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 6px); transform:translateX(-50%); background:#000; color:#fff; font-size:12px; line-height:1; padding:6px 9px; white-space:nowrap; pointer-events:none; opacity:0; transition:opacity .12s; z-index:20; text-transform:none; }
.nl-ico:hover::after, .nl-ico:focus-visible::after { opacity:1; }

.nl-ico.on { background:#000; color:#fff; }
