@import url("variables.css");

/* ============================================
   SIGN IN PAGE - MINIMALIST DESIGN
   ============================================ */

.signin-container {
    width: 100%;
    min-height: 90vh;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
}

.signin-wrapper {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    border: 1px solid var(--divider-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.signin-content {
    padding: 0.5rem 2rem;
}

/* Header */
.signin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.signin-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.signin-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Form */
.signin-form {
    width: 100%;
    margin-bottom: 1.5rem;
}

.signin-form .form-group {
    margin-bottom: 1.25rem;
}

.signin-form .form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.signin-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    background: var(--surface-muted);
    transition: all 0.2s ease;
}

.signin-form .form-group input:hover {
    background: var(--bg-white);
    border-color: var(--primary-light);
}

.signin-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: var(--bg-white);
}

.signin-form .form-group input::placeholder {
    color: var(--text-tertiary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password:focus {
    outline: none;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Submit Button */
.btn-signin {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-signin:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-signin:disabled,
.btn-signin.loading {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.btn-signin:disabled:hover,
.btn-signin.loading:hover {
    background: var(--text-tertiary);
    transform: none;
    box-shadow: none;
}

/* Button Loader */
.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Footer */
.signin-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--divider-color);
}

.signin-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.signin-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signin-footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Demo Credentials */
.demo-credentials {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
}

.demo-credentials small {
    font-size: 0.8125rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Auth Messages */
.auth-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin: 0 auto 1.5rem;
    max-width: 420px;
    text-align: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #065f46;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay p {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .signin-container {
        padding: 1rem;
    }

    .signin-wrapper {
        max-width: 100%;
    }

    .signin-content {
        padding: 2rem 1.5rem;
    }

    .signin-header h1 {
        font-size: 1.5rem;
    }

    .signin-header p {
        font-size: 0.875rem;
    }

    .signin-form .form-group input,
    .btn-signin {
        font-size: 1rem;
        padding: 1rem;
    }

    .auth-message {
        margin: 0 1rem 1.5rem;
    }
}