:root {
  --web-green: #18533f;
  --web-green-dark: #123e31;
  --web-bg: #eef4f1;
  --web-line: #dbe7e1;
  --web-text: #142b25;
  --web-muted: #6d7f79;
}

.web-auth-body {
  min-height: 100%;
  margin: 0;
  color: var(--web-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.92), transparent 30rem),
    linear-gradient(145deg, #edf4f0, #d9e6df);
  font-family: Arial, Helvetica, sans-serif;
}

.web-auth-shell {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
}

.web-auth-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(24,83,63,.14);
}

.web-auth-logo {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 14px;
  border-radius: 20px;
  object-fit: cover;
}

.web-auth-brand {
  text-align: center;
  color: var(--web-green-dark);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.035em;
}

.web-auth-subtitle {
  margin: 8px auto 24px;
  max-width: 320px;
  text-align: center;
  color: var(--web-muted);
  font-size: 14px;
  line-height: 1.45;
}

.web-auth-form {
  display: grid;
  gap: 15px;
}

.web-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--web-text);
  font-size: 13px;
  font-weight: 700;
}

.web-auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--web-line);
  border-radius: 13px;
  outline: none;
  color: var(--web-text);
  background: #fff;
  font-size: 16px;
}

.web-auth-form input:focus {
  border-color: #78a994;
  box-shadow: 0 0 0 3px rgba(24,83,63,.08);
}

.web-auth-primary {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #246e54, #123e31);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.web-auth-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #efc8c5;
  border-radius: 12px;
  color: #8d322d;
  background: #fff3f2;
  font-size: 13px;
  line-height: 1.4;
}

.web-auth-switch,
.web-auth-note {
  margin: 18px 0 0;
  text-align: center;
  color: var(--web-muted);
  font-size: 13px;
  line-height: 1.45;
}

.web-auth-switch a {
  color: var(--web-green);
  font-weight: 800;
  text-decoration: none;
}

.web-auth-note {
  font-size: 12px;
}

.web-client .telegram-phone-button {
  display: none !important;
}

.web-logout-form {
  position: fixed;
  top: 18px;
  right: max(70px, calc((100vw - 450px) / 2 + 70px));
  z-index: 1000;
  margin: 0;
}

.web-logout-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(20,43,37,.12);
  border-radius: 10px;
  color: #315c4c;
  background: rgba(255,255,255,.90);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

@media (max-width: 520px) {
  .web-auth-shell { padding: 16px; }
  .web-auth-card { padding: 24px 20px; border-radius: 22px; }
  .web-logout-form { top: max(14px, calc(env(safe-area-inset-top) + 8px)); right: 70px; }
}

/* BEGIN BAi AgroWork PWA PUSH 1.0C — production UI */
.web-push-controls {
  position: fixed;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 2200;
  max-width: min(320px, calc(100vw - 24px));
  font: inherit;
}

.web-push-controls[hidden],
.web-push-controls [hidden] {
  display: none !important;
}

.web-push-primary {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid #18533f;
  padding: 9px 13px;
  background: #18533f;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
}

.web-push-message {
  margin-top: 7px;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  font-size: 13px;
  line-height: 1.35;
  color: #303b37;
}

@media (max-width: 640px) {
  .web-push-controls {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 20px);
  }
}
/* END BAi AgroWork PWA PUSH 1.0C — production UI */


/* BAI_WEB_TELEGRAM_ICON_FIX_1_0A */
.web-telegram-link-button {
  position: fixed;
  top: 12px;
  right: 82px;
  z-index: 1000;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: #229ed9;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.3);
  -webkit-tap-highlight-color: transparent;
}

.web-telegram-link-button:hover {
  background: #178bc2;
  color: #ffffff;
  text-decoration: none;
}

.web-telegram-link-button:active {
  transform: scale(0.96);
}

.web-telegram-link-button:focus-visible {
  outline: 3px solid rgba(34, 158, 217, 0.3);
  outline-offset: 3px;
}

.web-telegram-link-button svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.web-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 480px) {
  .web-telegram-link-button {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 76px;
    width: 38px;
    height: 38px;
  }

  .web-telegram-link-button svg {
    width: 22px;
    height: 22px;
  }
}


/* BAI_WEB_HEADER_ROW_FIX_1_0B */
body.web-client .app-header { gap: 10px; }
body.web-client .app-header .brand { min-width: 0; margin-right: auto; }
body.web-client .app-header .web-logout-form {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: auto !important;
  flex: 0 0 auto;
}
body.web-client .app-header .web-logout-button {
  height: 48px;
  min-width: 0;
  padding: 0 14px;
  margin: 0;
  border-radius: 16px;
  font-size: 16px;
  white-space: nowrap;
}
@media (max-width: 560px) {
  body.web-client .app-header { gap: 6px; padding-left: 12px; padding-right: 12px; }
  body.web-client .app-header .brand { gap: 8px; }
  body.web-client .app-header .brand > div:last-child span { display: none; }
  body.web-client .app-header .brand > div:last-child strong { font-size: 18px; white-space: nowrap; }
  body.web-client .app-header .brand-mark { width: 42px; height: 42px; flex: 0 0 42px; }
  body.web-client .app-header .icon-button { width: 42px; height: 42px; flex: 0 0 42px; }
  body.web-client .app-header .web-logout-button { height: 42px; padding: 0 10px; border-radius: 14px; font-size: 14px; }
}
@media (max-width: 380px) {
  body.web-client .app-header { gap: 4px; padding-left: 9px; padding-right: 9px; }
  body.web-client .app-header .brand > div:last-child strong { font-size: 16px; }
  body.web-client .app-header .icon-button { width: 40px; height: 40px; flex-basis: 40px; }
  body.web-client .app-header .web-logout-button { height: 40px; padding: 0 8px; font-size: 13px; }
}
