body.guest-layout {
    /* Cores */
    --guest-bg-page: #dde6ef;
    --guest-bg-card: #ffffff;
    --guest-color-text: #333333;
    --guest-color-text-muted: #666666;
    --guest-color-text-soft: #555555;
    --guest-color-heading: #1a1a1a;
    --guest-color-primary: #2764c0;
    --guest-color-primary-hover: #1e4f9e;
    --guest-color-primary-focus-ring: rgba(39, 100, 192, 0.1);
    --guest-color-border: #d0d5dd;
    --guest-color-border-light: #dddddd;
    --guest-color-link: var(--guest-color-primary);
    --guest-color-footer: #7b8794;
    --guest-color-disabled: #bfc5cd;
    --guest-color-secondary-btn: #6c757d;
    --guest-color-secondary-btn-hover: #545b62;
    --guest-color-google: #4285f4;
    --guest-color-google-hover: #357abd;
    --guest-color-google-text: #3c4043;
    --guest-color-google-border: #dadce0;
    --guest-color-google-bg-hover: #f7f8f8;
    --guest-color-divider-muted: #999999;
    --guest-color-divider-login: #aaaaaa;
    --guest-color-icon-muted: #999999;
    --guest-color-icon-muted-hover: #666666;

    /* Sombras */
    --guest-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --guest-shadow-login-card-top: 0 -10px 28px -8px rgba(15, 23, 42, 0.12);
    --guest-shadow-login-card-bottom: 0 8px 32px rgba(15, 23, 42, 0.06);
    --guest-shadow-carousel-line: 0 6px 14px rgba(15, 23, 42, 0.1);
    
    /* Tipografia & espaço */
    --guest-font-sans: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, sans-serif;
    --guest-radius-sm: 3px;
    --guest-radius-md: 8px;
    --guest-radius-lg: 12px;
    --guest-transition-fast: 0.2s ease;
    --guest-z-overlay: 0;
    --guest-z-content: 1;

    /* Carrossel de marcas (largura alinhada ao SVG Teletiquete viewBox 85) */
    --guest-brand-logo-width: 85px;

    /* Padrão de fundo */
    --guest-bg-pattern-url: url("../../images/bg-login.png");
    --guest-bg-pattern-opacity: 0.18;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--guest-bg-page);
}

body.guest-layout {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--guest-font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--guest-color-text);
    background: var(--guest-bg-page);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: var(--guest-bg-pattern-url);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.guest-layout::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-repeat: repeat;
    background-position: 0 0;
    background-attachment: fixed;
    opacity: var(--guest-bg-pattern-opacity);
    pointer-events: none;
    z-index: var(--guest-z-overlay);
}

body.guest-layout > * {
    position: relative;
    z-index: var(--guest-z-content);
}

body.guest-layout .container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    background: var(--guest-bg-card);
    border-radius: var(--guest-radius-lg);
    box-shadow: var(--guest-shadow-card);
}

body.guest-layout .container h1 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--guest-color-heading);
    text-align: center;
}

body.guest-layout .container .subtitle {
    margin: 0 0 25px;
    font-size: 0.875rem;
    color: var(--guest-color-text-muted);
    text-align: center;
}

body.guest-layout .container form {
    margin-bottom: 20px;
}

body.guest-layout label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--guest-color-text-soft);
}

body.guest-layout input[type="text"],
body.guest-layout input[type="email"],
body.guest-layout input[type="password"],
body.guest-layout input[type="number"],
body.guest-layout select,
body.guest-layout textarea {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--guest-color-border);
    border-radius: var(--guest-radius-md);
    transition: border-color var(--guest-transition-fast), box-shadow var(--guest-transition-fast);
}

body.guest-layout input:focus,
body.guest-layout select:focus,
body.guest-layout textarea:focus {
    outline: none;
    border-color: var(--guest-color-primary);
    box-shadow: 0 0 0 3px var(--guest-color-primary-focus-ring);
}

body.guest-layout button,
body.guest-layout .btn {
    display: inline-block;
    width: 100%;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
    text-align: center;
    text-decoration: none;
    background: var(--guest-color-primary);
    border: none;
    border-radius: var(--guest-radius-md);
    cursor: pointer;
    transition: background-color var(--guest-transition-fast);
}

body.guest-layout button:hover,
body.guest-layout .btn:hover {
    background: var(--guest-color-primary-hover);
}

body.guest-layout .btn-secondary {
    background: var(--guest-color-secondary-btn);
}

body.guest-layout .btn-secondary:hover {
    background: var(--guest-color-secondary-btn-hover);
}

body.guest-layout .btn-google {
    margin-bottom: 15px;
    background: var(--guest-color-google);
}

body.guest-layout .btn-google:hover {
    background: var(--guest-color-google-hover);
}

body.guest-layout a {
    color: var(--guest-color-link);
    text-decoration: none;
    transition: color var(--guest-transition-fast);
}

body.guest-layout a:hover {
    text-decoration: underline;
}

body.guest-layout .alert {
    margin-bottom: 20px;
    padding: 12px 15px;
    font-size: 0.875rem;
    border-radius: var(--guest-radius-md);
}

body.guest-layout .alert-danger {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

body.guest-layout .alert-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

body.guest-layout .alert-warning {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

body.guest-layout .alert-info {
    color: #0c5460;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

body.guest-layout .text-center {
    text-align: center;
}

body.guest-layout .text-muted {
    color: var(--guest-color-secondary-btn);
}

body.guest-layout .mt-2 {
    margin-top: 20px;
}

body.guest-layout .mb-2 {
    margin-bottom: 20px;
}

body.guest-layout .divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    font-size: 0.8125rem;
    color: var(--guest-color-divider-muted);
}

body.guest-layout .divider::before,
body.guest-layout .divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--guest-color-border-light);
}

