:root {
    --primary: #0F4C7A;
    --primary-dark: #0A2E47;
    --primary-light: #E8F4F8;
    --secondary: #E8F4F8;
    --text: #0A2E47;
    --text-light: #0F4C7A;
    --text-lighter: #00A8E8;
    --border: #E8F4F8;
    --border-light: #E8F4F8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #E8F4F8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: calc(100% - 120px);
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    margin: 60px auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    position: relative;
}

.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 50px 40px 40px 40px;
    background: var(--white);
    overflow-y: auto;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.auth-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.auth-brand-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.auth-brand-tagline {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* Modern Form Styles */
.modern-form {
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group.floating {
    position: relative;
}

.form-group.floating input,
.form-group.floating select {
    width: 100%;
    padding: 16px 48px 16px 48px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
    color: var(--text);
    transition: var(--transition);
    font-family: inherit;
    appearance: none;
}

.form-group.floating input:focus,
.form-group.floating select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(15, 76, 122, 0.1);
}

.form-group.floating label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-lighter);
    background: var(--white);
    padding: 0 4px;
    transition: var(--transition);
    pointer-events: none;
    font-weight: 500;
}

.form-group.floating.focused label,
.form-group.floating input:not(:placeholder-shown) + label,
.form-group.floating select:not([value=""]) + label {
    top: 0;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}

.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    transition: var(--transition);
    z-index: 2;
}

.form-group.floating.focused .form-icon {
    color: var(--primary);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-lighter);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary);
    background: var(--border-light);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.modern-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 76, 122, 0.35);
}

.modern-btn:active {
    transform: translateY(0);
}

.modern-btn.loading .btn-text {
    opacity: 0;
}

.modern-btn.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    opacity: 0;
    transition: var(--transition);
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Social Buttons */
.social-btn {
    width: 100%;
    padding: 12px;
    background: var(--white);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    background: var(--secondary);
    border-color: var(--text-lighter);
    transform: translateY(-1px);
}

.google-btn {
    color: #1e293b;
}

.google-btn i {
    color: #db4437;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-lighter);
    font-size: 13px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 16px;
    background: var(--white);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.4;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #dcfce7;
}

.alert-danger {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fee2e2;
}

.alert-warning {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fef3c7;
}

.alert i {
    font-size: 16px;
    margin-top: 1px;
}

/* Password Strength */
.password-strength {
    margin-bottom: 20px;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--text-lighter);
    border-radius: 2px;
    transition: var(--transition);
}

.strength-text {
    font-size: 12px;
    color: var(--text-lighter);
    font-weight: 500;
    text-align: center;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-right {
    background: linear-gradient(135deg, rgba(15, 76, 122, 0.92) 0%, rgba(10, 46, 71, 0.92) 50%, rgba(0, 168, 232, 0.88) 100%),
                url('../images/dryzone.png') center/100% 100% no-repeat;
    background-blend-mode: overlay;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.auth-right::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
    pointer-events: none;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: float 7s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 8%;
    left: 8%;
    animation-delay: 0s;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 8%;
    animation-delay: 2s;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.2);
}

.shape-3 {
    width: 70px;
    height: 70px;
    top: 45%;
    left: 15%;
    animation-delay: 4s;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.08);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-25px) translateX(15px) rotate(90deg) scale(1.05);
    }
    50% {
        transform: translateY(-15px) translateX(-10px) rotate(180deg) scale(0.95);
    }
    75% {
        transform: translateY(20px) translateX(20px) rotate(270deg) scale(1.08);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.auth-right-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-right-icon {
    font-size: 72px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
    animation: iconBounce 3s cubic-bezier(0.36, 0, 0.66, 1) infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) scale(1.1) rotate(-5deg);
    }
    50% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    75% {
        transform: translateY(-8px) scale(1.05) rotate(5deg);
    }
}

