/* Design System Tokens */
:root {
    --primary-color: #d35400; /* Laranja Padaria */
    --primary-hover: #b34700;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Base Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow: hidden;
}

/* Container Principal Split-Screen */
.login-pf-page {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Lado Esquerdo - Imagem e Branding */
.login-aside {
    flex: 1.2;
    position: relative;
    background: #2d3436 url('../img/background_new.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: flex-end;
    padding: 80px;
}

.login-aside::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.aside-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
}

.aside-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.aside-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.9;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Lado Direito - Formulário de Login */
.login-main {
    flex: 1;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.login-card-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card-header {
    margin-bottom: 40px;
    text-align: left;
}

#kc-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
}

#kc-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* Formulário e Inputs */
.form-group {
    margin-bottom: 24px;
}

.control-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    height: 54px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-family);
    background-color: var(--white);
    border: 2px solid #edf2f7;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    color: var(--text-main);
}

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

/* Botão de Login */
.btn-primary {
    width: 100%;
    height: 56px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.3);
}

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

/* Opções e Links */
.login-pf-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

#kc-form-options {
    margin-bottom: 24px;
}

.checkbox label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

a:hover {
    text-decoration: underline;
}

/* Alertas de Erro/Mensagem */
.alert {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.alert-error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-info {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #bee3f8;
}

/* Registro e Info */
#kc-registration {
    margin-top: 32px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #edf2f7;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-footer {
    margin-top: 40px;
    text-align: center;
}

.contact-link {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.contact-link:hover {
    opacity: 1;
    text-decoration: none !important;
    color: var(--primary-color) !important;
}

/* Responsividade */
@media (max-width: 1024px) {
    .login-aside {
        display: none;
    }
    .login-main {
        background-color: var(--bg-light);
    }
    .login-card-wrapper {
        background: var(--white);
        padding: 40px;
        border-radius: var(--radius);
        box-shadow: var(--shadow-strong);
    }
}

@media (max-width: 480px) {
    .login-main {
        padding: 20px;
    }
    .login-card-wrapper {
        padding: 30px 20px;
    }
    .aside-title {
        font-size: 2.5rem;
    }
}
