/**
 * Login Page Styles (ZSC001)
 * Matches the UI mockup design
 */

/* Reset and base */
* {
    box-sizing: border-box;
}

/* Body styling */
.login-body {
    margin: 0;
    padding: 0;
    background-color: white;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Main container */
.login-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    flex:1;
    padding: 20px;
}

/* Login container */
.login-container {
    width: 100%;
    max-width: 700px;
}
 
/* Login box */
.login-box {
    background-color: hsl(0deg 0% 94.9%);
    border-radius: 15px;
    padding: 50px 70px 20px 70px;
}
 
/* Title */
.login-title {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin: 0 0 24px 0;
    color: #333333;
}
 
/* Error message */
.error-message {
    color: #dc3545;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
    margin: 0px 0 20px 0;
}
 
/* Form styling */
.login-form {
    margin: 0;
}
 
/* Form group */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    gap: 16px;
}
 
/* Form label */
.form-label {
    flex-shrink: 0;
    width: 80px;
    font-size: 16px;
    font-weight: bold;
    color: #333333;
    text-align: left;
}
 
/* Form input */
.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #828282;
    border-radius: 12px;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}
 
.form-input:focus {
    outline: none;
    border-color: #666666;
}
 
.form-input::placeholder {
    color: #999999;
}
 
/* Form actions */
.form-actions {
    margin-top: 28px;
    text-align: center;
}
 
/* Login button */
.btn-login {
    display: inline-block;
    padding: 12px 48px;
    font-size: 16px;
    font-weight: normal;
    color: #ffffff;
    background-color: #333333;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
 
.btn-login:hover {
    background-color: #444444;
}
 
.btn-login:active {
    background-color: #222222;
}
 
/* Forgot password link */
.forgot-password {
    margin-top: 24px;
    text-align: center;
}
 
.forgot-link {
    color: #333333;
    font-size: 16px;
    text-decoration: underline;
    font-weight: bold;
}
 
.forgot-link:hover {
    color: #000000;
}
 
/* Home page styles */
.home-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}
 
.home-container h1 {
    font-size: 24px;
    color: #333333;
    margin-bottom: 16px;
}
 
.home-container p {
    color: #666666;
    margin-bottom: 24px;
}
 
.btn-logout {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    color: #ffffff;
    background-color: #666666;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
 
.btn-logout:hover {
    background-color: #555555;
    color: #ffffff;
}

/* Override login-main for forgot password page to allow full width header */
.forgot-password-page .login-main {
    display: block;
    padding: 0;
}

/* Forgot Password Page Styles (ZSC002 - Redesign) */
.forgot-pwd-page {
    background-color: #ffffff;
    width: 100%;
}

/* Header Bar */
.forgot-header-bar {
    width: 100%;
    height: 60px;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
}

.forgot-header-bar .header-left {
    position: absolute;
    left: 20px;
}

.forgot-header-bar .header-site-title {
    font-size: 20px;
    font-weight: bold;
    color: #333333;
    margin: 0;
}

.btn-header-back {
    display: inline-block;
    padding: 8px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #000000;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}

/* Content Area */
.forgot-main-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}

.forgot-view-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forgot-view-wrapper form {
    width: 100%;
}

.instruction-text-left {
    font-size: 16px;
    color: #333333;
    margin-bottom: 40px;
    text-align: left;
}

/* Form Row (Label and Input side-by-side) */
.forgot-form-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.forgot-label-side {
    width: 140px;
    font-size: 16px;
    color: #333333;
    padding-top: 10px;
}

.forgot-input-group {
    flex: 1;
}

.forgot-input-field {
    width: 100%;
    max-width: 450px;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #828282;
    border-radius: 12px;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
    line-height: normal;

}

.forgot-input-field:focus {
    outline: none;
    border-color: #333333;
}

/* Messages */
.status-text-red {
    color: #ff0000;
    font-size: 14px;
    margin-bottom: -2rem;
    text-align: center;
    display: block; 
    font-weight:  bold;
}

.error-text-small {
    color: #ff0000;
    font-size: 14px;
    margin-top: 7px;
}

/* Actions */
.forgot-actions-center {
    margin-top: 60px;
    text-align: center;
}

.btn-submit-black {
    display: inline-block;
    padding: 14px 80px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background-color: #000000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-submit-black:hover {
    opacity: 0.8;
}

.btn-submit-black:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Overlay & Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay.active {
    display: flex;
}
