﻿/* =========================
   FlowerLine Auth
   ========================= */


html{
  overflow-y:auto;
  margin:0 !important;
  padding:0 !important;
  background:
    linear-gradient(135deg, #f4e9df 0%, #f8f1ea 48%, #ead8cb 100%);
}

:root{
  --text: #6f5d5a;
  --muted: rgba(111,93,90,.65);

  --vanilla: #f6efe6;
  --vanilla2: #f3e8dc;

  --card: rgba(246,239,230,.78);
  --stroke: rgba(111,93,90,.18);

  --card-shadow: 0 26px 70px rgba(0,0,0,.18);
  --radius: 34px;
}

*{
  box-sizing:border-box;
}

html,
body{
  min-height:100%;
  overflow-x:hidden;
}

body{
  margin:0;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 50% 20%, rgba(255,255,255,.55), transparent 62%),
    linear-gradient(180deg, var(--vanilla), var(--vanilla2));
  position:relative;
}

/* =========================
   Auth layout
   ========================= */

.auth-wrap{
  min-height:calc(100vh - 120px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 0;
  position:relative;
  overflow:hidden;
  z-index:1;
}

.auth-card{
  width:min(520px, 92vw);
  padding:34px 28px 26px;
  border-radius:var(--radius);
  background:var(--card);
  border:1px solid var(--stroke);
  box-shadow:var(--card-shadow);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  position:relative;
  z-index:2;
}

.auth-title{
  text-align:center;
  font-family:Georgia, "Times New Roman", serif;
  font-size:44px;
  letter-spacing:.4px;
  margin:0 0 18px;
  color:rgba(111,93,90,.9);
}

.auth-subtitle{
  text-align:center;
  margin:-6px 0 14px;
  font-size:14px;
  color:rgba(111,93,90,.65);
}

.auth-form{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:6px 10px 0;
}

.auth-message{
  margin:0 10px 12px;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  line-height:1.35;
  text-align:center;
  border:1px solid rgba(111,93,90,.14);
  background:rgba(255,255,255,.46);
}

.auth-message--ok{
  color:#6f5d5a;
}

.auth-message--error{
  color:#b95d65;
  border-color:rgba(185,93,101,.22);
  background:rgba(255,246,246,.56);
}

.auth-phone-note,
.auth-test-code{
  text-align:center;
  color:rgba(111,93,90,.72);
  font-size:14px;
}

.auth-test-code{
  margin-top:14px;
}

.input-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(111,93,90,.12);
  box-shadow:0 10px 20px rgba(0,0,0,.06);
  transition:border-color .18s ease, box-shadow .18s ease;
}

.input-row input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  font-size:18px;
  color:var(--text);
}

.input-row input::placeholder{
  color:rgba(111,93,90,.55);
}

.input-row:focus-within{
  border-color:rgba(111,93,90,.28);
  box-shadow:0 14px 26px rgba(0,0,0,.10);
}

.tg-actions{
  width:100%;
  margin-top:12px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.auth-inline-form{
  display:flex;
  justify-content:center;
  margin-top:10px;
}

.auth-link-btn{
  border:0;
  border-bottom:1px dashed rgba(111,93,90,.38);
  background:transparent;
  color:rgba(111,93,90,.78);
  padding:0 0 3px;
  font:inherit;
  font-size:14px;
  cursor:pointer;
}

.auth-link-btn:hover{
  color:rgba(111,93,90,.96);
  border-color:rgba(111,93,90,.66);
}

.auth-link-btn:disabled{
  opacity:.48;
  cursor:not-allowed;
  color:rgba(79,64,59,.56);
  border-color:rgba(111,93,90,.22);
}

.auth-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:min(340px, 100%);
  height:56px;
  margin-top:8px;
  margin-left:auto;
  margin-right:auto;
  border-radius:18px;
  text-decoration:none;
  cursor:pointer;
  color:rgba(111,93,90,.92);
  font-size:18px;
  font-weight:650;
  letter-spacing:.2px;
  background:var(--card);
  border:1px solid rgba(111,93,90,.18);
  box-shadow:0 14px 28px rgba(0,0,0,.18);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-align:center;
}

