/* ======================================================================
   Login — two styles in one stylesheet.
   1) .login-super-*  : plain SUPER_ADMIN login (apex domain, no branding)
   2) .login-lc-*     : branded per-LC login (subdomain, with banner/logo)
   Shared: .login-error, .login-field
   ====================================================================== */

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* =======================================================================
   1) SUPER_ADMIN — plain login
   ======================================================================= */

.login-super-body {
  background: #f5f6fa;
  min-height: 100vh;
}

.login-super-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-super-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
}

.login-super-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 24px;
  text-align: center;
  letter-spacing: 0.3px;
}

.login-subtitle {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  margin: 0 0 24px;
}

.login-subtitle code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.login-super-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-field input:focus {
  outline: none;
  border-color: #1a1a2e;
  box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.login-super-btn {
  width: 100%;
  margin-top: 6px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #1a1a2e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.login-super-btn:hover { background: #0f0f1e; }
.login-super-btn:active { transform: scale(0.99); }

/* =======================================================================
   2) LC — branded login (per-tenant subdomain)
   ======================================================================= */

.login-lc-body {
  background: #f4efe9;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-lc-shell {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* -- Decorative geometric banner ---------------------------------------- */
.login-lc-banner {
  position: relative;
  height: 150px;
  border-radius: 14px;
  overflow: hidden;
  background: #cac5b8;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.02);
}

.banner-shape {
  position: absolute;
  transform-origin: center;
}

/* Yellow diagonal top-left */
.shape-yellow {
  top: 0;
  left: 0;
  width: 34%;
  height: 55%;
  background: #f0c93a;
  clip-path: polygon(0 0, 100% 0, 60% 100%, 0 60%);
}

/* Grey center block */
.shape-grey {
  top: 0;
  left: 22%;
  width: 40%;
  height: 100%;
  background: #4d4d4d;
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
}

/* Orange bottom-left wedge */
.shape-orange {
  bottom: 0;
  left: 0;
  width: 28%;
  height: 60%;
  background: #ef7d36;
  clip-path: polygon(0 40%, 100% 100%, 0 100%);
}

/* Teal center */
.shape-teal {
  bottom: 0;
  left: 32%;
  width: 26%;
  height: 70%;
  background: #2a9aa3;
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

/* Green right block */
.shape-green {
  top: 0;
  right: 10%;
  width: 36%;
  height: 100%;
  background: #87b93c;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}

/* Red top-right corner */
.shape-red {
  top: 0;
  right: 0;
  width: 14%;
  height: 60%;
  background: #c94a3a;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* -- Card with logo + form --------------------------------------------- */
.login-lc-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #fff;
  border-radius: 14px;
  min-height: 300px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  padding: 28px;
  gap: 24px;
  align-items: stretch;
}

/* Left: logo block */
.login-lc-logo {
  background: #f4e6f5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.logo-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-bag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.2px;
}

.logo-tag {
  font-size: 9px;
  color: #6b7280;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Right: form column */
.login-lc-body-col {
  display: flex;
  flex-direction: column;
  padding: 4px 4px 4px 12px;
}

.login-lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.login-lc-title {
  font-size: 22px;
  font-weight: 500;
  color: #1a1a2e;
  margin: 0;
}

/* Language tabs */
.lang-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.lang-tab {
  background: none;
  border: none;
  padding: 2px 6px;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.lang-tab.active {
  color: #1a1a2e;
  font-weight: 600;
}

.lang-tab:hover {
  color: #1a1a2e;
}

.lang-sep {
  width: 1px;
  height: 14px;
  background: #d1d5db;
}

/* Form */
.login-lc-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-lc-field label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.login-lc-field .required { color: #e11d48; margin-left: 2px; }

/* Phone input with +998 prefix */
.phone-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.phone-input-wrap:focus-within {
  border-color: #ef7d36;
  box-shadow: 0 0 0 3px rgba(239, 125, 54, 0.12);
}

.phone-prefix {
  padding: 10px 12px;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.phone-input-wrap input[type="tel"] {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  background: transparent;
  color: #111827;
  font-family: inherit;
}

/* Password input with eye toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  flex: 1;
  padding: 10px 40px 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.password-input-wrap input:focus {
  outline: none;
  border-color: #ef7d36;
  box-shadow: 0 0 0 3px rgba(239, 125, 54, 0.12);
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover { color: #1a1a2e; }

/* Orange pill LOGIN button */
.login-lc-btn {
  align-self: flex-start;
  margin-top: 6px;
  padding: 12px 44px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: #ef7d36;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(239, 125, 54, 0.3);
}

.login-lc-btn:hover { background: #e56a1f; }
.login-lc-btn:active { transform: scale(0.98); }

/* -- Mobile ------------------------------------------------------------ */
@media (max-width: 600px) {
  .login-lc-banner { height: 110px; }
  .login-lc-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .login-lc-logo {
    padding: 24px;
  }
  .login-lc-body-col {
    padding: 0;
  }
  .login-lc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .login-lc-btn {
    align-self: stretch;
    text-align: center;
  }
}
