/**
 * Auth Pages Styles
 * Centralized styles for login and register pages
 *
 * CUSTOMIZATION GUIDE:
 * - Modify CSS variables in :root to change colors, fonts globally
 * - login.php  → body.login-page
 * - register.php → body.register-page
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --auth-font: 'Lato', sans-serif;
    --auth-black: #000000;
    --auth-white: #ffffff;
    --auth-gray-100: #fafafa;
    --auth-gray-200: #e5e5e5;
    --auth-gray-400: #999999;
    --auth-gray-500: #666666;
    --auth-border-radius: 0;
    --auth-transition: 0.2s ease;
    --auth-register-from: #667eea;
    --auth-register-to: #764ba2;
}

/* ============================================
   BASE
   ============================================ */
* {
    box-sizing: border-box;
}

/* ============================================
   LOGIN PAGE  (body.login-page)
   ============================================ */
body.login-page {
    font-family: var(--auth-font);
    height: 100vh;
    overflow: hidden;
    background: var(--auth-white);
    margin: 0;
    padding: 0;
}

.login-page .split-screen-container {
    display: flex;
    height: 100vh;
}

/* Left Half - Login Form */
.login-page .left-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--auth-white);
    position: relative;
}

/* Top Bar */
.login-page .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid var(--auth-gray-200);
}

.login-page .logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}

.login-page .logo img {
    height: 48px;
    filter: grayscale(100%);
    transition: transform var(--auth-transition);
}

.login-page .logo:hover img {
    transform: scale(1.05);
}

.login-page .logo-tagline {
    font-size: 11px;
    font-weight: 600;
    color: var(--auth-gray-500);
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.login-page .register-link {
    color: var(--auth-black);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border: 2px solid var(--auth-black);
    border-radius: var(--auth-border-radius);
    transition: all var(--auth-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-page .register-link:hover {
    background: var(--auth-black);
    color: var(--auth-white);
}

/* Login Form Container */
.login-page .login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-page .login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-page .login-form-wrapper h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--auth-black);
    letter-spacing: -1px;
}

.login-page .login-form-wrapper .subtitle {
    color: var(--auth-gray-500);
    margin-bottom: 40px;
    font-size: 15px;
    font-weight: 400;
}

.login-page .form-group {
    margin-bottom: 24px;
}

.login-page .form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-black);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-page .form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.login-page .remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.login-page .remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--auth-black);
}

.login-page .remember-me label {
    font-size: 13px;
    color: var(--auth-gray-500);
    cursor: pointer;
    user-select: none;
}

.login-page .forgot-password {
    color: var(--auth-black);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity var(--auth-transition);
}

.login-page .forgot-password:hover {
    opacity: 0.7;
}

.login-page .form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--auth-border-radius);
    border: 2px solid var(--auth-gray-200);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--auth-white);
    color: var(--auth-black);
}

.login-page .form-control:focus {
    outline: none;
    border-color: var(--auth-black);
    background: var(--auth-gray-100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-page .form-control::placeholder {
    color: var(--auth-gray-400);
}

.login-page .btn-login {
    width: 100%;
    background: var(--auth-black);
    border: 2px solid var(--auth-black);
    padding: 16px;
    border-radius: var(--auth-border-radius);
    font-weight: 600;
    font-size: 14px;
    color: var(--auth-white);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-page .btn-login::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-page .btn-login:hover {
    background: var(--auth-white);
    color: var(--auth-black);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.login-page .btn-login:hover::before {
    width: 300px;
    height: 300px;
}

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

.login-page .bottom-links {
    text-align: center;
    margin-top: 32px;
    color: var(--auth-gray-500);
    font-size: 13px;
}

.login-page .bottom-links a {
    color: var(--auth-black);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--auth-black);
    padding-bottom: 2px;
}

.login-page .bottom-links a:hover {
    opacity: 0.7;
}

.login-page .alert {
    border-radius: var(--auth-border-radius);
    margin-bottom: 24px;
    padding: 14px 16px;
    font-size: 13px;
    border: 2px solid;
    font-weight: 500;
}

.login-page .alert-danger {
    background: var(--auth-gray-100);
    border-color: #333333;
    color: var(--auth-black);
}

.login-page .alert-success {
    background: var(--auth-gray-100);
    border-color: var(--auth-gray-500);
    color: var(--auth-black);
}

/* Separator */
.login-separator {
    margin: 0 8px;
    color: #e5e5e5;
}

/* Right Half - Image */
.login-page .right-half {
    flex: 1;
    background: #f5f5f5;
    background-size: cover;
    background-position: center;
    position: relative;
    filter: grayscale(100%);
}

.login-page .right-half::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.login-page .logo-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0.25;
    pointer-events: none;
    width: 70%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-page .logo-overlay img {
    width: 100%;
    height: auto;
}

.login-page .logo-overlay-tagline {
    color: var(--auth-white);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

.login-page .image-overlay-text {
    position: absolute;
    bottom: 60px;
    left: 60px;
    right: 60px;
    color: var(--auth-white);
    z-index: 1;
}

.login-page .image-overlay-text h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.login-page .image-overlay-text p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
    font-weight: 400;
}

.login-page .pattern-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(0deg, transparent 24%, rgba(255,255,255,.05) 25%, rgba(255,255,255,.05) 26%, transparent 27%, transparent 74%, rgba(255,255,255,.05) 75%, rgba(255,255,255,.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255,255,255,.05) 25%, rgba(255,255,255,.05) 26%, transparent 27%, transparent 74%, rgba(255,255,255,.05) 75%, rgba(255,255,255,.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
}

/* ---- Login responsive ---- */
@media (max-width: 992px) {
    .login-page .right-half { display: none; }
    .login-page .left-half  { flex: 1; }
}

@media (max-width: 768px) {
    .login-page .logo-overlay { width: 70%; max-width: 300px; }
    .login-page .logo-overlay-tagline { font-size: 12px; margin-top: 12px; }
    .login-page .top-bar { padding: 20px 24px; }
    .login-page .login-container { padding: 24px; }
    .login-page .logo img { height: 30px; }
    .login-page .logo-tagline { font-size: 8px; margin-top: 6px; }
    .login-page .register-link { font-size: 12px; padding: 8px 16px; }
    .login-page .login-form-wrapper h1 { font-size: 28px; }
}

/* ============================================
   REGISTER PAGE  (body.register-page)
   ============================================ */
body.register-page {
    font-family: var(--auth-font);
    background: linear-gradient(135deg, var(--auth-register-from) 0%, var(--auth-register-to) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    margin: 0;
}

.register-page .auth-card {
    background: var(--auth-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    margin: 20px auto;
}

.register-page .auth-card h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.register-page .auth-card > p {
    color: #666;
    margin-bottom: 30px;
}

.register-page .form-control {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 4px;
}

.register-page .form-control:focus {
    border-color: var(--auth-register-from);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.register-page .btn-primary {
    background: linear-gradient(135deg, var(--auth-register-from) 0%, var(--auth-register-to) 100%);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
}

.register-page .btn-primary:hover {
    opacity: 0.9;
}

.register-page .auth-links {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.register-page .auth-links a {
    color: var(--auth-register-from);
    text-decoration: none;
    font-weight: 600;
}

.register-page .auth-links a:hover {
    text-decoration: underline;
}

.register-page .alert {
    border-radius: 8px;
    margin-bottom: 20px;
}

.register-page .text-danger {
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 12px;
    display: block;
}