.auth-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(111,93,90,.30);
  box-shadow:0 18px 34px rgba(0,0,0,.22);
  filter:brightness(1.01);
}

.auth-btn:active{
  transform:translateY(0) scale(.99);
}

.auth-links{
  margin-top:14px;
  text-align:center;
  font-size:15px;
  color:var(--muted);
}

.auth-links a{
  color:rgba(111,93,90,.92);
  text-decoration:none;
  font-weight:500;
}

.auth-links a:hover{
  text-decoration:underline;
}

.auth-topbar{
  text-align:center;
  margin-top:10px;
  font-size:14px;
  color:rgba(111,93,90,.65);
}

/* =========================
   Background flowers
   ========================= */

body::before,
body::after{
  content:"";
  position:fixed;
  background-repeat:no-repeat;
  background-size:contain;
  opacity:.6;
  pointer-events:none;
  z-index:0;
}

body::before{
  left:-140px;
  bottom:-450px;
  width:1000px;
  height:1000px;
  background-image:url("../images/downleft.png");
}

body::after{
  right:-190px;
  bottom:-500px;
  width:1200px;
  height:1200px;
  background-image:url("../images/downright.png");
}

.auth-corner,
[class*="cornerleft"],
[class*="cornerright"],
[class*="decoradmin"],
[class*="leftauth"],
[class*="flora"]{
  display:none !important;
}

.auth-wrap,
.auth-card{
  position:relative;
  z-index:2;
}

@media (max-width:900px){
  body::before,
  body::after{
    width:360px;
    height:360px;
  }
}

@media (max-width:640px){
  .auth-wrap{
    min-height:calc(100vh - 100px);
    padding:20px 12px;
  }

  .auth-card{
    width:min(100%, 94vw);
    padding:26px 18px 22px;
    border-radius:24px;
  }

  .auth-title{
    font-size:34px;
    margin-bottom:14px;
  }

  .auth-subtitle{
    font-size:13px;
  }

  .auth-btn{
    height:52px;
    font-size:16px;
  }
}

/* =========================
   Customer phone auth
   ========================= */

