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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-card {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
    max-height: calc(100vh - 60px);
}

.brand-panel {
    flex: 0.95;
    background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    color: rgba(255, 255, 255, 0.95);
    padding: 32px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0.7;
}

.brand-panel > * {
    position: relative;
    z-index: 1;
}

.brand-logo {
    max-width: 200px;
}

.logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(15, 23, 42, 0.35));
}

.system-name {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.brand-tagline {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

.brand-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.highlight {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.highlight-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.highlight-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.brand-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
}

.brand-points li::before {
    content: '•';
    margin-right: 8px;
    color: #a5f3fc;
}

.form-panel {
    flex: 1.1;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.form-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.environment-chip {
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.12);
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.form-subtitle {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.7);
}

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.9);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 2px solid rgba(226, 232, 240, 1);
    border-radius: 10px;
    color: #0f172a;
    font-size: 13px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #06b6d4;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.form-group input::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

.password-input-wrapper {
    position: relative;
}

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

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(15, 23, 42, 0.6);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #06b6d4;
}

.form-options {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 16px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.8);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(226, 232, 240, 1);
    border-radius: 4px;
    margin-right: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #06b6d4;
    border-color: #06b6d4;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.forgot-password {
    color: #06b6d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.login-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.25);
}

.login-button:hover {
    transform: translateY(-2px);
}

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

.error-message {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(254, 226, 226, 0.8);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #dc2626;
    font-size: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

.support-links {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(15, 23, 42, 0.6);
}

.support-links a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.support-links a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(15, 23, 42, 0.6);
    font-size: 11px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    .login-card {
        flex-direction: column;
        max-height: calc(100vh - 40px);
    }

    .brand-panel,
    .form-panel {
        padding: 24px 20px;
    }

    .brand-highlights {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 8px;
    }

    .support-links {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .form-title {
        font-size: 20px;
    }

    .brand-panel,
    .form-panel {
        padding: 20px 16px;
    }

    .support-links {
        font-size: 10px;
    }
}

/* Loading animation */
.login-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-button.loading span {
    display: none;
}

.login-button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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