/* ===== auth/login.php styles ===== */

/* =========================
   Page Background + Centering
   ========================= */

   :root{
    --brand: #8a522d;
    --brand-dark: #744221;
    --glass-bg: rgba(255,255,255,0.18);
    --glass-border: rgba(255,255,255,0.28);
    --text-on-glass: rgba(255,255,255,0.92);
    --shadow: 0 18px 45px rgba(0,0,0,0.28);
  }
  
  /* یک کانتینر تمام‌صفحه تا تداخل‌های style.css نتوانند مرکزچین را خراب کنند */
  body{
    min-height: 100svh;
    display: block;
    padding: 24px 14px;
    box-sizing: border-box;
  
    background-color: var(--bg-main, #f1eada);
    background-image: none;
    position: relative;
    isolation: isolate;
   
  }
  
  /* overlay برای افزایش خوانایی روی پس‌زمینه */
body::before{
  content: none;
}
  
  /* =========================
     Card (Glass)
     ========================= */
  
  .app-wrapper{
    width: 100%;
    display: grid;
    place-items: center;
  }

  .site-navbar{
    margin-top: 0;
    margin-bottom: 18px;
  }
  
  .main-card{
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 26px 22px;
    border-radius: 18px;
  
    background-color: #f1eada;
    background-image: url("../img/background.png") !important;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: auto 600px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
  
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .auth-hero{
    height: 300px;
  }

  .registration-sms-note{
    margin: 10px 0 4px;
    padding: 10px 12px;
    border: 1px solid rgba(138,82,45,.24);
    border-radius: 10px;
    background: rgba(255,255,255,.82);
    color: #6b4b33;
    text-align: center;
    line-height: 1.8;
    font-size: .82rem;
  }
  
  /* =========================
     Tabs
     ========================= */
  
  .tabs-header{
    width: 100%;
    max-width: 435px;
    margin: 0 auto 18px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.28);
  }
  
  .tab-btn{
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    color: #444;
    background: rgba(255,255,255,.7);
    border: 0;
    border-radius: 10px;
    border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease, transform .15s ease;
  }
  
  .tab-btn:hover{ transform: translateY(-1px); }
  
  .tab-btn.active{
    color: #fff;
    background: var(--brand);
    border-bottom-color: var(--brand);
  }

  .login-error{
    margin: 0 auto 14px;
    max-width: 435px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(253, 234, 234, .9);
    color: #8a1f1f;
    text-align: center;
    line-height: 1.9;
    font-size: .82rem;
  }

  .login-error a{
    color: #744221;
    font-weight: 800;
    text-decoration: underline;
  }
  
  /* =========================
     Sections show/hide
     ========================= */
  
  .form-section{ display: none; }
  .form-section.active{ display: block; }
  
  /* =========================
     Titles/Labels
     ========================= */
  
  .section-header{
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
  }
  
  .section-title{
    color: var(--text-on-glass);
    font-size: 1.15rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.18);
    font-weight: 800;
  }
  
  label{
    color: rgba(255,255,255,0.90);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
  }

  #register-section label{
    color: #6b4b33;
  }

  #login-section label{
    color: #6b4b33;
  }

  body:not(.auth-page) .main-card label{
    color: #6b4b33;
  }

  body:not(.auth-page) .main-card .section-title{
    color: #6b4b33;
  }
  
  /* =========================
     Form sizing
     ========================= */
  
  .form-container-width{
    width: 100%;
    max-width: 435px;
    margin: 0 auto;
  }
  
  /* Mobile digits */
  .mobile-group{
    display: flex;
    gap: 5px;
    margin-bottom: 14px;
    direction: ltr;
    justify-content: center;
    flex-wrap: nowrap;
  }
  
  .m-digit{
    width: 35px;
    height: 40px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    background: rgba(255,255,255,0.88);
    -webkit-appearance: none;
    -moz-appearance: textfield;
    box-sizing: border-box;
  }
  
  .m-fixed{
    background: rgba(220,220,220,0.55) !important;
    color: #333;
    cursor: default;
    border-color: rgba(255,255,255,0.25);
  }
  
  /* Password input */
  .input-full{
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 10px 0 0;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    outline: none;
    color: #4a3426;
  }
  
  .input-full:focus{
    border-color: rgba(138,82,45,0.8);
    box-shadow: 0 0 0 4px rgba(138,82,45,0.18);
  }
  
  /* Buttons */
  .btn-primary-custom{
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    margin-top: 16px;
    font-family:"IranSans",sans-serif;
  }
  
  .btn-primary-custom:hover{
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.26);
    background: var(--brand-dark);
  }
  
  .forgot-link-wrapper{
    text-align: center;
    margin-top: 14px;
  }
  
  .forgot-link-wrapper a{
    color: rgba(138, 82, 45, 0.92);
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.95;
  }
  
  .forgot-link-wrapper a:hover{
    text-decoration: underline;
    opacity: 1;
  }
  
  /* Autofill fix for digit inputs */
  .m-digit:-webkit-autofill,
  .m-digit:-webkit-autofill:hover,
  .m-digit:-webkit-autofill:focus,
  .m-digit:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0px 1000px rgba(255,255,255,0.88) inset !important;
    -webkit-text-fill-color: #333 !important;
    transition: background-color 5000s ease-in-out 0s;
  }
  
  /* Responsive */
  @media (max-width: 768px){
    body.auth-page{
      padding-right: 0;
      padding-left: 0;
    }

    body.auth-page > .site-navbar{
      width: calc(100% - 28px) !important;
      max-width: calc(100% - 28px) !important;
      margin-right: auto !important;
      margin-left: auto !important;
      justify-content: center !important;
    }

    body.auth-page > .site-navbar .site-navbar-inner{
      width: 100% !important;
      margin-right: auto !important;
      margin-left: auto !important;
      justify-content: center !important;
    }

    body.auth-page > .app-wrapper,
    body.auth-page > .site-footer{
      width: calc(100% - 28px);
      margin-right: auto;
      margin-left: auto;
    }
  }

  @media (max-width: 420px){
    .main-card{ padding: 22px 16px; }
    .m-digit{ width: 28px; height: 38px; font-size: 14px; border-radius: 6px; }
  }
  