body.auth-page,
body.admin-auth{
  width:100%;
  min-width:100%;
  min-height:100vh;
  background:#f4efe7;
  font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html:has(body.auth-page),
html:has(body.admin-auth){
  overflow-x:hidden;
  overflow-y:scroll !important;
  scrollbar-gutter:stable;
  background-color:#f4efe7 !important;
  background-image:
    linear-gradient(180deg,rgba(255,255,255,.68),rgba(246,239,231,.84)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132' viewBox='0 0 132 132'%3E%3Cg fill='none' stroke='%23c9966e' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round' opacity='.95'%3E%3Cpath d='M66 0 132 66 66 132 0 66Z'/%3E%3Cpath d='M66 14 118 66 66 118 14 66Z' opacity='.72'/%3E%3Cpath d='M0 66 66 0 132 66' opacity='.46'/%3E%3Cpath d='M0 66 66 132 132 66' opacity='.38'/%3E%3Cpath d='M66 28 104 66 66 104 28 66Z' opacity='.28'/%3E%3Cpath d='M66 56 70 66 66 76 62 66Z' opacity='.9'/%3E%3Cpath d='M56 66 66 62 76 66 66 70Z' opacity='.9'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-repeat:repeat,repeat !important;
  background-size:auto,132px 132px !important;
  background-position:center top,center top !important;
}

body.admin-auth{
  width:100%;
  min-width:100%;
  overflow-y:visible;
  scrollbar-gutter:auto;
}

body.auth-page{
  overflow-y:visible;
  scrollbar-gutter:auto;
}

body.auth-page,
body.admin-auth{
  min-height:100dvh;
  background:transparent !important;
}

body.auth-page .site-header,
body.admin-auth .site-header{
  width:100%;
  max-width:100%;
}

body.auth-page::before,
body.admin-auth::before{
  content:none !important;
  display:none !important;
  background-image:none !important;
}

body.auth-page::after,
body.admin-auth::after{
  content:none !important;
  display:none !important;
  background-image:none !important;
}

body.auth-page .auth-corner,
body.admin-auth .auth-corner{
  display:none !important;
}

body.auth-page .auth-wrap,
body.admin-auth .auth-wrap{
  width:100%;
  min-height:calc(100dvh - var(--site-header-h,154px));
  padding:34px 16px 44px;
  background:transparent !important;
}

body.admin-auth .auth-wrap{
  padding:24px 16px;
}

body.auth-page .auth-card,
body.admin-auth .auth-card{
  width:min(430px, calc(100vw - 28px));
  min-height:auto;
  padding:38px 38px 34px;
  border-radius:24px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(126,105,100,.12);
  box-shadow:0 26px 72px rgba(90,62,48,.16);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
}

body.auth-page .auth-title,
body.admin-auth .auth-title{
  margin:0 0 10px;
  color:#342521;
  font-family:"Playfair Display", Georgia, serif;
  font-size:32px;
  font-weight:500;
  line-height:1;
}

body.auth-page .auth-subtitle,
body.admin-auth .auth-subtitle{
  margin:0 0 24px;
  color:rgba(69,55,50,.68);
  font-size:12px;
  font-weight:400;
  line-height:1.35;
}

body.auth-page .auth-form,
body.admin-auth .auth-form{
  gap:14px;
  padding:0;
}

body.auth-page .auth-message{
  margin:0 0 14px;
  background:rgba(255,255,255,.42);
  border-color:rgba(126,105,100,.16);
}

.auth-phone-field,
.auth-code-field{
  width:100%;
  min-height:52px;
  display:grid;
  grid-template-columns:90px 1fr;
  border:1px solid rgba(126,105,100,.30);
  border-radius:10px;
  background:rgba(255,255,255,.22);
  overflow:hidden;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42);
}

.auth-phone-field.is-locked{
  opacity:.58;
}

.auth-phone-field.is-locked input{
  cursor:default;
}

.auth-phone-prefix{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-width:0;
  border-right:1px solid rgba(126,105,100,.18);
  color:#43332f;
  font-size:14px;
  font-weight:500;
}

.auth-phone-flag{
  width:22px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  font-size:15px;
  line-height:1;
  border-radius:2px;
}

.auth-phone-input-wrap{
  min-width:0;
  display:flex;
  align-items:center;
}

.auth-phone-input-wrap input,
.auth-code-field input{
  width:100%;
  height:100%;
  min-height:50px;
  border:0;
  outline:0;
  background:transparent;
  color:#3d302c;
  font:inherit;
  font-size:16px;
  font-weight:400;
  padding:0 18px;
}

.auth-phone-input-wrap input::placeholder,
.auth-code-field input::placeholder{
  color:rgba(69,55,50,.36);
}

.auth-code-field{
  display:flex;
  grid-template-columns:none;
}

.auth-field-error{
  min-height:18px;
  margin-top:-10px;
  color:#b95d65;
  font-size:12px;
  line-height:1.2;
  opacity:0;
}

.auth-field-error--hidden{
  display:none;
}

.auth-code-form{
  margin-top:6px;
}

.auth-field-error.is-visible{
  opacity:1;
}

body.auth-page .auth-btn,
body.admin-auth .auth-btn{
  width:100%;
  height:50px;
  margin:0;
  border-radius:10px;
  border:0;
  background:linear-gradient(180deg, rgba(236,221,211,.88), rgba(226,209,199,.88));
  color:#5b4842;
  box-shadow:none;
  font-size:15px;
  font-weight:600;
}

body.auth-page .auth-btn:hover,
body.admin-auth .auth-btn:hover{
  transform:none;
  box-shadow:none;
  filter:brightness(1.01);
}

.auth-separator{
  margin:26px auto 28px;
  width:178px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:14px;
  color:rgba(69,55,50,.52);
  font-size:12px;
  font-weight:500;
}

.auth-separator span{
  height:1px;
  background:rgba(126,105,100,.15);
}

.auth-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:48px;
  width:220px;
  margin:0 auto;
}

