* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: calc(100vh - 100px);
}

.login-container {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-height: calc(100vh - 160px);
}

.brand-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.logo {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.logo img {
    width: 90px;
    height: 90px;
    border-radius: 18px;
    background: white;
    padding: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.brand-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.brand-section p {
    font-size: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.form-section {
    padding: 48px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 360px;
    padding: 0 0 4px 0;
}

.form-container h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
    transition: all 0.2s ease;
    pointer-events: none;
    background: transparent;
    font-weight: 400;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: 0;
    left: 12px;
    font-size: 11px;
    color: #667eea;
    background: white;
    padding: 0 4px;
    font-weight: 500;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

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

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover {
    background: #94a3b8;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

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

.divider {
    text-align: center;
    margin: 16px 0 20px 0;
    position: relative;
    min-height: 20px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 12px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.btn-google {
    width: 100%;
    padding: 14px 20px;
    background: white;
    color: #374151;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google svg {
    width: 18px;
    height: 18px;
}

.form-footer {
    text-align: center;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 14px;
}

.form-footer a:hover {
    color: #5a67d8;
}

.hidden {
    display: none;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 500;
    border: 1px solid;
    animation: slideIn 0.2s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #d97706;
    border-color: #fed7aa;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    body {
        min-height: 100vh;
    }
    
    .login-wrapper {
        min-height: 100vh;
        padding: 8px;
        align-items: flex-start;
        padding-top: 8px;
    }
    
    .login-container {
        grid-template-columns: 1fr;
        max-width: 450px;
        max-height: calc(100vh - 16px);
        width: 100%;
    }
    
    .brand-section {
        padding: 32px 20px;
    }
    
    .form-section {
        padding: 32px 20px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .logo img {
        width: 70px;
        height: 70px;
        padding: 12px;
    }
    
    .brand-section h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .brand-section p {
        font-size: 13px;
    }
    
    .form-container h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .input-group {
        margin-bottom: 16px;
    }
    
    .input-group input {
        padding: 12px 14px;
        font-size: 15px;
    }
    
    .btn-primary,
    .btn-google {
        padding: 12px 16px;
        margin-bottom: 16px;
    }
    
    .divider {
        margin: 12px 0 16px 0;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 0;
        padding-top: 0;
        min-height: 100vh;
    }
    
    .login-container {
        max-height: 100vh;
        border-radius: 0;
        width: 100vw;
        height: 100vh;
        max-width: none;
    }
    
    .brand-section {
        padding: 24px 16px;
    }
    
    .form-section {
        padding: 24px 16px;
        max-height: calc(100vh - 48px);
    }
    
    .logo img {
        width: 60px;
        height: 60px;
        padding: 10px;
    }
    
    .brand-section h1 {
        font-size: 18px;
        text-align: left;
    }
    
    .brand-section p {
        font-size: 12px;
    }
    
    .form-container h2 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .input-group input {
        padding: 16px 14px;
        font-size: 16px;
        min-height: 52px;
    }
    
    .btn-primary,
    .btn-google {
        padding: 16px 18px;
        margin-bottom: 16px;
        min-height: 52px;
        font-size: 16px;
    }
    
    .divider {
        margin: 10px 0 14px 0;
    }
}

@media (max-width: 360px) {
    .login-wrapper {
        padding: 0;
        padding-top: 0;
        min-height: 100vh;
    }
    
    .login-container {
        max-height: 100vh;
        border-radius: 0;
        width: 100vw;
        height: 100vh;
        max-width: none;
    }
    
    .brand-section {
        padding: 20px 12px;
    }
    
    .form-section {
        padding: 20px 12px;
        max-height: calc(100vh - 40px);
    }
    
    .logo img {
        width: 50px;
        height: 50px;
        padding: 8px;
    }
    
    .brand-section h1 {
        font-size: 16px;
        margin-bottom: 4px;
        text-align: left;
    }
    
    .brand-section p {
        font-size: 11px;
    }
    
    .form-container h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .input-group input {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .btn-primary,
    .btn-google {
        padding: 14px 16px;
        margin-bottom: 14px;
        min-height: 48px;
        font-size: 16px;
    }
    
    .divider {
        margin: 8px 0 12px 0;
    }
}

@media (max-height: 700px) {
    .login-wrapper {
        align-items: flex-start;
        padding-top: 16px;
        min-height: 100vh;
    }
    
    .login-container {
        max-height: calc(100vh - 40px);
    }
    
    .brand-section {
        padding: 20px 16px;
    }
    
    .form-section {
        padding: 20px 16px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .logo img {
        width: 50px;
        height: 50px;
        padding: 8px;
    }
    
    .brand-section h1 {
        font-size: 16px;
        margin-bottom: 4px;
        text-align: left;
    }
    
    .brand-section p {
        font-size: 11px;
    }
    
    .form-container h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .input-group {
        margin-bottom: 12px;
    }
    
    .input-group input {
        padding: 14px 14px;
        min-height: 48px;
    }
    
    .btn-primary,
    .btn-google {
        padding: 14px 16px;
        margin-bottom: 14px;
        min-height: 48px;
    }
}