/* cssfiles/login.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
a{
    cursor: pointer;
}

.messagebox {
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    animation: slideDown 0.6s ease-out;
}

.messagebox div {
    color: #00ffaa;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
    word-wrap: break-word;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    background: linear-gradient(90deg, #00ffff, #00ffaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.input-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-box input {
    width: 100%;
    padding: 1rem;
    padding: 1rem 3rem 1rem 1rem; 
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-box button {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.input-box button img {
    width: 20px;
    height: 20px;
    filter: invert(100%); /* makes icon white */
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.input-box button:hover img {
    opacity: 1;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0 0.5rem;
}

.input-box input:focus~label,
.input-box input:valid~label {
    top: 0;
    font-size: 0.8rem;
    color: #00ffff;
    background: rgba(15, 32, 39, 0.9);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.input-box input:focus {
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    white-space: nowrap;
}

.remember-forgot input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #00ffff;
}

.remember-forgot a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.remember-forgot a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #00ffff, #00ffaa);
    border: none;
    border-radius: 50px;
    color: #0f2027;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    margin-bottom: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
}

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

.register-link {
    text-align: center;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

#singupbtn {
    background: transparent;
    border: none;
    color: #00ffaa;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    margin-left: 0.25rem;
}

#singupbtn:hover {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile First Responsive Design */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .container {
        max-width: 100%;
    }

    .login-box {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .login-box h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .messagebox {
        padding: 0.8rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .messagebox div {
        font-size: 0.85rem;
    }

    .input-box {
        margin-bottom: 1.25rem;
    }

    .input-box input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .input-box label {
        font-size: 0.95rem;
        left: 0.9rem;
    }

    .input-box input:focus~label,
    .input-box input:valid~label {
        font-size: 0.75rem;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 1.25rem;
    }

    .remember-forgot label {
        font-size: 0.8rem;
    }

    .remember-forgot a {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.9rem;
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .register-link {
        font-size: 0.85rem;
    }

    #singupbtn {
        font-size: 0.85rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    body {
        padding: 0.25rem;
        padding-top: 1rem;
    }

    .login-box {
        padding: 1rem 0.8rem;
    }

    .login-box h2 {
        font-size: 1.3rem;
    }

    .input-box input {
        padding: 0.8rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 768px) {
    .container {
        max-width: 450px;
    }

    .login-box {
        padding: 2.5rem 2rem;
    }

    .login-box h2 {
        font-size: 2rem;
    }
}

/* Prevent horizontal scroll and ensure content fits */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Loading state for button */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Focus states for accessibility */
input:focus,
.btn:focus,
#singupbtn:focus ,
.close_btn:focus,
.btnf:focus,
.submit-btnf:focus {
    outline: 2px solid #00ffff;
    outline-offset: 2px;
}

/* Ensure no vertical scroll on mobile */
@media (max-height: 700px) and (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 1rem;
    }

    .login-box {
        max-height: none;
    }

    .messagebox {
        margin-bottom: 1rem;
    }
}

/* forget pass window........................................................ */
/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s;
    overflow: hidden;
}

.popup-overlay.active .popup {
    transform: scale(1);
}

/* Popup Header */
.popup-header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* Popup Body */
.popup-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.otp-inputs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.otp-inputs input {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.otp-inputs input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.resend-otp {
    text-align: center;
    margin-top: 15px;
}

.resend-otp a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.resend-otp a:hover {
    text-decoration: underline;
}

/* Popup Footer */
.popup-footer {
    padding: 0 30px 30px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btnf {
    display: block;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-send {
    background: #3498db;
    color: white;
}

.btn-send:hover {
    background: #2980b9;
}

.btn-cancel {
    background: #e74c3c;
    color: white;
}

.btn-cancel:hover {
    background: #c0392b;
}

/* Responsive styles */
@media (max-width: 480px) {
    .popup {
        width: 95%;
    }

    .popup-body {
        padding: 20px;
    }

    .popup-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }

    .otp-inputs input {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
/* new pass set window */
.newpass-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.newpass-popup.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-content {
  background: #fff;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-btnf {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #333;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #222;
}

.form-groupf {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

label {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #555;
}

#newPassword,#confirmPassword{
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

/* Password toggle button styles for new password popup */
.password-input-wrapper,
.wrinput {
    position: relative;
    width: 100%;
}

.toggle-password-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password-btn img {
    width: 20px;
    height: 20px;
    filter: invert(100%);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toggle-password-btn:hover img {
    opacity: 1;
}

/* Adjust password input padding to make room for the toggle button */
#newPassword,
#confirmPassword {
    padding-right: 3.5rem;
}

#newPassword:focus {
  border-color: #007bff;
}
#confirmPassword:focus {
  border-color: #007bff;
}

.submit-btnf {
  width: 100%;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #007bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btnf:hover {
  background: #0056b3;
}

@media (max-width: 480px) {
  .popup-content {
    padding: 20px;
  }

  h2 {
    font-size: 1.2rem;
  }

#newPassword,#confirmPassword{
    font-size: 0.95rem;
  }

  .submit-btnf {
    font-size: 0.95rem;
  }
}
.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
  text-align: center;
}
