/* =========================
   UI PRIMITIVES (shared)
========================= */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.section{ padding:16px; }

.hr{
  height:1px;
  background:var(--border);
  border:0;
  margin:14px 0;
}

/* buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:12px;
  padding:10px 14px;
  border:1px solid transparent;
  font-weight:650;
  cursor:pointer;
  white-space:nowrap;
}
.btn-primary{ background:var(--brand); color:#fff; }
.btn-outline{ background:#fff; border-color:var(--border); color:var(--text); }
.btn-accent{ background:var(--brand2); color:#fff; }

/* badges */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(20,85,135,.08);
  border:1px solid rgba(20,85,135,.18);
  color:var(--brand);
  font-weight:700;
  font-size:12px;
}

/* =========================
   NAVBAR
========================= */
.navbar{
  background:#fff;
  border-bottom:1px solid var(--border);
}

.navbar .inner{
  width:100%;
  padding:12px 32px;
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}

.logo-img{
  height:36px;
  width:auto;
  border-radius:0 !important;
  display:block;
}

.brand{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:850;
  letter-spacing:.2px;
}

.nav-links{
  flex:1 1 420px;
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  flex-wrap:wrap;
}

.nav-links a{
  padding:8px 10px;
  border-radius:10px;
  color:var(--muted);
  font-weight:650;
}

.nav-links a.active{
  background:rgba(20,85,135,.10);
  color:var(--brand);
}

.nav-links a:hover{
  background:rgba(20,85,135,.06);
}

.nav-user{
  display:inline-flex;
  align-items:center;
  height:40px;
  padding:0 8px;
  font-size:14px;
  font-weight:550;
  color:var(--muted);
  white-space:nowrap;
}

/* =========================
   FORMS
========================= */
.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
  font-weight:800;
  letter-spacing:.2px;
}

.field select,
.field input{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:none;
  background:#fff;
}

.field select:focus,
.field input:focus{
  border-color:rgba(20,85,135,.5);
  box-shadow:0 0 0 4px rgba(20,85,135,.08);
}

/* =========================
   TAG CLOUD
========================= */
.tag-cloud{
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:10px;
}

.tag{
  font-size:13px;
  font-weight:650;
  color:var(--muted);
  text-decoration:none;
  padding:2px 0;
  border-bottom:1px solid transparent;
  line-height:1.25;
  transition:.15s ease;
}

.tag:hover{
  color:var(--brand);
  border-color:rgba(20,85,135,.25);
}

.tag:active{ transform:translateY(1px); }

.tag--sm{ font-size:12px; }
.tag--wrap{ white-space:normal; max-width:100%; }

/* =========================
   CALENDAR
========================= */
.calendar__head{ margin-bottom:10px; }
.calendar__title{ font-weight:900; }
.calendar__hint{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.calendar__card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
}

.calendar__month{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}
.calendar__month-name{ font-weight:850; }
.calendar__month-range{ color:var(--muted); font-size:12px; }

.calendar__grid{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:6px;
  font-size:12px;
}

.calendar__wd{
  text-align:center;
  color:var(--muted);
  font-weight:800;
}

.calendar__day{
  text-align:center;
  padding:6px 0;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  transition:.15s ease;
}
.calendar__day.is-empty{ background:transparent; border-color:transparent; }
.calendar__day.is-today{
  background:rgba(20,85,135,.10);
  border-color:rgba(20,85,135,.30);
  font-weight:900;
}
.calendar__day.is-break{
  background:rgba(240,130,30,.12);
  border-color:rgba(240,130,30,.35);
  font-weight:700;
}
.calendar__day.is-today.is-break{
  background:linear-gradient(135deg, rgba(20,85,135,.15), rgba(240,130,30,.15));
}

.calendar__day:not(.is-empty):hover{
  background:rgba(20,85,135,.06);
}

.calendar__legend{
  margin-top:10px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  font-size:12px;
  color:var(--muted);
}

.legend-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:3px;
  display:inline-block;
}
.dot--today{ background:rgba(20,85,135,.55); }
.dot--break{ background:rgba(240,130,30,.75); }

/* =========================
   MESSAGES (TOAST)
========================= */
.messages{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20000;
  width: min(var(--container), calc(100vw - 32px));
  padding: 0;
  pointer-events: none;
}

.messages ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.messages li{
  pointer-events:auto;
  background:#fff;
  border:1px solid var(--border);
  border-left:5px solid var(--brand2);
  padding:12px 14px;
  border-radius:14px;
  box-shadow:0 20px 50px rgba(0,0,0,.18);
  font-size:14px;
}

/* =========================
   FOOTER
========================= */
.footer{
  max-width:var(--container);
  margin:30px auto 18px;
  padding:16px var(--pad);
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  text-align:left;
  border-top:1px solid var(--border);
}

.footer-inner{
  display:flex;
  flex-direction:column;
  gap:10px;
  white-space:normal;
}

