:root{
  --bg0:#070812;
  --bg1:#0a0c1a;
  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.12);
  --stroke2: rgba(255,255,255,.18);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);
  --muted2: rgba(255,255,255,.45);
  --accent: #7c5cff;
  --accent2:#a78bfa;
  --good:#2ee59d;
  --bad:#ff4d6d;
  --warn:#ffcc66;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --r: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

/* ===== ПК ВИД ВСЕГДА (и на телефоне тоже) =====
   На телефоне будет горизонтальный скролл, зато раскладка как на ПК */
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue";
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 15% 10%, rgba(124,92,255,.22), transparent 55%),
    radial-gradient(1200px 900px at 85% 20%, rgba(255,77,109,.12), transparent 60%),
    radial-gradient(900px 700px at 55% 85%, rgba(167,139,250,.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;

  min-width: 1100px;
  overflow-x: hidden;
}

a{ color:inherit; text-decoration:none; }

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbarInner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.brandDot{
  width:14px; height:14px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(124,92,255,.9), rgba(167,139,250,.9));
  box-shadow: 0 0 0 4px rgba(124,92,255,.15);
}
.brandTitle{ font-weight: 800; letter-spacing:.08em; font-size: 13px; text-transform: uppercase; }
.brandSub{ font-size: 12px; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.iconBtn{
  display:flex; align-items:center; gap:8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  user-select:none;
}
.iconBtn img{ width:16px; height:16px; opacity:.9; }
.iconBtn:active{ transform: translateY(1px); }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.grid{ display:grid; gap: 16px; }
.card{
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.cardHeader{
  padding: 16px 16px 12px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.hTitle{ display:flex; align-items:flex-start; gap:12px; min-width:0; }
.hTitle img{ width:22px; height:22px; opacity:.95; margin-top:2px; }
.hTitle .t{ font-weight: 800; letter-spacing:.02em; }
.hTitle .s{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.hRight{ display:flex; align-items:center; gap:10px; }

.monthNav{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: nowrap;
}

.monthBtn{
  width:42px; height:42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.monthBtn img{ width:18px; height:18px; opacity:.9; }
.monthBtn:active{ transform: translateY(1px); }

.monthLabel{ min-width:0; }
#monthLabel{
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.1;
}

.btn{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 12px 14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
  white-space:nowrap;
}
.btn.small{ padding: 10px 12px; font-size: 12px; }
.btn.primary{
  border-color: rgba(124,92,255,.45);
  background: linear-gradient(180deg, rgba(124,92,255,.28), rgba(124,92,255,.12));
  box-shadow: 0 10px 30px rgba(124,92,255,.18);
}
.btn.danger{
  border-color: rgba(255,77,109,.35);
  background: linear-gradient(180deg, rgba(255,77,109,.20), rgba(255,77,109,.10));
}
.btn:active{ transform: translateY(1px); }

.pillRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pillRow.center{ justify-content:center; }
.pill{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  cursor:pointer;
}
.pill[data-active="1"]{
  border-color: rgba(124,92,255,.50);
  background: linear-gradient(180deg, rgba(124,92,255,.24), rgba(124,92,255,.10));
}

.calendar{ padding: 0 16px 16px; }
.weekdays{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 4px 2px 10px;
  color: var(--muted);
  font-size: 12px;
}
.weekdays div{ text-align:center; }

.days{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding-bottom: 8px;
}
.day{
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: #fff;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  padding: 10px;
  position:relative;
  overflow:hidden;
}
.dayTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 8px;
}

.dayNames{
  margin-top: 8px;
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  border-radius: 12px;
}

.dayNames::-webkit-scrollbar{ width:0; height:0; }
.dayNames{ scrollbar-width:none; -ms-overflow-style:none; }

.dayName{
  font-size: 11px;
  line-height: 1.25;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 0;
}
.dayName.muted{ color: rgba(255,255,255,.55); }
.day[data-out="1"]{ opacity:.35; }
.day[data-today="1"]{
  border-color: rgba(124,92,255,.55);
  box-shadow: 0 0 0 4px rgba(124,92,255,.14);
}
.day[data-selected="1"]{
  border-color: rgba(167,139,250,.60);
}
.dayNum{ font-weight: 800; }
.dot{
  width: 8px; height: 8px; border-radius:999px;
  background: rgba(255,255,255,.0);
}
.day[data-has="1"] .dot{
  background: rgba(124,92,255,.95);
  box-shadow: 0 0 0 5px rgba(124,92,255,.16);
}

.footerHint{
  padding: 0 16px 14px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  color: var(--muted2);
  font-size: 12px;
}
.note{ color: var(--muted2); font-size: 12px; }

.hr{
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 12px 0;
}

.formGrid{ width:100%; }
.field{ width:100%; }
.label{ color: var(--muted); font-size: 12px; margin-bottom: 8px; }

.input, .select{
  width:100%;
  display:block;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding: 14px 14px;
  outline: none;
}
.input::placeholder{ color: rgba(255,255,255,.35); }

.row2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items:start;
}

/* ✅ Отступ перед блоком кнопок (Удалить / Применить / Очистить-Сохранить и т.п.) */
.rightActions{
  width:100%;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap:wrap;

  margin-top: 14px;       /* главное: отлипание от полей */
  padding-top: 2px;
}

/* Дополнительный отступ именно внутри карточек списка (чтобы "Удалить" не прижималась) */
.shiftRow .rightActions{
  margin-top: 16px;
}

.list{ display:flex; flex-direction:column; gap: 12px; }

.shiftRow{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding: 14px;
  display:flex;
  gap: 12px;
}
.shiftMain .name{ font-weight: 900; font-size: 18px; }
.shiftMain .meta{ color: var(--muted); font-size: 12px; margin-top: 4px; }

.badge{
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  height: fit-content;
  white-space: nowrap;
}
.badge.accent{
  border-color: rgba(124,92,255,.42);
  background: rgba(124,92,255,.14);
}

.empty{
  color: var(--muted);
  text-align:center;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
}

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset: 0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 200;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
}
.modal[data-open="1"]{ display:flex; }
.modalCard{
  width: min(760px, 100%);
  max-height: calc(100dvh - 36px); /* ✅ корректно на мобиле */
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,10,18,.72);
  box-shadow: 0 30px 120px rgba(0,0,0,.65);
}

.modalBody{
  padding: 14px;
  overflow: auto;                     /* ✅ скролл внутри */
  -webkit-overflow-scrolling: touch;  /* ✅ “нативный” скролл на мобиле */
  max-height: calc(100dvh - 36px - 72px); /* card - header */
}
.modalHeader{
  padding: 14px 14px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.modalHeader .t{ font-weight: 900; font-size: 18px; }
.modalHeader .s{ color: var(--muted); font-size: 12px; margin-top: 4px; }
.modalClose{
  width: 44px; height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
}

/* ===== Toasts (always on top) ===== */
.toastWrap{
  position: fixed;
  right: 14px;
  bottom: 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  z-index: 999999;
}
.toast{
  min-width: 360px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0,0,0,.60);
  padding: 12px 14px;
}
.toast .tt{ font-weight: 900; }
.toast .ts{ color: var(--muted); font-size: 12px; margin-top: 4px; }
.toast.good{ border-color: rgba(46,229,157,.35); }
.toast.bad{ border-color: rgba(255,77,109,.35); }
.toast.warn{ border-color: rgba(255,204,102,.35); }

/* phone button */
.phoneBtn{
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  cursor:pointer;
}
.phoneBtn img{ width:18px; height:18px; opacity:.92; }