body.guest-layout .divider::before {
    margin-right: 10px;
}

body.guest-layout .divider::after {
    margin-left: 10px;
}

body.guest-layout .checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

body.guest-layout .checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
}

body.guest-layout .checkbox-group label {
    margin: 0;
    font-weight: normal;
}

body.guest-layout .links {
    margin-top: 20px;
    font-size: 0.875rem;
    text-align: center;
}

body.guest-layout .links a {
    display: inline-block;
    margin: 0 10px;
}

body.guest-layout code {
    padding: 2px 6px;
    font-size: 0.8125rem;
    background: #f4f4f4;
    border-radius: var(--guest-radius-sm);
}

body.guest-layout .recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 15px 0;
}

body.guest-layout .recovery-codes code {
    display: block;
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid var(--guest-color-border-light);
}

/* —— Página login —— */
body.guest-layout.page-login {
    padding: 30px 20px;
    gap: 0;
}

body.guest-layout.page-login::before {
    opacity: 0.24;
    background-size: 380px auto;
}

body.guest-layout.page-login .container {
    max-width: 420px;
    margin-top: 4px;
    padding: 36px 40px;
    box-shadow: var(--guest-shadow-login-card-top), var(--guest-shadow-login-card-bottom);
}

body.guest-layout.page-login .container h1 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--guest-color-primary);
    text-align: left;
}

body.guest-layout.page-login .container .subtitle {
    margin-bottom: 24px;
    color: var(--guest-color-text-soft);
    text-align: left;
}

body.guest-layout.page-login .btn.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 11px 16px;
    font-weight: 500;
    color: var(--guest-color-google-text);
    background: var(--guest-bg-card);
    border: 1px solid var(--guest-color-google-border);
    transition: background-color var(--guest-transition-fast);
}

body.guest-layout.page-login .btn.btn-google:hover {
    text-decoration: none;
    background: var(--guest-color-google-bg-hover);
}

body.guest-layout.page-login .btn.btn-google svg {
    flex-shrink: 0;
}

body.guest-layout.page-login .divider {
    margin: 18px 0;
    font-size: 0.8125rem;
    color: var(--guest-color-divider-login);
}

body.guest-layout.page-login input[type="email"],
body.guest-layout.page-login input[type="password"],
body.guest-layout.page-login input[type="text"] {
    margin-bottom: 12px;
    padding: 13px 16px;
    background: var(--guest-bg-card);
}

body.guest-layout.page-login .password-wrapper {
    position: relative;
}

body.guest-layout.page-login .password-wrapper input {
    padding-right: 44px !important;
}

body.guest-layout.page-login .toggle-password {
    position: absolute;
    top: 13px;
    right: 12px;
    display: flex;
    align-items: center;
    width: auto !important;
    margin: 0;
    padding: 0 !important;
    color: var(--guest-color-icon-muted);
    cursor: pointer;
    background: none !important;
    border: none !important;
    transition: color var(--guest-transition-fast);
}

body.guest-layout.page-login .toggle-password:hover {
    color: var(--guest-color-icon-muted-hover);
    background: none !important;
}

body.guest-layout.page-login .forgot-link {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 0.8125rem;
    color: var(--guest-color-primary);
    text-decoration: none;
}

body.guest-layout.page-login .forgot-link:hover {
    text-decoration: underline;
}

body.guest-layout.page-login button[type="submit"] {
    padding: 13px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color var(--guest-transition-fast), opacity var(--guest-transition-fast);
}

body.guest-layout.page-login button[type="submit"]:disabled {
    cursor: not-allowed;
    background: var(--guest-color-disabled);
}

body.guest-layout.page-login button[type="submit"]:not(:disabled):hover {
    background: var(--guest-color-primary-hover);
}

body.guest-layout.page-login .brand-carousel {
    position: relative;
    z-index: var(--guest-z-content);
    width: 100%;
    max-width: 600px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
}

body.guest-layout.page-login .brand-carousel::after {
    content: "";
    position: absolute;
    right: 8%;
    bottom: 0;
    left: 8%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(15, 23, 42, 0.12) 20%,
        rgba(15, 23, 42, 0.12) 80%,
        transparent
    );
    box-shadow: var(--guest-shadow-carousel-line);
}

body.guest-layout.page-login .brand-carousel-track {
    display: inline-flex;
    align-items: center;
    animation: guest-brand-scroll 18s linear infinite;
}

body.guest-layout.page-login .brand-item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
}

body.guest-layout.page-login .brand-item svg {
    display: block;
    width: var(--guest-brand-logo-width);
    max-width: var(--guest-brand-logo-width);
    height: auto;
    flex-shrink: 0;
    opacity: 0.7;
}

@keyframes guest-brand-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

body.guest-layout.page-login .login-footer {
    position: relative;
    z-index: var(--guest-z-content);
    margin-top: 28px;
    font-size: 0.75rem;
    color: var(--guest-color-footer);
    text-align: center;
}

body.guest-layout.page-login .login-footer strong {
    font-weight: 600;
    color: var(--guest-color-text-soft);
}

body.guest-layout.page-login .container form {
    margin-bottom: 0;
}

body.guest-layout.page-login .form-group {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    body.guest-layout.page-login .container {
        padding: 28px 24px;
    }

    body.guest-layout.page-login .brand-carousel {
        max-width: 100%;
    }

    body.guest-layout.page-login .brand-item {
        padding: 0 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.guest-layout.page-login .brand-carousel-track {
        animation: none;
    }
}
