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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.left-panel {
    flex: 1;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.title-wrapper {
    max-width: 600px;
}

.system-title {
    color: white;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 2px;
    text-align: left;
    text-transform: uppercase;
}

.right-panel {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-container {
    background: white;
    padding: 50px 60px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
}

.emblem-wrapper {
    text-align: center;
    margin-bottom: 32px;
}

.brand-logo {
    display: block;
    margin: 0 auto;
    height: auto;
    max-height: 130px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
}

.login-form {
    width: 100%;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    font-size: 16px;
    transition: color 0.3s ease;
    user-select: none;
}

.toggle-password:hover {
    color: #2a5298;
}

.form-input:focus {
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.form-input.input-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-input.input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    display: none;
    align-items: center;
    gap: 6px;
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    animation: slideDown 0.3s ease;
}

.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
}

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

.btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-primary {
    background: #2a5298;
    color: white;
    margin-bottom: 16px;
}

.btn-primary:hover {
    background: #1e3c72;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

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

.btn-secondary {
    background: white;
    color: #2a5298;
    border: 2px solid #2a5298;
}

.btn-secondary:hover {
    background: #f0f4f8;
    transform: translateY(-1px);
}

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

@media (max-width: 968px) {
    .container {
        flex-direction: column;
    }

    .left-panel {
        flex: 0 0 auto;
        padding: 30px 20px;
    }

    .system-title {
        font-size: 28px;
        text-align: center;
    }

    .right-panel {
        flex: 1;
    }

    .login-container {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }

    .brand-logo {
        max-height: 100px;
        max-width: 100px;
    }

    .system-title {
        font-size: 22px;
    }
}

.flash-error {
    background: rgba(200, 60, 60, 0.15);
    color: #c0392b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.flash-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(39, 174, 96, 0.12);
    color: #1e8449;
    border: 1px solid rgba(39, 174, 96, 0.35);
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.flash-success .fa-check-circle {
    margin-top: 2px;
    flex-shrink: 0;
    color: #27ae60;
}

.btn-create-token {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}