.footer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.footer-links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.footer-links a{
  color:var(--muted);
  font-weight:500;
  font-size:13px;
  opacity:.85;
  transition:.15s ease;
}
.footer-links a:hover{
  opacity:1;
  color:var(--text);
}
.footer-links a:not(:last-child)::after{
  content:"";
  margin:0;
}

/* =========================
   AI FLOATING BUTTON + MODAL
========================= */
.ai-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  height:56px;
  padding:0 14px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:2px solid rgba(0, 85, 160, .55);
  color:#0b3d7a;
  font-size:14px;
  font-weight:850;
  letter-spacing:.2px;
  cursor:pointer;
  z-index:9999;
  box-shadow: 0 12px 30px rgba(0,0,0,.14), 0 0 0 0 rgba(0, 85, 160, .35);
  transform: translateZ(0);
  animation: aiPulse 2.2s ease-in-out infinite, aiWiggle 6.5s ease-in-out infinite;
}

.ai-fab__spark{
  width:30px;
  height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0, 85, 160, .08);
  border:1px solid rgba(0, 85, 160, .18);
  box-shadow: 0 0 18px rgba(0, 85, 160, .25);
  font-size:16px;
  line-height:1;
}

.ai-fab__label{ line-height:1; }

.ai-fab:hover{
  box-shadow: 0 14px 34px rgba(0,0,0,.16), 0 0 0 10px rgba(0, 85, 160, .08);
  transform: translateY(-2px);
}
.ai-fab:active{ transform: translateY(0); }

@keyframes aiPulse{
  0%   { box-shadow: 0 12px 30px rgba(0,0,0,.14), 0 0 0 0 rgba(0, 85, 160, .35); }
  70%  { box-shadow: 0 12px 30px rgba(0,0,0,.14), 0 0 0 16px rgba(0, 85, 160, 0); }
  100% { box-shadow: 0 12px 30px rgba(0,0,0,.14), 0 0 0 0 rgba(0, 85, 160, 0); }
}

@keyframes aiWiggle{
  0%, 86%, 100% { transform: translateY(0); }
  90% { transform: translateY(-2px) rotate(-2deg); }
  93% { transform: translateY(-2px) rotate(2deg); }
  96% { transform: translateY(-1px) rotate(0deg); }
}

@media (prefers-reduced-motion: reduce){
  .ai-fab{ animation:none; }
}

.ai-modal{ position:fixed; inset:0; display:none; z-index:10000; }
.ai-modal.is-open{ display:block; }
.ai-modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }

.ai-modal__panel{
  position:absolute;
  right:18px;
  bottom:90px;
  width:min(420px, calc(100vw - 36px));
  max-height:min(70vh, 560px);
  background:#fff;
  border-radius:18px;
  border:1px solid #e5e7eb;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}

.ai-modal__header{
  padding:14px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  border-bottom:1px solid #eef1f5;
}

.ai-title{ font-weight:850; font-size:16px; }
.ai-subtitle{ color:var(--muted); font-size:12px; margin-top:2px; }
.ai-close{ border:none; background:transparent; font-size:18px; cursor:pointer; padding:6px; }

.ai-modal__body{
  padding:14px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ai-bubble{
  max-width:90%;
  padding:10px 12px;
  border-radius:14px;
  font-size:14px;
  line-height:1.35;
}
.ai-bubble--bot{ background:#f6f7fb; border:1px solid #eef1f5; }
.ai-bubble--me{ background:#e9f5ff; border:1px solid #d7ecff; align-self:flex-end; }

.ai-suggestions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:2px;
}

.ai-chip{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  cursor:pointer;
}

.ai-modal__footer{
  padding:12px;
  display:flex;
  gap:10px;
  border-top:1px solid #eef1f5;
}

.ai-input{
  flex:1;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}

.ai-send{
  border:none;
  border-radius:12px;
  padding:10px 12px;
  background:var(--brand);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

/* cards grid (2 колонки) */
.cards{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  align-items:start;
}

/* ===== PRICING ===== */
.pricing-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:12px;
}

@media (max-width: 700px){
  .pricing-grid{ grid-template-columns:1fr; }
}

.pricing-card{
  position:relative;
  padding:16px;                 /* одинаковые внутренние отступы */
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}

.pricing-card--featured{
  border-color: rgba(20,85,135,.55);
  box-shadow: 0 12px 30px rgba(2,6,23,.08);
}

.pricing-badge{
  position:absolute;
  top:12px;
  right:12px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:rgba(20,85,135,.10);
  border:1px solid rgba(20,85,135,.25);
  color:var(--brand);
}

.pricing-title{
  font-weight:900;
  font-size:18px;
  margin:0;
  padding-right:100px; /* чтобы заголовок не залезал под бейдж */
}

.pricing-price{
  margin-top:8px;
  font-size:18px;
  font-weight:900;
  color:var(--text);
}

.pricing-price span{
  font-weight:600;
  font-size:14px;
  color:var(--muted);
}

.pricing-desc{
  margin-top:10px;
  color:var(--muted);
  line-height:1.55;
}

.pricing-cta{
  margin-top:14px;
}