@import url('/css/redesign.css?v=1');
@import url('/css/semantic-redesign.css?v=1');

@layer legacy {
:root {
  --bg: #FFFBF5;
  --bg-card: #FFFFFF;
  --primary: #E8A0BF;
  --primary-dark: #D4789B;
  --primary-light: #F5D5E5;
  --accent: #B07BAC;
  --text: #3D3D3D;
  --text-light: #888888;
  --text-white: #FFFFFF;
  --border: #F0E6DD;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-btn: 14px;
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1200px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.page-container { padding-top: 5rem; padding-bottom: 4rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); font-size: 0.85rem; }

/* FLOATING HEADER */
.header-float {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 0.75rem 1.25rem;
  pointer-events: none;
}
.header {
  max-width: var(--max-w); margin: 0 auto;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 100px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  pointer-events: auto;
  transition: box-shadow 0.3s, background 0.3s;
}
.header:hover { box-shadow: 0 6px 32px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 1.25rem; }
.header__logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.logo-icon { font-size: 1.3rem; }
.logo-text { background: linear-gradient(135deg, var(--primary-dark), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header__nav { display: flex; gap: 0.25rem; align-items: center; }
.header__link { padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--text); text-decoration: none; transition: all 0.2s; }
.header__link:hover { background: rgba(232,160,191,0.12); color: var(--primary-dark); }
.header__link--primary { background: var(--primary); color: #fff; }
.header__link--primary:hover { background: var(--primary-dark); color: #fff; }
.header__link--ghost { color: var(--text-light); }
.header__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.header__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

@media (max-width: 640px) {
  .header-float { padding: 0.5rem 0.75rem; }
  .header__inner { height: 48px; padding: 0 1rem; }
  .header__nav { display: none; position: absolute; top: calc(100% + 0.5rem); left: 0.5rem; right: 0.5rem; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 20px; flex-direction: column; padding: 0.75rem; box-shadow: 0 8px 32px rgba(0,0,0,0.1); border: 1px solid rgba(255,255,255,0.5); }
  .header__nav.open { display: flex; }
  .header__link { padding: 0.6rem 1rem; border-radius: 14px; text-align: center; }
  .header__burger { display: flex; }
}

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.65rem 1.5rem; border: 2px solid transparent; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all var(--transition); text-decoration: none; white-space: nowrap; }
.btn--primary { background: var(--primary); color: var(--text-white); border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--text-white); }
.btn--outline { background: transparent; color: var(--primary-dark); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary-light); }
.btn--ghost { background: transparent; color: var(--text-light); border-color: transparent; }
.btn--ghost:hover { color: var(--text); background: var(--border); }
.btn--success { background: #7BC67E; color: #fff; border-color: #7BC67E; }
.btn--success:hover { background: #5EB362; }
.btn--danger { background: #E87C7C; color: #fff; border-color: #E87C7C; }
.btn--danger:hover { background: #D45A5A; }
.btn--sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn--full { width: 100%; }

/* HERO */
.hero { padding: 7rem 0 3rem; background: linear-gradient(180deg, var(--primary-light) 0%, rgba(232,160,191,0.15) 70%, var(--bg) 100%); }

.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 900px; margin: 0 auto; }
.hero__content { flex: 1; }
.hero__title { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero__subtitle { font-size: 1.15rem; color: var(--text-light); margin-bottom: 2rem; }
.hero__image { display: none; }
.hero__visual {
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 20px 60px rgba(232, 160, 191, 0.3);
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }
@media (max-width: 768px) {
  .hero__inner { text-align: center; }
  .hero__title { font-size: 1.8rem; }
  .hero__image { flex: none; }
  .hero__visual { width: 140px; height: 140px; }
}

/* SECTION TITLES */
.section-title { text-align: center; font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background: var(--primary); border-radius: 4px; margin: 0.75rem auto 0; }
.section-subtitle { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 1rem; }
.page-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; }

/* STEPS */
.steps { padding: 4rem 0; }
.steps__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.step-card { background: var(--bg-card); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); position: relative; transition: transform var(--transition); }
.step-card:hover { transform: translateY(-4px); }
.step-card__num { position: absolute; top: -12px; left: -12px; width: 32px; height: 32px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.step-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.9rem; color: var(--text-light); }

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

/* BOXES */
.boxes { padding: 4rem 0; background: var(--bg-card); }
.boxes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
@media (max-width: 768px) { .boxes__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .boxes__grid { grid-template-columns: 1fr; max-width: 320px; } }
.box-card { background: var(--bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); }
.box-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.box-card__img { aspect-ratio: 4/3; overflow: hidden; background: var(--primary-light); display: flex; align-items: center; justify-content: center; }
.box-card__img img { width: 100%; height: 100%; object-fit: cover; }
.box-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.box-card__size-label {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 2px;
}
.box-card__body { padding: 1.25rem; }
.box-card__body h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.box-card__size { display: inline-block; background: var(--primary-light); color: var(--primary-dark); padding: 0.2rem 0.6rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.box-card__desc { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.5rem; line-height: 1.5; }
.box-card__price { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); }
.box-card__prices { margin-top: 0.5rem; }
.box-card__price-main { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); }
.box-card__price-options { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.3rem; font-size: 0.8rem; color: #888; }

/* FAQ */
.faq { padding: 4rem 0; }
.faq__list { max-width: 900px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__question { width: 100%; background: none; border: none; padding: 1.25rem 0; font-size: 1.05rem; font-weight: 600; text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text); }
.faq__question::after { content: '+'; font-size: 1.5rem; color: var(--primary); }
.faq__item.open .faq__question::after { content: '−'; }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq__item.open .faq__answer { max-height: 300px; padding-bottom: 1.25rem; }
.faq__answer p { color: var(--text-light); line-height: 1.7; }

/* SUBSCRIBE */
.subscribe { padding: 4rem 0; }
.subscribe__card { background: linear-gradient(135deg, var(--primary-light), #FFF0F5); border-radius: var(--radius); padding: 3rem 2rem; text-align: center; max-width: 900px; margin: 0 auto; }
.subscribe__card h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.subscribe__card p { color: var(--text-light); margin-bottom: 1.5rem; }
.subscribe__form { display: flex; gap: 0.75rem; max-width: 400px; margin: 0 auto; }
.subscribe__form input { flex: 1; padding: 0.65rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-btn); background: #fff; }
.subscribe__form input:focus { outline: none; border-color: var(--primary); }
.subscribe__msg { margin-top: 1rem; font-size: 0.9rem; }
@media (max-width: 480px) { .subscribe__form { flex-direction: column; } }

/* FLOATING FOOTER */
.footer-float { padding: 0 1.25rem 1rem; margin-top: auto; }
.footer {
  max-width: var(--max-w); margin: 0 auto;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  padding: 2.5rem 0 1.5rem;
}
.footer__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.footer__logo { font-size: 0.95rem; font-weight: 700; color: var(--primary-dark); }
.footer__desc { color: var(--text-light); font-size: 0.9rem; margin-top: 0.5rem; }
.footer__col h4 { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--primary-dark); }
.footer__col a { display: block; color: var(--text-light); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer__col a:hover { color: var(--primary-dark); }
.footer__socials { display: flex; justify-content: center; gap: 1.25rem; margin-top: 0.75rem; }
.footer__social-link { display: inline-flex !important; align-items: center; justify-content: center; transition: transform 0.2s ease, opacity 0.2s ease; margin-bottom: 0 !important; text-decoration: none; opacity: 0.45; }
.footer__social-link:hover { transform: scale(1.15); opacity: 0.85; }
.footer__social-link svg { display: block; width: 28px; height: 28px; }
.footer__bottom { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1rem; }
.footer__bottom p { color: var(--text-light); font-size: 0.8rem; text-align: center; }
@media (max-width: 640px) {
  .footer-float { padding: 0 0.75rem 0.75rem; }
  .footer { border-radius: 24px; padding: 2rem 0 1rem; }
  .footer__inner { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
}

/* FORMS */
.form__section { background: var(--bg-card); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.form__section-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--primary-light); }
.form__group { margin-bottom: 1rem; }
.form__group label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form__group input, .form__group select, .form__group textarea { width: 100%; padding: 0.7rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm); background: #fff; transition: border-color var(--transition); font-size: 0.95rem; }
.form__group input:focus, .form__group select:focus, .form__group textarea:focus { outline: none; border-color: var(--primary); }
.form__group textarea { resize: vertical; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) {  }
.form__check label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; }
.form__check input[type="checkbox"] { margin-top: 3px; accent-color: var(--primary-dark); width: 18px; height: 18px; }
.form--inline { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.form--inline .form__group { margin-bottom: 0; }
.form--horizontal { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.form--horizontal .form__group { flex: 1; min-width: 150px; margin-bottom: 0; }

/* ALERTS */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; }
.alert--error { background: #FFF0F0; border: 1px solid #E87C7C; color: #C0392B; }
.alert--success { background: #F0FFF0; border: 1px solid #7BC67E; color: #27AE60; border-radius: 12px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; }
.alert--warning { background: #FFF8E1; border: 1px solid #FFD54F; color: #F57F17; border-radius: 12px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; }
.alert--info { background: #E3F2FD; border: 1px solid #64B5F6; color: #1565C0; border-radius: 12px; padding: 1rem 1.5rem; margin-bottom: 1.5rem; }
.alert h2 { margin-bottom: 0.5rem; }

/* AUTH */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.auth-card { background: var(--bg-card); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-card__title { text-align: center; font-size: 1.35rem; margin-bottom: 1.5rem; }

/* BADGES */
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.badge--lg { font-size: 0.85rem; padding: 0.35rem 1rem; }
.badge--new { background: #E3F2FD; color: #1565C0; }
.badge--confirmed { background: #FFF3E0; color: #E65100; }
.badge--assembling { background: #F3E5F5; color: #7B1FA2; }
.badge--assembled { background: #E8F5E9; color: #2E7D32; }
.badge--ready_to_ship { background: #E8EAF6; color: #283593; }
.badge--handed_to_courier { background: #FFF3E0; color: #BF360C; }
.badge--waiting_delivery_payment { background: #FFF8E1; color: #F57F17; }
.badge--shipped { background: #E0F7FA; color: #00838F; }
.badge--delivered { background: #E8F5E9; color: #1B5E20; }
.badge--received { background: #E8F8F0; color: #196F3D; }
.badge--returned { background: #FCE4EC; color: #C62828; }
.badge--cancelled { background: #FAFAFA; color: #757575; }
.badge--role-admin { background: #FCE4EC; color: #C62828; }
.badge--role-worker { background: #E8EAF6; color: #283593; }

/* ORDER CARDS */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.order-card { display: block; background: var(--bg-card); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); transition: transform var(--transition); color: var(--text); text-decoration: none; }
.order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.order-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.order-card__number { font-weight: 700; font-size: 1.1rem; }
.order-card__product { font-weight: 500; }
.order-card__date { font-size: 0.85rem; color: var(--text-light); }
.order-card__track { font-size: 0.85rem; color: var(--accent); margin-top: 0.25rem; }
.order-card__footer { display: flex; justify-content: flex-end; }
.order-card__amount { font-weight: 700; font-size: 1.1rem; color: var(--primary-dark); }

/* ORDER DETAIL */
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 500; }
.order-detail__header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.order-detail__header h1 { font-size: 1.5rem; }
.order-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.order-detail__grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .order-detail__grid, .order-detail__grid--3 { grid-template-columns: 1fr; } }
.detail-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.detail-card h3 { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-light); }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; }
.detail-list dt { font-weight: 500; font-size: 0.85rem; color: var(--text-light); }
.detail-list dd { font-size: 0.95rem; }

/* CHAT */
.chat-section { margin-bottom: 2rem; }
.chat { max-height: 400px; overflow-y: auto; padding: 1rem 0; }
.chat__empty { text-align: center; color: var(--text-light); padding: 2rem 0; }
.chat__msg { max-width: 75%; margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.chat__msg--mine { margin-left: auto; background: var(--primary-light); border-bottom-right-radius: 4px; }
.chat__msg--theirs { background: #F5F5F5; border-bottom-left-radius: 4px; }
.chat__msg-header { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.75rem; color: var(--text-light); margin-bottom: 0.35rem; }
.chat__msg p { font-size: 0.9rem; }
.chat__img { max-width: 250px; border-radius: 8px; margin-top: 0.5rem; }
.chat__form { border-top: 1px solid var(--border); padding-top: 1rem; }
.chat__form textarea { width: 100%; padding: 0.6rem; border: 2px solid var(--border); border-radius: var(--radius-sm); resize: none; }
.chat__form textarea:focus { outline: none; border-color: var(--primary); }
.chat__form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.chat__attach { cursor: pointer; font-size: 1.2rem; }

/* ===== CLIENT MESSENGER (unified with admin) ===== */
.messenger--client {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.messenger--client .messenger__thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1.5px solid var(--border);
  font-size: 0.88rem;
  margin: -1.5rem -1.5rem 0 -1.5rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #FAFAFA;
}
.messenger--client .messenger__messages {
  min-height: 300px;
  max-height: 500px;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.messenger__placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.95rem;
  min-height: 200px;
}
.msg { display: flex; }
.msg--other { justify-content: flex-start; }
.msg--mine { justify-content: flex-end; }
.msg__bubble {
  max-width: 70%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
}
.msg--other .msg__bubble {
  background: #F0F0F0;
  border-bottom-left-radius: 4px;
}
.msg--mine .msg__bubble {
  background: var(--primary-light);
  border-bottom-right-radius: 4px;
}
.msg__text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.msg__photo {
  max-width: 240px;
  max-height: 200px;
  border-radius: 10px;
  display: block;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.msg__time {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  text-align: right;
}
.msg__toy-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  background: var(--bg);
  margin-bottom: 0.3rem;
}
.msg__toy-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.messenger--client .messenger__input {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1.5px solid var(--border);
  background: #FAFAFA;
}
.messenger--client .messenger__input textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  line-height: 1.4;
}
.messenger--client .messenger__attach {
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 0.4rem;
  border-radius: 8px;
  transition: color 0.15s;
}
.messenger--client .messenger__attach:hover { color: var(--primary); }
.messenger--client .messenger__send {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.messenger--client .messenger__send:hover { opacity: 0.85; }
.messenger--client .messenger__photo-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 1.25rem 0.5rem;
  background: #FAFAFA;
}
.messenger--client .messenger__photo-preview img {
  max-height: 60px;
  border-radius: 8px;
}
.messenger--client .messenger__photo-preview button {
  font-size: 0.82rem;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

/* WORKER */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.work-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.work-card--mine { border-left: 4px solid var(--primary); }
.work-card__header { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.work-card__number { font-weight: 700; }
.work-card__body { font-size: 0.9rem; margin-bottom: 1rem; }
.work-card__body p { margin-bottom: 0.3rem; }
.work-card__img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; margin: 0.5rem 0; }
.work-card__actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ADMIN TABLE */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--primary-light); padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover { background: #FEFAF5; }
.admin-table--sm { font-size: 0.8rem; }
.admin-table--sm th, .admin-table--sm td { padding: 0.5rem 0.75rem; }
.table-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.row--new { background: rgba(21,101,192,0.05); }
.row--confirmed { background: #FFF8E1; }
.row--assembling { background: #F3E5F5; }
.row--assembled { background: #E8F5E9; }
.row--ready_to_ship { background: #E8EAF6; }
.row--handed_to_courier { background: #FFF3E0; }
.row--waiting_delivery_payment { background: #FFF8E1; }
.row--shipped { background: #E0F7FA; }
.row--delivered td { opacity: 0.6; }
.row--received { background: #E8F8F0; }
.row--returned td { opacity: 0.55; color: #C62828; }
.row--cancelled td { opacity: 0.5; text-decoration: line-through; color: #757575; }

/* ADMIN NAV */
.admin-header { margin-bottom: 2rem; }
.admin-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.admin-nav__link { padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; color: var(--text-light); background: var(--bg); border: 1px solid var(--border); transition: all var(--transition); }
.admin-nav__link:hover { background: var(--primary-light); color: var(--primary-dark); }
.admin-nav__link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.admin-toolbar { margin-bottom: 1.5rem; }
.admin-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.admin-filters select, .admin-filters input { padding: 0.5rem 0.75rem; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; }
.admin-filters input { min-width: 200px; }
.admin-actions { margin-bottom: 2rem; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 4rem 2rem; }

.empty-state h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-light); margin-bottom: 1.5rem; }

/* ERROR PAGE */
.error-page { text-align: center; padding: 4rem 2rem; }
.error-page h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-page p { color: var(--text-light); margin-bottom: 2rem; }

/* CONTENT PAGES */
.content-page { max-width: 700px; }
.content-page h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; color: var(--primary-dark); }
.content-page p { line-height: 1.8; color: var(--text-light); margin-bottom: 1rem; }

/* ==== Profile page ==== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* ==== Auth links ==== */
.auth-card__link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #888;
}
.auth-card__link a { color: var(--primary); text-decoration: none; }
.auth-card__link a:hover { text-decoration: underline; }

/* ==== Delivery calc result ==== */
.delivery-calc {
  background: #f0faf0;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-top: 0.75rem;
  border-left: 3px solid #4caf50;
}
.delivery-calc strong { color: var(--primary-dark); }

/* Disabled table rows */
.row--disabled { opacity: 0.5; }

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { width: 100%; padding-right: 40px; box-sizing: border-box; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: transparent; border: none; outline: none; box-shadow: none; cursor: pointer; color: #aaa; padding: 0; margin: 0; display: flex; align-items: center; -webkit-appearance: none; appearance: none; }
.password-toggle:hover { color: #555; }
.password-toggle:focus { outline: none; box-shadow: none; }

/* Order form sections */
.order-section { border: none; padding: 0; margin: 0 0 2rem 0; }

.order-section__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; padding-bottom: 0.65rem; border-bottom: 2px solid var(--primary-light); width: 100%; }
.form__row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 640px) { .form__row--3 { grid-template-columns: 1fr; } }
.order-check { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-size: 0.92rem; margin-bottom: 0.75rem; line-height: 1.4; }
.order-check input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; accent-color: var(--primary-dark); cursor: pointer; margin: 0; }
.order-check a { color: var(--primary-dark); text-decoration: underline; }
.text-sm { font-size: 0.85rem; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header .page-title { margin-bottom: 0; }

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 380px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
  padding: 1.25rem 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.cookie-banner--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-banner__text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}
.cookie-banner__text a {
  color: var(--primary-dark);
  text-decoration: underline;
  font-weight: 600;
}
.cookie-banner__buttons {
  display: flex;
  gap: 0.5rem;
}
.cookie-banner__btn {
  flex: 1;
  border: none;
  border-radius: 50px;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.cookie-banner__btn--accept {
  background: var(--primary);
  color: #fff;
}
.cookie-banner__btn--accept:hover {
  background: var(--primary-dark);
}
.cookie-banner__btn--decline {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid var(--border);
}
.cookie-banner__btn--decline:hover {
  background: var(--border);
  color: var(--text);
}
@media (max-width: 640px) {
  .cookie-banner {
    bottom: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}

/* PVZ pickup point selector */
/* City autocomplete */
.city-autocomplete { position: relative; }
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.suggestion-item {
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.12s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #f8f5f7; }

/* 4-column row for Yandex fields */
.form__row--4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .form__row--4 { grid-template-columns: repeat(2, 1fr); }
}

.pvz-filter {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.pvz-filter:focus { border-color: #B07BAC; outline: none; box-shadow: 0 0 0 2px rgba(176,123,172,0.2); }
.pvz-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}
.pvz-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.pvz-item:last-child { border-bottom: none; }
.pvz-item:hover { background: #f8f5f7; }
.pvz-item--active { background: #ede0eb; }
.pvz-item--empty, .pvz-item--hint {
  color: #999;
  font-size: 0.85rem;
  cursor: default;
  justify-content: center;
}
.pvz-item__addr { flex: 1; font-size: 0.92rem; }
.pvz-item__time { width: 100%; font-size: 0.8rem; color: #888; }
.pvz-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.pvz-badge--pvz { background: #e8f5e9; color: #388e3c; }
.pvz-badge--postamat { background: #e3f2fd; color: #1565c0; }
.pvz-info {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8f5f7;
  border-radius: 8px;
  border-left: 3px solid #B07BAC;
}
.pvz-info p { margin: 0.25rem 0; }
.text-error { color: #d32f2f; font-size: 0.9rem; margin-top: 0.5rem; }

/* Form hints and examples */
.form__hint {
  font-size: 0.88rem;
  color: #777;
  margin-bottom: 1rem;
  line-height: 1.4;
}
.form__example {
  display: block;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Suggestions dropdown (city search) */
.suggestions-dropdown {
  position: absolute;
  z-index: 100;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
}
.form__group { position: relative; }
.suggestion-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.suggestion-item:hover {
  background: #f0f0f0;
}
.suggestion-item small {
  color: #888;
}

/* ---- Status progression bar (client order) ---- */
.status-progress { margin-bottom: 1.5rem; }
.status-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.status-step__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.status-step--done .status-step__dot {
  background: var(--primary);
  color: #fff;
}
.status-step--active .status-step__dot {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--primary-light);
}
.status-step__label {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.4rem;
  text-align: center;
  max-width: 70px;
}
.status-step--done .status-step__label,
.status-step--active .status-step__label {
  color: var(--text);
  font-weight: 600;
}
.status-step__line {
  flex: 1;
  min-width: 20px;
  max-width: 60px;
  height: 3px;
  background: var(--border);
  margin-bottom: 1.2rem;
  transition: var(--transition);
}
.status-step__line--done {
  background: var(--primary);
}
.status-note {
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Payment method radio buttons */
.delivery-payment-methods { margin: 1.25rem 0; }
.delivery-payment-methods .form__label { font-weight: 600; margin-bottom: 0.75rem; display: block; }
.payment-option { margin-bottom: 0.5rem; }
.payment-radio { display: flex; align-items: flex-start; cursor: pointer; }
.payment-radio input[type="radio"] { margin-top: 0.35rem; margin-right: 0.75rem; accent-color: #B07BAC; width: 18px; height: 18px; flex-shrink: 0; }
.payment-radio__body { display: flex; flex-direction: column; flex: 1; padding: 0.75rem 1rem; border: 2px solid #e8e0e6; border-radius: 10px; transition: border-color 0.2s, background 0.2s; }
.payment-radio input[type="radio"]:checked + .payment-radio__body { border-color: #B07BAC; background: #faf5f9; }
.payment-radio__title { font-weight: 600; font-size: 0.95rem; color: #333; }
.payment-radio__price { font-weight: 700; font-size: 1.05rem; color: #B07BAC; margin-top: 0.2rem; }
.payment-radio__desc { font-size: 0.82rem; color: #888; margin-top: 0.2rem; }

/* ===== AUDIO PLAYER (client chat) ===== */
.msg__audio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
  padding: 0.15rem 0;
}
.msg__audio-play {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.msg__audio-play:hover { opacity: 0.85; }
.msg__audio-wave {
  flex: 1;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  position: relative;
  min-width: 80px;
}
.msg__audio-progress {
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
}
.msg__audio-dur {
  font-size: 0.7rem;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 28px;
}

/* ===== MESSAGE META ===== */
.msg__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: flex-end;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

/* ===== MESSAGE ACTIONS (edit/delete) ===== */
.msg__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.4rem;
  opacity: 0;
  transition: opacity .15s ease;
}
.msg:hover .msg__actions { opacity: 1; }
.msg__action-btn {
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.msg__action-btn:hover { background: rgba(0,0,0,0.08); color: #111827; }
.msg__delete-btn:hover { background: rgba(220,38,38,0.1); color: #b91c1c; }
.msg__action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Edited tag + edited text area */
.msg__edited-tag {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-left: 0.3rem;
  font-style: italic;
}
.msg__edit-area {
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.4;
  border: 1px solid #c9ccd1;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  resize: vertical;
  background: #fff;
  color: #111827;
  margin-top: 0.2rem;
}
.msg__edit-area:focus { outline: 2px solid var(--primary); outline-offset: -2px; }
.msg__edit-toolbar {
  display: flex;
  align-items: center;
  margin-top: 0.35rem;
}

/* ===== READ RECEIPTS ===== */
.msg__read-status {
  display: inline-flex;
  align-items: center;
  color: #aaa;
}
.msg__read-status--read {
  color: var(--primary);
}

/* ===== ONLINE DOT ===== */
.chat-online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  transition: background 0.2s;
}
.chat-online-dot--on {
  background: #4CAF50;
}

/* ===== MIC BUTTON (client) ===== */
.messenger--client .messenger__mic {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.messenger--client .messenger__mic:hover { color: var(--primary); }

/* ===== VOICE RECORDER (client) ===== */
.messenger--client .messenger__voice-rec {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-top: 1.5px solid var(--border);
  background: #FFF5F5;
}
.voice-rec__wave {
  flex: 1;
  height: 20px;
  background: repeating-linear-gradient(90deg, #E57373 0px, #E57373 2px, transparent 2px, transparent 5px);
  border-radius: 4px;
  animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.voice-rec__time {
  font-size: 0.85rem;
  font-weight: 600;
  color: #E53935;
  min-width: 35px;
}
.voice-rec__cancel {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #999;
  padding: 0.25rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.voice-rec__cancel:hover { color: #E53935; background: #FFEBEE; }
.voice-rec__send {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.15s;
}
.voice-rec__send:hover { opacity: 0.85; }

/* ===== TYPING INDICATOR (client) ===== */
.messenger--client .messenger__typing {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 1.25rem 0.35rem;
  font-size: 0.75rem;
  color: var(--text-light);
}
.typing-dots {
  display: inline-flex;
  gap: 3px;
}
.typing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* ===== MOBILE RESPONSIVE FIXES ===== */
@media (max-width: 480px) {
  /* Status stepper: compact on small screens */
  .status-steps {
    gap: 0;
    padding: 0.75rem 0;
  }
  .status-step { min-width: 44px; }
  .status-step__dot { width: 26px; height: 26px; font-size: 0.7rem; }
  .status-step__label { font-size: 0.6rem; max-width: 50px; }
  .status-step__line { min-width: 10px; max-width: 30px; margin-bottom: 1rem; }

  /* Client chat: msg bubble wider on mobile */
  .msg__bubble { max-width: 88%; }
  .msg__photo { max-width: 100%; max-height: 180px; }
  .msg__audio { min-width: 140px; }

  /* Client chat input: tighter spacing */
  .messenger--client .messenger__input {
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
  }
  .messenger--client .messenger__input textarea {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
  }

  /* Voice recorder: tighter on mobile */
  .messenger--client .messenger__voice-rec {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  /* Detail cards */
  .detail-card { padding: 1rem; }
  .detail-card h3 { font-size: 0.95rem; }
  .detail-list { gap: 0.3rem 0.75rem; }
  .detail-list dt { font-size: 0.8rem; }
  .detail-list dd { font-size: 0.88rem; }

  /* Order header */
  .order-detail__header h1 { font-size: 1.2rem; }

  /* Order page container */
  .page-container { padding: 1rem 0.5rem; }

  /* Messenger client block */
  .messenger--client .messenger__thread-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }
  .messenger--client .messenger__messages {
    padding: 0.75rem;
    min-height: 250px;
    max-height: 400px;
  }

  /* Orders grid */
  .orders-grid { grid-template-columns: 1fr; gap: 0.75rem; }
}

@media (max-width: 360px) {
  /* Very small phones */
  .status-step { min-width: 36px; }
  .status-step__dot { width: 22px; height: 22px; font-size: 0.65rem; }
  .status-step__label { font-size: 0.55rem; max-width: 40px; }
  .status-step__line { min-width: 6px; max-width: 20px; }
  .msg__bubble { max-width: 92%; }

  .header__logo { font-size: 0.95rem; }
}

/* ===== PHOTO LIGHTBOX ===== */
.photo-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  object-fit: contain;
}
.photo-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.photo-lightbox__close:hover { opacity: 1; }

/* Payment error banner */
.payment-error-banner {
  background: #fff3f3;
  border: 2px solid #e74c3c;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  animation: bannerShake 0.5s ease;
}
.payment-error-banner__icon { font-size: 3rem; margin-bottom: 0.5rem; }
.payment-error-banner__title { font-size: 1.5rem; font-weight: 700; color: #c0392b; margin-bottom: 0.75rem; }
.payment-error-banner__text { font-size: 1rem; color: #333; line-height: 1.7; margin-bottom: 1.25rem; text-align: left; max-width: 500px; margin-left: auto; margin-right: auto; }
@keyframes bannerShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Shared confirmation dialog */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.4);
}
.modal-overlay.open { display: flex; }
.modal-overlay .modal {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.confirm-modal .modal { max-width: 420px; text-align: center; }
.confirm-modal__icon { display: flex; justify-content: center; margin-bottom: 0.75rem; }
.confirm-modal__icon svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.confirm-modal__title { margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 700; }
.confirm-modal__text { margin-bottom: 1.5rem; color: var(--text-light); }
.confirm-modal__actions { display: flex; justify-content: center; gap: 0.75rem; }
.confirm-modal__actions .btn { min-width: 120px; }

@media (max-width: 640px) {
  .header__burger,
  .header__link,
  .btn,
  button,
  input[type="checkbox"],
  input[type="radio"],
  .messenger__attach,
  .messenger__mic,
  .messenger__send,
  .voice-rec__cancel,
  .voice-rec__send { min-width: 44px; min-height: 44px; }
  .confirm-modal__actions { flex-direction: column-reverse; }
  .confirm-modal__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* === 2026-04 PUBLIC RESPONSIVE IMPROVEMENTS === */
@media (max-width: 768px) {
  .container, .page-container { padding-left: 0.75rem; padding-right: 0.75rem; }
  .btn, button.btn { min-height: 40px; }
  /* Поля ввода — крупнее на мобиле для комфортного ввода */
  input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
    font-size: 16px; /* предотвращает зум iOS */
    min-height: 44px;
    padding: 0.6rem 0.75rem;
  }
  textarea { min-height: 80px; }
  /* Заголовки */
  .page-title { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .page-title { font-size: 1.3rem; }
  .hero h1, .hero__title { font-size: 1.6rem !important; line-height: 1.2; }
}

/* === 2026-04 FIXED-HEADER OFFSET (mobile only) === */
/* На десктопе у публичных страниц уже есть .page-container (padding-top: 5rem),
   а у админки заголовки уходят ниже навигации — отступ не нужен.
   На телефоне же контент уезжал под шапку — компенсируем. */
@media (max-width: 768px) {
  body { padding-top: 64px; }
  .page-container { padding-top: 1.5rem; } /* публичные страницы — убираем дубль */
}
:target { scroll-margin-top: 80px; }

/* === System accessibility and mobile baseline === */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 20000;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: #111;
  color: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #6a1b9a;
  outline-offset: 3px;
}
body.modal-open { overflow: hidden; }
.modal__close,
.photo-lightbox__close,
.messenger__mic,
.messenger__send,
.messenger__attach,
.voice-rec__cancel,
.voice-rec__send { min-width: 44px; min-height: 44px; }
.field-error { color: #b42318; font-size: 0.8rem; margin-top: 0.25rem; }
[aria-invalid="true"] { border-color: #b42318 !important; }
@media (max-width: 640px) {
  .form__row,
  .form__row--2,
  .form__row--3,
  .form__row--4,
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .btn,
  button,
  [role="button"] { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === 2026-04 LANDING: fix white stripe above hero on mobile === */
@media (max-width: 768px) {
  .hero { margin-top: -64px; padding-top: 8rem; }
}
}