.auth-actions--triple{
  grid-template-columns:repeat(3, 1fr);
  gap:26px;
  width:320px;
}

.auth-action-form{
  margin:0;
  padding:0;
  display:flex;
  justify-content:center;
}

.auth-action{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:#4f403b;
  font-size:14px;
  font-weight:500;
  line-height:1.18;
  text-align:center;
}

.auth-action--button{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  font-family:inherit;
}

.auth-action__circle{
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(126,105,100,.17);
  background:rgba(255,255,255,.36);
  box-shadow:0 8px 18px rgba(90,62,48,.08);
}

.auth-action__circle svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:#3f312d;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.auth-action__circle .auth-phone-action-icon{
  width:21px;
  height:21px;
  stroke-width:1.35;
}

body.auth-page .auth-phone-note{
  margin-bottom:-4px;
}

body.auth-page .auth-inline-form,
body.admin-auth .auth-inline-form{
  margin-top:9px;
}

body.auth-page .auth-resend-code-form{
  margin-top:8px;
}

body.auth-page .auth-change-phone-form{
  margin-top:4px;
  margin-bottom:8px;
}

body.auth-page .auth-link-btn{
  color:rgba(79,64,59,.72);
}

body.auth-page .auth-test-code,
body.auth-page .auth-links{
  display:none;
}

body.admin-auth .auth-error{
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  line-height:1.35;
  text-align:center;
  color:#b95d65;
  border:1px solid rgba(185,93,101,.22);
  background:rgba(255,246,246,.56);
}

body.admin-auth .auth-field{
  text-align:left;
}

body.admin-auth .auth-subtitle{
  margin-bottom:16px;
}

body.admin-auth .auth-form{
  gap:11px;
}

body.admin-auth .field-label{
  margin:0 0 8px;
  padding:0;
  color:rgba(69,55,50,.68);
  font-size:12px;
  font-weight:400;
}

body.admin-auth .input-row{
  min-height:52px;
  padding:0 18px;
  border:1px solid rgba(126,105,100,.30);
  border-radius:10px;
  background:rgba(255,255,255,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42);
}

body.admin-auth .input-icon{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

body.admin-auth .input-icon svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:rgba(79,64,59,.58);
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
}

body.admin-auth .input-row--plain{
  justify-content:center;
}

body.admin-auth .input-row:focus-within{
  border-color:rgba(126,105,100,.42);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42);
}

body.admin-auth .input-row input{
  height:50px;
  color:#3d302c;
  font:inherit;
  font-size:16px;
  font-weight:400;
}

body.admin-auth .input-row input::placeholder{
  color:rgba(69,55,50,.36);
}

body.admin-auth .hint,
body.admin-auth .step-note,
body.admin-auth .resend-hint{
  color:rgba(69,55,50,.62);
  font-size:12px;
  line-height:1.35;
}

body.admin-auth .hint{
  margin-top:-3px;
}

body.admin-auth .step-note{
  margin:4px 0 -1px;
}

body.admin-auth .resend-form{
  margin-top:7px;
}

body.admin-auth .resend-hint{
  margin-top:4px;
}

body.admin-auth .tg-link,
body.admin-auth .resend-link{
  color:rgba(79,64,59,.72);
  text-decoration:none;
  border-bottom:1px dashed rgba(111,93,90,.38);
}

body.admin-auth .check-row{
  justify-content:center;
  color:rgba(69,55,50,.64);
  font-size:12px;
  line-height:1.35;
}

@media (max-width:520px){
  body.auth-page .auth-wrap,
  body.admin-auth .auth-wrap{
    min-height:calc(100vh - 138px);
    padding:24px 12px 32px;
  }

  body.auth-page .auth-card,
  body.admin-auth .auth-card{
    min-height:auto;
    padding:32px 22px 28px;
    border-radius:22px;
  }

  .auth-phone-field{
    grid-template-columns:82px 1fr;
  }

  .auth-actions{
    width:210px;
    gap:34px;
  }

  .auth-actions--triple{
    width:100%;
    max-width:300px;
    gap:18px;
  }
}
