/* ---
   File: public/css/stylesignup.css
--- */

/* --- 1. Reset & Global --- */
:root {
  --primary-color: #6D28D9;
  --primary-dark: #442166;
  --primary-light: #7F56D9;
  --text-dark: #1D2939;
  --text-light: #475467;
  --bg-split-light: #f3f0f7;
  --bg-white: #FFFFFF;
  --border-color: #D0D5DD;
  --border-focus: #a98bce;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --primary-color-rgb: 85, 41, 127;
  --gradient-start: #7F56D9;
  --gradient-end: #55297f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-split-light);
  color: var(--text-light);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  /* Dynamic Viewport Height for mobile browsers */
  min-height: 100dvh; 
  padding: 20px;
}

/* --- 2. Login Container --- */
.login-container {
  display: flex;
  width: 100%;
  max-width: 950px;
  min-height: 600px;
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* --- 3. Visual Side (Left/Top) --- */
.visual-side {
  flex: 1; /* Take remaining space */
  max-width: 45%; /* Default Desktop Width */
  background: #6D28D9;
  color: var(--bg-white);
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.visual-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.5;
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.logo-visual-svg {
    display: inline-block;
    color: var(--bg-white);
    width: 80px;
    height: auto;
    margin-bottom: 24px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.visual-side h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.visual-side p {
  font-size: 16px;
  opacity: 0.85;
  max-width: 300px;
}

/* --- 4. Form Side (Right/Bottom) --- */
.form-side {
  flex: 1.2; /* Slightly wider than visual side */
  padding: 40px 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* --- 5. Typography --- */
.welcome {
  margin-bottom: 32px;
  text-align: left;
}

.welcome h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.welcome p {
  font-size: 16px;
  color: var(--text-light);
}

/* --- 6. Form Elements --- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  text-align: left;
}

.input-field {
  position: relative;
  width: 100%;
}

.input-field input:not([type="file"]) {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: 16px;
  background-color: var(--bg-white);
  transition: all 0.2s ease;
}

.input-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1);
}

/* Floating Labels */
.input-field label {
  position: absolute;
  top: 15px;
  left: 44px;
  font-size: 16px;
  color: var(--text-light);
  transition: all 0.2s ease;
  pointer-events: none;
  background: var(--bg-white);
  padding: 0 4px;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
  top: -10px;
  left: 40px;
  font-size: 13px;
  color: var(--primary-color);
  font-weight: 500;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    color: #98A2B3;
    transition: color 0.2s ease;
}

.input-field input:focus ~ .input-icon {
    color: var(--primary-color);
}

/* --- 7. Buttons --- */
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.btn-login:hover {
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
  transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* --- 8. OTP Styling (Responsive) --- */
.otp-input {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.otp-input input {
  /* Flexible width for small screens */
  flex: 1; 
  width: 100%;
  max-width: 55px; /* Maximum size on desktop */
  height: 55px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0; /* Reset padding for center align */
}

.time-container{
  display: flex;
justify-content: space-between;
  font-size: 14px;
}

/* --- 9. File Upload --- */
.input-field-file label {
    position: static;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.input-field-file input[type="file"] {
    padding: 8px;
    border: 1px dashed var(--border-color);
    background: #F9FAFB;
}

/* --- 10. Links & Footer --- */
.register-link-container {
  margin-top: 10px;
 font-size: 14px; /* Slightly larger */
  color: var(--text-light);
}
.register-link {
   font-size: 14px; /* Slightly larger */
  color: #6D28D9;
  text-decoration: none;
  font-weight: 500;
}
.register-link:hover { text-decoration: underline; }

/* --- 11. Flash Messages --- */
.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 1000;
}
.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 14px;
}
.flash-message.success { border-left: 4px solid #10B981; color: #065F46; }
.flash-message.error { border-left: 4px solid #EF4444; color: #991B1B; }
.close-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: inherit; }

/* --- 12. RESPONSIVE QUERIES --- */

/* Tablet (Portrait) and Large Phones */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column; /* Stack vertically */
        height: auto;
        min-height: auto;
        max-width: 550px;
    }

    .visual-side {
        max-width: 100%;
        padding: 30px 24px;
        align-items: center;
        text-align: center;
        flex: 0; /* Do not grow, just take content height */
    }

    .visual-side p {
        /* Hide description on mobile to save space, keep branding */
        display: none; 
    }
    
    .logo-visual-svg {
        width: 50px; /* Smaller logo */
        margin-bottom: 10px;
    }

    .visual-side h2 {
        font-size: 20px;
        margin: 0;
    }

    .form-side {
        padding: 40px 24px;
    }
}

/* Mobile Devices */
@media (max-width: 480px) {
    body {
        padding: 0;
        background-color: var(--bg-white); /* Remove gray bg on mobile */
    }

    .login-container {
        border-radius: 0; /* Full screen, no corners */
        box-shadow: none;
        min-height: 100dvh;
    }

    .welcome h1 {
        font-size: 24px;
    }

    .input-field input:not([type="file"]) {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .otp-input {
        gap: 6px;
    }

    .otp-input input {
        height: 45px;
        font-size: 18px;
        border-radius: 6px;
    }
    
    .form-side {
        padding: 30px 20px;
    }
}


/* password strength */
#strengthText {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: #777;
}

.input-wrapper input {
  padding-left: 40px; /* icon ke liye space */
}


/* Signature Modal Overlay */
.cropper-modal-overlay {
  display: none; /* Default hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85); /* Darker background */
  z-index: 99999; /* Sabse upar */
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.cropper-modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
}

.img-container {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  background-color: #f7f7f7;
  margin-bottom: 20px;
}

/* Cropper specific fix */
#cropperImage {
  display: block;
  max-width: 100%;
}
