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

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: auto;
}

.display-error {
    display: flex;
    color: #fff;
    padding: 0.75rem 1rem;
    background: #ff4646;
    border-radius: 10px;
    margin-bottom: 15px;
}

.error-icon {
    font-size: 30px;
    font-weight: 700;
    align-content: center;
    flex-shrink: 0;
}

.input-error {
    align-content: center;
    margin-left: 15px;
    word-break: break-word;
}

/* Animated background shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.bg-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    background: white;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.bg-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    background: white;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.bg-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    background: white;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    margin: auto;
}

.login-left {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.login-left::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -30px;
    left: -30px;
}

.logo-section {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    max-width: 150px;
    height: auto;
}

.logo-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

.welcome-text {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.welcome-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.welcome-text p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.features {
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.login-right {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.login-header {
    margin-bottom: 1.5rem;
}

.login-header h2 {
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 0.9rem 0.9rem 0.9rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    cursor: pointer;
}

.checkbox-wrapper label {
    color: #666;
    cursor: pointer;
    margin: 0;
}

.forgot-password {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.forgot-password:hover {
    color: #c62828;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.4);
}

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

.help-text {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

.help-text a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: 600;
}

.help-text a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
    border-left: 4px solid #c62828;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Tablet devices and small laptops */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .login-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        max-height: none;
        border-radius: 15px;
    }

    .login-left {
        padding: 2rem;
    }

    .welcome-text h2 {
        font-size: 1.5rem;
    }

    .login-right {
        padding: 2rem;
    }
}

/* Mobile devices */
@media (max-width: 480px) {
    html {
        overflow: auto;
    }

    body {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .login-container {
        margin: 0 auto;
        border-radius: 12px;
    }

    .login-left {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.8rem;
    }

    .logo-subtitle {
        font-size: 0.9rem;
    }

    .logo-section {
        margin-bottom: 1.2rem;
    }

    .welcome-text {
        margin-bottom: 1.2rem;
    }

    .welcome-text h2 {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }

    .welcome-text p {
        font-size: 0.9rem;
    }

    .feature-item {
        font-size: 0.85rem;
        gap: 0.75rem;
        margin-bottom: 0.7rem;
    }

    .feature-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .login-right {
        padding: 1.5rem;
    }

    .login-header {
        margin-bottom: 1.2rem;
    }

    .login-header h2 {
        font-size: 1.3rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.85rem 0.85rem 0.85rem 2.8rem;
        font-size: 0.95rem;
    }

    .input-icon {
        left: 0.9rem;
        font-size: 1.1rem;
    }

    .form-options {
        font-size: 0.8rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .btn-login {
        padding: 0.85rem;
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .help-text {
        font-size: 0.8rem;
    }

    .error-icon {
        font-size: 24px;
    }

    .display-error {
        padding: 0.6rem 0.8rem;
    }

    .bg-shape:nth-child(1) {
        width: 200px;
        height: 200px;
    }

    .bg-shape:nth-child(2) {
        width: 150px;
        height: 150px;
    }

    .bg-shape:nth-child(3) {
        width: 100px;
        height: 100px;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    body {
        padding: 0.5rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .login-left {
        padding: 1.2rem;
    }

    .login-right {
        padding: 1.2rem;
    }

    .logo {
        font-size: 1.6rem;
    }

    .welcome-text h2 {
        font-size: 1.2rem;
    }

    .login-header h2 {
        font-size: 1.2rem;
    }

    .form-control {
        padding: 0.8rem 0.8rem 0.8rem 2.6rem;
        font-size: 0.9rem;
    }

    .input-icon {
        left: 0.8rem;
        font-size: 1rem;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    html {
        overflow: auto;
    }

    body {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .login-container {
        grid-template-columns: 1fr 1fr;
        max-width: 100%;
        max-height: none;
        margin: 0 auto;
    }

    .login-left {
        padding: 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .logo-section {
        margin-bottom: 0.8rem;
    }

    .welcome-text {
        margin-bottom: 0.8rem;
    }

    .welcome-text h2 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .welcome-text p {
        font-size: 0.8rem;
    }

    .feature-item {
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .feature-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .login-right {
        padding: 1.5rem;
    }

    .login-header {
        margin-bottom: 0.8rem;
    }

    .login-header h2 {
        font-size: 1.2rem;
    }

    .login-header p {
        font-size: 0.8rem;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .form-control {
        padding: 0.7rem 0.7rem 0.7rem 2.5rem;
        font-size: 0.9rem;
    }

    .input-icon {
        left: 0.8rem;
        font-size: 1rem;
    }

    .form-options {
        margin-bottom: 0.8rem;
        font-size: 0.75rem;
    }

    .btn-login {
        padding: 0.7rem;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .help-text {
        font-size: 0.75rem;
    }
}