.auth-right-heading {
    font-size: 34px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 1s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-right-text {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 36px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease-out 0.4s both;
    letter-spacing: 0.3px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.feature-item i {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    width: 20px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .auth-left {
        padding: 40px 30px;
    }

    .auth-right {
        display: none;
    }

    .auth-title {
        font-size: 24px;
    }
    
    .form-group.floating input,
    .form-group.floating select {
        font-size: 16px;
        padding: 14px 44px 14px 44px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        background: linear-gradient(135deg, #ffffff 0%, #E8F4F8 100%);
    }

    .auth-container {
        margin: 15px auto;
        width: calc(100% - 30px);
        border-radius: 12px;
        height: auto;
    }

    .auth-left {
        padding: 35px 25px;
        overflow-y: auto;
        max-height: 90vh;
    }

    .auth-form-wrapper {
        max-width: 100%;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group.floating input,
    .form-group.floating select {
        font-size: 16px;
        padding: 14px 44px 14px 44px;
        border-radius: 8px;
    }

    .form-group.floating label {
        left: 44px;
        font-size: 13px;
    }

    .form-group.floating.focused label,
    .form-group.floating input:not(:placeholder-shown) + label,
    .form-group.floating select:not([value=""]) + label {
        font-size: 11px;
    }

    .form-icon {
        left: 12px;
        font-size: 16px;
    }

    .password-toggle {
        right: 12px;
    }

    .modern-btn {
        padding: 14px;
        font-size: 15px;
        border-radius: 8px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
        font-size: 13px;
    }

    .checkbox-container {
        font-size: 13px;
    }

    .checkmark {
        width: 16px;
        height: 16px;
    }

    .auth-toggle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        background: white;
    }

    .auth-container {
        margin: 8px;
        width: calc(100% - 16px);
        border-radius: 8px;
        height: auto;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .auth-left {
        padding: 25px 18px;
        min-height: auto;
    }

    .auth-brand {
        margin-bottom: 25px;
    }

    .auth-brand-logo {
        width: 45px;
        height: 45px;
    }

    .auth-brand-logo img {
        width: 26px;
        height: 26px;
    }

    .auth-brand-name {
        font-size: 18px;
    }

    .auth-brand-tagline {
        font-size: 11px;
    }

    .auth-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .auth-subtitle {
        font-size: 12px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group.floating input,
    .form-group.floating select {
        font-size: 16px;
        padding: 12px 40px 12px 40px;
        border-radius: 6px;
        border: 2px solid #E8F4F8;
    }

    .form-group.floating input:focus,
    .form-group.floating select:focus {
        border-color: #0F4C7A;
        box-shadow: 0 0 0 2px rgba(15, 76, 122, 0.08);
    }

    .form-group.floating label {
        left: 40px;
        font-size: 12px;
    }

    .form-group.floating.focused label,
    .form-group.floating input:not(:placeholder-shown) + label,
    .form-group.floating select:not([value=""]) + label {
        font-size: 10px;
    }

    .form-icon {
        left: 10px;
        font-size: 15px;
    }

    .password-toggle {
        right: 10px;
        font-size: 15px;
    }

    .modern-btn {
        padding: 12px;
        font-size: 14px;
        border-radius: 6px;
        margin-bottom: 12px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
        font-size: 12px;
    }

    .checkbox-container {
        font-size: 12px;
    }

    .checkmark {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    .forgot-password {
        font-size: 12px;
    }

    .auth-toggle {
        font-size: 12px;
        text-align: center;
        margin-top: 12px;
    }

    .auth-toggle a {
        font-weight: 700;
        color: #0F4C7A;
    }
}

@media (max-width: 360px) {
    .auth-left {
        padding: 20px 15px;
    }

    .auth-form-wrapper {
        width: 100%;
    }

    .auth-title {
        font-size: 18px;
    }

    .form-group.floating input,
    .form-group.floating select {
        font-size: 16px;
        padding: 11px 38px 11px 38px;
    }

    .modern-btn {
        padding: 11px;
        font-size: 13px;
    }
}

/* Custom scrollbar */
.auth-left::-webkit-scrollbar {
    width: 6px;
}

.auth-left::-webkit-scrollbar-track {
    background: var(--border-light);
}

.auth-left::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.auth-left::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}