/* ========================================
   MODERN AUTHENTICATION PAGES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.auth-container {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.auth-left {
    padding: 50px;
    background: white;
}

.auth-right {
    background: linear-gradient(135deg, #2d7a3e 0%, #27ae60 100%);
    padding: 50px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 40px 40px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.auth-logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2d7a3e, #27ae60);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.auth-logo-text h2 {
    font-size: 1.5rem;
    color: #2d7a3e;
    margin-bottom: 0;
}

.auth-logo-text p {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.auth-header {
    margin-bottom: 35px;
}

.auth-header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #e74c3c;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #7f8c8d;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e8f5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #f8fafb;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #2d7a3e;
    outline: none;
    box-shadow: 0 0 0 4px rgba(45, 122, 62, 0.1);
    background: white;
}

.form-group textarea {
    padding-left: 15px;
    resize: vertical;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: #7f8c8d;
    user-select: none;
}

.password-toggle:hover {
    color: #2d7a3e;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2d7a3e;
}

.checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
}

.forgot-link {
    color: #2d7a3e;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Captcha */
.captcha-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.captcha-image {
    flex: 0 0 200px;
    height: 60px;
    border: 2px solid #e8f5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.captcha-image:hover {
    border-color: #2d7a3e;
    transform: scale(1.02);
}

iframe.captcha-image {
    display: block;
}

.captcha-input {
    flex: 1;
}

.captcha-refresh {
    flex: 0 0 auto;
    padding: 14px;
    background: #f0f8f4;
    border: 2px solid #e8f5e9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #2d7a3e;
    transition: all 0.3s;
}

.captcha-refresh:hover {
    background: #2d7a3e;
    color: white;
    border-color: #2d7a3e;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2d7a3e, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 122, 62, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(45, 122, 62, 0.4);
}

.btn-block {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2d7a3e;
    color: #2d7a3e;
}

.btn-outline:hover {
    background: #2d7a3e;
    color: white;
}

.btn-google {
    background: white;
    border: 2px solid #e0e0e0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-google:hover {
    border-color: #2d7a3e;
    background: #f8fafb;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    border: 2px solid #27ae60;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 2px solid #e74c3c;
    color: #721c24;
}

.alert-icon {
    font-size: 1.5rem;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e8f5e9;
}

.auth-footer p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #2d7a3e;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Right Side Content */
.auth-illustration {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-illustration-icon {
    font-size: 120px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.auth-benefits h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.auth-benefits ul {
    list-style: none;
    padding: 0;
    position: relative;
    z-index: 1;
}

.auth-benefits li {
    padding: 15px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-benefits li:last-child {
    border-bottom: none;
}

.auth-benefits li::before {
    content: '✓';
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-container {
        max-width: 900px;
    }
    
    .auth-left,
    .auth-right {
        padding: 40px;
    }
}

@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .auth-right {
        order: -1;
        padding: 40px 30px;
    }
    
    .auth-left {
        padding: 40px 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-illustration-icon {
        font-size: 80px;
    }
    
    .auth-benefits h3 {
        font-size: 1.5rem;
    }
    
    .auth-benefits li {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 30px 15px;
    }
    
    .auth-left,
    .auth-right {
        padding: 35px 25px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .auth-logo-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .auth-logo-text h2 {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 15px 12px 40px;
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .btn-block {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 20px 10px;
    }
    
    .auth-container {
        border-radius: 20px;
    }
    
    .auth-left,
    .auth-right {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 1.6rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .auth-logo {
        margin-bottom: 25px;
    }
    
    .auth-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    
    .auth-logo-text h2 {
        font-size: 1.2rem;
    }
    
    .auth-logo-text p {
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 11px 12px 11px 38px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .input-icon {
        left: 12px;
        font-size: 1.1rem;
    }
    
    .password-toggle {
        right: 12px;
        font-size: 1.1rem;
    }
    
    .captcha-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .captcha-image {
        flex: 1 1 auto;
        width: 100%;
        height: 55px;
    }
    
    .captcha-input {
        padding-left: 15px !important;
    }
    
    .captcha-refresh {
        width: 100%;
        padding: 12px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn {
        padding: 11px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .btn-block {
        padding: 13px;
        font-size: 0.95rem;
    }
    
    .auth-divider {
        margin: 25px 0;
    }
    
    .auth-illustration-icon {
        font-size: 60px;
    }
    
    .auth-benefits h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .auth-benefits li {
        padding: 12px 0;
        font-size: 0.9rem;
    }
    
    .auth-benefits li::before {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .alert-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .auth-left,
    .auth-right {
        padding: 25px 15px;
    }
    
    .auth-header h1 {
        font-size: 1.4rem;
    }
    
    .auth-header p {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 10px 10px 35px;
        font-size: 0.85rem;
    }
    
    .btn-block {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .auth-illustration-icon {
        font-size: 50px;
    }
    
    .auth-benefits h3 {
        font-size: 1.2rem;
    }
    
    .auth-benefits li {
        font-size: 0.85rem;
        padding: 10px 0;
    }
}

/* Landscape Mode for Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-page {
        padding: 20px 10px;
    }
    
    .auth-right {
        display: none;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .auth-left {
        padding: 30px;
    }
    
    .auth-header {
        margin-bottom: 25px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px 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); }
}
